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 252 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

253 {
254  return libMesh::Point(
255  vec.Elem(0), vec.Size() > 1 ? vec.Elem(1) : 0., vec.Size() > 2 ? vec.Elem(2) : 0.);
256 }

◆ registerMooseObject()

registerMooseObject ( "MooseApp"  ,
MFEMProblem   
)

◆ vectorFunctionDim()

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

Definition at line 259 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

260 {
261  if (type == "LevelSetOlssonVortex")
262  {
263  return 2;
264  }
265  else if (type == "ParsedVectorFunction")
266  {
267  if (parameters.isParamSetByUser("expression_z") || parameters.isParamSetByUser("value_z"))
268  {
269  return 3;
270  }
271  else if (parameters.isParamSetByUser("expression_y") || parameters.isParamSetByUser("value_y"))
272  {
273  return 2;
274  }
275  else
276  {
277  return 1;
278  }
279  }
280  else
281  {
282  return 3;
283  }
284 }
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 286 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

◆ VECTOR_FUNCS

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

Definition at line 324 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().