35 libMesh::UniquePtr<FEVariablesBase> func;
51 std::vector<std::string> var_names;
65 std::string fe_family;
90 libmesh_error_msg(
"ERROR: must call set_var_names() before building FEVariablesBase!");
93 libmesh_error_msg(
"ERROR: must call set_var_indices() before building FEVariablesBase!");
96 libmesh_error_msg(
"ERROR: must call set_subdomain_ids() before building FEVariablesBase!");
110 libmesh_error_msg(
"ERROR: Must call set_getpot() before calling VariableFactoryAbstract::build_var_names!");
113 libmesh_error_msg(
"ERROR: Must call set_var_section() before calling VariableFactoryAbstract::build_var_names!");
124 std::map<std::string, FactoryAbstract<FEVariablesBase>*>&
127 static std::map<std::string, FactoryAbstract<FEVariablesBase>*> _map;
134 const std::vector<std::string>* VariableFactoryAbstract::_var_names = NULL;
135 const std::vector<VariableIndex>* VariableFactoryAbstract::_var_indices = NULL;
136 std::string VariableFactoryAbstract::_var_section = std::string(
"DIE!");
137 const std::set<libMesh::subdomain_id_type>* VariableFactoryAbstract::_subdomain_ids = NULL;
static std::string _var_section
Section of input to parse variable names in build_var_names.
virtual libMesh::UniquePtr< FEVariablesBase > build_fe_var(const std::vector< std::string > &var_names, const std::vector< VariableIndex > &var_indices, const std::set< libMesh::subdomain_id_type > &subdomain_ids)=0
Subclasses implement construction of the FEVariablesBase object using the var_names and var_indices...
virtual void check_create_state() const
Helper function to check required data is set when calling create()
static void check_build_parse_state()
Helper function to check required data is set when calling build_* or parse_* methods.
virtual std::vector< std::string > parse_var_names(const GetPot &input, const std::string &var_section)=0
virtual void reset_create_state()
Helper function to reset data before next call to create()
static std::map< std::string, FactoryAbstract< Base > * > & factory_map()
virtual libMesh::UniquePtr< FEVariablesBase > create()
Subclasses implement the actual construction of the Base object in create().
static const std::vector< std::string > * _var_names
Variable component names needed for FEVariableBase construction.
static void reset_build_parse_state()
Helper function to check required data is set when calling build_* or parse_* methods.
static std::vector< std::string > build_var_names(const std::string &name)
Build the variable names for the FEVariablesBase type (name), returned in the std::vector.
virtual std::string parse_fe_family_impl(const GetPot &input, const std::string &var_section)=0
static const GetPot * _input
We store only a raw pointer here because we can't make a copy.
static std::string parse_fe_family(const std::string &name)
static const std::set< libMesh::subdomain_id_type > * _subdomain_ids
Subdomain ids for the variable.
virtual std::string parse_fe_order_impl(const GetPot &input, const std::string &var_section)=0
static const std::vector< VariableIndex > * _var_indices
Variable component indices needed for FEVariableBase construction.
static std::string parse_fe_order(const std::string &name)
Abstract factory that provides availability of GetPot.