提供了不同线性代数库的向量存储方案的统一接口。 更多...
#include <dof_map.h>
Public 成员函数 | |
NumericVector (const Parallel::Communicator &comm_in, const ParallelType ptype=AUTOMATIC) | |
虚拟构造函数。维度=0。 更多... | |
NumericVector (const Parallel::Communicator &comm_in, const numeric_index_type n, const ParallelType ptype=AUTOMATIC) | |
构造函数。将维度设置为 n,并初始化所有元素为零。 更多... | |
NumericVector (const Parallel::Communicator &comm_in, const numeric_index_type n, const numeric_index_type n_local, const ParallelType ptype=AUTOMATIC) | |
构造函数。将本地维度设置为 n_local ,全局维度设置为 n ,并初始化所有元素为零。 更多... | |
NumericVector (const Parallel::Communicator &comm_in, const numeric_index_type N, const numeric_index_type n_local, const std::vector< numeric_index_type > &ghost, const ParallelType ptype=AUTOMATIC) | |
构造函数。将本地维度设置为 n_local ,全局维度设置为 n ,但还为由 ghost 参数指定的索引保留内存。 更多... | |
virtual NumericVector< T > & | operator= (const NumericVector< T > &v)=0 |
一个复制赋值运算符 更多... | |
NumericVector (NumericVector &&)=default | |
这 5 个特殊函数可以为这个类提供默认值,因为它本身不管理任何内存。 更多... | |
NumericVector (const NumericVector &)=default | |
NumericVector & | operator= (NumericVector &&)=default |
virtual | ~NumericVector ()=default |
虽然这个类不管理任何内存,但派生类可能会管理内存,用户可能会通过指向这个基类的指针删除内存。 更多... | |
virtual bool | initialized () const |
检查向量是否已经初始化。 更多... | |
ParallelType | type () const |
获取向量的类型。 更多... | |
ParallelType & | type () |
获取向量的类型。 更多... | |
virtual bool | closed () const |
检查向量是否已经关闭并准备好进行计算。 更多... | |
virtual void | close ()=0 |
调用 NumericVector 的内部组装函数,确保值在处理器之间一致。 更多... | |
virtual void | clear () |
将 NumericVector<T> 恢复到原始状态。 更多... | |
virtual void | zero ()=0 |
将所有条目设置为零。等同于 v = 0,但更明显且更快。 更多... | |
virtual std::unique_ptr < NumericVector< T > > | zero_clone () const =0 |
返回一个智能指针,指向具有相同类型、大小和分区的此向量的副本,但所有条目都为零。 更多... | |
virtual std::unique_ptr < NumericVector< T > > | clone () const =0 |
返回一个包装了此向量副本的智能指针。 更多... | |
virtual void | init (const numeric_index_type n, const numeric_index_type n_local, const bool fast=false, const ParallelType ptype=AUTOMATIC)=0 |
更改向量的维度为 n 。如果可能的话 ,该向量的保留内存保持不变。 如果 n==0 ,所有内存都将被释放。因此,如果要调整向量的大小并释放不需要的内存, 必须首先调用 init(0) ,然后调用 init(n) 。这种行为类似于 STL 容器。 更多... | |
virtual void | init (const numeric_index_type n, const bool fast=false, const ParallelType ptype=AUTOMATIC)=0 |
调用 init() ,其中 n_local = N。 更多... | |
virtual void | init (const numeric_index_type n, const numeric_index_type n_local, const std::vector< numeric_index_type > &ghost, const bool fast=false, const ParallelType ptype=AUTOMATIC)=0 |
创建一个包含本地索引以及在 ghost 参数中指定的索引的向量。 更多... | |
virtual void | init (const NumericVector< T > &other, const bool fast=false)=0 |
创建一个具有与 other 相同维度和存储类型的向量,包括 ghost dofs。 更多... | |
virtual NumericVector< T > & | operator= (const T s)=0 |
设置向量的所有条目为值 s。 更多... | |
virtual NumericVector< T > & | operator= (const std::vector< T > &v)=0 |
设置 (*this)(i) = v(i) 对于向量的每个条目。 更多... | |
virtual Real | min () const =0 |
获取向量中的最小值,或者在复数情况下获取最小的实部。 更多... | |
virtual Real | max () const =0 |
获取向量中的最大值,或者在复数情况下获取最大的实部。 更多... | |
virtual T | sum () const =0 |
获取向量中所有值的总和。 更多... | |
virtual Real | l1_norm () const =0 |
获取向量的 ![]() | |
virtual Real | l2_norm () const =0 |
获取向量的 ![]() | |
virtual Real | linfty_norm () const =0 |
获取向量的 ![]() | |
virtual Real | subset_l1_norm (const std::set< numeric_index_type > &indices) const |
获取指定条目的向量的 ![]() | |
virtual Real | subset_l2_norm (const std::set< numeric_index_type > &indices) const |
获取指定条目的向量的 ![]() | |
virtual Real | subset_linfty_norm (const std::set< numeric_index_type > &indices) const |
获取指定条目的向量的最大绝对值,即指定条目的 ![]() | |
Real | l2_norm_diff (const NumericVector< T > &other_vec) const |
获取 ![]() ![]() ![]() this。 更多... | |
virtual numeric_index_type | size () const =0 |
获取向量的大小。 更多... | |
virtual numeric_index_type | local_size () const =0 |
获取向量的本地大小,即 index_stop - index_start。 更多... | |
virtual numeric_index_type | first_local_index () const =0 |
获取实际存储在该处理器上的第一个向量元素的索引。 更多... | |
virtual numeric_index_type | last_local_index () const =0 |
获取实际存储在该处理器上的最后一个向量元素的索引+1。 更多... | |
virtual T | operator() (const numeric_index_type i) const =0 |
获取向量的第 i 个条目的副本。 更多... | |
virtual T | el (const numeric_index_type i) const |
获取向量的第 i 个条目。 更多... | |
virtual void | get (const std::vector< numeric_index_type > &index, T *values) const |
一次访问多个组件。 values 将 *不会* 重新分配空间;它应该已经具有足够的空间。 默认实现对每个索引调用 operator() ,但某些实现可能在此处提供更快的方法。 更多... | |
void | get (const std::vector< numeric_index_type > &index, std::vector< T > &values) const |
一次访问多个组件。 values 将被调整大小,如果需要,将被填充。 默认实现对每个索引调用 operator() ,但某些实现可能在此处提供更快的方法。 更多... | |
virtual NumericVector< T > & | operator+= (const NumericVector< T > &v)=0 |
将向量加上 v , ![]() u.add(1, v)。 更多... | |
virtual NumericVector< T > & | operator-= (const NumericVector< T > &v)=0 |
将 v 从 *this 减去, ![]() u.add (-1, v)。 更多... | |
NumericVector< T > & | operator*= (const T a) |
将向量缩放为 a , ![]() u.scale(a)。 更多... | |
virtual NumericVector< T > & | operator*= (const NumericVector< T > &v)=0 |
计算此向量条目与另一个向量的条目之间的分量乘法, ![]() | |
NumericVector< T > & | operator/= (const T a) |
将向量缩放为 1/a , ![]() u.scale (1. 更多... | |
virtual NumericVector< T > & | operator/= (const NumericVector< T > &v)=0 |
计算此向量条目与另一个向量的分量除法, ![]() | |
virtual void | reciprocal ()=0 |
计算每个向量条目的分量倒数, ![]() | |
virtual void | conjugate ()=0 |
反转向量中每个条目的虚部。 更多... | |
virtual void | set (const numeric_index_type i, const T value)=0 |
设置 v(i) = value 。 请注意,此方法的库实现是线程安全的, 例如,将在写入向量之前锁定 _numeric_vector_mutex 。 更多... | |
virtual void | add (const numeric_index_type i, const T value)=0 |
将 value 添加到由 i 指定的向量条目。 请注意,此方法的库实现是线程安全的, 例如,将在写入向量之前锁定 _numeric_vector_mutex 。 更多... | |
virtual void | add (const T s)=0 |
将 s 添加到向量的每个条目, ![]() | |
virtual void | add (const NumericVector< T > &v)=0 |
将 v 添加到 *this, ![]() operator+=()。 更多... | |
virtual void | add (const T a, const NumericVector< T > &v)=0 |
带有标量倍数的向量相加, ![]() operator+=()。 更多... | |
virtual void | add_vector (const T *v, const std::vector< numeric_index_type > &dof_indices) |
计算 ![]() v 是一个指针, 每个 dof_indices [i] 指定了要添加的值 v [i] 的位置。 这应该在子类中进行重写以提高效率。请注意,此方法的库实现是线程安全的。 更多... | |
void | add_vector (const std::vector< T > &v, const std::vector< numeric_index_type > &dof_indices) |
计算 ![]() v 是一个 std::vector, 每个 dof_indices [i] 指定了要添加的值 v [i] 的位置 默认实现对每个索引调用 operator() ,但某些实现可能在此处提供更快的方法。 请注意,此方法的库实现是线程安全的。 更多... | |
void | add_vector (const NumericVector< T > &v, const std::vector< numeric_index_type > &dof_indices) |
计算 ![]() v 是一个 NumericVector, 每个 dof_indices [i] 指定了要添加的值 v(i) 的位置。此方法是线程安全的。 更多... | |
void | add_vector (const DenseVector< T > &v, const std::vector< numeric_index_type > &dof_indices) |
计算 ![]() v 是一个 DenseVector, 每个 dof_indices [i] 指定了要添加的值 v(i) 的位置。此方法是线程安全的。 更多... | |
virtual void | add_vector (const NumericVector< T > &v, const SparseMatrix< T > &A)=0 |
计算 ![]() SparseMatrix A 和 NumericVector v 的乘积添加到 this。 更多... | |
void | add_vector (const NumericVector< T > &v, const ShellMatrix< T > &A) |
计算 ![]() ShellMatrix A 和 NumericVector v 的乘积添加到 this。 更多... | |
virtual void | add_vector_transpose (const NumericVector< T > &v, const SparseMatrix< T > &A)=0 |
计算 ![]() A 的转置与 NumericVector v 的乘积添加到 this。 更多... | |
virtual void | insert (const T *v, const std::vector< numeric_index_type > &dof_indices) |
将 v 的条目插入到 *this 中,位置由 dof_indices 指定。请注意,此方法的库实现是线程安全的。 更多... | |
void | insert (const NumericVector< T > &v, const std::vector< numeric_index_type > &dof_indices) |
将 v 的条目插入到 *this 中,位置由 v 指定。 只要使用 NumericVector 的库实现,此方法是线程安全的。 更多... | |
void | insert (const DenseVector< T > &v, const std::vector< numeric_index_type > &dof_indices) |
将 v 的条目插入到 *this 中,位置由 v 指定。 只要使用 NumericVector 的库实现,此方法是线程安全的。 更多... | |
void | insert (const DenseSubVector< T > &v, const std::vector< numeric_index_type > &dof_indices) |
将 v 的条目插入到 *this 中,位置由 v 指定。 只要使用 NumericVector 的库实现,此方法是线程安全的。 更多... | |
virtual void | scale (const T factor)=0 |
缩放向量的每个元素。 更多... | |
virtual void | abs ()=0 |
设置 ![]() | |
virtual T | dot (const NumericVector< T > &v) const =0 |
计算 ![]() v 的点积。 更多... | |
virtual void | localize (std::vector< T > &v_local) const =0 |
创建全局向量的副本并存储在本地向量 v_local 中。 更多... | |
virtual void | localize (NumericVector< T > &v_local) const =0 |
创建全局向量的副本并存储在本地向量 v_local 中,而不是 std::vector。 更多... | |
virtual void | localize (NumericVector< T > &v_local, const std::vector< numeric_index_type > &send_list) const =0 |
创建本地向量 v_local ,其中仅包含与此处理器相关的信息,由 send_list 定义。 更多... | |
virtual void | localize (std::vector< T > &v_local, const std::vector< numeric_index_type > &indices) const =0 |
用全局索引中给定的值填充本地 std::vector "v_local"。 更多... | |
virtual void | localize (const numeric_index_type first_local_idx, const numeric_index_type last_local_idx, const std::vector< numeric_index_type > &send_list)=0 |
使用由 send_list 指定的值从相邻处理器中选择的值更新本地向量。 更多... | |
virtual void | localize_to_one (std::vector< T > &v_local, const processor_id_type proc_id=0) const =0 |
在处理器 proc_id 上创建全局向量的本地副本。 默认情况下,数据发送到处理器 0。此方法对于从一个处理器输出数据非常有用。 更多... | |
virtual int | compare (const NumericVector< T > &other_vector, const Real threshold=TOLERANCE) const |
比较 this 与 other_vector 的等效性,(在给定的 threshold 内) 如果等效则返回 -1 ,或者返回第一个索引,其中 abs (a[i]-b[i]) 超过阈值。 更多... | |
virtual int | local_relative_compare (const NumericVector< T > &other_vector, const Real threshold=TOLERANCE) const |
比较该向量与另一个向量的局部相对差异。 更多... | |
virtual void | pointwise_mult (const NumericVector< T > &vec1, const NumericVector< T > &vec2)=0 |
比较该向量与另一个向量的全局相对差异。 更多... | |
virtual void | pointwise_divide (const NumericVector< T > &vec1, const NumericVector< T > &vec2)=0 |
计算该向量与另一个向量的逐点除法。 更多... | |
virtual void | print (std::ostream &os=libMesh::out) const |
打印本地向量的内容,默认输出到 libMesh::out 流。 更多... | |
virtual void | print_global (std::ostream &os=libMesh::out) const |
打印全局向量的内容,默认输出到 libMesh::out 流。 更多... | |
virtual void | print_matlab (const std::string &="") const |
以Matlab的稀疏矩阵格式打印向量内容。可选择将向量打印到名为 name 的文件中。 如果未指定 name,则内容将被打印到屏幕上。 更多... | |
virtual void | create_subvector (NumericVector< T > &subvector, const std::vector< numeric_index_type > &rows) const |
使用 rows 中的索引从该向量中填充 subvector。类似于 SparseMatrix 类的 create_submatrix() 函数, 当前仅对 PetscVectors 实现了此功能。 更多... | |
virtual void | swap (NumericVector< T > &v) |
交换该向量的内容与向量 v 的内容。子类应提供足够的间接性以使此操作成为 O(1) 的头部交换操作。 更多... | |
virtual std::size_t | max_allowed_id () const =0 |
返回 NumericVector 可以包含的最大条目数(在所有处理器上)。 更多... | |
bool | readable () const |
检查该向量是否能够用于全局操作。 更多... | |
bool | compatible (const NumericVector< T > &v) const |
检查该向量和向量 v 是否能够一起用于全局操作。 更多... | |
template<> | |
void | print (std::ostream &os) const |
template<> | |
void | print_global (std::ostream &os) const |
静态 Public 成员函数 | |
static std::unique_ptr < NumericVector< T > > | build (const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package()) |
构建一个 NumericVector 对象。 更多... | |
static std::string | get_info () |
Gets a string containing the reference information. 更多... | |
static void | print_info (std::ostream &out_stream=libMesh::out) |
Prints the reference information, by default to libMesh::out . 更多... | |
static unsigned int | n_objects () |
Prints the number of outstanding (created, but not yet destroyed) objects. 更多... | |
static void | enable_print_counter_info () |
Methods to enable/disable the reference counter output from print_info() 更多... | |
static void | disable_print_counter_info () |
Protected 类型 | |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Data structure to log the information. 更多... | |
Protected 成员函数 | |
void | increment_constructor_count (const std::string &name) noexcept |
Increments the construction counter. 更多... | |
void | increment_destructor_count (const std::string &name) noexcept |
Increments the destruction counter. 更多... | |
Protected 属性 | |
bool | _is_closed |
用于跟踪向量的值在在一些或全部处理器上进行插入或添加值操作后是否在所有处理器上保持一致的标志。 更多... | |
bool | _is_initialized |
在调用 init() 后设置为 true。 更多... | |
ParallelType | _type |
向量的类型。 更多... | |
std::mutex | _numeric_vector_mutex |
用于执行线程安全操作的互斥锁。 更多... | |
静态 Protected 属性 | |
static Counts | _counts |
Actually holds the data. 更多... | |
static Threads::atomic < unsigned int > | _n_objects |
The number of objects. 更多... | |
static Threads::spin_mutex | _mutex |
Mutual exclusion object to enable thread-safe reference counting. 更多... | |
static bool | _enable_print_counter = true |
Flag to control whether reference count information is printed when print_info is called. 更多... | |
友元 | |
std::ostream & | operator<< (std::ostream &os, const NumericVector< T > &v) |
允许使用流语法打印向量的内容。 更多... | |
提供了不同线性代数库的向量存储方案的统一接口。
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
在文件 reference_counter.h 第 119 行定义.
|
inlineexplicit |
虚拟构造函数。维度=0。
comm_in | 通信器对象,表示通信方式。 |
ptype | 平行类型,表示数值向量的类型。 |
在文件 numeric_vector.h 第 938 行定义.
|
inlineexplicit |
构造函数。将维度设置为 n,并初始化所有元素为零。
comm_in | 通信器对象,表示通信方式。 |
n | 向量的全局维度。 |
ptype | 平行类型,表示数值向量的类型。 |
在文件 numeric_vector.h 第 951 行定义.
|
inline |
构造函数。将本地维度设置为 n_local
,全局维度设置为 n
,并初始化所有元素为零。
comm_in | 通信器对象,表示通信方式。 |
n | 向量的全局维度。 |
n_local | 向量的本地维度。 |
ptype | 平行类型,表示数值向量的类型。 |
在文件 numeric_vector.h 第 967 行定义.
|
inline |
构造函数。将本地维度设置为 n_local
,全局维度设置为 n
,但还为由 ghost
参数指定的索引保留内存。
comm_in | 通信器对象,表示通信方式。 |
N | 向量的全局维度。 |
n_local | 向量的本地维度。 |
ghost | 指定的索引。 |
ptype | 平行类型,表示数值向量的类型。 |
在文件 numeric_vector.h 第 984 行定义.
|
default |
这 5 个特殊函数可以为这个类提供默认值,因为它本身不管理任何内存。
|
default |
|
virtualdefault |
虽然这个类不管理任何内存,但派生类可能会管理内存,用户可能会通过指向这个基类的指针删除内存。
|
pure virtual |
设置 ,对向量中的每个条目进行绝对值操作。
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
将 value
添加到由 i
指定的向量条目。 请注意,此方法的库实现是线程安全的, 例如,将在写入向量之前锁定 _numeric_vector_mutex
。
i | 要添加到的条目的索引。 |
value | 要添加的值。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
将 s
添加到向量的每个条目,
s | 要添加的值。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
将 v
添加到 *this, 。 等效于调用
operator+=()。
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
带有标量倍数的向量相加, 。 等效于调用
operator+=()。
a | 缩放因子。 |
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
virtual |
计算 ,其中
v
是一个指针, 每个 dof_indices
[i] 指定了要添加的值 v
[i] 的位置。 这应该在子类中进行重写以提高效率。请注意,此方法的库实现是线程安全的。
v | 一个指向值的指针。 |
dof_indices | 每个要添加值的位置的索引集合。 |
被 libMesh::PetscVector< T > , 以及 libMesh::EpetraVector< T > 重载.
在文件 numeric_vector.C 第 379 行定义.
参考自 libMesh::SparseMatrix< T >::vector_mult_add().
|
inline |
计算 ,其中
v
是一个 std::vector, 每个 dof_indices
[i] 指定了要添加的值 v
[i] 的位置 默认实现对每个索引调用 operator()
,但某些实现可能在此处提供更快的方法。 请注意,此方法的库实现是线程安全的。
v | 包含要添加的值的 std::vector。 |
dof_indices | 每个要添加值的位置的索引集合。 |
在文件 numeric_vector.h 第 1041 行定义.
void libMesh::NumericVector< T >::add_vector | ( | const NumericVector< T > & | v, |
const std::vector< numeric_index_type > & | dof_indices | ||
) |
计算 ,其中
v
是一个 NumericVector, 每个 dof_indices
[i] 指定了要添加的值 v(i)
的位置。此方法是线程安全的。
v | 另一个数值向量。 |
dof_indices | 每个要添加值的位置的索引集合。 |
在文件 numeric_vector.C 第 391 行定义.
参考 libMesh::NumericVector< T >::readable() , 以及 libMesh::NumericVector< T >::size().
|
inline |
计算 ,其中
v
是一个 DenseVector, 每个 dof_indices
[i] 指定了要添加的值 v(i)
的位置。此方法是线程安全的。
v | 另一个数值向量。 |
dof_indices | 每个要添加值的位置的索引集合。 |
在文件 numeric_vector.h 第 1053 行定义.
参考 libMesh::DenseVector< T >::empty() , 以及 libMesh::DenseVector< T >::size().
|
pure virtual |
计算 , 即将
SparseMatrix
A
和 NumericVector
v
的乘积添加到 this。
v | 另一个数值向量。 |
A | 稀疏矩阵。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
void libMesh::NumericVector< T >::add_vector | ( | const NumericVector< T > & | v, |
const ShellMatrix< T > & | A | ||
) |
计算 , 即将
ShellMatrix
A
和 NumericVector
v
的乘积添加到 this。
v | 另一个数值向量。 |
A | Shell 矩阵。 |
在文件 numeric_vector.C 第 405 行定义.
参考 libMesh::ShellMatrix< T >::vector_mult_add().
|
pure virtual |
计算 , 即将矩阵
A
的转置与 NumericVector
v
的乘积添加到 this。
v | 另一个数值向量。 |
A | 稀疏矩阵。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
static |
构建一个 NumericVector 对象。
comm | 通信器对象,表示通信方式。 |
solver_package | 线性求解器包的类型。 |
在文件 numeric_vector.C 第 50 行定义.
参考 libMesh::EIGEN_SOLVERS, libMesh::LASPACK_SOLVERS , 以及 libMesh::TRILINOS_SOLVERS.
参考自 libMesh::DiagonalMatrix< T >::DiagonalMatrix(), libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::DofMap::enforce_constraints_on_residual() , 以及 libMesh::DofMap::process_mesh_constraint_rows().
|
inlinevirtual |
将 NumericVector<T> 恢复到原始状态。
被 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 重载.
在文件 numeric_vector.h 第 1002 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized.
|
pure virtual |
返回一个包装了此向量副本的智能指针。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
调用 NumericVector 的内部组装函数,确保值在处理器之间一致。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::DofMap::enforce_adjoint_constraints_exactly() , 以及 libMesh::DofMap::enforce_constraints_exactly().
|
inlinevirtual |
检查向量是否已经关闭并准备好进行计算。
在文件 numeric_vector.h 第 180 行定义.
参考 libMesh::NumericVector< T >::_is_closed.
参考自 libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::PetscVector< T >::localize(), libMesh::DofMap::max_constraint_error(), libMesh::EigenSparseVector< T >::operator=(), libMesh::LaspackVector< T >::operator=() , 以及 libMesh::PetscVector< T >::operator=().
|
virtual |
比较 this
与 other_vector
的等效性,(在给定的 threshold
内) 如果等效则返回 -1
,或者返回第一个索引,其中 abs
(a[i]-b[i]) 超过阈值。
other_vector | 另一个数值向量。 |
threshold | 阈值。 |
-1
,否则返回第一个不等效的索引。 在文件 numeric_vector.C 第 109 行定义.
参考 std::abs().
bool libMesh::NumericVector< T >::compatible | ( | const NumericVector< T > & | v | ) | const |
检查该向量和向量 v
是否能够一起用于全局操作。
v | 要比较的另一个向量。 |
在文件 numeric_vector.C 第 423 行定义.
参考 libMesh::NumericVector< T >::first_local_index(), libMesh::NumericVector< T >::last_local_index(), libMesh::NumericVector< T >::local_size(), libMesh::NumericVector< T >::readable() , 以及 libMesh::NumericVector< T >::size().
|
pure virtual |
|
inlinevirtual |
使用 rows
中的索引从该向量中填充 subvector。类似于
SparseMatrix 类的 create_submatrix()
函数, 当前仅对 PetscVectors 实现了此功能。
subvector | 要填充的子向量。 |
rows | 包含用于选择要填充到子向量的索引的向量。 |
被 libMesh::PetscVector< T > , 以及 libMesh::EpetraVector< T > 重载.
在文件 numeric_vector.h 第 871 行定义.
|
staticinherited |
在文件 reference_counter.C 第 100 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter.
|
pure virtual |
计算 ,即 (*this) 与向量
v
的点积。
在复数值情况下,使用 v
的复共轭。
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inlinevirtual |
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
在文件 reference_counter.C 第 94 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter.
|
pure virtual |
获取实际存储在该处理器上的第一个向量元素的索引。
0。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::NumericVector< T >::compatible(), libMesh::DofMap::extract_local_vector() , 以及 libMesh::DofMap::max_constraint_error().
|
inlinevirtual |
一次访问多个组件。 values
将 *不会* 重新分配空间;它应该已经具有足够的空间。 默认实现对每个索引调用 operator()
,但某些实现可能在此处提供更快的方法。
index | 要获取的索引集合。 |
values | 存储获取值的数组。 |
被 libMesh::PetscVector< T > 重载.
在文件 numeric_vector.h 第 1012 行定义.
参考自 libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::DofMap::enforce_constraints_on_residual() , 以及 libMesh::DofMap::max_constraint_error().
|
inline |
一次访问多个组件。 values
将被调整大小,如果需要,将被填充。 默认实现对每个索引调用 operator()
,但某些实现可能在此处提供更快的方法。
index | 要获取的索引集合。 |
values | 存储获取值的向量。 |
在文件 numeric_vector.h 第 1026 行定义.
|
staticinherited |
Gets a string containing the reference information.
在文件 reference_counter.C 第 47 行定义.
参考 libMesh::ReferenceCounter::_counts.
参考自 libMesh::ReferenceCounter::print_info().
|
inlineprotectednoexceptinherited |
Increments the construction counter.
Should be called in the constructor of any derived class that will be reference counted.
在文件 reference_counter.h 第 183 行定义.
参考 libMesh::err.
参考自 libMesh::ReferenceCountedObject< SparseMatrix< T > >::ReferenceCountedObject().
|
inlineprotectednoexceptinherited |
Increments the destruction counter.
Should be called in the destructor of any derived class that will be reference counted.
在文件 reference_counter.h 第 207 行定义.
参考 libMesh::err.
参考自 libMesh::ReferenceCountedObject< SparseMatrix< T > >::~ReferenceCountedObject().
|
pure virtual |
更改向量的维度为 n
。如果可能的话 ,该向量的保留内存保持不变。 如果 n==0
,所有内存都将被释放。因此,如果要调整向量的大小并释放不需要的内存, 必须首先调用 init(0)
,然后调用 init(n)
。这种行为类似于 STL 容器。
n | 新的全局维度。 |
n_local | 新的本地维度。 |
fast | 如果为 false,则向量将被填充为零。 |
ptype | 平行类型,表示数值向量的类型。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::DistributedVector< T >::clone(), libMesh::EigenSparseVector< T >::clone(), libMesh::EpetraVector< T >::clone(), libMesh::LaspackVector< T >::clone(), libMesh::PetscVector< T >::clone(), libMesh::DistributedVector< T >::zero_clone(), libMesh::EigenSparseVector< T >::zero_clone(), libMesh::EpetraVector< T >::zero_clone(), libMesh::LaspackVector< T >::zero_clone() , 以及 libMesh::PetscVector< T >::zero_clone().
|
pure virtual |
调用 init()
,其中 n_local = N。
n | 新的全局维度。 |
fast | 如果为 false,则向量将被填充为零。 |
ptype | 平行类型,表示数值向量的类型。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
创建一个包含本地索引以及在 ghost
参数中指定的索引的向量。
n | 新的全局维度。 |
n_local | 新的本地维度。 |
ghost | 指定的索引。 |
fast | 如果为 false,则向量将被填充为零。 |
ptype | 平行类型,表示数值向量的类型。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
创建一个具有与 other
相同维度和存储类型的向量,包括 ghost dofs。
other | 另一个数值向量。 |
fast | 如果为 false,则向量将被填充为零。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inlinevirtual |
检查向量是否已经初始化。
在文件 numeric_vector.h 第 159 行定义.
参考 libMesh::NumericVector< T >::_is_initialized.
参考自 libMesh::PetscVector< T >::create_subvector() , 以及 libMesh::PetscVector< T >::init().
|
virtual |
将 v
的条目插入到 *this 中,位置由 dof_indices
指定。请注意,此方法的库实现是线程安全的。
v | 一个指向值的指针。 |
dof_indices | 每个要插入值的位置的索引集合。 |
被 libMesh::PetscVector< T > , 以及 libMesh::EpetraVector< T > 重载.
在文件 numeric_vector.C 第 84 行定义.
void libMesh::NumericVector< T >::insert | ( | const NumericVector< T > & | v, |
const std::vector< numeric_index_type > & | dof_indices | ||
) |
将 v
的条目插入到 *this 中,位置由 v
指定。 只要使用 NumericVector
的库实现,此方法是线程安全的。
v | 一个数值向量。 |
dof_indices | 每个要插入值的位置的索引集合。 |
在文件 numeric_vector.C 第 96 行定义.
参考 libMesh::NumericVector< T >::readable() , 以及 libMesh::NumericVector< T >::size().
|
inline |
将 v
的条目插入到 *this 中,位置由 v
指定。 只要使用 NumericVector
的库实现,此方法是线程安全的。
v | 一个 DenseVector。 |
dof_indices | 每个要插入值的位置的索引集合。 |
在文件 numeric_vector.h 第 1077 行定义.
参考 libMesh::DenseVector< T >::empty() , 以及 libMesh::DenseVector< T >::size().
|
inline |
将 v
的条目插入到 *this 中,位置由 v
指定。 只要使用 NumericVector
的库实现,此方法是线程安全的。
v | 一个 DenseSubVector。 |
dof_indices | 每个要插入值的位置的索引集合。 |
在文件 numeric_vector.h 第 1089 行定义.
参考 libMesh::DenseSubVector< T >::empty() , 以及 libMesh::DenseSubVector< T >::size().
|
pure virtual |
获取向量的 -范数,即条目的绝对值之和。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
获取向量的 -范数,即条目平方和的平方根。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
Real libMesh::NumericVector< T >::l2_norm_diff | ( | const NumericVector< T > & | other_vec | ) | const |
获取 -范数的向量差值
, 其中
是
this。
other_vec | 另一个数值向量。 |
在文件 numeric_vector.C 第 363 行定义.
参考 std::norm(), libMesh::TensorTools::norm_sq(), libMesh::Real , 以及 std::sqrt().
|
pure virtual |
获取实际存储在该处理器上的最后一个向量元素的索引+1。
size()。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::NumericVector< T >::compatible(), libMesh::DofMap::extract_local_vector() , 以及 libMesh::DofMap::max_constraint_error().
|
pure virtual |
获取向量的 -范数,即向量的最大绝对值。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
virtual |
比较该向量与另一个向量的局部相对差异。
如果两个向量在给定的局部相对阈值 abs
(a[i]-b[i])/max(a[i],b[i]) 下等效,则返回-1,否则返回首个不等效的索引。
other_vector | 要比较的另一个向量。 |
threshold | 允许的局部相对差异阈值(可选,默认值为 TOLERANCE)。 |
在文件 numeric_vector.C 第 137 行定义.
参考 std::abs().
|
pure virtual |
获取向量的本地大小,即 index_stop
- index_start。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::NumericVector< T >::compatible(), libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::DofMap::enforce_constraints_on_residual(), libMesh::DistributedVector< T >::init(), libMesh::EigenSparseVector< T >::init(), libMesh::EpetraVector< T >::init() , 以及 libMesh::LaspackVector< T >::init().
|
pure virtual |
创建全局向量的副本并存储在本地向量 v_local
中。
v_local | 用于存储本地向量的 std::vector。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly() , 以及 libMesh::DofMap::enforce_constraints_on_residual().
|
pure virtual |
创建全局向量的副本并存储在本地向量 v_local
中,而不是 std::vector。
v_local | 用于存储本地向量的 NumericVector<T>。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
创建本地向量 v_local
,其中仅包含与此处理器相关的信息,由 send_list
定义。
v_local | 用于存储本地向量的 NumericVector<T>。 |
send_list | 指定要包含在本地向量中的值的索引列表。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
用全局索引中给定的值填充本地 std::vector "v_local"。
v_local | 用于存储本地向量的 std::vector。 |
indices | 要填充到 v_local 中的全局索引列表。 |
Fill in the local std::vector "v_local" with the global indices given in "indices".
Example:
* On 4 procs *this = {a, b, c, d, e, f, g, h, i} is a parallel vector. * On each proc, the indices arrays are set up as: * proc0, indices = {1,2,4,5} * proc1, indices = {2,5,6,8} * proc2, indices = {2,3,6,7} * proc3, indices = {0,1,2,3} * * After calling this version of localize, the v_local vectors are: * proc0, v_local = {b,c,e,f} * proc1, v_local = {c,f,g,i} * proc2, v_local = {c,d,g,h} * proc3, v_local = {a,b,c,d} *
这个函数在并行I/0例程中很有用,当你有一个解值的并行向量,你想写一个子集。
在 libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
使用由 send_list
指定的值从相邻处理器中选择的值更新本地向量。
first_local_idx | 本地向量的第一个索引。 |
last_local_idx | 本地向量的最后一个索引。 |
send_list | 用于更新本地向量的值的索引列表。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
在处理器 proc_id
上创建全局向量的本地副本。 默认情况下,数据发送到处理器 0。此方法对于从一个处理器输出数据非常有用。
v_local | 用于存储本地向量的 std::vector。 |
proc_id | 目标处理器的 ID。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
获取向量中的最大值,或者在复数情况下获取最大的实部。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
返回 NumericVector 可以包含的最大条目数(在所有处理器上)。
尽管我们定义了 numeric_index_type,通常要求 NumericVector 底层实现的索引具有大小等于 sizeof(numeric_index_type) 的大小, 但这两种类型仍可能具有不同的符号,这会影响可以存储在 NumericVector 中的最大值数量。
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
获取向量中的最小值,或者在复数情况下获取最小的实部。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
在文件 reference_counter.h 第 85 行定义.
参考 libMesh::ReferenceCounter::_n_objects.
参考自 libMesh::LibMeshInit::~LibMeshInit().
|
pure virtual |
获取向量的第 i 个条目的副本。
i | 要获取的条目的索引。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inline |
将向量缩放为 a
, 。等价于
u.scale(a)。
a | 缩放因子。 |
在文件 numeric_vector.h 第 463 行定义.
参考 libMesh::NumericVector< T >::scale().
|
pure virtual |
计算此向量条目与另一个向量的条目之间的分量乘法, 。
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
将向量加上 v
, 。等价于
u.add(1, v)。
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
将 v
从 *this 减去, 。等价于
u.add
(-1, v)。
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inline |
将向量缩放为 1/a
, 。等价于
u.scale
(1.
/a)。
a | 缩放因子。 |
在文件 numeric_vector.h 第 481 行定义.
参考 libMesh::NumericVector< T >::scale().
|
pure virtual |
计算此向量条目与另一个向量的分量除法, 。
v | 另一个数值向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
一个复制赋值运算符
v | 要复制的 NumericVector 对象。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
default |
|
pure virtual |
设置向量的所有条目为值 s。
s | 设置的值。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
设置 (*this)(i) = v(i) 对于向量的每个条目。
v | 另一个向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
计算该向量与另一个向量的逐点除法。
执行逐点(分量间)除法操作 , 并将结果存储在该向量中。
vec1 | 被除数的输入向量。 |
vec2 | 除数的输入向量。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
比较该向量与另一个向量的全局相对差异。
如果两个向量在给定的全局相对阈值 threshold
下等效,则返回-1,否则返回首个不等效的索引, 其中相对差异定义为 。
other_vector | 要比较的另一个向量。 |
threshold | 允许的全局相对差异阈值(可选,默认值为 TOLERANCE)。 |
执行逐点(分量间)乘积操作 ,并将结果存储在该向量中。
vec1 | 第一个输入向量。 |
vec2 | 第二个输入向量。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inlinevirtual |
打印本地向量的内容,默认输出到 libMesh::out 流。
os | 输出流,用于指定输出位置(可选,默认为 libMesh::out)。 |
在文件 numeric_vector.h 第 1121 行定义.
|
inline |
在文件 numeric_vector.h 第 1103 行定义.
参考 std::imag(), libMesh::initialized() , 以及 std::real().
|
inlinevirtual |
打印全局向量的内容,默认输出到 libMesh::out 流。
os | 输出流,用于指定输出位置(可选,默认为 libMesh::out)。 |
在文件 numeric_vector.h 第 1158 行定义.
|
inline |
在文件 numeric_vector.h 第 1136 行定义.
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
在文件 reference_counter.C 第 81 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter , 以及 libMesh::ReferenceCounter::get_info().
参考自 libMesh::LibMeshInit::~LibMeshInit().
|
inlinevirtual |
以Matlab的稀疏矩阵格式打印向量内容。可选择将向量打印到名为 name
的文件中。 如果未指定 name,则内容将被打印到屏幕上。
name | 用于指定输出文件名的可选参数(默认为空)。 |
被 libMesh::PetscVector< T > 重载.
在文件 numeric_vector.h 第 859 行定义.
bool libMesh::NumericVector< T >::readable | ( | ) | const |
检查该向量是否能够用于全局操作。
在文件 numeric_vector.C 第 416 行定义.
参考 libMesh::closed() , 以及 libMesh::initialized().
参考自 libMesh::NumericVector< T >::add_vector(), libMesh::NumericVector< T >::compatible() , 以及 libMesh::NumericVector< T >::insert().
|
pure virtual |
计算每个向量条目的分量倒数, 。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
pure virtual |
缩放向量的每个元素。
factor | 缩放因子。 |
在 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::NumericVector< T >::operator*=(), libMesh::NumericVector< T >::operator/=() , 以及 libMesh::TensorShellMatrix< T >::vector_mult().
|
pure virtual |
设置 v(i)
= value
。 请注意,此方法的库实现是线程安全的, 例如,将在写入向量之前锁定 _numeric_vector_mutex
。
i | 要设置的条目的索引。 |
value | 要设置的值。 |
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly() , 以及 libMesh::DofMap::enforce_constraints_on_residual().
|
pure virtual |
获取向量的大小。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::NumericVector< T >::add_vector(), libMesh::NumericVector< T >::compatible(), libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::DofMap::enforce_constraints_on_residual(), libMesh::DofMap::extract_local_vector(), libMesh::DistributedVector< T >::init(), libMesh::EigenSparseVector< T >::init(), libMesh::EpetraVector< T >::init(), libMesh::LaspackVector< T >::init(), libMesh::NumericVector< T >::insert(), libMesh::DistributedVector< T >::operator*=(), libMesh::EigenSparseVector< T >::operator*=(), libMesh::EpetraVector< T >::operator*=(), libMesh::LaspackVector< T >::operator*=(), libMesh::DistributedVector< T >::operator/=(), libMesh::EigenSparseVector< T >::operator/=(), libMesh::EpetraVector< T >::operator/=() , 以及 libMesh::LaspackVector< T >::operator/=().
|
virtual |
获取指定条目的向量的 -范数,即指定条目的绝对值之和。
indices | 指定的索引集合。 |
在文件 numeric_vector.C 第 306 行定义.
参考 std::abs(), std::norm() , 以及 libMesh::Real.
|
virtual |
获取指定条目的向量的 -范数,即指定条目平方和的平方根。
indices | 指定的索引集合。 |
在文件 numeric_vector.C 第 323 行定义.
参考 std::norm(), libMesh::TensorTools::norm_sq(), libMesh::Real , 以及 std::sqrt().
|
virtual |
获取指定条目的向量的最大绝对值,即指定条目的 -范数。
indices | 指定的索引集合。 |
在文件 numeric_vector.C 第 340 行定义.
参考 std::abs(), std::norm() , 以及 libMesh::Real.
|
pure virtual |
获取向量中所有值的总和。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
inlinevirtual |
交换该向量的内容与向量 v
的内容。子类应提供足够的间接性以使此操作成为 O(1) 的头部交换操作。
v | 要交换内容的向量。 |
被 libMesh::PetscVector< T >, libMesh::EpetraVector< T >, libMesh::LaspackVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 重载.
在文件 numeric_vector.h 第 1179 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized.
参考自 libMesh::EpetraVector< T >::swap() , 以及 libMesh::PetscVector< T >::swap().
|
inline |
获取向量的类型。
在文件 numeric_vector.h 第 166 行定义.
参考 libMesh::NumericVector< T >::_type.
参考自 libMesh::DofMap::constrain_element_residual(), libMesh::DofMap::enforce_adjoint_constraints_exactly(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::DofMap::enforce_constraints_on_residual(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::DofMap::heterogeneously_constrain_element_jacobian_and_residual(), libMesh::DofMap::heterogeneously_constrain_element_residual(), libMesh::DistributedVector< T >::init(), libMesh::EigenSparseVector< T >::init(), libMesh::EpetraVector< T >::init(), libMesh::LaspackVector< T >::init() , 以及 libMesh::PetscVector< T >::localize().
|
inline |
获取向量的类型。
在文件 numeric_vector.h 第 173 行定义.
参考 libMesh::NumericVector< T >::_type.
|
pure virtual |
将所有条目设置为零。等同于 v
= 0,但更明显且更快。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
参考自 libMesh::SumShellMatrix< T >::vector_mult() , 以及 libMesh::SparseMatrix< T >::vector_mult().
|
pure virtual |
返回一个智能指针,指向具有相同类型、大小和分区的此向量的副本,但所有条目都为零。
在 libMesh::PetscVector< T >, libMesh::LaspackVector< T >, libMesh::EpetraVector< T >, libMesh::EigenSparseVector< T > , 以及 libMesh::DistributedVector< T > 内被实现.
|
friend |
|
staticprotectedinherited |
Actually holds the data.
在文件 reference_counter.h 第 124 行定义.
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
在文件 reference_counter.h 第 143 行定义.
参考自 libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info() , 以及 libMesh::ReferenceCounter::print_info().
|
protected |
用于跟踪向量的值在在一些或全部处理器上进行插入或添加值操作后是否在所有处理器上保持一致的标志。
在文件 numeric_vector.h 第 913 行定义.
参考自 libMesh::NumericVector< T >::closed(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::DistributedVector< T >::localize(), libMesh::DistributedVector< T >::operator=() , 以及 libMesh::PetscVector< T >::PetscVector().
|
protected |
在调用 init() 后设置为 true。
在文件 numeric_vector.h 第 918 行定义.
参考自 libMesh::PetscVector< T >::create_subvector(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::NumericVector< T >::initialized(), libMesh::DistributedVector< T >::localize(), libMesh::DistributedVector< T >::operator=() , 以及 libMesh::PetscVector< T >::PetscVector().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
在文件 reference_counter.h 第 137 行定义.
|
staticprotectedinherited |
The number of objects.
Print the reference count information when the number returns to 0.
在文件 reference_counter.h 第 132 行定义.
参考自 libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter() , 以及 libMesh::ReferenceCounter::~ReferenceCounter().
|
protected |
用于执行线程安全操作的互斥锁。
在文件 numeric_vector.h 第 928 行定义.
|
protected |
向量的类型。
在文件 numeric_vector.h 第 923 行定义.
参考自 libMesh::DistributedVector< T >::DistributedVector(), libMesh::EigenSparseVector< T >::EigenSparseVector(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::PetscVector< T >::init(), libMesh::LaspackVector< T >::LaspackVector(), libMesh::PetscVector< T >::PetscVector() , 以及 libMesh::NumericVector< T >::type().