GRINS-0.6.0
|
Base class for reading and handling boundary conditions for physics classes. More...
#include <bc_handling_base.h>
Public Member Functions | |
BCHandlingBase (const std::string &physics_name) | |
virtual | ~BCHandlingBase () |
void | attach_neumann_bound_func (GRINS::NBCContainer &neumann_bcs) |
void | attach_dirichlet_bound_func (const GRINS::DBCContainer &dirichlet_bc) |
virtual void | read_bc_data (const GetPot &input, const std::string &id_str, const std::string &bc_str, const std::string &var_str, const std::string &val_str) |
virtual void | init_bc_data (const libMesh::FEMSystem &system) |
Override this method to initialize any system-dependent data. More... | |
virtual void | apply_neumann_bcs (AssemblyContext &context, const GRINS::CachedValues &cache, const bool request_jacobian, const GRINS::BoundaryID bc_id) const |
virtual void | user_apply_neumann_bcs (AssemblyContext &context, const GRINS::CachedValues &cache, const bool request_jacobian, const GRINS::BoundaryID bc_id, const GRINS::BCType bc_type) const |
virtual void | init_dirichlet_bc_func_objs (libMesh::FEMSystem *system) const |
virtual void | init_periodic_bcs (libMesh::FEMSystem *system) const |
void | set_dirichlet_bc_type (GRINS::BoundaryID bc_id, int bc_type) |
void | set_neumann_bc_type (GRINS::BoundaryID bc_id, int bc_type) |
void | set_dirichlet_bc_value (GRINS::BoundaryID bc_id, libMesh::Real value, int component=0) |
void | set_neumann_bc_value (GRINS::BoundaryID bc_id, const libMesh::Point &q_in) |
libMesh::Real | get_dirichlet_bc_value (GRINS::BoundaryID bc_id, int component=0) const |
const libMesh::Point & | get_neumann_bc_value (GRINS::BoundaryID bc_id) const |
std::tr1::shared_ptr< GRINS::NeumannFuncObj > | get_neumann_bound_func (GRINS::BoundaryID bc_id, GRINS::VariableIndex var_id) const |
std::tr1::shared_ptr< GRINS::NeumannFuncObj > | get_neumann_bound_func (GRINS::BoundaryID bc_id, GRINS::VariableIndex var_id) |
virtual void | init_dirichlet_bcs (libMesh::FEMSystem *system) const |
virtual int | string_to_int (const std::string &bc_type_in) const |
virtual void | init_bc_types (const GRINS::BoundaryID bc_id, const std::string &bc_id_string, const int bc_type, const std::string &bc_vars, const std::string &bc_value, const GetPot &input) |
virtual void | user_init_dirichlet_bcs (libMesh::FEMSystem *system, libMesh::DofMap &dof_map, GRINS::BoundaryID bc_id, GRINS::BCType bc_type) const |
GRINS::BCType | get_dirichlet_bc_type (const GRINS::BoundaryID bc_id) const |
bool | is_axisymmetric () const |
Protected Types | |
enum | BC_BASE { PERIODIC = -5, CONSTANT_DIRICHLET, PARSED_DIRICHLET, PARSED_FEM_DIRICHLET, AXISYMMETRIC } |
Protected Attributes | |
std::vector< std::pair< BoundaryID, BCType > > | _dirichlet_bc_map |
Map between boundary id and Dirichlet boundary condition type. More... | |
std::map< GRINS::BoundaryID, GRINS::BCType > | _neumann_bc_map |
Map between boundary id and Neumann boundary condition type. More... | |
std::map< GRINS::BoundaryID, libMesh::Point > | _dirichlet_values |
Stash prescribed Dirichlet boundary values. More... | |
std::map< GRINS::BoundaryID, libMesh::Point > | _q_values |
Stash prescribed boundary fluxes. More... | |
std::map< GRINS::BoundaryID, GRINS::NBCContainer > | _neumann_bound_funcs |
std::vector< GRINS::DBCContainer > | _dirichlet_bound_funcs |
GRINS::BoundaryConditions | _bound_conds |
Object that stashes generic boundary condition types. More... | |
std::vector< GRINS::PBCContainer > | _periodic_bcs |
unsigned int | _num_periodic_bcs |
std::string | _physics_name |
Static Protected Attributes | |
static bool | _axisymmetric = false |
Flag to cache whether or not there is an axisymmetric boundary present. More... | |
Private Member Functions | |
BCHandlingBase () | |
Base class for reading and handling boundary conditions for physics classes.
Definition at line 56 of file bc_handling_base.h.
|
protected |
Enumerator | |
---|---|
PERIODIC | |
CONSTANT_DIRICHLET | |
PARSED_DIRICHLET | |
PARSED_FEM_DIRICHLET | |
AXISYMMETRIC |
Definition at line 163 of file bc_handling_base.h.
GRINS::BCHandlingBase::BCHandlingBase | ( | const std::string & | physics_name | ) |
Definition at line 49 of file bc_handling_base.C.
|
virtual |
Definition at line 56 of file bc_handling_base.C.
|
private |
|
virtual |
Definition at line 234 of file bc_handling_base.C.
References _neumann_bc_map, and user_apply_neumann_bcs().
void GRINS::BCHandlingBase::attach_dirichlet_bound_func | ( | const GRINS::DBCContainer & | dirichlet_bc | ) |
Definition at line 67 of file bc_handling_base.C.
References _dirichlet_bound_funcs.
Referenced by GRINS::Physics::attach_dirichlet_bound_func(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), GRINS::IncompressibleNavierStokesBCHandling::init_bc_types(), and init_bc_types().
void GRINS::BCHandlingBase::attach_neumann_bound_func | ( | GRINS::NBCContainer & | neumann_bcs | ) |
Definition at line 61 of file bc_handling_base.C.
References _neumann_bound_funcs, and GRINS::NBCContainer::get_bc_id().
Referenced by GRINS::Physics::attach_neumann_bound_func().
|
inline |
Definition at line 207 of file bc_handling_base.h.
References _dirichlet_bc_map.
libMesh::Real GRINS::BCHandlingBase::get_dirichlet_bc_value | ( | GRINS::BoundaryID | bc_id, |
int | component = 0 |
||
) | const |
Definition at line 273 of file bc_handling_base.C.
Referenced by GRINS::HeatTransferBCHandling::user_init_dirichlet_bcs(), GRINS::LowMachNavierStokesBCHandling::user_init_dirichlet_bcs(), GRINS::IncompressibleNavierStokesBCHandling::user_init_dirichlet_bcs(), GRINS::SolidMechanicsBCHandling::user_init_dirichlet_bcs(), and GRINS::AxisymmetricHeatTransferBCHandling::user_init_dirichlet_bcs().
|
inline |
Definition at line 185 of file bc_handling_base.h.
References _q_values.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::user_apply_neumann_bcs(), GRINS::HeatTransferBCHandling::user_apply_neumann_bcs(), and GRINS::SolidMechanicsBCHandling::user_apply_neumann_bcs().
|
inline |
Definition at line 192 of file bc_handling_base.h.
References _neumann_bound_funcs.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::user_apply_neumann_bcs(), and GRINS::HeatTransferBCHandling::user_apply_neumann_bcs().
|
inline |
Definition at line 200 of file bc_handling_base.h.
References _neumann_bound_funcs.
|
virtual |
Override this method to initialize any system-dependent data.
Override this method to, for example, cache a System variable number. This is called before any of the other init methods in this class. By default, does nothing.
Reimplemented in GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >, GRINS::IncompressibleNavierStokesBCHandling, GRINS::SolidMechanicsBCHandling, GRINS::HeatTransferBCHandling, GRINS::LowMachNavierStokesBCHandling, GRINS::SpalartAllmarasBCHandling, and GRINS::AxisymmetricHeatTransferBCHandling.
Definition at line 111 of file bc_handling_base.C.
Referenced by GRINS::Physics::init_bcs().
|
virtual |
Reimplemented in GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >, GRINS::IncompressibleNavierStokesBCHandling, GRINS::SolidMechanicsBCHandling, GRINS::HeatTransferBCHandling, GRINS::LowMachNavierStokesBCHandling, GRINS::SpalartAllmarasBCHandling, and GRINS::AxisymmetricHeatTransferBCHandling.
Definition at line 318 of file bc_handling_base.C.
References _num_periodic_bcs, _periodic_bcs, _physics_name, GRINS::DBCContainer::add_bc_id(), GRINS::DBCContainer::add_var_name(), attach_dirichlet_bound_func(), CONSTANT_DIRICHLET, PARSED_DIRICHLET, PARSED_FEM_DIRICHLET, PERIODIC, GRINS::DBCContainer::set_fem_func_string(), GRINS::DBCContainer::set_func(), GRINS::PBCContainer::set_master_bcid(), GRINS::PBCContainer::set_offset_vector(), and GRINS::PBCContainer::set_slave_bcid().
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::init_bc_types(), GRINS::SpalartAllmarasBCHandling::init_bc_types(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), GRINS::HeatTransferBCHandling::init_bc_types(), GRINS::SolidMechanicsBCHandling::init_bc_types(), GRINS::IncompressibleNavierStokesBCHandling::init_bc_types(), and read_bc_data().
|
virtual |
Definition at line 116 of file bc_handling_base.C.
References _dirichlet_bound_funcs.
Referenced by GRINS::Physics::init_bcs().
|
virtual |
Reimplemented in GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >, and GRINS::LowMachNavierStokesBCHandling.
Definition at line 190 of file bc_handling_base.C.
References _dirichlet_bc_map, and user_init_dirichlet_bcs().
Referenced by GRINS::Physics::init_bcs().
|
virtual |
Definition at line 203 of file bc_handling_base.C.
References _num_periodic_bcs, and _periodic_bcs.
Referenced by GRINS::Physics::init_bcs().
|
inline |
Definition at line 179 of file bc_handling_base.h.
References _axisymmetric.
Referenced by GRINS::HeatTransfer< Conductivity >::HeatTransfer(), GRINS::IncompressibleNavierStokes< Viscosity >::IncompressibleNavierStokes(), GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >::ReactingLowMachNavierStokes(), and GRINS::HeatTransferBCHandling::user_apply_neumann_bcs().
|
virtual |
Definition at line 73 of file bc_handling_base.C.
References init_bc_types(), and string_to_int().
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::AxisymmetricHeatTransferBCHandling(), GRINS::HeatTransferBCHandling::HeatTransferBCHandling(), GRINS::IncompressibleNavierStokesBCHandling::IncompressibleNavierStokesBCHandling(), GRINS::LowMachNavierStokesBCHandling::LowMachNavierStokesBCHandling(), GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >::ReactingLowMachNavierStokesBCHandling(), GRINS::SolidMechanicsBCHandling::SolidMechanicsBCHandling(), and GRINS::SpalartAllmarasBCHandling::SpalartAllmarasBCHandling().
void GRINS::BCHandlingBase::set_dirichlet_bc_type | ( | GRINS::BoundaryID | bc_id, |
int | bc_type | ||
) |
Definition at line 252 of file bc_handling_base.C.
References _dirichlet_bc_map.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::init_bc_types(), GRINS::HeatTransferBCHandling::init_bc_types(), GRINS::SpalartAllmarasBCHandling::init_bc_types(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), GRINS::SolidMechanicsBCHandling::init_bc_types(), and GRINS::IncompressibleNavierStokesBCHandling::init_bc_types().
void GRINS::BCHandlingBase::set_dirichlet_bc_value | ( | GRINS::BoundaryID | bc_id, |
libMesh::Real | value, | ||
int | component = 0 |
||
) |
Definition at line 264 of file bc_handling_base.C.
References _dirichlet_values.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::init_bc_types(), GRINS::HeatTransferBCHandling::init_bc_types(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), GRINS::IncompressibleNavierStokesBCHandling::init_bc_types(), and GRINS::SolidMechanicsBCHandling::init_bc_types().
void GRINS::BCHandlingBase::set_neumann_bc_type | ( | GRINS::BoundaryID | bc_id, |
int | bc_type | ||
) |
Definition at line 258 of file bc_handling_base.C.
References _neumann_bc_map.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::init_bc_types(), GRINS::HeatTransferBCHandling::init_bc_types(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), and GRINS::SolidMechanicsBCHandling::init_bc_types().
void GRINS::BCHandlingBase::set_neumann_bc_value | ( | GRINS::BoundaryID | bc_id, |
const libMesh::Point & | q_in | ||
) |
Definition at line 278 of file bc_handling_base.C.
References _q_values.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::init_bc_types(), GRINS::HeatTransferBCHandling::init_bc_types(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), and GRINS::SolidMechanicsBCHandling::init_bc_types().
|
virtual |
Reimplemented in GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >, GRINS::IncompressibleNavierStokesBCHandling, GRINS::SolidMechanicsBCHandling, GRINS::HeatTransferBCHandling, GRINS::LowMachNavierStokesBCHandling, GRINS::SpalartAllmarasBCHandling, and GRINS::AxisymmetricHeatTransferBCHandling.
Definition at line 283 of file bc_handling_base.C.
References _axisymmetric, _physics_name, AXISYMMETRIC, CONSTANT_DIRICHLET, PARSED_DIRICHLET, PARSED_FEM_DIRICHLET, and PERIODIC.
Referenced by read_bc_data(), GRINS::HeatTransferBCHandling::string_to_int(), GRINS::LowMachNavierStokesBCHandling::string_to_int(), GRINS::SpalartAllmarasBCHandling::string_to_int(), GRINS::IncompressibleNavierStokesBCHandling::string_to_int(), and GRINS::SolidMechanicsBCHandling::string_to_int().
|
virtual |
Reimplemented in GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >, GRINS::SolidMechanicsBCHandling, GRINS::HeatTransferBCHandling, and GRINS::AxisymmetricHeatTransferBCHandling.
Definition at line 479 of file bc_handling_base.C.
Referenced by apply_neumann_bcs().
|
virtual |
Reimplemented in GRINS::AxisymmetricHeatTransferBCHandling, GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >, GRINS::IncompressibleNavierStokesBCHandling, GRINS::SolidMechanicsBCHandling, GRINS::HeatTransferBCHandling, GRINS::LowMachNavierStokesBCHandling, and GRINS::SpalartAllmarasBCHandling.
Definition at line 470 of file bc_handling_base.C.
Referenced by init_dirichlet_bcs().
|
staticprotected |
Flag to cache whether or not there is an axisymmetric boundary present.
Definition at line 170 of file bc_handling_base.h.
Referenced by is_axisymmetric(), and string_to_int().
|
protected |
Object that stashes generic boundary condition types.
Definition at line 156 of file bc_handling_base.h.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::user_apply_neumann_bcs(), GRINS::HeatTransferBCHandling::user_apply_neumann_bcs(), and GRINS::SolidMechanicsBCHandling::user_apply_neumann_bcs().
|
protected |
Map between boundary id and Dirichlet boundary condition type.
We need to keep this around because the libMesh::DirichletBoundary objects can't be created until we init the variables. We use a vector of pairs so that the boundary condition functors get added to the libMesh::DofMap in the same order as in the input file.
Definition at line 137 of file bc_handling_base.h.
Referenced by get_dirichlet_bc_type(), GRINS::LowMachNavierStokesBCHandling::init_dirichlet_bcs(), init_dirichlet_bcs(), and set_dirichlet_bc_type().
|
protected |
Definition at line 151 of file bc_handling_base.h.
Referenced by attach_dirichlet_bound_func(), and init_dirichlet_bc_func_objs().
|
protected |
Stash prescribed Dirichlet boundary values.
Definition at line 143 of file bc_handling_base.h.
Referenced by set_dirichlet_bc_value().
|
protected |
Map between boundary id and Neumann boundary condition type.
Definition at line 140 of file bc_handling_base.h.
Referenced by apply_neumann_bcs(), and set_neumann_bc_type().
|
protected |
Definition at line 149 of file bc_handling_base.h.
Referenced by attach_neumann_bound_func(), and get_neumann_bound_func().
|
protected |
Definition at line 159 of file bc_handling_base.h.
Referenced by init_bc_types(), and init_periodic_bcs().
|
protected |
Definition at line 158 of file bc_handling_base.h.
Referenced by init_bc_types(), and init_periodic_bcs().
|
protected |
Definition at line 161 of file bc_handling_base.h.
Referenced by GRINS::AxisymmetricHeatTransferBCHandling::AxisymmetricHeatTransferBCHandling(), GRINS::HeatTransferBCHandling::HeatTransferBCHandling(), GRINS::IncompressibleNavierStokesBCHandling::IncompressibleNavierStokesBCHandling(), GRINS::AxisymmetricHeatTransferBCHandling::init_bc_types(), GRINS::HeatTransferBCHandling::init_bc_types(), GRINS::LowMachNavierStokesBCHandling::init_bc_types(), GRINS::IncompressibleNavierStokesBCHandling::init_bc_types(), GRINS::SolidMechanicsBCHandling::init_bc_types(), init_bc_types(), GRINS::LowMachNavierStokesBCHandling::LowMachNavierStokesBCHandling(), GRINS::ReactingLowMachNavierStokesBCHandling< Chemistry >::ReactingLowMachNavierStokesBCHandling(), GRINS::SolidMechanicsBCHandling::SolidMechanicsBCHandling(), GRINS::SpalartAllmarasBCHandling::SpalartAllmarasBCHandling(), GRINS::AxisymmetricHeatTransferBCHandling::string_to_int(), string_to_int(), GRINS::AxisymmetricHeatTransferBCHandling::user_apply_neumann_bcs(), GRINS::HeatTransferBCHandling::user_apply_neumann_bcs(), GRINS::SolidMechanicsBCHandling::user_apply_neumann_bcs(), GRINS::HeatTransferBCHandling::user_init_dirichlet_bcs(), and GRINS::AxisymmetricHeatTransferBCHandling::user_init_dirichlet_bcs().
|
protected |
Stash prescribed boundary fluxes.
Definition at line 146 of file bc_handling_base.h.
Referenced by get_neumann_bc_value(), and set_neumann_bc_value().