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

Referenced by MFEMProblem::addFunction().

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

◆ registerMooseObject()

registerMooseObject ( "MooseApp"  ,
MFEMProblem   
)

◆ vectorFunctionDim()

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

Definition at line 257 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().

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

Referenced by MFEMProblem::addFunction().

◆ VECTOR_FUNCS

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

Definition at line 322 of file MFEMProblem.C.

Referenced by MFEMProblem::addFunction().