GRINS-0.8.0
List of all members | Public Member Functions | Protected Member Functions
GRINS::ParsedFunctionNeumannBCFactory< FunctionType > Class Template Reference

#include <parsed_function_neumann_bc_factory.h>

Inheritance diagram for GRINS::ParsedFunctionNeumannBCFactory< FunctionType >:
Inheritance graph
[legend]
Collaboration diagram for GRINS::ParsedFunctionNeumannBCFactory< FunctionType >:
Collaboration graph
[legend]

Public Member Functions

 ParsedFunctionNeumannBCFactory (const std::string &bc_type_name)
 
 ~ParsedFunctionNeumannBCFactory ()
 
- Public Member Functions inherited from GRINS::NeumannBCFactoryAbstract
 NeumannBCFactoryAbstract (const std::string &bc_type_name)
 
 ~NeumannBCFactoryAbstract ()
 
virtual libMesh::UniquePtr< NeumannBCContainercreate ()
 Creates NeumannBCContainer for this Factory object. More...
 
- Public Member Functions inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
 BCFactoryAbstract (const std::string &bc_type_name)
 
 ~BCFactoryAbstract ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPot< NeumannBCContainer >
 FactoryWithGetPot (const std::string &name)
 
 ~FactoryWithGetPot ()
 
- Public Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
virtual ~FactoryAbstract ()
 
- Public Member Functions inherited from GRINS::ParsedFunctionNeumannBCFactoryHelper< FunctionType >
 ParsedFunctionNeumannBCFactoryHelper ()
 
 ~ParsedFunctionNeumannBCFactoryHelper ()
 

Protected Member Functions

virtual SharedPtr< NeumannBCAbstractbuild_neumann_func (const GetPot &input, MultiphysicsSystem &system, const FEVariablesBase &fe_var, const std::string &section)
 Builds the NeumannBCAbstract object for Neumann boundary conditions. More...
 
virtual std::string flux_input (const std::string &section) const
 
- Protected Member Functions inherited from GRINS::NeumannBCFactoryAbstract
void check_for_flux (const GetPot &input, const std::string &section, const std::vector< std::string > &var_names)
 Checks that the flux variable has been set. More...
 
- Protected Member Functions inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
void check_for_multiple_expressions (const GetPot &input, const std::string &section, const std::string &var_name) const
 Ensure that there is only one expression for the [Section/var_name] variable. More...
 
void build_var_indices (const MultiphysicsSystem &system, const std::vector< std::string > &var_names, std::vector< VariableIndex > &var_indices) const
 
virtual void check_state () const
 Helper function to reduce code duplication. More...
 
virtual void reset_state ()
 Helper function to redue code duplication. More...
 
- Protected Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
 FactoryAbstract (const std::string &name)
 Constructor is protected. Use the build() method to construct Base objects. More...
 
- Protected Member Functions inherited from GRINS::ParsedFunctionNeumannBCFactoryHelper< FunctionType >
SharedPtr< NeumannBCAbstractbuild_neumman_func_common (const GetPot &input, MultiphysicsSystem &system, const FEVariablesBase &fe_var, const std::string &flux_input)
 Helper function containing common code. More...
 
SharedPtr< NeumannBCAbstractbuild_parsed_neumann_func (MultiphysicsSystem &system, const std::string &expression, VariableIndex var_idx)
 Helper function that builds the right BC object depending on the FunctionType. More...
 
SharedPtr< NeumannBCAbstractbuild_composite_parsed_neumann_func (MultiphysicsSystem &system, const std::vector< std::string > &expressions, const std::vector< VariableIndex > &var_indices)
 Helper function that builds the right CompositeBC object depending on the FunctionType. More...
 
template<>
SharedPtr< NeumannBCAbstractbuild_parsed_neumann_func (MultiphysicsSystem &, const std::string &expression, VariableIndex var_idx)
 
template<>
SharedPtr< NeumannBCAbstractbuild_parsed_neumann_func (MultiphysicsSystem &system, const std::string &expression, VariableIndex var_idx)
 
template<>
SharedPtr< NeumannBCAbstractbuild_composite_parsed_neumann_func (MultiphysicsSystem &, const std::vector< std::string > &expressions, const std::vector< VariableIndex > &var_indices)
 
template<>
SharedPtr< NeumannBCAbstractbuild_composite_parsed_neumann_func (MultiphysicsSystem &system, const std::vector< std::string > &expressions, const std::vector< VariableIndex > &var_indices)
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
static void set_system (MultiphysicsSystem &system)
 
static void set_bc_ids (const std::set< BoundaryID > &bc_ids)
 Boundary id for the current boundary condition section. More...
 
static void set_fe_var (const FEVariablesBase &fe_var)
 Active variable for the current boundary condition. More...
 
