Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #ifdef MOOSE_MFEM_ENABLED 11 : 12 : #include "MFEMMixedBilinearFormKernel.h" 13 : 14 : InputParameters 15 25936 : MFEMMixedBilinearFormKernel::validParams() 16 : { 17 25936 : InputParameters params = MFEMKernel::validParams(); 18 51872 : params.addClassDescription( 19 : "Base class for mixed bilinear form kernels, allowing different trial and test variables."); 20 103744 : params.addParam<VariableName>( 21 : "trial_variable", 22 : "The trial variable this kernel is acting on and which will be solved for. If empty " 23 : "(default), it will be the same as the test variable."); 24 51872 : params.addParam<bool>( 25 51872 : "transpose", false, "If true, adds the transpose of the integrator to the system instead."); 26 25936 : return params; 27 0 : } 28 : 29 23 : MFEMMixedBilinearFormKernel::MFEMMixedBilinearFormKernel(const InputParameters & parameters) 30 : : MFEMKernel(parameters), 31 67 : _trial_var_name(isParamValid("trial_variable") ? getParam<VariableName>("trial_variable") 32 : : _test_var_name), 33 69 : _transpose(getParam<bool>("transpose")) 34 : { 35 23 : } 36 : 37 : const VariableName & 38 43 : MFEMMixedBilinearFormKernel::getTrialVariableName() const 39 : { 40 43 : return _trial_var_name; 41 : } 42 : 43 : mfem::BilinearFormIntegrator * 44 23 : MFEMMixedBilinearFormKernel::createBFIntegrator() 45 : { 46 23 : return _transpose ? new mfem::TransposeIntegrator(createMBFIntegrator()) : createMBFIntegrator(); 47 : } 48 : #endif