https://mooseframework.inl.gov
Functions | Variables
MFEMProblem.C File Reference

Go to the source code of this file.

Functions

 registerMooseObject ("MooseApp", MFEMProblem)
 
libMesh::Point pointFromMFEMVector (const mfem::Vector &vec)
 
int vectorFunctionDim (const std::string &type, const InputParameters &parameters)
 

Variables

const std::vector< std::string > SCALAR_FUNCS
 
const std::vector< std::string > VECTOR_FUNCS = {"ParsedVectorFunction", "LevelSetOlssonVortex"}
 

Function Documentation

◆ pointFromMFEMVector()

libMesh::Point pointFromMFEMVector ( const mfem::Vector &  vec)

Definition at line 265 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

266 {
267  return libMesh::Point(
268  vec.Elem(0), vec.Size() > 1 ? vec.Elem(1) : 0., vec.Size() > 2 ? vec.Elem(2) : 0.);
269 }

◆ registerMooseObject()

registerMooseObject ( "MooseApp"  ,
MFEMProblem   
)

◆ vectorFunctionDim()

int vectorFunctionDim ( const std::string &  type,
const InputParameters parameters 
)

Definition at line 272 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

273 {
274  if (type == "LevelSetOlssonVortex")
275  {
276  return 2;
277  }
278  else if (type == "ParsedVectorFunction")
279  {
280  if (parameters.isParamSetByUser("expression_z") || parameters.isParamSetByUser("value_z"))
281  {
282  return 3;
283  }
284  else if (parameters.isParamSetByUser("expression_y") || parameters.isParamSetByUser("value_y"))
285  {
286  return 2;
287  }
288  else
289  {
290  return 1;
291  }
292  }
293  else
294  {
295  return 3;
296  }
297 }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.

Variable Documentation

◆ SCALAR_FUNCS

const std::vector<std::string> SCALAR_FUNCS

Definition at line 299 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

◆ VECTOR_FUNCS

const std::vector<std::string> VECTOR_FUNCS = {"ParsedVectorFunction", "LevelSetOlssonVortex"}

Definition at line 337 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().