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

由Roy Stogner创作 2012年 更多...

#include <const_fem_function.h>

类 libMesh::ConstFEMFunction< Output > 继承关系图:
[图例]

Public 成员函数

 ConstFEMFunction (const Output c)
 构造函数,用于初始化常量值。 更多...
 
 ConstFEMFunction (ConstFEMFunction &&)=default
 该类可以使用默认的移动构造和分配。 更多...
 
 ConstFEMFunction (const ConstFEMFunction &)=default
 
ConstFEMFunctionoperator= (const ConstFEMFunction &)=default
 
ConstFEMFunctionoperator= (ConstFEMFunction &&)=default
 
virtual ~ConstFEMFunction ()=default
 默认析构函数。 更多...
 
virtual std::unique_ptr
< FEMFunctionBase< Output > > 
clone () const override
 克隆函数。创建并返回一个与当前实例相同类型的新实例。 更多...
 
virtual Output operator() (const FEMContext &c, const Point &p, const Real=0.) override
 重载操作符,用于计算标量值。 更多...
 
virtual void operator() (const FEMContext &c, const Point &p, const Real, DenseVector< Output > &output) override
 重载操作符,用于计算矢量值。 更多...
 
virtual void init_context (const FEMContext &)
 准备上下文对象以供使用。 更多...
 
void operator() (const FEMContext &, const Point &p, DenseVector< Output > &output)
 计算时间无关的向量值函数的评估函数。将输出值设置在传入的output DenseVector中。 更多...
 
virtual Output component (const FEMContext &, unsigned int i, const Point &p, Real time=0.)
 返回坐标p和时间time的向量分量i。 更多...
 

Private 属性

Output _c
 

详细描述

template<typename Output = Number>
class libMesh::ConstFEMFunction< Output >

由Roy Stogner创作 2012年

返回单个值的FEMFunction,与时间和位置输入无关。

在文件 const_fem_function.h42 行定义.

构造及析构函数说明

template<typename Output = Number>
libMesh::ConstFEMFunction< Output >::ConstFEMFunction ( const Output  c)
inline

构造函数,用于初始化常量值。

参数
c返回的常量值。

在文件 const_fem_function.h49 行定义.

template<typename Output = Number>
libMesh::ConstFEMFunction< Output >::ConstFEMFunction ( ConstFEMFunction< Output > &&  )
default

该类可以使用默认的移动构造和分配。

template<typename Output = Number>
libMesh::ConstFEMFunction< Output >::ConstFEMFunction ( const ConstFEMFunction< Output > &  )
default
template<typename Output = Number>
virtual libMesh::ConstFEMFunction< Output >::~ConstFEMFunction ( )
virtualdefault

默认析构函数。

成员函数说明

template<typename Output = Number>
virtual std::unique_ptr<FEMFunctionBase<Output> > libMesh::ConstFEMFunction< Output >::clone ( ) const
inlineoverridevirtual

克隆函数。创建并返回一个与当前实例相同类型的新实例。

返回
新实例的指针。

实现了 libMesh::FEMFunctionBase< Output >.

在文件 const_fem_function.h68 行定义.

69  {return std::make_unique<ConstFEMFunction>(*this); }
template<typename Output >
Output libMesh::FEMFunctionBase< Output >::component ( const FEMContext &  context,
unsigned int  i,
const Point &  p,
Real  time = 0. 
)
inlinevirtualinherited

返回坐标p和时间time的向量分量i。

参数
contextFEM上下文对象。
i向量的分量索引。
p坐标点。
time时间。
返回
返回向量的指定分量值。

注意:子类不需要重写此函数,因为默认实现基于完整向量评估,通常是正确的。 注意:建议子类重写此函数,因为默认实现基于向量评估,通常是不必要的低效的。

libMesh::CompositeFEMFunction< Output >, libMesh::ParsedFEMFunction< Output >, libMesh::ParsedFEMFunction< T > , 以及 libMesh::WrappedFunctor< Output > 重载.

在文件 fem_function_base.h141 行定义.

145 {
146  DenseVector<Output> outvec(i+1);
147  (*this)(context, p, time, outvec);
148  return outvec(i);
149 }
template<typename Output>
virtual void libMesh::FEMFunctionBase< Output >::init_context ( const FEMContext &  )
inlinevirtualinherited

准备上下文对象以供使用。

大多数问题将希望出于效率的考虑重新实现此函数,以便根据其特定的函数要求调用FE::get_*()。

参数
contextFEM上下文对象。

libMesh::ParsedFEMFunction< Output > , 以及 libMesh::ParsedFEMFunction< T > 重载.

在文件 fem_function_base.h70 行定义.

70 {}
template<typename Output = Number>
virtual Output libMesh::ConstFEMFunction< Output >::operator() ( const FEMContext &  c,
const Point &  p,
const Real  = 0. 
)
inlineoverridevirtual

重载操作符,用于计算标量值。

参数
cFEM上下文。
p计算点的坐标。
time时间值,默认为0。
返回
计算得到的标量值。

实现了 libMesh::FEMFunctionBase< Output >.

在文件 const_fem_function.h78 行定义.

参考 libMesh::ConstFEMFunction< Output >::_c.

81  { return _c; }
template<typename Output = Number>
virtual void libMesh::ConstFEMFunction< Output >::operator() ( const FEMContext &  c,
const Point &  p,
const Real  ,
DenseVector< Output > &  output 
)
inlineoverridevirtual

重载操作符,用于计算矢量值。

参数
cFEM上下文。
p计算点的坐标。
time时间值。
output计算得到的矢量值。

实现了 libMesh::FEMFunctionBase< Output >.

在文件 const_fem_function.h90 行定义.

参考 libMesh::ConstFEMFunction< Output >::_c.

94  {
95  // 将输出矢量的每个分量设置为常量值
96  for (auto i : index_range(output))
97  output(i) = _c;
98  }
template<typename Output >
void libMesh::FEMFunctionBase< Output >::operator() ( const FEMContext &  context,
const Point &  p,
DenseVector< Output > &  output 
)
inlineinherited

计算时间无关的向量值函数的评估函数。将输出值设置在传入的output DenseVector中。

参数
contextFEM上下文对象。
p坐标点。
output输出的向量。

在文件 fem_function_base.h153 行定义.

156 {
157  // 调用时间相关的函数,t=0。
158  this->operator()(context, p, 0., output);
159 }
virtual Output operator()(const FEMContext &, const Point &p, const Real time=0.)=0
计算坐标p和时间time(默认为0)处的标量函数值。
template<typename Output = Number>
ConstFEMFunction& libMesh::ConstFEMFunction< Output >::operator= ( const ConstFEMFunction< Output > &  )
default
template<typename Output = Number>
ConstFEMFunction& libMesh::ConstFEMFunction< Output >::operator= ( ConstFEMFunction< Output > &&  )
default

类成员变量说明

template<typename Output = Number>
Output libMesh::ConstFEMFunction< Output >::_c
private

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