GRINS-0.7.0
|
Class to encapsulate variables that have only one FEType/Order. More...
#include <single_fe_type_variable.h>
Public Member Functions | |
SingleFETypeVariable (const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix, const std::string &subsection, const std::string &default_family, const std::string &default_order, bool is_constraint_var) | |
Deprecated, old style constructor. More... | |
SingleFETypeVariable (const GetPot &input, const std::string &subsection, bool is_constraint_var) | |
Primary constructor. More... | |
~SingleFETypeVariable () | |
virtual void | init (libMesh::FEMSystem *system) |
Add variables to the system. More... | |
Public Member Functions inherited from GRINS::FEVariablesBase | |
FEVariablesBase (bool is_constraint_var) | |
~FEVariablesBase () | |
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_family_and_order (const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix, const std::string &subsection, std::vector< GRINSEnums::FEFamily > &family, std::vector< GRINSEnums::Order > &order, const std::string &default_family, const std::string &default_order) |
Helper function to parse FEFamily and Order. More... | |
void | dup_family_order_check (const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix) const |
Check (and error if true) for old and new style FEFamily/Order input. More... | |
bool | have_family_or_order (const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix, const std::string &subsection) const |
Check for no presence of FEFamily/Order input. More... | |
void | parse_old_style_with_warning (const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix, const std::string &default_family, const std::string &default_order, const std::string &subsection, GRINSEnums::FEFamily &family, GRINSEnums::Order &order) |
void | parse_new_style (const GetPot &input, const std::string &subsection, GRINSEnums::FEFamily &family, GRINSEnums::Order &order) |
Protected Member Functions inherited from GRINS::FEVariablesBase | |
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... | |
Additional Inherited Members | |
Protected Attributes inherited from GRINS::FEVariablesBase | |
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... | |
Class to encapsulate variables that have only one FEType/Order.
This class only handles the FEType and Order. Subclasses will handle the construction/parsing of the variable names since we can have both "single variables" and variables like Velocity that have the same FEType for all the variables, but multiple variables with unique names.
Definition at line 39 of file single_fe_type_variable.h.
GRINS::SingleFETypeVariable::SingleFETypeVariable | ( | const GetPot & | input, |
const std::string & | physics_name, | ||
const std::string & | old_var_prefix, | ||
const std::string & | subsection, | ||
const std::string & | default_family, | ||
const std::string & | default_order, | ||
bool | is_constraint_var | ||
) |
Deprecated, old style constructor.
This constructor is used for when there is possibly old deprecated styles of input for which we do additional checks/warnings. Otherwise, you should use the new constructor.
Definition at line 39 of file single_fe_type_variable.C.
References GRINS::FEVariablesBase::_family, GRINS::FEVariablesBase::_order, and parse_family_and_order().
GRINS::SingleFETypeVariable::SingleFETypeVariable | ( | const GetPot & | input, |
const std::string & | subsection, | ||
bool | is_constraint_var | ||
) |
Primary constructor.
Will parse from input section [Variables/<subsection>].
Definition at line 64 of file single_fe_type_variable.C.
References GRINS::FEVariablesBase::_family, GRINS::FEVariablesBase::_order, and parse_new_style().
|
inline |
Definition at line 61 of file single_fe_type_variable.h.
|
protected |
Check (and error if true) for old and new style FEFamily/Order input.
Actually, for the new style, we just check for the presence of a [Variables] section in order to be conservative.
Definition at line 168 of file single_fe_type_variable.C.
Referenced by parse_family_and_order().
|
protected |
Check for no presence of FEFamily/Order input.
Definition at line 201 of file single_fe_type_variable.C.
Referenced by parse_family_and_order().
|
virtual |
Add variables to the system.
This expects that _var_names has been setup during construction time by the subclasses.
Implements GRINS::FEVariablesBase.
Reimplemented in GRINS::DisplacementFEVariables, and GRINS::VelocityFEVariables.
Definition at line 78 of file single_fe_type_variable.C.
References GRINS::FEVariablesBase::_family, GRINS::FEVariablesBase::_order, GRINS::FEVariablesBase::_var_names, and GRINS::FEVariablesBase::_vars.
Referenced by GRINS::VelocityFEVariables::init(), GRINS::DisplacementFEVariables::init(), GRINS::ConvectionDiffusion::init_variables(), GRINS::BoussinesqBuoyancyBase::init_variables(), GRINS::ReactingLowMachNavierStokesAbstract::init_variables(), GRINS::AxisymmetricBoussinesqBuoyancy::init_variables(), GRINSTesting::VariablesTest::test_pressure(), GRINSTesting::VariablesTest::test_species_mass_fracs(), GRINSTesting::VariablesTest::test_temp(), and GRINSTesting::VariablesTest::test_var_constraint_and_warehouse().
|
protected |
Helper function to parse FEFamily and Order.
Mainly to encapsulate warning/using old style and new style. Note that default_family and default_order are only for the old style. In the new style, the user must specify the FEFamily and order in the input file. This function assumes that family and order have been properly sized. Currently assumes only a single family and order.
Definition at line 91 of file single_fe_type_variable.C.
References dup_family_order_check(), grins_warning, have_family_or_order(), parse_new_style(), and parse_old_style_with_warning().
Referenced by SingleFETypeVariable().
|
protected |
Definition at line 182 of file single_fe_type_variable.C.
Referenced by parse_family_and_order(), and SingleFETypeVariable().
|
protected |
Definition at line 147 of file single_fe_type_variable.C.
References grins_warning.
Referenced by parse_family_and_order().