A variable which is solved for in a System of equations. More...
#include <variable.h>
Public Member Functions | |
Variable (System *sys, const std::string &var_name, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type) | |
Variable (System *sys, const std::string &var_name, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type, const std::set< subdomain_id_type > &var_active_subdomains) | |
System * | system () const |
const std::string & | name () const |
unsigned int | number () const |
unsigned int | first_scalar_number () const |
const FEType & | type () const |
unsigned int | n_components () const |
bool | active_on_subdomain (subdomain_id_type sid) const |
bool | implicitly_active () const |
const std::set< subdomain_id_type > & | active_subdomains () const |
Protected Attributes | |
System * | _sys |
std::string | _name |
std::set< subdomain_id_type > | _active_subdomains |
unsigned int | _number |
unsigned int | _first_scalar_number |
FEType | _type |
A variable which is solved for in a System of equations.
This class defines the notion of a variable in the system. A variable is one of potentially several unknowns in the problem at hand. A variable is described by a unique name, a finite element approximation family, and (optionally) a list of subdomains to which the variable is restricted.
Definition at line 49 of file variable.h.
|
inline |
Constructor. Omits the subdomain mapping, hence this constructor creates a variable which is active on all subdomains.
Definition at line 58 of file variable.h.
Referenced by libMesh::VariableGroup::variable().
|
inline |
Constructor. Takes a set which contains the subdomain indices for which this variable is active.
Definition at line 75 of file variable.h.
|
inline |
true
if this variable is active on subdomain sid
, false
otherwise._active_subdomains
container as active everywhere, i.e. for all subdomains. Definition at line 136 of file variable.h.
References _active_subdomains.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::DofMap::_dof_indices(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::DofMap::local_variable_indices(), libMesh::DofMap::old_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::BoundaryProjectSolution::operator()(), and libMesh::DofMap::reinit().
|
inline |
Definition at line 150 of file variable.h.
References _active_subdomains.
Referenced by libMesh::DifferentiableSystem::add_second_order_dot_vars(), libMesh::EquationSystems::get_vars_active_subdomains(), libMesh::VariableGroup::variable(), and libMesh::System::write_header().
|
inline |
Definition at line 113 of file variable.h.
References _first_scalar_number.
Referenced by libMesh::System::n_components(), and libMesh::VariableGroup::variable().
|
inline |
true
if this variable is active on all subdomains because it has no specified activity map. This can be used to perform more efficient computations in some places. Definition at line 144 of file variable.h.
References _active_subdomains.
|
inline |
Definition at line 125 of file variable.h.
References _type, libMesh::FEType::family, libMesh::OrderWrapper::get_order(), libMesh::FEType::order, libMesh::SCALAR, and type().
Referenced by libMesh::System::n_components().
|
inline |
Definition at line 100 of file variable.h.
References _name.
Referenced by libMesh::DifferentiableSystem::add_second_order_dot_vars(), DMlibMeshSetSystem_libMesh(), and libMesh::VariableGroup::variable().
|
inline |
Definition at line 106 of file variable.h.
References _number.
Referenced by libMesh::VariableGroup::variable().
|
inline |
Definition at line 92 of file variable.h.
References _sys.
Referenced by libMesh::VariableGroup::variable().
|
inline |
FEType
for this variable. Definition at line 119 of file variable.h.
References _type.
Referenced by libMesh::DofMap::_dof_indices(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DifferentiableSystem::add_second_order_dot_vars(), libMesh::FEMSystem::assembly(), libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::System::get_info(), n_components(), libMesh::DofMap::old_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::System::read_serialized_vectors(), libMesh::DofMap::reinit(), libMesh::DofMap::SCALAR_dof_indices(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::VariableGroup::variable(), libMesh::System::write_parallel_data(), libMesh::System::write_serialized_vector(), and libMesh::System::write_serialized_vectors().
|
protected |
Definition at line 156 of file variable.h.
Referenced by active_on_subdomain(), active_subdomains(), and implicitly_active().
|
protected |
Definition at line 158 of file variable.h.
Referenced by first_scalar_number(), and libMesh::VariableGroup::first_scalar_number().
|
protected |
Definition at line 155 of file variable.h.
Referenced by name().
|
protected |
Definition at line 157 of file variable.h.
Referenced by number(), and libMesh::VariableGroup::number().
|
protected |
Definition at line 154 of file variable.h.
Referenced by system().
|
protected |
Definition at line 159 of file variable.h.
Referenced by n_components(), and type().