ParsedFEMFunction 提供对 FEMSystem 中基于 FParser 的解析函数的支持。 更多...
#include <parsed_fem_function.h>
Public 成员函数 | |
ParsedFEMFunction (const System &sys, std::string expression, const std::vector< std::string > *additional_vars=nullptr, const std::vector< Output > *initial_vals=nullptr) | |
构造函数。 更多... | |
ParsedFEMFunction & | operator= (const ParsedFEMFunction &) |
赋值运算符。 更多... | |
ParsedFEMFunction (const ParsedFEMFunction &) | |
复制构造函数。 更多... | |
void | reparse (std::string expression) |
重新解析使用新表达式。 更多... | |
virtual void | init_context (const FEMContext &c) override |
初始化上下文。 更多... | |
virtual std::unique_ptr < FEMFunctionBase< Output > > | clone () const override |
克隆函数。 更多... | |
virtual Output | operator() (const FEMContext &c, const Point &p, const Real time=0.) override |
调用运算符,用于计算解析函数的值。 更多... | |
void | operator() (const FEMContext &c, const Point &p, const Real time, DenseVector< Output > &output) override |
调用运算符,用于计算解析函数的值。 更多... | |
virtual Output | component (const FEMContext &c, unsigned int i, const Point &p, Real time=0.) override |
计算解析函数的第 i 个分量的值。 更多... | |
const std::string & | expression () |
获取解析表达式。 更多... | |
Output | get_inline_value (std::string_view inline_var_name) const |
获取内联变量的值。 更多... | |
void | set_inline_value (std::string_view inline_var_name, Output newval) |
更改内联变量的值。 更多... | |
void | operator() (const FEMContext &, const Point &p, DenseVector< Output > &output) |
计算时间无关的向量值函数的评估函数。将输出值设置在传入的output DenseVector中。 更多... | |
Protected 成员函数 | |
void | partial_reparse (std::string expression) |
用于重新解析表达式的辅助函数。 更多... | |
std::size_t | find_name (std::string_view varname, std::string_view expr) const |
用于解析变量名称的辅助函数。 更多... | |
void | eval_args (const FEMContext &c, const Point &p, const Real time) |
用于计算函数参数的辅助函数。 更多... | |
Output | eval (FunctionParserBase< Output > &parser, std::string_view libmesh_dbg_var(function_name), unsigned int libmesh_dbg_var(component_idx)) const |
评估第 i 个 FunctionParser 并检查结果。 更多... | |
Output | eval (char &libmesh_dbg_var(parser), std::string_view libmesh_dbg_var(function_name), unsigned int libmesh_dbg_var(component_idx)) const |
评估字符对象。 更多... | |
Private 属性 | |
const System & | _sys |
std::string | _expression |
std::vector< std::string > | _subexpressions |
unsigned int | _n_vars |
unsigned int | _n_requested_vars |
unsigned int | _n_requested_grad_components |
unsigned int | _n_requested_hess_components |
bool | _requested_normals |
std::vector< std::unique_ptr < FunctionParserBase< Output > > > | parsers |
std::vector< char * > | parsers |
std::vector< Output > | _spacetime |
std::vector< bool > | _need_var |
std::vector< bool > | _need_var_grad |
std::vector< bool > | _need_var_hess |
std::string | variables |
std::vector< std::string > | _additional_vars |
std::vector< Output > | _initial_vals |
ParsedFEMFunction 提供对 FEMSystem 中基于 FParser 的解析函数的支持。
所有覆盖的虚拟函数在 fem_function_base.h 中有文档说明。
Output | 输出类型,默认为 Number。 |
在文件 parsed_fem_function.h 第 59 行定义.
|
inlineexplicit |
构造函数。
sys | System 对象的引用。 |
expression | 解析表达式。 |
additional_vars | 其他变量的字符串向量(可选,默认为 nullptr)。 |
initial_vals | 初始值的输出向量(可选,默认为 nullptr)。 |
在文件 parsed_fem_function.h 第 292 行定义.
参考 libMesh::ParsedFEMFunction< Output >::reparse().
|
inline |
复制构造函数。
此类包含 unique_ptrs,因此无法进行默认复制构造或赋值。
可以进行默认移动和删除。
在文件 parsed_fem_function.h 第 317 行定义.
参考 libMesh::ParsedFEMFunction< Output >::_expression , 以及 libMesh::ParsedFEMFunction< Output >::reparse().
|
inlineoverridevirtual |
克隆函数。
实现了 libMesh::FEMFunctionBase< Output >.
在文件 parsed_fem_function.h 第 520 行定义.
|
inlineoverridevirtual |
计算解析函数的第 i 个分量的值。
c | FEMContext 对象的引用。 |
i | 分量的索引。 |
p | 点的引用。 |
time | 时间,默认值为 0。 |
重载 libMesh::FEMFunctionBase< Output > .
在文件 parsed_fem_function.h 第 562 行定义.
|
inlineprotected |
评估第 i 个 FunctionParser 并检查结果。
parser | 要评估的 FunctionParserBase 对象。 |
function_name | 函数名称。 |
component_idx | 分量索引。 |
在文件 parsed_fem_function.h 第 934 行定义.
参考 libMesh::err.
|
inlineprotected |
评估字符对象。
parser | 要评估的字符对象。 |
function_name | 函数名称。 |
component_idx | 分量索引。 |
|
inlineprotected |
用于计算函数参数的辅助函数。
c | FEMContext 对象的引用。 |
p | 点的引用。 |
time | 时间。 |
在文件 parsed_fem_function.h 第 805 行定义.
|
inline |
|
inlineprotected |
用于解析变量名称的辅助函数。
varname | 要查找的变量名称。 |
expr | 解析表达式。 |
在文件 parsed_fem_function.h 第 779 行定义.
|
inline |
获取内联变量的值。
inline_var_name | 内联变量的名称。 |
在文件 parsed_fem_function.h 第 576 行定义.
参考 libMesh::Real.
参考自 libMesh::ParsedFEMFunctionParameter< T >::get().
|
inlineoverridevirtual |
初始化上下文。
c | FEMContext 对象的引用。 |
重载 libMesh::FEMFunctionBase< Output > .
在文件 parsed_fem_function.h 第 488 行定义.
|
inlineinherited |
计算时间无关的向量值函数的评估函数。将输出值设置在传入的output DenseVector中。
context | FEM上下文对象。 |
p | 坐标点。 |
output | 输出的向量。 |
在文件 fem_function_base.h 第 153 行定义.
|
inlineoverridevirtual |
调用运算符,用于计算解析函数的值。
c | FEMContext 对象的引用。 |
p | 点的引用。 |
time | 时间,默认值为 0。 |
实现了 libMesh::FEMFunctionBase< Output >.
在文件 parsed_fem_function.h 第 529 行定义.
|
inlineoverridevirtual |
调用运算符,用于计算解析函数的值。
c | FEMContext 对象的引用。 |
p | 点的引用。 |
time | 时间。 |
output | 输出向量的引用。 |
实现了 libMesh::FEMFunctionBase< Output >.
在文件 parsed_fem_function.h 第 543 行定义.
参考 libMesh::DenseVector< T >::size().
|
inline |
赋值运算符。
此类包含一个 const 引用,因此无法进行默认复制或移动赋值。我们手动实现了前者。
此类包含 unique_ptrs,因此无法进行默认复制构造或赋值。
可以进行默认移动和删除。
在文件 parsed_fem_function.h 第 344 行定义.
参考 libMesh::ParsedFEMFunction< Output >::_sys.
|
inlineprotected |
用于重新解析表达式的辅助函数。
expression | 新的解析表达式。 |
在文件 parsed_fem_function.h 第 715 行定义.
参考 libMesh::Real.
|
inline |
重新解析使用新表达式。
expression | 新的解析表达式。 |
在文件 parsed_fem_function.h 第 359 行定义.
参考自 libMesh::ParsedFEMFunction< Output >::ParsedFEMFunction().
|
inline |
更改内联变量的值。
inline_var_name | 内联变量的名称。 |
newval | 新的内联变量值。 |
在文件 parsed_fem_function.h 第 649 行定义.
参考自 libMesh::ParsedFEMFunctionParameter< T >::set().
|
private |
在文件 parsed_fem_function.h 第 283 行定义.
|
private |
|
private |
在文件 parsed_fem_function.h 第 284 行定义.
|
private |
在文件 parsed_fem_function.h 第 255 行定义.
|
private |
在文件 parsed_fem_function.h 第 255 行定义.
|
private |
在文件 parsed_fem_function.h 第 255 行定义.
|
private |
在文件 parsed_fem_function.h 第 255 行定义.
|
private |
在文件 parsed_fem_function.h 第 270 行定义.
|
private |
在文件 parsed_fem_function.h 第 273 行定义.
|
private |
在文件 parsed_fem_function.h 第 278 行定义.
|
private |
在文件 parsed_fem_function.h 第 259 行定义.
|
private |
在文件 parsed_fem_function.h 第 265 行定义.
|
private |
在文件 parsed_fem_function.h 第 254 行定义.
|
private |
|
private |
在文件 parsed_fem_function.h 第 261 行定义.
|
private |
在文件 parsed_fem_function.h 第 263 行定义.
|
private |
在文件 parsed_fem_function.h 第 282 行定义.