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 "MFEMFunctorMaterial.h" 13 : #include "MFEMProblem.h" 14 : 15 : InputParameters 16 4902 : MFEMFunctorMaterial::validParams() 17 : { 18 4902 : InputParameters params = MFEMObject::validParams(); 19 4902 : params += MFEMBlockRestrictable::validParams(); 20 4902 : params += MFEMBoundaryRestrictable::validParams(); 21 : 22 9804 : params.addClassDescription( 23 : "Base class for declaration of material properties to add to MFEM problems."); 24 9804 : params.registerBase("FunctorMaterial"); 25 4902 : params.registerSystemAttributeName("FunctorMaterial"); 26 9804 : params.addPrivateParam<bool>("_neighbor", false); 27 9804 : params.addPrivateParam<bool>("_interface", false); 28 4902 : return params; 29 0 : } 30 : 31 327 : MFEMFunctorMaterial::MFEMFunctorMaterial(const InputParameters & parameters) 32 : : MFEMObject(parameters), 33 327 : MFEMBlockRestrictable(parameters, getMFEMProblem().mesh().getMFEMParMesh()), 34 327 : MFEMBoundaryRestrictable(parameters, getMFEMProblem().mesh().getMFEMParMesh()), 35 981 : _properties(getMFEMProblem().getCoefficients()) 36 : { 37 327 : if (isSubdomainRestricted() && isBoundaryRestricted()) 38 0 : paramError("boundary", "Cannot specify both block and boundary parameters"); 39 327 : } 40 : 41 325 : MFEMFunctorMaterial::~MFEMFunctorMaterial() {} 42 : 43 : #endif