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

This class defines a logically grouped set of variables in the system. 更多...

#include <variable.h>

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

Public 成员函数

 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. 更多...
 
 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. 更多...
 
 VariableGroup (const VariableGroup &)=default
 Standard constructors. 更多...
 
VariableGroupoperator= (const VariableGroup &)=default
 
 VariableGroup (VariableGroup &&)=default
 
VariableGroupoperator= (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). 更多...
 
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. 更多...
 
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 属性

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.

在文件 variable.h193 行定义.

构造及析构函数说明

libMesh::VariableGroup::VariableGroup ( System *  sys,
std::vector< std::string >  var_names,
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.h201 行定义.

205  :
206  Variable (sys,
207  "var_group",
208  var_number,
209  first_scalar_num,
210  var_type),
211  _names(std::move(var_names))
212  {}
Variable(System *sys, std::string var_name, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type)
Constructor.
Definition: variable.h:58
std::vector< std::string > _names
Definition: variable.h:322
libMesh::VariableGroup::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 
)
inline

Constructor.

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

在文件 variable.h219 行定义.

224  :
225 
226  Variable (sys,
227  "var_group",
228  var_number,
229  first_scalar_num,
230  var_type,
231  var_active_subdomains),
232  _names(std::move(var_names))
233  {}
Variable(System *sys, std::string var_name, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type)
Constructor.
Definition: variable.h:58
std::vector< std::string > _names
Definition: variable.h:322
libMesh::VariableGroup::VariableGroup ( const VariableGroup )
default

Standard constructors.

libMesh::VariableGroup::VariableGroup ( VariableGroup &&  )
default

成员函数说明

bool libMesh::Variable::active_on_subdomain ( subdomain_id_type  sid) const
inlineinherited
返回
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 行定义.

参考 libMesh::Variable::_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
inlineinherited
返回
The set of subdomain ids this variable lives on.

在文件 variable.h171 行定义.

参考 libMesh::Variable::_active_subdomains.

参考自 variable().

172  { return _active_subdomains; }
std::set< subdomain_id_type > _active_subdomains
Definition: variable.h:177
void libMesh::VariableGroup::append ( std::string  var_name)
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.

在文件 variable.h318 行定义.

参考 _names.

319  { _names.push_back (std::move(var_name)); }
std::vector< std::string > _names
Definition: variable.h:322
unsigned int libMesh::Variable::first_scalar_number ( ) const
inlineinherited
返回
The index of the first scalar component of this variable in the system.

在文件 variable.h134 行定义.

参考 libMesh::Variable::_first_scalar_number.

参考自 variable().

135  { return _first_scalar_number; }
unsigned int _first_scalar_number
Definition: variable.h:179
unsigned int libMesh::VariableGroup::first_scalar_number ( unsigned int  v) const
inline
返回
The index of the first scalar component of this variable in the system.

在文件 variable.h307 行定义.

参考 libMesh::Variable::_first_scalar_number , 以及 n_variables().

308  {
309  libmesh_assert_less (v, this->n_variables());
310  return _first_scalar_number+v;
311  }
unsigned int _first_scalar_number
Definition: variable.h:179
unsigned int n_variables() const
Definition: variable.h:256
bool libMesh::Variable::implicitly_active ( ) const
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.

在文件 variable.h165 行定义.

参考 libMesh::Variable::_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
inlineinherited
返回
The number of components of this variable.

在文件 variable.h146 行定义.

参考 libMesh::Variable::_type , 以及 libMesh::Variable::type().

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

在文件 variable.h121 行定义.

参考 libMesh::Variable::_name.

参考自 variable().

122  { return _name; }
std::string _name
Definition: variable.h:176
const std::string& libMesh::VariableGroup::name ( unsigned int  v) const
inline
返回
The user-specified name of the variable.

在文件 variable.h285 行定义.

参考 _names , 以及 n_variables().

286  {
287  libmesh_assert_less (v, this->n_variables());
288  return _names[v];
289  }
unsigned int n_variables() const
Definition: variable.h:256
std::vector< std::string > _names
Definition: variable.h:322
unsigned int libMesh::Variable::number ( ) const
inlineinherited
返回
The rank of this variable in the system.

