GRINS-0.7.0
List of all members | Public Member Functions | Protected Member Functions
GRINSTesting::SATurbUBCFactory Class Reference
Inheritance diagram for GRINSTesting::SATurbUBCFactory:
Inheritance graph
[legend]
Collaboration diagram for GRINSTesting::SATurbUBCFactory:
Collaboration graph
[legend]

Public Member Functions

 SATurbUBCFactory (const std::string &bc_type_name)
 
- Public Member Functions inherited from GRINSTesting::SATurbBCFactoryBase
 SATurbBCFactoryBase (const std::string &bc_type_name)
 
- Public Member Functions inherited from GRINS::DirichletBCFactoryFunctionBase< libMesh::FunctionBase< libMesh::Number > >
 DirichletBCFactoryFunctionBase (const std::string &bc_type_name)
 
 ~DirichletBCFactoryFunctionBase ()
 
- Public Member Functions inherited from GRINS::DirichletBCFactoryAbstract
 DirichletBCFactoryAbstract (const std::string &bc_type_name)
 
 ~DirichletBCFactoryAbstract ()
 
- Public Member Functions inherited from GRINS::BCFactoryAbstract< libMesh::DirichletBoundary >
 BCFactoryAbstract (const std::string &bc_type_name)
 
 ~BCFactoryAbstract ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPot< libMesh::DirichletBoundary >
 FactoryWithGetPot (const std::string &name)
 
 ~FactoryWithGetPot ()
 

Protected Member Functions

virtual libMesh::UniquePtr< libMesh::FunctionBase< libMesh::Number > > build_func (const GetPot &, GRINS::MultiphysicsSystem &system, std::vector< std::string > &var_names, const std::string &)
 Builds the FunctionBase object for boundary condition. More...
 
- Protected Member Functions inherited from GRINS::DirichletBCFactoryFunctionBase< libMesh::FunctionBase< libMesh::Number > >
libMesh::UniquePtr< libMesh::DirichletBoundary > make_dirichlet_boundary (const std::set< BoundaryID > &bc_ids, const libMesh::System &system, libMesh::UniquePtr< libMesh::FunctionBase< libMesh::Number > > &func, const std::vector< VariableIndex > &var_indices)
 Dispatch, based on FunctionType, to the correct DirchletBoundary construction. More...
 
virtual const std::vector< std::string > & get_var_names () const
 Helper function that can be overridded in subclasses. More...
 
- Protected Member Functions inherited from GRINS::DirichletBCFactoryAbstract
void check_for_vars (const GetPot &input, const std::string &section, const std::vector< std::string > &var_names, std::set< std::string > *vars_found=NULL)
 Helper function. More...
 
- Protected Member Functions inherited from GRINS::BCFactoryAbstract< libMesh::DirichletBoundary >
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINSTesting::SATurbBCFactoryBase
static void set_turb_bc_values (libMesh::MeshFunction *turbulent_bc_values)
 
- Static Public Member Functions inherited from GRINS::BCFactoryAbstract< libMesh::DirichletBoundary >
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< libMesh::DirichletBoundary >
static void set_getpot (const GetPot &input)
 
- Static Protected Attributes inherited from GRINSTesting::SATurbBCFactoryBase
static libMesh::MeshFunction * _turbulent_bc_values = NULL
 
- Static Protected Attributes inherited from GRINS::BCFactoryAbstract< libMesh::DirichletBoundary >
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< libMesh::DirichletBoundary >
static const GetPot * _input
 We store only a raw pointer here because we can't make a copy. More...
 

Detailed Description

Definition at line 166 of file test_turbulent_channel.C.

Constructor & Destructor Documentation

GRINSTesting::SATurbUBCFactory::SATurbUBCFactory ( const std::string &  bc_type_name)
inline

Definition at line 170 of file test_turbulent_channel.C.

171  : SATurbBCFactoryBase(bc_type_name)
172  {}
SATurbBCFactoryBase(const std::string &bc_type_name)

Member Function Documentation

virtual libMesh::UniquePtr<libMesh::FunctionBase<libMesh::Number> > GRINSTesting::SATurbUBCFactory::build_func ( const GetPot &  input,
GRINS::MultiphysicsSystem system,
std::vector< std::string > &  var_names,
const std::string &  section 
)
inlineprotectedvirtual

Builds the FunctionBase object for boundary condition.

Subclasses should override this function to build the FunctionBase object that corresponds to the variables passed in var_names. The variable names passed in will correspond to only a single VariableBase object, e.g. Velocity. The section arguments corresponds to the section to parse for the variables in the input file, e.g. input(section+"/"+var_names[0]).

The variable names passed in correspond to all the active variable names for a Variable group. The variable names present in var_names after this function is called will correspond to those variables. Note that var_names is NOT const. This is because one of the behaviors of subclasses may be to remove variables from the list. For example, for some symmetry conditions, we only want to enforce zero on certain components of the solution while leaving others untouched.

Implements GRINS::DirichletBCFactoryFunctionBase< libMesh::FunctionBase< libMesh::Number > >.

Definition at line 177 of file test_turbulent_channel.C.

References GRINSTesting::SATurbBCFactoryBase::_turbulent_bc_values.

181  {
182  libmesh_assert_equal_to(var_names.size(), 2);
183  libmesh_assert_equal_to(var_names[0], std::string("u"));
184  libmesh_assert_equal_to(var_names[1], std::string("v"));
185 
186  libMesh::UniquePtr<libMesh::CompositeFunction<libMesh::Number> >
187  composite_func( new libMesh::CompositeFunction<libMesh::Number> );
188 
189  libMesh::UniquePtr<libMesh::FunctionBase<libMesh::Number> >
190  bound_func(new TurbulentBdyFunctionU(_turbulent_bc_values) );
191 
192  std::vector<GRINS::VariableIndex> vars(1);
193  vars[0] = system.variable_number(var_names[0]);
194  composite_func->attach_subfunction(*bound_func, vars);
195 
196  vars[0] = system.variable_number(var_names[1]);
197  composite_func->attach_subfunction(libMesh::ZeroFunction<libMesh::Number>(), vars);
198 
199  return libMesh::UniquePtr<libMesh::FunctionBase<libMesh::Number> >( composite_func.release() );
200  }
static libMesh::MeshFunction * _turbulent_bc_values

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

Generated on Thu Jun 2 2016 21:52:33 for GRINS-0.7.0 by  doxygen 1.8.10