System::Variable Class Reference
#include <system.h>
Public Member Functions | |
| Variable (const std::string &var_name, const unsigned int var_number, const FEType &var_type) | |
| Variable (const std::string &var_name, const unsigned int var_number, const FEType &var_type, const std::set< subdomain_id_type > &var_active_subdomains) | |
| const std::string & | name () const |
| unsigned int | number () const |
| const FEType & | type () const |
| bool | active_on_subdomain (const subdomain_id_type sid) const |
| bool | implicitly_active () const |
Private Attributes | |
| std::string | _name |
| unsigned int | _number |
| FEType | _type |
| std::set< subdomain_id_type > | _active_subdomains |
Detailed Description
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 687 of file system.h.
Constructor & Destructor Documentation
| System::Variable::Variable | ( | const std::string & | var_name, | |
| const unsigned int | var_number, | |||
| const FEType & | var_type | |||
| ) | [inline] |
| System::Variable::Variable | ( | const std::string & | var_name, | |
| const unsigned int | var_number, | |||
| const FEType & | var_type, | |||
| const std::set< subdomain_id_type > & | var_active_subdomains | |||
| ) | [inline] |
Member Function Documentation
| bool System::Variable::active_on_subdomain | ( | const subdomain_id_type | sid | ) | const [inline] |
returns true if this variable is active on subdomain sid, false otherwise. Note that we interperet the special case of an empty _active_subdomains container as active everywhere, i.e. for all subdomains.
Definition at line 742 of file system.h.
References _active_subdomains.
Referenced by EquationSystems::build_solution_vector(), DofMap::distribute_local_dofs_var_major(), and DofMap::reinit().
00743 { return (_active_subdomains.empty() || _active_subdomains.count(sid)); }
| bool System::Variable::implicitly_active | ( | ) | const [inline] |
returns 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 750 of file system.h.
References _active_subdomains.
Referenced by EquationSystems::build_solution_vector().
00751 { return _active_subdomains.empty(); }
| const std::string& System::Variable::name | ( | ) | const [inline] |
| unsigned int System::Variable::number | ( | ) | const [inline] |
| const FEType& System::Variable::type | ( | ) | const [inline] |
The FEType for this variable.
Definition at line 733 of file system.h.
References _type.
Referenced by DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), System::ProjectVector::operator()(), System::project_vector(), and DofMap::SCALAR_dof_indices().
00734 { return _type; }
Member Data Documentation
std::set<subdomain_id_type> System::Variable::_active_subdomains [private] |
Definition at line 757 of file system.h.
Referenced by active_on_subdomain(), and implicitly_active().
std::string System::Variable::_name [private] |
unsigned int System::Variable::_number [private] |
FEType System::Variable::_type [private] |
The documentation for this class was generated from the following file: