GRINS-0.8.0
|
Factory to build FEVariablesBase classes that use species names as variables. More...
#include <variable_factory.h>
Public Member Functions | |
SpeciesVariableFactory (const std::string &name) | |
~SpeciesVariableFactory () | |
Public Member Functions inherited from GRINS::VariableFactoryBase | |
VariableFactoryBase (const std::string &name) | |
~VariableFactoryBase () | |
Public Member Functions inherited from GRINS::VariableFactoryAbstract | |
VariableFactoryAbstract (const std::string &name) | |
~VariableFactoryAbstract () | |
virtual libMesh::UniquePtr< FEVariablesBase > | create () |
Subclasses implement the actual construction of the Base object in create(). More... | |
Public Member Functions inherited from GRINS::FactoryWithGetPot< FEVariablesBase > | |
FactoryWithGetPot (const std::string &name) | |
~FactoryWithGetPot () | |
Public Member Functions inherited from GRINS::FactoryAbstract< FEVariablesBase > | |
virtual | ~FactoryAbstract () |
Protected Member Functions | |
virtual std::vector< std::string > | parse_var_names (const GetPot &input, const std::string &var_section) |
Implementation species variable name parsing. More... | |
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) |
Subclasses implement construction of the FEVariablesBase object using the var_names and var_indices. More... | |
Protected Member Functions inherited from GRINS::VariableFactoryBase | |
virtual std::string | parse_fe_family_impl (const GetPot &input, const std::string &var_section) |
virtual std::string | parse_fe_order_impl (const GetPot &input, const std::string &var_section) |
Protected Member Functions inherited from GRINS::VariableFactoryAbstract | |
virtual void | check_create_state () const |
Helper function to check required data is set when calling create() More... | |
virtual void | reset_create_state () |
Helper function to reset data before next call to create() More... | |
std::string | parse_var_option (const GetPot &input, const std::string &var_section, const std::string &option, const std::string &default_val) const |
Protected Member Functions inherited from GRINS::FactoryAbstract< FEVariablesBase > | |
FactoryAbstract (const std::string &name) | |
Constructor is protected. Use the build() method to construct Base objects. More... | |
Protected Attributes | |
std::string | _prefix |
std::string | _material |
Additional Inherited Members | |
Static Public Member Functions inherited from GRINS::VariableFactoryAbstract | |
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. More... | |
static std::string | parse_fe_family (const std::string &name) |
static std::string | parse_fe_order (const std::string &name) |
static void | set_var_names (const std::vector< std::string > &var_names) |
Set the variable names before calling create() More... | |
static void | set_var_indices (const std::vector< VariableIndex > &var_indices) |
Set the variable indices before calling create() More... | |
static void | set_var_section (const std::string &var_section) |
Set the section for the input file before calling build_var_names() More... | |
static void | set_subdomain_ids (const std::set< libMesh::subdomain_id_type > &subdomain_ids) |
Static Public Member Functions inherited from GRINS::FactoryWithGetPot< FEVariablesBase > | |
static void | set_getpot (const GetPot &input) |
Static Public Member Functions inherited from GRINS::FactoryAbstract< FEVariablesBase > | |
static libMesh::UniquePtr< FEVariablesBase > | build (const std::string &name) |
Use this method to build objects of type Base. More... | |
Static Protected Member Functions inherited from GRINS::VariableFactoryAbstract | |
static void | check_build_parse_state () |
Helper function to check required data is set when calling build_* or parse_* methods. More... | |
static void | reset_build_parse_state () |
Helper function to check required data is set when calling build_* or parse_* methods. More... | |
Static Protected Member Functions inherited from GRINS::FactoryAbstract< FEVariablesBase > | |
static FactoryAbstract< FEVariablesBase > & | get_factory (const std::string &name) |
Helper method that looks up the factory and returns it if present, or error if it's not. More... | |
static DerivedType & | get_factory_subclass (const std::string &name) |
Like get_factory, but will downcast to DerivedType. More... | |
static std::map< std::string, FactoryAbstract< FEVariablesBase > * > & | factory_map () |
Static Protected Attributes inherited from GRINS::VariableFactoryAbstract | |
static const std::vector< std::string > * | _var_names = NULL |
Variable component names needed for FEVariableBase construction. More... | |
static const std::vector< VariableIndex > * | _var_indices = NULL |
Variable component indices needed for FEVariableBase construction. More... | |
static std::string | _var_section = std::string("DIE!") |
Section of input to parse variable names in build_var_names. More... | |
static const std::set< libMesh::subdomain_id_type > * | _subdomain_ids = NULL |
Subdomain ids for the variable. More... | |
Static Protected Attributes inherited from GRINS::FactoryWithGetPot< FEVariablesBase > | |
static const GetPot * | _input |
We store only a raw pointer here because we can't make a copy. More... | |
Factory to build FEVariablesBase classes that use species names as variables.
Thus, we need a special way to parse the input to figure out what all the species names are.
Definition at line 223 of file variable_factory.h.
|
inline |
Definition at line 227 of file variable_factory.h.
|
inline |
Definition at line 231 of file variable_factory.h.
|
inlineprotectedvirtual |
Subclasses implement construction of the FEVariablesBase object using the var_names and var_indices.
This function will be called from within create(), which called from VariableFactoryAbstract::build. Note the var_names can be built a priori using the VariableFactoryAbstract::build_var_names() method.
Implements GRINS::VariableFactoryAbstract.
Definition at line 242 of file variable_factory.h.
References GRINS::SpeciesVariableFactory< VariableType >::_material, and GRINS::SpeciesVariableFactory< VariableType >::_prefix.
|
inlineprotectedvirtual |
Implementation species variable name parsing.
First, we look for the [Variables/<VariableType>/prefix], which is the prefix for all the species variable component names. The, we need to look up the material to figure out where to grab the species from. With the material name, then we look up the species names and accordingly build up the variable names.
Implements GRINS::VariableFactoryAbstract.
Definition at line 276 of file variable_factory.h.
References GRINS::MaterialsParsing::parse_species_varnames().
|
protected |
Definition at line 249 of file variable_factory.h.
Referenced by GRINS::SpeciesVariableFactory< VariableType >::build_fe_var().
|
protected |
Definition at line 247 of file variable_factory.h.
Referenced by GRINS::SpeciesVariableFactory< VariableType >::build_fe_var().