libmesh解析
本工作只是尝试解析原libmesh的代码,供学习使用
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 
Public 成员函数 | Protected 属性 | 所有成员列表
libMesh::Variable类 参考

This class defines the notion of a variable in the system. 更多...

#include <variable.h>

类 libMesh::Variable 继承关系图:
[图例]

Public 成员函数

 Variable (System *sys, std::string var_name, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type)
 Constructor. 更多...
 
 Variable (System *sys, 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)
 Constructor. 更多...
 
 Variable (const Variable &)=default
 Standard constructors. 更多...
 
Variableoperator= (const Variable &)=default
 
 Variable (Variable &&)=default
 
Variableoperator= (Variable &&)=default
 
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
 
bool active_on_subdomain (subdomain_id_type sid) const
 
bool implicitly_active () const
 
const std::set
< subdomain_id_type > & 
active_subdomains () const
 

Protected 属性

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 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.

作者
Roy Stogner
日期
2010 A variable which is solved for in a System of equations.

在文件 variable.h49 行定义.

构造及析构函数说明

libMesh::Variable::Variable ( System *  sys,
std::string  var_name,
const unsigned int  var_number,
const unsigned int  first_scalar_num,
const FEType &  var_type 
)
inline

Constructor.

Omits the subdomain mapping, hence this constructor creates a variable which is active on all subdomains.

在文件 variable.h58 行定义.

参考自 libMesh::VariableGroup::variable().

62  :
63  _sys(sys),
64  _name(std::move(var_name)),
66  _number(var_number),
67  _first_scalar_number(first_scalar_num),
68  _type(var_type)
69  {}
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
std::string _name
Definition: variable.h:176
unsigned int _first_scalar_number
Definition: variable.h:179
System * _sys
Definition: variable.h:175
unsigned int _number
Definition: variable.h:178
libMesh::Variable::Variable ( System *  sys,
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 
)
inline

Constructor.

Takes a set which contains the subdomain indices for which this variable is active.

在文件 variable.h75 行定义.

80  :
81  _sys(sys),
82  _name(std::move(var_name)),
83  _active_subdomains(var_active_subdomains),
84  _number(var_number),
85  _first_scalar_number(first_scalar_num),
86  _type(var_type)
87  {}
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
std::string _name
Definition: variable.h:176
unsigned int _first_scalar_number
Definition: variable.h:179
System * _sys
Definition: variable.h:175
unsigned int _number
Definition: variable.h:178
libMesh::Variable::Variable ( const Variable )
default

Standard constructors.

libMesh::Variable::Variable ( Variable &&  )
default

成员函数说明

bool libMesh::Variable::active_on_subdomain ( subdomain_id_type  sid) const
inline
返回
true if this variable is active on subdomain sid, false otherwise.
注解
We interpret the special case of an empty _active_subdomains container as active everywhere, i.e. for all subdomains.

在文件 variable.h157 行定义.

参考 _active_subdomains.

参考自 libMesh::DofMap::_dof_indices(), 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::DofMap::reinit().

158  { return (_active_subdomains.empty() || _active_subdomains.count(sid)); }
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
const std::set<subdomain_id_type>& libMesh::Variable::active_subdomains ( ) const
inline
返回
The set of subdomain ids this variable lives on.

在文件 variable.h171 行定义.

参考 _active_subdomains.

参考自 libMesh::VariableGroup::variable().

172  { return _active_subdomains; }
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
unsigned int libMesh::Variable::first_scalar_number ( ) const
inline
返回
The index of the first scalar component of this variable in the system.

在文件 variable.h134 行定义.

参考 _first_scalar_number.

参考自 libMesh::VariableGroup::variable().

135  { return _first_scalar_number; }
unsigned int _first_scalar_number
Definition: variable.h:179
bool libMesh::Variable::implicitly_active ( ) const
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.

在文件 variable.h165 行定义.

参考 _active_subdomains.

166  { return _active_subdomains.empty(); }
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
unsigned int libMesh::Variable::n_components ( ) const
inline
返回
The number of components of this variable.

在文件 variable.h146 行定义.

参考 _type , 以及 type().

147  { return type().family == SCALAR ? _type.order.get_order() : 1; }
const FEType & type() const
Definition: variable.h:140
const std::string& libMesh::Variable::name ( ) const
inline
返回
The user-specified name of the variable.

在文件 variable.h121 行定义.

参考 _name.

参考自 libMesh::VariableGroup::variable().

122  { return _name; }
std::string _name
Definition: variable.h:176
unsigned int libMesh::Variable::number ( ) const
inline
返回
The rank of this variable in the system.

在文件 variable.h127 行定义.

参考 _number.

参考自 libMesh::VariableGroup::variable().

128  { return _number; }
unsigned int _number
Definition: variable.h:178
Variable& libMesh::Variable::operator= ( const Variable )
default
Variable& libMesh::Variable::operator= ( Variable &&  )
default
bool libMesh::Variable::operator== ( const Variable other) const
inline
返回
true iff the other Variable has the same characteristics and system numbering as this one.

在文件 variable.h101 行定义.

参考 _active_subdomains, _first_scalar_number, _name, _sys , 以及 _type.

102  {
103  return (_sys == other._sys) &&
104  (_name == other._name) &&
105  (_active_subdomains == other._active_subdomains) &&
106  (_first_scalar_number == other._first_scalar_number) &&
107  (_type == other._type);
108  }
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
std::string _name
Definition: variable.h:176
unsigned int _first_scalar_number
Definition: variable.h:179
System * _sys
Definition: variable.h:175
System* libMesh::Variable::system ( ) const
inline
返回
A pointer to the System this Variable is part of.

在文件 variable.h113 行定义.

参考 _sys.

参考自 libMesh::VariableGroup::variable().

114  {
115  return _sys;
116  }
System * _sys
Definition: variable.h:175
const FEType& libMesh::Variable::type ( ) const
inline

类成员变量说明

std::set<subdomain_id_type> libMesh::Variable::_active_subdomains
protected
unsigned int libMesh::Variable::_first_scalar_number
protected
std::string libMesh::Variable::_name
protected

在文件 variable.h176 行定义.

参考自 name() , 以及 operator==().

unsigned int libMesh::Variable::_number
protected

在文件 variable.h178 行定义.

参考自 number() , 以及 libMesh::VariableGroup::number().

System* libMesh::Variable::_sys
protected

在文件 variable.h175 行定义.

参考自 operator==() , 以及 system().

FEType libMesh::Variable::_type
protected

在文件 variable.h180 行定义.

参考自 n_components(), operator==() , 以及 type().


该类的文档由以下文件生成: