GRINS-0.8.0
List of all members | Public Member Functions | Protected Attributes
GRINS::FEVariablesBase Class Reference

#include <fe_variables_base.h>

Inheritance diagram for GRINS::FEVariablesBase:
Inheritance graph
[legend]

Public Member Functions

 FEVariablesBase (const std::vector< std::string > &var_names, const std::vector< VariableIndex > &var_indices, const std::set< libMesh::subdomain_id_type > &subdomain_ids)
 
virtual ~FEVariablesBase ()
 
void set_is_constraint_var (bool is_constraint_var)
 Set whether or not this is a "constraint" variable. 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
 
const std::set< libMesh::subdomain_id_type > & subdomain_ids () const
 

Protected Attributes

std::vector< VariableIndex_vars
 
std::vector< std::string > _var_names
 
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...
 
std::set< libMesh::subdomain_id_type > _subdomain_ids
 

Detailed Description

Definition at line 53 of file fe_variables_base.h.

Constructor & Destructor Documentation

GRINS::FEVariablesBase::FEVariablesBase ( const std::vector< std::string > &  var_names,
const std::vector< VariableIndex > &  var_indices,
const std::set< libMesh::subdomain_id_type > &  subdomain_ids 
)
inline

Definition at line 57 of file fe_variables_base.h.

60  : _vars(var_indices),
61  _var_names(var_names),
62  _is_constraint_var(false),
63  _neumann_bc_sign(1.0),
65  {
66  libmesh_assert_equal_to(var_names.size(), var_indices.size());
67  }
std::set< libMesh::subdomain_id_type > _subdomain_ids
bool _is_constraint_var
Tracks whether this is a constraint variable.
libMesh::Real _neumann_bc_sign
Track the sign of the Neumann BC term. Defaults to 1.0.
const std::set< libMesh::subdomain_id_type > & subdomain_ids() const
std::vector< std::string > _var_names
std::vector< VariableIndex > _vars
const std::vector< VariableIndex > & var_indices() const
virtual GRINS::FEVariablesBase::~FEVariablesBase ( )
inlinevirtual

Definition at line 69 of file fe_variables_base.h.

69 {};

Member Function Documentation

const std::vector<std::string>& GRINS::FEVariablesBase::active_var_names ( ) const
inline
bool GRINS::FEVariablesBase::is_constraint_var ( ) const
inline
libMesh::Real GRINS::FEVariablesBase::neumann_bc_sign ( ) const
inline

Definition at line 88 of file fe_variables_base.h.

References _neumann_bc_sign.

Referenced by GRINS::MultiphysicsSystem::apply_neumann_bcs().

89  { return _neumann_bc_sign; }
libMesh::Real _neumann_bc_sign
Track the sign of the Neumann BC term. Defaults to 1.0.
void GRINS::FEVariablesBase::set_is_constraint_var ( bool  is_constraint_var)
inline

Set whether or not this is a "constraint" variable.

Constraint variables are things like Lagrange multipliers. The primary implication is that if the Variable is a constraint variable, then no boundary conditions are required/used for that variable.

Definition at line 76 of file fe_variables_base.h.

References _is_constraint_var, and is_constraint_var().

Referenced by GRINS::IncompressibleNavierStokesBase< Viscosity >::IncompressibleNavierStokesBase(), GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >::LowMachNavierStokesBase(), GRINS::ReactingLowMachNavierStokesAbstract::ReactingLowMachNavierStokesAbstract(), GRINS::SpalartAllmaras< Viscosity >::SpalartAllmaras(), and GRINSTesting::VariablesTest::test_var_constraint().

bool _is_constraint_var
Tracks whether this is a constraint variable.
bool is_constraint_var() const
void GRINS::FEVariablesBase::set_neumann_bc_is_positive ( bool  is_positive)
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 125 of file fe_variables_base.h.

References _neumann_bc_sign.

Referenced by GRINS::SolidMechanicsAbstract::SolidMechanicsAbstract().

126  {
127  if(is_positive)
128  _neumann_bc_sign = 1.0;
129  else
130  _neumann_bc_sign = -1.0;
131  }
libMesh::Real _neumann_bc_sign
Track the sign of the Neumann BC term. Defaults to 1.0.
const std::set<libMesh::subdomain_id_type>& GRINS::FEVariablesBase::subdomain_ids ( ) const
inline

Definition at line 99 of file fe_variables_base.h.

References _subdomain_ids.

Referenced by GRINS::Physics::check_var_subdomain_consistency(), and GRINS::DefaultBCBuilder::is_var_active().

100  { return _subdomain_ids; }
std::set< libMesh::subdomain_id_type > _subdomain_ids
const std::vector<VariableIndex>& GRINS::FEVariablesBase::var_indices ( ) const
inline

Member Data Documentation

bool GRINS::FEVariablesBase::_is_constraint_var
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 114 of file fe_variables_base.h.

Referenced by is_constraint_var(), and set_is_constraint_var().

libMesh::Real GRINS::FEVariablesBase::_neumann_bc_sign
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 119 of file fe_variables_base.h.

Referenced by neumann_bc_sign(), and set_neumann_bc_is_positive().

std::set<libMesh::subdomain_id_type> GRINS::FEVariablesBase::_subdomain_ids
protected

Definition at line 121 of file fe_variables_base.h.

Referenced by subdomain_ids().

std::vector<std::string> GRINS::FEVariablesBase::_var_names
protected

Definition at line 106 of file fe_variables_base.h.

Referenced by active_var_names().

std::vector<VariableIndex> GRINS::FEVariablesBase::_vars
protected

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

Generated on Tue Dec 19 2017 12:47:30 for GRINS-0.8.0 by  doxygen 1.8.9.1