libMesh
|
This class defines a logically grouped set of variables in the system. More...
#include <variable.h>
Public Member Functions | |
VariableGroup (System *sys, std::vector< std::string > var_names, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type) | |
Constructor. More... | |
VariableGroup (System *sys, std::vector< std::string > var_names, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type, const std::set< subdomain_id_type > &var_active_subdomains) | |
Constructor. More... | |
VariableGroup (const VariableGroup &)=default | |
Standard constructors. More... | |
VariableGroup & | operator= (const VariableGroup &)=default |
VariableGroup (VariableGroup &&)=default | |
VariableGroup & | operator= (VariableGroup &&)=default |
bool | operator== (const VariableGroup &other) const |
unsigned int | n_variables () const |
Variable | variable (unsigned int v) const |
Variable | operator() (unsigned int v) const |
Support vg(v). More... | |
const std::string & | name (unsigned int v) const |
unsigned int | number (unsigned int v) const |
unsigned int | first_scalar_number (unsigned int v) const |
void | append (std::string var_name) |
Appends a variable to the group. More... | |
unsigned int | number () const |
bool | operator== (const Variable &other) const |
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 |
unsigned int | n_components (const MeshBase &mesh) 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 | |
std::vector< std::string > | _names |
System * | _sys |
std::string | _name |
std::set< subdomain_id_type > | _active_subdomains |
unsigned int | _number |
unsigned int | _first_scalar_number |
FEType | _type |
This class defines a logically grouped set of variables in the system.
VariableGroup
is appropriate for representing several unknowns in the problem that are all approximated with the same finite element approximation family and (optionally) a list of subdomains to which the variables are restricted.
Definition at line 203 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 211 of file variable.h.
|
inline |
Constructor.
Takes a set which contains the subdomain indices for which this variable is active.
Definition at line 229 of file variable.h.
|
default |
Standard constructors.
|
default |
|
inlineinherited |
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 167 of file variable.h.
References libMesh::Variable::_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::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::DofMap::local_variable_indices(), libMesh::DofMap::old_dof_indices(), libMesh::BoundaryProjectSolution::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), libMesh::DofMap::reinit(), and libMesh::Nemesis_IO_Helper::write_nodal_solution().
|
inlineinherited |
Definition at line 181 of file variable.h.
References libMesh::Variable::_active_subdomains.
Referenced by libMesh::DifferentiableSystem::add_second_order_dot_vars(), libMesh::System::add_variable(), libMesh::EquationSystems::get_vars_active_subdomains(), main(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), variable(), and libMesh::System::write_header().
|
inline |
Appends a variable to the group.
Really only can be used by System
in a very limited window of opportunity - after the user specifies variables but before the system is initialized.
Definition at line 328 of file variable.h.
References _names.
|
inlineinherited |
Definition at line 138 of file variable.h.
References libMesh::Variable::_first_scalar_number.
Referenced by libMesh::System::n_components(), and variable().
Definition at line 317 of file variable.h.
References libMesh::Variable::_first_scalar_number, and n_variables().
|
inlineinherited |
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 175 of file variable.h.
References libMesh::Variable::_active_subdomains.
Referenced by libMesh::System::add_variable().
|
inherited |
FEFamily
is SCALAR
or if the associated FEFieldType
is TYPE_SCALAR
. Otherwise this will error because determination of the number of components for a TYPE_VECTOR
requires the mesh Definition at line 23 of file variable.C.
References libMesh::Variable::_type, libMesh::FEType::family, libMesh::FEInterface::field_type(), libMesh::OrderWrapper::get_order(), libMesh::FEType::order, libMesh::SCALAR, and libMesh::TYPE_VECTOR.
Referenced by libMesh::System::n_components(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), and libMesh::BoundaryVolumeSolutionTransfer::transfer_volume_boundary().
Definition at line 36 of file variable.C.
References libMesh::Variable::_type, libMesh::FEType::family, libMesh::OrderWrapper::get_order(), mesh, libMesh::FEInterface::n_vec_dim(), libMesh::FEType::order, and libMesh::SCALAR.
|
inline |
VariableGroup
Definition at line 266 of file variable.h.
References _names.
Referenced by libMesh::DofMap::add_variable_group(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::distribute_scalar_dofs(), libMesh::DofMap::dof_indices(), first_scalar_number(), libMesh::System::get_info(), name(), number(), libMesh::DofMap::old_dof_indices(), libMesh::DofMap::reinit(), and variable().
|
inlineinherited |
Definition at line 122 of file variable.h.
References libMesh::Variable::_name.
Referenced by libMesh::DifferentiableSystem::add_second_order_dot_vars(), DMlibMeshSetSystem_libMesh(), libMesh::StaticCondensationDofMap::reinit(), libMesh::MeshfreeSolutionTransfer::transfer(), libMesh::DTKSolutionTransfer::transfer(), and variable().
|
inline |
Definition at line 295 of file variable.h.
References _names, and n_variables().
Referenced by libMesh::System::get_info().
|
inlineinherited |
Definition at line 128 of file variable.h.
References libMesh::Variable::_number.
Referenced by libMesh::MeshFunctionSolutionTransfer::transfer(), libMesh::DirectSolutionTransfer::transfer(), libMesh::MeshfreeSolutionTransfer::transfer(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), libMesh::BoundaryVolumeSolutionTransfer::transfer_volume_boundary(), and variable().
Definition at line 304 of file variable.h.
References libMesh::Variable::_number, and n_variables().
Referenced by libMesh::DofMap::dof_indices(), libMesh::DofMap::old_dof_indices(), and libMesh::StaticCondensationDofMap::reinit().
|
inline |
Support vg(v).
Variable
for v. Definition at line 289 of file variable.h.
References variable().
|
default |
|
default |
|
inlineinherited |
other
Variable has the same characteristics and system numbering as this one. Definition at line 102 of file variable.h.
References libMesh::Variable::_active_subdomains, libMesh::Variable::_first_scalar_number, libMesh::Variable::_name, libMesh::Variable::_sys, and libMesh::Variable::_type.
|
inline |
other
VariableGroup has exactly the same Variable members as this one. Definition at line 257 of file variable.h.
References _names.
|
inlineinherited |
Definition at line 114 of file variable.h.
References libMesh::Variable::_sys.
Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::MeshFunctionSolutionTransfer::transfer(), libMesh::DirectSolutionTransfer::transfer(), libMesh::MeshfreeSolutionTransfer::transfer(), libMesh::BoundaryVolumeSolutionTransfer::transfer(), libMesh::DTKSolutionTransfer::transfer(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), libMesh::BoundaryVolumeSolutionTransfer::transfer_volume_boundary(), and variable().
|
inlineinherited |
FEType
for this variable. Definition at line 144 of file variable.h.
References libMesh::Variable::_type.
Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::_node_dof_indices(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DifferentiableSystem::add_second_order_dot_vars(), libMesh::FEMSystem::assembly(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), 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::distribute_scalar_dofs(), libMesh::DofMap::dof_indices(), libMesh::System::get_info(), main(), libMesh::DifferentiablePhysics::nonlocal_mass_residual(), libMesh::DofMap::old_dof_indices(), libMesh::BoundaryProjectSolution::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), libMesh::System::project_vector(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::StaticCondensationDofMap::reinit(), libMesh::DofMap::reinit(), libMesh::DofMap::SCALAR_dof_indices(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::MeshFunctionSolutionTransfer::transfer(), libMesh::DirectSolutionTransfer::transfer(), variable(), libMesh::System::write_parallel_data(), and libMesh::System::write_serialized_vector().
Variable
object constructed for an individual member of our group. Definition at line 273 of file variable.h.
References libMesh::Variable::active_subdomains(), libMesh::Variable::first_scalar_number(), n_variables(), libMesh::Variable::name(), libMesh::Variable::number(), libMesh::Variable::system(), libMesh::Variable::type(), and libMesh::Variable::Variable().
Referenced by operator()().
|
protectedinherited |
Definition at line 187 of file variable.h.
Referenced by libMesh::Variable::active_on_subdomain(), libMesh::Variable::active_subdomains(), libMesh::Variable::implicitly_active(), and libMesh::Variable::operator==().
|
protectedinherited |
Definition at line 189 of file variable.h.
Referenced by libMesh::Variable::first_scalar_number(), first_scalar_number(), and libMesh::Variable::operator==().
|
protectedinherited |
Definition at line 186 of file variable.h.
Referenced by libMesh::Variable::name(), and libMesh::Variable::operator==().
|
protected |
Definition at line 332 of file variable.h.
Referenced by append(), n_variables(), name(), and operator==().
|
protectedinherited |
Definition at line 188 of file variable.h.
Referenced by libMesh::Variable::number(), and number().
|
protectedinherited |
Definition at line 185 of file variable.h.
Referenced by libMesh::Variable::operator==(), and libMesh::Variable::system().
|
protectedinherited |
Definition at line 190 of file variable.h.
Referenced by libMesh::Variable::n_components(), libMesh::Variable::operator==(), and libMesh::Variable::type().