static void set_section (const std::string &section)
 Sets the current section of the input file. More...
 
static bool have_bc_type (const std::string &bc_type)
 
- Static Public Member Functions inherited from GRINS::FactoryWithGetPot< NeumannBCContainer >
static void set_getpot (const GetPot &input)
 
- Static Public Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
static libMesh::UniquePtr< NeumannBCContainerbuild (const std::string &name)
 Use this method to build objects of type Base. More...
 
- Static Protected Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
static FactoryAbstract< NeumannBCContainer > & 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< NeumannBCContainer > * > & factory_map ()
 
- Protected Attributes inherited from GRINS::NeumannBCFactoryAbstract
bool _is_homogeneous
 Track if this is a homogeneous Neumann boundary condition. More...
 
- Static Protected Attributes inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
static MultiphysicsSystem_system
 We store only a raw pointer here because we can't make a copy. More...
 
static const std::set< BoundaryID > * _bc_ids
 BoundaryID for constructing a particular boundary condition. More...
 
static const FEVariablesBase_fe_var
 The FEVariablesBase class associated with the boundary condition being built. More...
 
static std::string _section
 
- Static Protected Attributes inherited from GRINS::FactoryWithGetPot< NeumannBCContainer >
static const GetPot * _input
 We store only a raw pointer here because we can't make a copy. More...
 

Detailed Description

template<typename FunctionType>
class GRINS::ParsedFunctionNeumannBCFactory< FunctionType >

Definition at line 36 of file parsed_function_neumann_bc_factory.h.

Constructor & Destructor Documentation

template<typename FunctionType>
GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::ParsedFunctionNeumannBCFactory ( const std::string &  bc_type_name)
inline

Definition at line 41 of file parsed_function_neumann_bc_factory.h.

42  : NeumannBCFactoryAbstract(bc_type_name),
43  ParsedFunctionNeumannBCFactoryHelper<FunctionType>()
44  {}
NeumannBCFactoryAbstract(const std::string &bc_type_name)
template<typename FunctionType>
GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::~ParsedFunctionNeumannBCFactory ( )
inline

Definition at line 46 of file parsed_function_neumann_bc_factory.h.

46 {};

Member Function Documentation

template<typename FunctionType>
virtual SharedPtr<NeumannBCAbstract> GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::build_neumann_func ( const GetPot &  input,
MultiphysicsSystem system,
const FEVariablesBase fe_var,
const std::string &  section 
)
inlineprotectedvirtual

Builds the NeumannBCAbstract object for Neumann boundary conditions.

Subclasses should override this function to build the NeumannBCAbstract object that corresponds to the variables passed in var_names. The FEVariableBase object corresponds to the variable associated with this boundary condition, e.g. Velocity. The section arguments corresponds to the section to parse for the flux in the input file, e.g. input(section+"/"+flux). Note that for Variables with more than one component, the flux input should be a vector the size of the var_names object, even if one of the components is zero.

Implements GRINS::NeumannBCFactoryAbstract.

Definition at line 51 of file parsed_function_neumann_bc_factory.h.

References GRINS::FEVariablesBase::active_var_names(), GRINS::ParsedFunctionNeumannBCFactoryHelper< FunctionType >::build_neumman_func_common(), GRINS::NeumannBCFactoryAbstract::check_for_flux(), and GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::flux_input().

55  {
56  std::string flux_input = this->flux_input(section);
57 
58  // Make sure flux input specified and consistent with var_names size
59  this->check_for_flux(input,flux_input,fe_var.active_var_names());
60 
61  return this->build_neumman_func_common( input, system, fe_var, flux_input );
62  }
void check_for_flux(const GetPot &input, const std::string &section, const std::vector< std::string > &var_names)
Checks that the flux variable has been set.
SharedPtr< NeumannBCAbstract > build_neumman_func_common(const GetPot &input, MultiphysicsSystem &system, const FEVariablesBase &fe_var, const std::string &flux_input)
Helper function containing common code.
virtual std::string flux_input(const std::string &section) const
template<typename FunctionType>
virtual std::string GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::flux_input ( const std::string &  section) const
inlineprotectedvirtual

Reimplemented in GRINS::ParsedTractionBCFactory< FunctionType >.

Definition at line 64 of file parsed_function_neumann_bc_factory.h.

References GRINS::BoundaryConditionNames::bc_flux_var().

Referenced by GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::build_neumann_func().

65  { return section+"/"+BoundaryConditionNames::bc_flux_var(); }
static std::string bc_flux_var()
"Standard" input variable for Neumann flux in input file

The documentation for this class was generated from the following file:

Generated on Tue Dec 19 2017 12:47:31 for GRINS-0.8.0 by  doxygen 1.8.9.1