在文件 variable.h127 行定义.

参考 libMesh::Variable::_number.

参考自 variable().

128  { return _number; }
unsigned int _number
Definition: variable.h:178
unsigned int libMesh::VariableGroup::number ( unsigned int  v) const
inline
返回
The rank of this variable in the system.

在文件 variable.h294 行定义.

参考 libMesh::Variable::_number , 以及 n_variables().

参考自 libMesh::DofMap::dof_indices() , 以及 libMesh::DofMap::old_dof_indices().

295  {
296  libmesh_assert_less (v, this->n_variables());
297  return _number + v;
298  }
unsigned int n_variables() const
Definition: variable.h:256
unsigned int _number
Definition: variable.h:178
Variable libMesh::VariableGroup::operator() ( unsigned int  v) const
inline

Support vg(v).

返回
A Variable for v.

在文件 variable.h279 行定义.

参考 variable().

280  { return this->variable(v); }
Variable variable(unsigned int v) const
Definition: variable.h:263
VariableGroup& libMesh::VariableGroup::operator= ( const VariableGroup )
default
VariableGroup& libMesh::VariableGroup::operator= ( VariableGroup &&  )
default
bool libMesh::Variable::operator== ( const Variable other) const
inlineinherited
返回
true iff the other Variable has the same characteristics and system numbering as this one.

在文件 variable.h101 行定义.

参考 libMesh::Variable::_active_subdomains, libMesh::Variable::_first_scalar_number, libMesh::Variable::_name, libMesh::Variable::_sys , 以及 libMesh::Variable::_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
bool libMesh::VariableGroup::operator== ( const VariableGroup other) const
inline
返回
true iff the other VariableGroup has exactly the same Variable members as this one.

在文件 variable.h247 行定义.

参考 _names.

248  {
249  return (this->Variable::operator==(other)) &&
250  (_names == other._names);
251  }
std::vector< std::string > _names
Definition: variable.h:322
System* libMesh::Variable::system ( ) const
inlineinherited
返回
A pointer to the System this Variable is part of.

在文件 variable.h113 行定义.

参考 libMesh::Variable::_sys.

参考自 variable().

114  {
115  return _sys;
116  }
System * _sys
Definition: variable.h:175
const FEType& libMesh::Variable::type ( ) const
inlineinherited
Variable libMesh::VariableGroup::variable ( unsigned int  v) const
inline
返回
A Variable object constructed for an individual member of our group.

在文件 variable.h263 行定义.

参考 libMesh::Variable::active_subdomains(), libMesh::Variable::first_scalar_number(), n_variables(), libMesh::Variable::name(), libMesh::Variable::number(), libMesh::Variable::system(), libMesh::Variable::type() , 以及 libMesh::Variable::Variable().

参考自 operator()().

264  {
265  libmesh_assert_less (v, this->n_variables());
266  return Variable (this->system(),
267  this->name(v),
268  this->number(v),
269  this->first_scalar_number(v),
270  this->type(),
271  this->active_subdomains());
272  }
const FEType & type() const
Definition: variable.h:140
const std::string & name() const
Definition: variable.h:121
Variable(System *sys, std::string var_name, const unsigned int var_number, const unsigned int first_scalar_num, const FEType &var_type)
Constructor.
Definition: variable.h:58
unsigned int first_scalar_number() const
Definition: variable.h:134
unsigned int number() const
Definition: variable.h:127
unsigned int n_variables() const
Definition: variable.h:256
System * system() const
Definition: variable.h:113
const std::set< subdomain_id_type > & active_subdomains() const
Definition: variable.h:171

类成员变量说明

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

在文件 variable.h176 行定义.

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

std::vector<std::string> libMesh::VariableGroup::_names
protected

在文件 variable.h322 行定义.

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

unsigned int libMesh::Variable::_number
protectedinherited

在文件 variable.h178 行定义.

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

System* libMesh::Variable::_sys
protectedinherited

在文件 variable.h175 行定义.

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

FEType libMesh::Variable::_type
protectedinherited

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