GRINS-0.7.0
|
#include <fe_variables_base.h>
Public Member Functions | |
FEVariablesBase (bool is_constraint_var) | |
~FEVariablesBase () | |
virtual void | init (libMesh::FEMSystem *system)=0 |
Add variables to the system. More... | |
bool | is_constraint_var () const |
void | set_neumann_bc_is_positive (bool is_positive) |
Reset whetever Neumann bc is postive or not. More... | |
libMesh::Real | neumann_bc_sign () const |
const std::vector< std::string > & | active_var_names () const |
Return the var names that are active from this class. More... | |
const std::vector< VariableIndex > & | var_indices () const |
Protected Member Functions | |
void | parse_names_from_input (const GetPot &input, const std::string &subsection, std::vector< std::string > &var_names, const std::vector< std::string > &default_names) |
Method to parse variable names from input. More... | |
void | duplicate_name_section_check (const GetPot &input) const |
Check for old name style and new name style. If both present, error. More... | |
bool | check_dep_name_input (const GetPot &input, const std::string &new_subsection) const |
Check for deprecated variable name input style. More... | |
Protected Attributes | |
std::vector< VariableIndex > | _vars |
std::vector< std::string > | _var_names |
std::vector< GRINSEnums::FEFamily > | _family |
std::vector< GRINSEnums::Order > | _order |
bool | _is_constraint_var |
Tracks whether this is a constraint variable. More... | |
libMesh::Real | _neumann_bc_sign |
Track the sign of the Neumann BC term. Defaults to 1.0. More... | |
Definition at line 53 of file fe_variables_base.h.
|
inline |
Definition at line 57 of file fe_variables_base.h.
|
inline |
Definition at line 62 of file fe_variables_base.h.
|
inline |
Return the var names that are active from this class.
This must not be called until init_vars has been called.
Definition at line 84 of file fe_variables_base.h.
References _var_names.
Referenced by GRINS::CatalyticWallNeumannBCFactoryCommon< ImplType >::build_catalytic_wall_common(), GRINS::ParsedFunctionNeumannBCFactory< FunctionType >::build_neumann_func(), GRINS::ParsedFunctionNeumannOldStyleBCFactory< FunctionType >::build_neumann_func(), GRINS::ParsedFunctionNeumannBCFactoryHelper< FunctionType >::build_neumman_func_common(), GRINS::OldStyleBCBuilder::construct_bcs_old_style(), GRINS::DirichletBCFactoryFunctionBase< libMesh::FunctionBase< libMesh::Number > >::get_var_names(), GRINSTesting::VariablesTest::test_pressure(), GRINSTesting::VariablesTest::test_species_mass_fracs(), GRINSTesting::VariablesTest::test_temp(), GRINSTesting::VariablesTest::test_velocity_2d(), and GRINSTesting::VariablesTest::test_velocity_3d().
|
protected |
Check for deprecated variable name input style.
If found, this returns true and emits a deprecated warning. Otherwise, this returns false. The string argument is supplied by each variable class for the warning message. E.g. if the variable class is going to look in "Displacement", i.e. [Variables/Displacement/names], then "Displacement" should be passed.
Definition at line 59 of file fe_variables_base.C.
References duplicate_name_section_check(), grins_warning, and GRINS::VariablesParsing::varnames_input_name().
Referenced by GRINS::MultiVarSingleFETypeVariable::MultiVarSingleFETypeVariable(), and GRINS::SingleVarSingleFETypeVariable::SingleVarSingleFETypeVariable().
|
protected |
Check for old name style and new name style. If both present, error.
Old name style: [Physics/VariableNames] New name style: [Variables/<variable type>="">] Here, we just check for the presence of the sections [Physics/VariableNames] and [Variables].
Definition at line 51 of file fe_variables_base.C.
References GRINS::VariablesParsing::variables_section().
Referenced by check_dep_name_input().
|
pure virtual |
Add variables to the system.
This expects that _var_names has been setup during construction time. Most subclasses should be able to use default_fe_init, once they subclass this and VariablesBase.
Implemented in GRINS::SingleFETypeVariable, GRINS::DisplacementFEVariables, and GRINS::VelocityFEVariables.
|
inline |
Definition at line 70 of file fe_variables_base.h.
References _is_constraint_var.
Referenced by GRINS::DefaultBCBuilder::build_axisymmetric_bcs(), GRINS::DefaultBCBuilder::build_bcs_by_var_section(), and GRINSTesting::VariablesTest::test_var_constraint_and_warehouse().
|
inline |
Definition at line 79 of file fe_variables_base.h.
References _neumann_bc_sign.
Referenced by GRINS::MultiphysicsSystem::apply_neumann_bcs().
|
protected |
Method to parse variable names from input.
Names parsed from: [Variables/<subsection>/names] and then populated into the supplied var_names vector. It is assumed that var_names has been properly sized, that default_names and var_names have the same size, and that default_names has been populated with unique strings.
Definition at line 38 of file fe_variables_base.C.
References GRINS::VariablesParsing::varnames_input_name().
Referenced by GRINS::MultiVarSingleFETypeVariable::MultiVarSingleFETypeVariable(), and GRINS::SingleVarSingleFETypeVariable::SingleVarSingleFETypeVariable().
|
inline |
Reset whetever Neumann bc is postive or not.
Postive means a value of 1.0 will be used in front of NeumannBC terms while is_positive = false indicates a value of -1.0 should be used.
Definition at line 145 of file fe_variables_base.h.
References _neumann_bc_sign.
Referenced by GRINS::SolidMechanicsAbstract::SolidMechanicsAbstract().
|
inline |
Definition at line 87 of file fe_variables_base.h.
References _vars.
Referenced by GRINS::ParsedFunctionNeumannBCFactoryHelper< FunctionType >::build_neumman_func_common(), GRINS::CatalyticWallNeumannBCFactoryCommon< ImplType >::extract_species_vars(), and GRINS::CatalyticWallNeumannBCFactoryCommon< ImplType >::extract_temp_var().
|
protected |
Definition at line 125 of file fe_variables_base.h.
Referenced by GRINS::SingleFETypeVariable::init(), GRINS::SingleFETypeVariable::SingleFETypeVariable(), and GRINS::ThermoPressureFEVariable::ThermoPressureFEVariable().
|
protected |
Tracks whether this is a constraint variable.
By constraint variable, we mean a variable that is effectively a Lagrange multiplier. The intended use case is to determine whether this variable requires boundary conditions to be specified (constraint variables do not).
Definition at line 135 of file fe_variables_base.h.
Referenced by is_constraint_var().
|
protected |
Track the sign of the Neumann BC term. Defaults to 1.0.
Depending on the Physics/Variable combination, the sign in front of the Neumann boundary term can change.
Definition at line 140 of file fe_variables_base.h.
Referenced by neumann_bc_sign(), and set_neumann_bc_is_positive().
|
protected |
Definition at line 127 of file fe_variables_base.h.
Referenced by GRINS::SingleFETypeVariable::init(), GRINS::SingleFETypeVariable::SingleFETypeVariable(), and GRINS::ThermoPressureFEVariable::ThermoPressureFEVariable().
|
protected |
Definition at line 123 of file fe_variables_base.h.
Referenced by active_var_names(), GRINS::VelocityFEVariables::init(), GRINS::DisplacementFEVariables::init(), GRINS::SingleFETypeVariable::init(), GRINS::MultiVarSingleFETypeVariable::MultiVarSingleFETypeVariable(), GRINS::SpeciesMassFractionsFEVariables::n_species(), GRINS::SingleVarSingleFETypeVariable::SingleVarSingleFETypeVariable(), GRINS::SpeciesMassFractionsFEVariables::SpeciesMassFractionsFEVariables(), GRINS::DisplacementFEVariables::u_name(), GRINS::DisplacementFEVariables::v_name(), and GRINS::DisplacementFEVariables::w_name().
|
protected |
Definition at line 121 of file fe_variables_base.h.
Referenced by GRINS::SingleFETypeVariable::init(), GRINS::TurbulenceFEVariables::nu(), GRINS::PressureFEVariable::p(), GRINS::ThermoPressureFEVariable::p0(), GRINS::SpeciesMassFractionsFEVariables::species(), GRINS::PrimitiveTempFEVariables::T(), GRINS::VelocityFEVariables::u(), GRINS::DisplacementFEVariables::u(), GRINS::VelocityFEVariables::v(), GRINS::DisplacementFEVariables::v(), GRINS::GenericFETypeVariable::var(), var_indices(), GRINS::VelocityFEVariables::w(), and GRINS::DisplacementFEVariables::w().