GRINS-0.7.0
List of all members | Public Member Functions
GRINS::SingleVarSingleFETypeVariable Class Reference

Base class for variables with a single component. More...

#include <single_var_single_fe_type_variable.h>

Inheritance diagram for GRINS::SingleVarSingleFETypeVariable:
Inheritance graph
[legend]
Collaboration diagram for GRINS::SingleVarSingleFETypeVariable:
Collaboration graph
[legend]

Public Member Functions

 SingleVarSingleFETypeVariable (const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix, const std::string &old_var_name, const std::string &default_name, const std::string &subsection, const std::string &default_family, const std::string &default_order, bool is_constraint_var)
 Deprecated, old style constructor. More...
 
 SingleVarSingleFETypeVariable (const GetPot &input, const std::string &subsection, const std::string &default_name, bool is_constraint_var)
 Primary constructor. More...
 
 ~SingleVarSingleFETypeVariable ()
 
- Public Member Functions inherited from 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. 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
 

Additional Inherited Members

- Protected Member Functions inherited from GRINS::SingleFETypeVariable
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...
 
- 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...
 

Detailed Description

Base class for variables with a single component.

Definition at line 34 of file single_var_single_fe_type_variable.h.

Constructor & Destructor Documentation

GRINS::SingleVarSingleFETypeVariable::SingleVarSingleFETypeVariable ( const GetPot &  input,
const std::string &  physics_name,
const std::string &  old_var_prefix,
const std::string &  old_var_name,
const std::string &  default_name,
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 33 of file single_var_single_fe_type_variable.C.

References GRINS::FEVariablesBase::_var_names, GRINS::FEVariablesBase::check_dep_name_input(), and GRINS::FEVariablesBase::parse_names_from_input().

42  : SingleFETypeVariable(input,physics_name,old_var_prefix,subsection,default_family,
43  default_order,is_constraint_var)
44  {
45  _var_names.resize(1);
46 
47  std::vector<std::string> default_names(1,default_name);
48 
49  if( this->check_dep_name_input(input,subsection) )
50  _var_names[0] = input("Physics/VariableNames/"+old_var_name, default_names[0] );
51  else
52  this->parse_names_from_input(input,subsection,_var_names,default_names);
53  }
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.
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.
std::vector< std::string > _var_names
bool is_constraint_var() const
bool check_dep_name_input(const GetPot &input, const std::string &new_subsection) const
Check for deprecated variable name input style.
GRINS::SingleVarSingleFETypeVariable::SingleVarSingleFETypeVariable ( const GetPot &  input,
const std::string &  subsection,
const std::string &  default_name,
bool  is_constraint_var 
)

Primary constructor.

Will parse from input section [Variables/<subsection>].

Definition at line 55 of file single_var_single_fe_type_variable.C.

References GRINS::FEVariablesBase::_var_names, and GRINS::FEVariablesBase::parse_names_from_input().

59  : SingleFETypeVariable(input,subsection,is_constraint_var)
60  {
61  _var_names.resize(1);
62  std::vector<std::string> default_names(1,default_name);
63  this->parse_names_from_input(input,subsection,_var_names,default_names);
64  }
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.
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.
std::vector< std::string > _var_names
bool is_constraint_var() const
GRINS::SingleVarSingleFETypeVariable::~SingleVarSingleFETypeVariable ( )
inline

Definition at line 59 of file single_var_single_fe_type_variable.h.

59 {};

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

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