25 #ifndef GRINS_NEUMANN_BC_PARSED_H
26 #define GRINS_NEUMANN_BC_PARSED_H
33 #include "libmesh/parsed_function.h"
34 #include "libmesh/composite_function.h"
35 #include "libmesh/parsed_fem_function.h"
36 #include "libmesh/composite_fem_function.h"
40 template<
typename FEShape>
54 template<
typename FEShape>
59 const std::vector<VariableIndex>& vars )
62 libmesh_assert_equal_to( expressions.size(), vars.size() );
64 libMesh::UniquePtr<libMesh::CompositeFunction<FEShape> >
67 for(
unsigned int i = 0; i < vars.size(); i++ )
70 std::vector<unsigned int> index(1,vars[i]);
71 composite_func->attach_subfunction(parsed_func, index);
74 this->
_func.reset(composite_func.release());
80 template<
typename FEShape>
95 template<
typename FEShape>
100 const std::vector<VariableIndex>& vars,
104 libmesh_assert_equal_to( expressions.size(), vars.size() );
106 libMesh::UniquePtr<libMesh::CompositeFEMFunction<FEShape> >
107 composite_func(
new libMesh::CompositeFEMFunction<FEShape> );
109 for(
unsigned int i = 0; i < vars.size(); i++ )
112 std::vector<unsigned int> index(1,vars[i]);
113 composite_func->attach_subfunction(parsed_func, index);
116 this->
_func.reset(composite_func.release());
123 #endif // GRINS_NEUMANN_BC_PARSED_H
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
virtual ~ParsedNeumannBC()
CompositeParsedFEMNeumannBC(const std::vector< std::string > &expressions, const std::vector< VariableIndex > &vars, const MultiphysicsSystem &system)
ParsedFEMNeumannBC(const std::string &expression, const MultiphysicsSystem &system, VariableIndex var)
virtual ~CompositeParsedFEMNeumannBC()
CompositeParsedNeumannBC(const std::vector< std::string > &expressions, const std::vector< VariableIndex > &vars)
virtual ~ParsedFEMNeumannBC()
ParsedNeumannBC(const std::string &expression, VariableIndex var)
Interface with libMesh for solving Multiphysics problems.
virtual ~CompositeParsedNeumannBC()
libMesh::UniquePtr< libMesh::FunctionBase< FEShape > > _func
Function object for the actual Neumann flux.