该类提供了一个良好的接口,用于访问 PETSc 的 Vec 对象。所有重写的虚拟函数都在 numeric_vector.h 中有文档说明。 更多...
#include <petsc_vector.h>
Public 成员函数 | |
PetscVector (const Parallel::Communicator &comm_in, const ParallelType type=AUTOMATIC) | |
无效的构造函数。维度=0。 更多... | |
PetscVector (const Parallel::Communicator &comm_in, const numeric_index_type n, const ParallelType type=AUTOMATIC) | |
构造函数。将维度设置为 n 并将所有元素初始化为零。 更多... | |
PetscVector (const Parallel::Communicator &comm_in, const numeric_index_type n, const numeric_index_type n_local, const ParallelType type=AUTOMATIC) | |
构造函数。将本地维度设置为 n_local ,全局维度设置为 n ,并将所有元素初始化为零。 更多... | |
PetscVector (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 type=AUTOMATIC) | |
构造函数。将本地维度设置为 n_local ,全局维度设置为 n ,但还会为由 ghost 参数指定的索引保留内存。 更多... | |
PetscVector (Vec v, const Parallel::Communicator &comm_in) | |
构造函数。假设您已经有一个有效的 PETSc Vec 对象,则创建一个 PetscVector。在这种情况下,当该对象超出作用域时,v 不会被 PetscVector 构造函数销毁。 这允许将 v 的所有权保留给原始创建者,并仅为 PetscVector 提供附加功能。 更多... | |
PetscVector< T > & | operator= (const PetscVector< T > &v) |
复制赋值运算符。 在执行各种检查后调用 VecCopy。 更多... | |
PetscVector (PetscVector &&)=delete | |
该类手动管理 C 风格的结构(Vec),因此我们不希望生成任何自动复制/移动函数,并且无法默认生成析构函数。 更多... | |
PetscVector (const PetscVector &)=delete | |
PetscVector & | operator= (PetscVector &&)=delete |
virtual | ~PetscVector () |
析构函数。 更多... | |
virtual void | close () override |
关闭 PetscVector。 更多... | |
virtual void | clear () noexceptoverride |
从析构函数中调用 clear(),所以它不应引发异常。 更多... | |
virtual void | zero () override |
将 PetscVector 的所有元素设置为零。 更多... | |
virtual std::unique_ptr < NumericVector< T > > | zero_clone () const override |
获取一个零副本的独立指针。 更多... | |
virtual std::unique_ptr < NumericVector< T > > | clone () const override |
克隆该 NumericVector 的独立副本。 更多... | |
virtual void | init (const numeric_index_type N, const numeric_index_type n_local, const bool fast=false, const ParallelType type=AUTOMATIC) override |
初始化 NumericVector 对象。 更多... | |
virtual void | init (const numeric_index_type N, const bool fast=false, const ParallelType type=AUTOMATIC) override |
初始化 NumericVector 对象。 更多... | |
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=AUTOMATIC) override |
初始化 NumericVector 对象。 更多... | |
virtual void | init (const NumericVector< T > &other, const bool fast=false) override |
使用另一个 NumericVector 对象初始化当前对象。 更多... | |
virtual NumericVector< T > & | operator= (const T s) override |
将 NumericVector 中的所有元素设置为标量值 s。 更多... | |
virtual NumericVector< T > & | operator= (const NumericVector< T > &v) override |
将当前 NumericVector 的内容复制为另一个 NumericVector v。 更多... | |
virtual NumericVector< T > & | operator= (const std::vector< T > &v) override |
将当前 NumericVector 的内容复制为一个标量值向量 v。 更多... | |
virtual Real | min () const override |
获取 NumericVector 中的最小值。 更多... | |
virtual Real | max () const override |
获取 NumericVector 中的最大值。 更多... | |
virtual T | sum () const override |
计算 NumericVector 中的元素之和。 更多... | |
virtual Real | l1_norm () const override |
计算 NumericVector 的 L1 范数。 更多... | |
virtual Real | l2_norm () const override |
计算 NumericVector 的 L2 范数。 更多... | |
virtual Real | linfty_norm () const override |
计算 NumericVector 的 Linf 范数。 更多... | |
virtual numeric_index_type | size () const override |
获取 NumericVector 的大小(维度)。 更多... | |
virtual numeric_index_type | local_size () const override |
获取 NumericVector 的本地大小(本地维度)。 更多... | |
virtual numeric_index_type | first_local_index () const override |
获取 NumericVector 的第一个本地索引。 更多... | |
virtual numeric_index_type | last_local_index () const override |
获取 NumericVector 的最后一个本地索引。 更多... | |
numeric_index_type | map_global_to_local_index (const numeric_index_type i) const |
virtual T | operator() (const numeric_index_type i) const override |
访问 NumericVector 对象的元素。 更多... | |
virtual void | get (const std::vector< numeric_index_type > &index, T *values) const override |
获取指定索引的元素值。 更多... | |
PetscScalar * | get_array () |
获取对 PETSc Vector 数据数组的读/写访问权限。 更多... | |
const PetscScalar * | get_array_read () const |
获取对 PETSc Vector 数据数组的只读访问权限。 更多... | |
void | restore_array () |
恢复数据数组。 更多... | |
virtual NumericVector< T > & | operator+= (const NumericVector< T > &v) override |
将当前 NumericVector 与另一个 NumericVector v 相加。 更多... | |
virtual NumericVector< T > & | operator-= (const NumericVector< T > &v) override |
将当前 NumericVector 与另一个 NumericVector v 相减。 更多... | |
virtual void | reciprocal () override |
对 NumericVector 中的所有元素取倒数。 更多... | |
virtual void | conjugate () override |
对 NumericVector 中的所有元素取共轭。 更多... | |
virtual void | set (const numeric_index_type i, const T value) override |
设置索引为 i 的元素值为 value。 更多... | |
virtual void | add (const numeric_index_type i, const T value) override |
将索引为 i 的元素值增加 value。 更多... | |
virtual void | add (const T s) override |
将 NumericVector 中的所有元素加上标量值 s。 更多... | |
virtual void | add (const NumericVector< T > &v) override |
将当前 NumericVector 与另一个 NumericVector v 相加。 更多... | |
virtual void | add (const T a, const NumericVector< T > &v) override |
将当前 NumericVector 与另一个 NumericVector v 相加,并乘以标量值 a。 更多... | |
virtual void | add_vector (const T *v, const std::vector< numeric_index_type > &dof_indices) override |
向指定索引数组的元素中添加向量 v 的元素。 更多... | |
virtual void | add_vector (const NumericVector< T > &v, const SparseMatrix< T > &A) override |
使用 SparseMatrix A 对向量 v 进行矩阵乘法,并将结果添加到当前向量。 更多... | |
virtual void | add_vector_transpose (const NumericVector< T > &v, const SparseMatrix< T > &A) override |
使用 SparseMatrix A 的共轭转置与向量 v 进行矩阵乘法,并将结果添加到当前向量。 更多... | |
void | add_vector_conjugate_transpose (const NumericVector< T > &v, const SparseMatrix< T > &A) |
![]() | |
virtual void | insert (const T *v, const std::vector< numeric_index_type > &dof_indices) override |
将指定索引数组的元素设置为向量 v 的元素。 更多... | |
virtual void | scale (const T factor) override |
缩放当前向量的所有元素。 更多... | |
virtual NumericVector< T > & | operator*= (const NumericVector< T > &v) override |
将当前向量与另一个 NumericVector v 逐元素相乘并赋值给当前向量。 更多... | |
virtual NumericVector< T > & | operator/= (const NumericVector< T > &v) override |
将当前向量与另一个 NumericVector v 逐元素相除并赋值给当前向量。 更多... | |
virtual void | abs () override |
对当前向量的所有元素取绝对值。 更多... | |
virtual T | dot (const NumericVector< T > &v) const override |
计算当前向量与向量 v 的点积。 更多... | |
T | indefinite_dot (const NumericVector< T > &v) const |
计算 (*this) 与向量 v 的点积,不使用复数值的共轭。 更多... | |
virtual void | localize (std::vector< T > &v_local) const override |
将当前向量的数据本地化到 std::vector v_local 中。 更多... | |
virtual void | localize (NumericVector< T > &v_local) const override |
将当前向量的数据本地化到 NumericVector v_local 中。 更多... | |
virtual void | localize (NumericVector< T > &v_local, const std::vector< numeric_index_type > &indices) const override |
将当前向量的数据本地化到 NumericVector 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) override |
本地化当前向量的数据,并将其发送给指定的进程。 更多... | |
virtual void | localize_to_one (std::vector< T > &v_local, const processor_id_type proc_id=0) const override |
将当前向量的数据本地化到 std::vector v_local 中,只包括一个进程的数据。 更多... | |
virtual void | pointwise_mult (const NumericVector< T > &vec1, const NumericVector< T > &vec2) override |
逐元素将当前向量与 vec1 相乘,结果存储在当前向量中。 更多... | |
virtual void | pointwise_divide (const NumericVector< T > &vec1, const NumericVector< T > &vec2) override |
逐元素将当前向量与 vec1 相除,结果存储在当前向量中。 更多... | |
virtual void | print_matlab (const std::string &name="") const override |
将当前向量的数据以 MATLAB 格式打印输出。 更多... | |
virtual void | create_subvector (NumericVector< T > &subvector, const std::vector< numeric_index_type > &rows) const override |
创建当前向量的子向量,并将其赋值给 subvector。 更多... | |
virtual void | swap (NumericVector< T > &v) override |
交换当前向量与另一个 NumericVector v 的数据。 更多... | |
virtual std::size_t | max_allowed_id () const override |
获取当前向量允许的最大 ID。 更多... | |
Vec | vec () |
获取当前向量的原始 PETSc Vec 指针。 更多... | |
Vec | vec () const |
获取当前向量的原始 PETSc Vec 指针(const 版本)。 更多... | |
template<> | |
void | localize_to_one (std::vector< Real > &v_local, const processor_id_type timpi_mpi_var(pid)) const |
template<> | |
void | localize_to_one (std::vector< Complex > &v_local, const processor_id_type pid) const |
virtual bool | initialized () const |
检查向量是否已经初始化。 更多... | |
ParallelType | type () const |
获取向量的类型。 更多... | |
ParallelType & | type () |
获取向量的类型。 更多... | |
virtual bool | closed () const |
检查向量是否已经关闭并准备好进行计算。 更多... | |
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 T | el (const numeric_index_type i) const |
获取向量的第 i 个条目。 更多... | |
void | get (const std::vector< numeric_index_type > &index, std::vector< T > &values) const |
一次访问多个组件。 values 将被调整大小,如果需要,将被填充。 默认实现对每个索引调用 operator() ,但某些实现可能在此处提供更快的方法。 更多... | |
NumericVector< T > & | operator*= (const T a) |
将向量缩放为 a , ![]() u.scale(a)。 更多... | |
NumericVector< T > & | operator/= (const T a) |
将向量缩放为 1/a , ![]() u.scale (1. 更多... | |
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) 的位置。此方法是线程安全的。 更多... | |
void | add_vector (const NumericVector< T > &v, const ShellMatrix< T > &A) |
计算 ![]() ShellMatrix A 和 NumericVector v 的乘积添加到 this。 更多... | |
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 | localize (std::vector< T > &v_local, const std::vector< numeric_index_type > &indices) const =0 |
用全局索引中给定的值填充本地 std::vector "v_local"。 更多... | |
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 | print (std::ostream &os=libMesh::out) const |
打印本地向量的内容,默认输出到 libMesh::out 流。 更多... | |
template<> | |
void | print (std::ostream &os) const |
virtual void | print_global (std::ostream &os=libMesh::out) const |
打印全局向量的内容,默认输出到 libMesh::out 流。 更多... | |
template<> | |
void | print_global (std::ostream &os) const |
bool | readable () const |
检查该向量是否能够用于全局操作。 更多... | |
bool | compatible (const NumericVector< T > &v) const |
检查该向量和向量 v 是否能够一起用于全局操作。 更多... | |
静态 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. 更多... | |
Private 类型 | |
typedef std::unordered_map < numeric_index_type, numeric_index_type > | GlobalToLocalMap |
用于将全局幽灵单元格映射到本地单元格的映射类型。 更多... | |
Private 成员函数 | |
void | _get_array (bool read_only) const |
从 PETSc 查询数组(如果向量是幽灵的,则还包括本地形式)。 更多... | |
void | _restore_array () const |
将数组(如果向量是幽灵的,则还包括本地形式)恢复到 PETSc。 更多... | |
Private 属性 | |
Vec | _vec |
用于保存向量元素的实际 PETSc 向量数据类型。 更多... | |
std::atomic< bool > | _array_is_present |
如果为 true,则当前 PETSc 向量值的实际数组当前可访问。这意味着成员 _local_form 和 _values 有效。 更多... | |
bool | _array_is_present |
numeric_index_type | _first |
第一个本地索引。 更多... | |
numeric_index_type | _last |
最后一个本地索引。 更多... | |
numeric_index_type | _local_size |
从 _get_array() 获取本地值的大小。 更多... | |
Vec | _local_form |
用于保存幽灵向量的本地形式的 PETSc 向量数据类型。仅当向量是幽灵的且 _array_is_present 为真时,此字段的内容才有效。 更多... | |
const PetscScalar * | _read_only_values |
指向当前 PETSc 向量值的实际数组的指针。仅当 _array_is_present 为真时,此指针才有效。 更多... | |
PetscScalar * | _values |
指向当前 PETSc 向量值的实际数组的指针。仅当 _array_is_present 为真时,此指针才有效。 我们使用了 PETSc 的 VecGetArrayRead() 函数,它需要一个常量 PetscScalar *,但是 _get_array 和 _restore_array 是 const 成员函数,因此 _values 也需要是可变的(否则在那个上下文中它是 "const PetscScalar * const")。 更多... | |
std::mutex | _petsc_get_restore_array_mutex |
用于 _get_array 和 _restore_array 的互斥锁。这是对象的一部分,以减少从多个 PetscVectors 同时读取时的线程争用。 更多... | |
GlobalToLocalMap | _global_to_local_map |
用于将全局幽灵单元格映射到本地单元格的映射(如果不是幽灵单元格模式,则为空)。 更多... | |
bool | _destroy_vec_on_exit |
此布尔值仅在接受 PETSc Vec 对象的构造函数中设置为 false。 更多... | |
bool | _values_manually_retrieved |
数据数组是否已经通过 get_array() 或 get_array_read() 手动检索。 更多... | |
bool | _values_read_only |
数据数组是否仅用于只读访问。 更多... | |
该类提供了一个良好的接口,用于访问 PETSc 的 Vec 对象。所有重写的虚拟函数都在 numeric_vector.h 中有文档说明。
在文件 petsc_vector.h 第 75 行定义.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
在文件 reference_counter.h 第 119 行定义.
|
private |
用于将全局幽灵单元格映射到本地单元格的映射类型。
在文件 petsc_vector.h 第 726 行定义.
|
inlineexplicit |
无效的构造函数。维度=0。
comm_in | 通信器,用于指定通信方式。 |
type | 并行类型,指定并行方式,默认为 AUTOMATIC。 |
在文件 petsc_vector.h 第 756 行定义.
参考 libMesh::NumericVector< T >::_type.
|
inlineexplicit |
构造函数。将维度设置为 n
并将所有元素初始化为零。
comm_in | 通信器,用于指定通信方式。 |
n | 维度。 |
type | 并行类型,指定并行方式,默认为 AUTOMATIC。 |
在文件 petsc_vector.h 第 775 行定义.
参考 libMesh::PetscVector< T >::init().
|
inline |
构造函数。将本地维度设置为 n_local
,全局维度设置为 n
,并将所有元素初始化为零。
comm_in | 通信器,用于指定通信方式。 |
n | 全局维度。 |
n_local | 本地维度。 |
type | 并行类型,指定并行方式,默认为 AUTOMATIC。 |
在文件 petsc_vector.h 第 794 行定义.
参考 libMesh::PetscVector< T >::init().
|
inline |
构造函数。将本地维度设置为 n_local
,全局维度设置为 n
,但还会为由 ghost
参数指定的索引保留内存。
comm_in | 通信器,用于指定通信方式。 |
N | 全局维度。 |
n_local | 本地维度。 |
ghost | 指定要保留内存的索引。 |
type | 并行类型,指定并行方式,默认为 AUTOMATIC。 |
在文件 petsc_vector.h 第 814 行定义.
参考 libMesh::PetscVector< T >::init().
|
inline |
构造函数。假设您已经有一个有效的 PETSc Vec 对象,则创建一个 PetscVector。在这种情况下,当该对象超出作用域时,v
不会被 PetscVector 构造函数销毁。 这允许将 v
的所有权保留给原始创建者,并仅为 PetscVector 提供附加功能。
它用于根据给定的 PETSc Vec 对象初始化 PetscVector 对象。 在构造函数中,还根据给定的 Vec 对象的类型创建了一个映射, 将全局幽灵单元格映射到本地单元格。 然后根据情况设置了 PetscVector 的类型(GHOSTED、PARALLEL 或 SERIAL)。 最后,将一些成员变量初始化为默认值。
v | 有效的 PETSc Vec 对象。 |
comm_in | 通信器,用于指定通信方式。 |
在文件 petsc_vector.h 第 844 行定义.
参考 libMesh::PetscVector< T >::_global_to_local_map, libMesh::NumericVector< T >::_is_closed, libMesh::NumericVector< T >::_is_initialized, libMesh::NumericVector< T >::_type , 以及 libMesh::PetscVector< T >::_vec.
|
delete |
该类手动管理 C 风格的结构(Vec),因此我们不希望生成任何自动复制/移动函数,并且无法默认生成析构函数。
|
delete |
|
inlinevirtual |
析构函数。
在文件 petsc_vector.h 第 950 行定义.
|
private |
从 PETSc 查询数组(如果向量是幽灵的,则还包括本地形式)。
read_only | 是否获取数据的只读副本。 |
在文件 petsc_vector.C 第 1266 行定义.
|
private |
将数组(如果向量是幽灵的,则还包括本地形式)恢复到 PETSc。
在文件 petsc_vector.C 第 1346 行定义.
参考自 libMesh::PetscVector< T >::add(), libMesh::PetscVector< T >::create_subvector(), libMesh::PetscVector< T >::init() , 以及 libMesh::PetscVector< T >::operator=().
|
overridevirtual |
对当前向量的所有元素取绝对值。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 459 行定义.
|
overridevirtual |
将索引为 i
的元素值增加 value。
i | 数值索引。 |
value | 要增加的值。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 196 行定义.
参考 libMesh::PS().
|
overridevirtual |
将 NumericVector 中的所有元素加上标量值 s。
s | 要加上的标量值。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 334 行定义.
|
overridevirtual |
将当前 NumericVector 与另一个 NumericVector v 相加。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 345 行定义.
|
overridevirtual |
将当前 NumericVector 与另一个 NumericVector v 相加,并乘以标量值 a。
a | 标量值。 |
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 355 行定义.
参考 libMesh::PetscVector< T >::_restore_array(), libMesh::PS(), libMesh::PetscVector< T >::size() , 以及 libMesh::PetscVector< T >::vec().
|
overridevirtual |
向指定索引数组的元素中添加向量 v 的元素。
v | 向量 v。 |
dof_indices | 指定的索引数组。 |
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.C 第 215 行定义.
参考 libMesh::pPS().
|
overridevirtual |
使用 SparseMatrix A 对向量 v 进行矩阵乘法,并将结果添加到当前向量。
v | 向量 v。 |
A | 稀疏矩阵 A。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 239 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
inlineinherited |
计算 ,其中
v
是一个 std::vector, 每个 dof_indices
[i] 指定了要添加的值 v
[i] 的位置 默认实现对每个索引调用 operator()
,但某些实现可能在此处提供更快的方法。 请注意,此方法的库实现是线程安全的。
v | 包含要添加的值的 std::vector。 |
dof_indices | 每个要添加值的位置的索引集合。 |
在文件 numeric_vector.h 第 1041 行定义.
|
inherited |
计算 ,其中
v
是一个 NumericVector, 每个 dof_indices
[i] 指定了要添加的值 v(i)
的位置。此方法是线程安全的。
v | 另一个数值向量。 |
dof_indices | 每个要添加值的位置的索引集合。 |
在文件 numeric_vector.C 第 391 行定义.
参考 libMesh::NumericVector< T >::readable() , 以及 libMesh::NumericVector< T >::size().
|
inlineinherited |
计算 ,其中
v
是一个 DenseVector, 每个 dof_indices
[i] 指定了要添加的值 v(i)
的位置。此方法是线程安全的。
v | 另一个数值向量。 |
dof_indices | 每个要添加值的位置的索引集合。 |
在文件 numeric_vector.h 第 1053 行定义.
参考 libMesh::DenseVector< T >::empty() , 以及 libMesh::DenseVector< T >::size().
|
inherited |
计算 , 即将
ShellMatrix
A
和 NumericVector
v
的乘积添加到 this。
v | 另一个数值向量。 |
A | Shell 矩阵。 |
在文件 numeric_vector.C 第 405 行定义.
参考 libMesh::ShellMatrix< T >::vector_mult_add().
void libMesh::PetscVector< T >::add_vector_conjugate_transpose | ( | const NumericVector< T > & | v, |
const SparseMatrix< T > & | A | ||
) |
.
将共轭转置的 SparseMatrix A 与 NumericVector v 的乘积添加到当前向量。
v | 向量 v。 |
A | 稀疏矩阵 A。 |
在文件 petsc_vector.C 第 299 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
overridevirtual |
使用 SparseMatrix A 的共轭转置与向量 v 进行矩阵乘法,并将结果添加到当前向量。
v | 向量 v。 |
A | 稀疏矩阵 A。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 269 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
staticinherited |
构建一个 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().
|
inlineoverridevirtualnoexcept |
从析构函数中调用 clear(),所以它不应引发异常。
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.h 第 1153 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized , 以及 libMesh::initialized().
|
inlineoverridevirtual |
克隆该 NumericVector 的独立副本。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1226 行定义.
参考 libMesh::NumericVector< T >::init().
|
inlineoverridevirtual |
关闭 PetscVector。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1135 行定义.
参考自 libMesh::PetscVector< T >::localize().
|
inlinevirtualinherited |
检查向量是否已经关闭并准备好进行计算。
在文件 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=().
|
virtualinherited |
比较 this
与 other_vector
的等效性,(在给定的 threshold
内) 如果等效则返回 -1
,或者返回第一个索引,其中 abs
(a[i]-b[i]) 超过阈值。
other_vector | 另一个数值向量。 |
threshold | 阈值。 |
-1
,否则返回第一个不等效的索引。 在文件 numeric_vector.C 第 109 行定义.
参考 std::abs().
|
inherited |
检查该向量和向量 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().
|
overridevirtual |
|
overridevirtual |
创建当前向量的子向量,并将其赋值给 subvector。
subvector | 用于存储子向量的 NumericVector。 |
rows | 子向量的行索引数组。 |
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.C 第 1189 行定义.
参考 libMesh::NumericVector< T >::_is_initialized, libMesh::PetscVector< T >::_restore_array(), libMesh::PetscVector< T >::_vec, libMesh::WrappedPetsc< T >::get(), libMesh::NumericVector< T >::initialized() , 以及 libMesh::numeric_petsc_cast().
|
staticinherited |
在文件 reference_counter.C 第 100 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter.
|
overridevirtual |
计算当前向量与向量 v 的点积。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 475 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
inlinevirtualinherited |
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
在文件 reference_counter.C 第 94 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter.
|
inlineoverridevirtual |
获取 NumericVector 的第一个本地索引。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1275 行定义.
|
inlineoverridevirtual |
获取指定索引的元素值。
index | 索引数组。 |
values | 用于存储值的数组。 |
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.h 第 1403 行定义.
|
inlineinherited |
一次访问多个组件。 values
将被调整大小,如果需要,将被填充。 默认实现对每个索引调用 operator()
,但某些实现可能在此处提供更快的方法。
index | 要获取的索引集合。 |
values | 存储获取值的向量。 |
在文件 numeric_vector.h 第 1026 行定义.
|
inline |
获取对 PETSc Vector 数据数组的读/写访问权限。
在文件 petsc_vector.h 第 1426 行定义.
|
inline |
获取对 PETSc Vector 数据数组的只读访问权限。
在文件 petsc_vector.h 第 1437 行定义.
|
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().
T libMesh::PetscVector< T >::indefinite_dot | ( | const NumericVector< T > & | v | ) | const |
计算 (*this) 与向量 v 的点积,不使用复数值的共轭。
v | 另一个 NumericVector 对象。 |
在文件 petsc_vector.C 第 498 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
inlineoverridevirtual |
初始化 NumericVector 对象。
N | 全局维度。 |
n_local | 本地维度。 |
fast | 是否启用快速初始化,默认为 false。 |
type | 并行类型,默认为 AUTOMATIC。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 959 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized, libMesh::initialized() , 以及 libMesh::zero.
参考自 libMesh::PetscVector< T >::localize() , 以及 libMesh::PetscVector< T >::PetscVector().
|
inlineoverridevirtual |
初始化 NumericVector 对象。
N | 全局维度。 |
fast | 是否启用快速初始化,默认为 false。 |
type | 并行类型,默认为 AUTOMATIC。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1026 行定义.
|
overridevirtual |
初始化 NumericVector 对象。
N | 全局维度。 |
n_local | 本地维度。 |
ghost | 指定要保留内存的索引。 |
fast | 是否启用快速初始化,默认为 false。 |
type | 并行类型,默认为 AUTOMATIC。 |
|
inlineoverridevirtual |
使用另一个 NumericVector 对象初始化当前对象。
other | 另一个 NumericVector 对象。 |
fast | 是否启用快速初始化,默认为 false。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1098 行定义.
参考 libMesh::PetscVector< T >::_global_to_local_map, libMesh::libMeshPrivateData::_is_initialized, libMesh::PetscVector< T >::_restore_array(), libMesh::NumericVector< T >::_type, libMesh::PetscVector< T >::_vec, libMesh::NumericVector< T >::initialized(), libMesh::initialized() , 以及 libMesh::zero.
|
inlinevirtualinherited |
检查向量是否已经初始化。
在文件 numeric_vector.h 第 159 行定义.
参考 libMesh::NumericVector< T >::_is_initialized.
参考自 libMesh::PetscVector< T >::create_subvector() , 以及 libMesh::PetscVector< T >::init().
|
overridevirtual |
将指定索引数组的元素设置为向量 v 的元素。
v | 向量 v。 |
dof_indices | 指定的索引数组。 |
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.C 第 390 行定义.
参考 libMesh::numeric_petsc_cast() , 以及 libMesh::pPS().
|
inherited |
将 v
的条目插入到 *this 中,位置由 v
指定。 只要使用 NumericVector
的库实现,此方法是线程安全的。
v | 一个数值向量。 |
dof_indices | 每个要插入值的位置的索引集合。 |
在文件 numeric_vector.C 第 96 行定义.
参考 libMesh::NumericVector< T >::readable() , 以及 libMesh::NumericVector< T >::size().
|
inlineinherited |
将 v
的条目插入到 *this 中,位置由 v
指定。 只要使用 NumericVector
的库实现,此方法是线程安全的。
v | 一个 DenseVector。 |
dof_indices | 每个要插入值的位置的索引集合。 |
在文件 numeric_vector.h 第 1077 行定义.
参考 libMesh::DenseVector< T >::empty() , 以及 libMesh::DenseVector< T >::size().
|
inlineinherited |
将 v
的条目插入到 *this 中,位置由 v
指定。 只要使用 NumericVector
的库实现,此方法是线程安全的。
v | 一个 DenseSubVector。 |
dof_indices | 每个要插入值的位置的索引集合。 |
在文件 numeric_vector.h 第 1089 行定义.
参考 libMesh::DenseSubVector< T >::empty() , 以及 libMesh::DenseSubVector< T >::size().
|
overridevirtual |
计算 NumericVector 的 L1 范数。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 60 行定义.
参考 libMesh::closed() , 以及 libMesh::Real.
|
overridevirtual |
计算 NumericVector 的 L2 范数。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 77 行定义.
参考 libMesh::closed() , 以及 libMesh::Real.
|
inherited |
获取 -范数的向量差值
, 其中
是
this。
other_vec | 另一个数值向量。 |
在文件 numeric_vector.C 第 363 行定义.
参考 std::norm(), libMesh::TensorTools::norm_sq(), libMesh::Real , 以及 std::sqrt().
|
inlineoverridevirtual |
获取 NumericVector 的最后一个本地索引。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1299 行定义.
|
overridevirtual |
计算 NumericVector 的 Linf 范数。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 97 行定义.
参考 libMesh::closed() , 以及 libMesh::Real.
|
virtualinherited |
比较该向量与另一个向量的局部相对差异。
如果两个向量在给定的局部相对阈值 abs
(a[i]-b[i])/max(a[i],b[i]) 下等效,则返回-1,否则返回首个不等效的索引。
other_vector | 要比较的另一个向量。 |
threshold | 允许的局部相对差异阈值(可选,默认值为 TOLERANCE)。 |
在文件 numeric_vector.C 第 137 行定义.
参考 std::abs().
|
inlineoverridevirtual |
获取 NumericVector 的本地大小(本地维度)。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1258 行定义.
参考自 libMesh::PetscVector< T >::localize() , 以及 libMesh::PetscVector< T >::operator=().
|
overridevirtual |
将当前向量的数据本地化到 std::vector v_local 中。
v_local | 用于存储本地数据的 std::vector。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 863 行定义.
参考自 libMesh::PetscVector< T >::localize().
|
overridevirtual |
将当前向量的数据本地化到 NumericVector v_local 中。
v_local | 用于存储本地数据的 NumericVector。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 634 行定义.
参考 libMesh::PetscVector< T >::_vec, libMesh::NumericVector< T >::closed(), libMesh::WrappedPetsc< T >::get(), libMesh::PetscVector< T >::local_size(), libMesh::PetscVector< T >::size() , 以及 libMesh::NumericVector< T >::type().
|
overridevirtual |
将当前向量的数据本地化到 NumericVector v_local 中,只包括指定的索引。
v_local | 用于存储本地数据的 NumericVector。 |
indices | 指定的索引数组。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 683 行定义.
参考 libMesh::PetscVector< T >::_vec, libMesh::PetscVector< T >::close(), libMesh::WrappedPetsc< T >::get(), libMesh::PetscVector< T >::size() , 以及 libMesh::NumericVector< T >::type().
|
overridevirtual |
本地化当前向量的数据,并将其发送给指定的进程。
first_local_idx | 第一个本地索引。 |
last_local_idx | 最后一个本地索引。 |
send_list | 要发送给的进程列表。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 802 行定义.
参考 libMesh::PetscVector< T >::_vec, libMesh::PetscVector< T >::close(), libMesh::WrappedPetsc< T >::get(), libMesh::PetscVector< T >::init() , 以及 libMesh::PetscVector< T >::localize().
|
pure virtualinherited |
用全局索引中给定的值填充本地 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 > 内被实现.
|
overridevirtual |
将当前向量的数据本地化到 std::vector v_local 中,只包括一个进程的数据。
v_local | 用于存储本地数据的 std::vector。 |
proc_id | 进程 ID。 |
void libMesh::PetscVector< Real >::localize_to_one | ( | std::vector< Real > & | v_local, |
const processor_id_type | timpi_mpi_varpid | ||
) | const |
在文件 petsc_vector.C 第 900 行定义.
参考 libMesh::WrappedPetsc< T >::get().
void libMesh::PetscVector< Complex >::localize_to_one | ( | std::vector< Complex > & | v_local, |
const processor_id_type | pid | ||
) | const |
在文件 petsc_vector.C 第 991 行定义.
参考 std::imag() , 以及 std::real().
|
inline |
i
对应的本地索引。如果索引不是幽灵单元,那么通过减去第一个本地索引的数量来实现。 如果它是幽灵单元,需要在映射中查找。
在文件 petsc_vector.h 第 1323 行定义.
|
inlineoverridevirtual |
获取 NumericVector 中的最大值。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1478 行定义.
参考 libMesh::Real.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
获取 NumericVector 中的最小值。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1457 行定义.
参考 libMesh::Real.
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
在文件 reference_counter.h 第 85 行定义.
参考 libMesh::ReferenceCounter::_n_objects.
参考自 libMesh::LibMeshInit::~LibMeshInit().
|
inlineoverridevirtual |
访问 NumericVector 对象的元素。
i | 数值索引。 |
i
的元素值。 实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1383 行定义.
|
inlineinherited |
将向量缩放为 a
, 。等价于
u.scale(a)。
a | 缩放因子。 |
在文件 numeric_vector.h 第 463 行定义.
参考 libMesh::NumericVector< T >::scale().
|
overridevirtual |
将当前向量与另一个 NumericVector v 逐元素相乘并赋值给当前向量。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 429 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
overridevirtual |
将当前 NumericVector 与另一个 NumericVector v 相加。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 118 行定义.
|
overridevirtual |
将当前 NumericVector 与另一个 NumericVector v 相减。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 134 行定义.
|
inlineinherited |
将向量缩放为 1/a
, 。等价于
u.scale
(1.
/a)。
a | 缩放因子。 |
在文件 numeric_vector.h 第 481 行定义.
参考 libMesh::NumericVector< T >::scale().
|
overridevirtual |
将当前向量与另一个 NumericVector v 逐元素相除并赋值给当前向量。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 444 行定义.
参考 libMesh::PetscVector< T >::_vec.
PetscVector< T > & libMesh::PetscVector< T >::operator= | ( | const PetscVector< T > & | v | ) |
复制赋值运算符。 在执行各种检查后调用 VecCopy。
v | 要复制的 PetscVector 对象。 |
在文件 petsc_vector.C 第 566 行定义.
参考 libMesh::PetscVector< T >::_restore_array(), libMesh::PetscVector< T >::_vec, libMesh::NumericVector< T >::closed(), libMesh::PetscVector< T >::local_size() , 以及 libMesh::PetscVector< T >::size().
|
delete |
|
overridevirtual |
将 NumericVector 中的所有元素设置为标量值 s。
s | 要赋给所有元素的标量值。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 523 行定义.
参考 libMesh::closed() , 以及 libMesh::PS().
|
overridevirtual |
将当前 NumericVector 的内容复制为另一个 NumericVector v。
v | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 550 行定义.
|
overridevirtual |
将当前 NumericVector 的内容复制为一个标量值向量 v。
v | 标量值向量。 |
Case 1: The vector is the same size of The global vector. Only add the local components.
Case 2: The vector is the same size as our local piece. Insert directly to the local piece.
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 596 行定义.
参考 libMesh::PS().
|
overridevirtual |
逐元素将当前向量与 vec1 相除,结果存储在当前向量中。
vec1 | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 1105 行定义.
参考 libMesh::PetscVector< T >::vec().
|
overridevirtual |
逐元素将当前向量与 vec1 相乘,结果存储在当前向量中。
vec1 | 另一个 NumericVector 对象。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 1081 行定义.
参考 libMesh::PetscVector< T >::vec().
|
inlinevirtualinherited |
打印本地向量的内容,默认输出到 libMesh::out 流。
os | 输出流,用于指定输出位置(可选,默认为 libMesh::out)。 |
在文件 numeric_vector.h 第 1121 行定义.
|
inlineinherited |
在文件 numeric_vector.h 第 1103 行定义.
参考 std::imag(), libMesh::initialized() , 以及 std::real().
|
inlinevirtualinherited |
打印全局向量的内容,默认输出到 libMesh::out 流。
os | 输出流,用于指定输出位置(可选,默认为 libMesh::out)。 |
在文件 numeric_vector.h 第 1158 行定义.
|
inlineinherited |
在文件 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().
|
overridevirtual |
将当前向量的数据以 MATLAB 格式打印输出。
name | 输出的名称。 |
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.C 第 1129 行定义.
参考 libMesh::closed() , 以及 libMesh::WrappedPetsc< T >::get().
|
inherited |
检查该向量是否能够用于全局操作。
在文件 numeric_vector.C 第 416 行定义.
参考 libMesh::closed() , 以及 libMesh::initialized().
参考自 libMesh::NumericVector< T >::add_vector(), libMesh::NumericVector< T >::compatible() , 以及 libMesh::NumericVector< T >::insert().
|
overridevirtual |
|
inline |
恢复数据数组。
在文件 petsc_vector.h 第 1447 行定义.
|
overridevirtual |
缩放当前向量的所有元素。
factor | 缩放因子。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 411 行定义.
参考 libMesh::PS().
|
overridevirtual |
设置索引为 i
的元素值为 value。
i | 数值索引。 |
value | 要设置的值。 |
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 149 行定义.
参考 libMesh::PS().
|
inlineoverridevirtual |
获取 NumericVector 的大小(维度)。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1238 行定义.
参考自 libMesh::PetscVector< T >::add(), libMesh::PetscVector< T >::localize() , 以及 libMesh::PetscVector< T >::operator=().
|
virtualinherited |
获取指定条目的向量的 -范数,即指定条目的绝对值之和。
indices | 指定的索引集合。 |
在文件 numeric_vector.C 第 306 行定义.
参考 std::abs(), std::norm() , 以及 libMesh::Real.
|
virtualinherited |
获取指定条目的向量的 -范数,即指定条目平方和的平方根。
indices | 指定的索引集合。 |
在文件 numeric_vector.C 第 323 行定义.
参考 std::norm(), libMesh::TensorTools::norm_sq(), libMesh::Real , 以及 std::sqrt().
|
virtualinherited |
获取指定条目的向量的最大绝对值,即指定条目的 -范数。
indices | 指定的索引集合。 |
在文件 numeric_vector.C 第 340 行定义.
参考 std::abs(), std::norm() , 以及 libMesh::Real.
|
overridevirtual |
计算 NumericVector 中的元素之和。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.C 第 44 行定义.
|
inlineoverridevirtual |
交换当前向量与另一个 NumericVector v 的数据。
v | 另一个 NumericVector 对象。 |
重载 libMesh::NumericVector< T > .
在文件 petsc_vector.h 第 1499 行定义.
参考 libMesh::PetscVector< T >::_array_is_present, libMesh::PetscVector< T >::_destroy_vec_on_exit, libMesh::PetscVector< T >::_global_to_local_map, libMesh::PetscVector< T >::_local_form, libMesh::PetscVector< T >::_values, libMesh::PetscVector< T >::_vec , 以及 libMesh::NumericVector< T >::swap().
|
inlineinherited |
获取向量的类型。
在文件 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().
|
inlineinherited |
获取向量的类型。
在文件 numeric_vector.h 第 173 行定义.
参考 libMesh::NumericVector< T >::_type.
|
inline |
获取当前向量的原始 PETSc Vec 指针。
在文件 petsc_vector.h 第 641 行定义.
参考 libMesh::PetscVector< T >::_vec.
参考自 libMesh::PetscVector< T >::add(), libMesh::PetscShellMatrix< T >::get_diagonal(), libMesh::PetscMatrix< T >::get_diagonal(), libMesh::PetscVector< T >::pointwise_divide(), libMesh::PetscVector< T >::pointwise_mult(), libMesh::PetscShellMatrix< T >::vector_mult() , 以及 libMesh::PetscShellMatrix< T >::vector_mult_add().
|
inline |
获取当前向量的原始 PETSc Vec 指针(const 版本)。
在文件 petsc_vector.h 第 652 行定义.
参考 libMesh::PetscVector< T >::_vec.
|
inlineoverridevirtual |
将 PetscVector 的所有元素设置为零。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1178 行定义.
|
inlineoverridevirtual |
获取一个零副本的独立指针。
实现了 libMesh::NumericVector< T >.
在文件 petsc_vector.h 第 1215 行定义.
参考 libMesh::NumericVector< T >::init().
|
mutableprivate |
如果为 true,则当前 PETSc 向量值的实际数组当前可访问。这意味着成员 _local_form 和 _values 有效。
在文件 petsc_vector.h 第 666 行定义.
|
mutableprivate |
在文件 petsc_vector.h 第 668 行定义.
|
staticprotectedinherited |
Actually holds the data.
在文件 reference_counter.h 第 124 行定义.
|
private |
此布尔值仅在接受 PETSc Vec 对象的构造函数中设置为 false。
在文件 petsc_vector.h 第 736 行定义.
|
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().
|
mutableprivate |
|
private |
用于将全局幽灵单元格映射到本地单元格的映射(如果不是幽灵单元格模式,则为空)。
在文件 petsc_vector.h 第 731 行定义.
参考自 libMesh::PetscVector< T >::init(), libMesh::PetscVector< T >::PetscVector() , 以及 libMesh::PetscVector< T >::swap().
|
protectedinherited |
用于跟踪向量的值在在一些或全部处理器上进行插入或添加值操作后是否在所有处理器上保持一致的标志。
在文件 numeric_vector.h 第 913 行定义.
参考自 libMesh::NumericVector< T >::closed(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::DistributedVector< T >::localize(), libMesh::DistributedVector< T >::operator=() , 以及 libMesh::PetscVector< T >::PetscVector().
|
protectedinherited |
在调用 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().
|
mutableprivate |
|
mutableprivate |
用于保存幽灵向量的本地形式的 PETSc 向量数据类型。仅当向量是幽灵的且 _array_is_present 为真时,此字段的内容才有效。
在文件 petsc_vector.h 第 693 行定义.
|
mutableprivate |
从 _get_array() 获取本地值的大小。
在文件 petsc_vector.h 第 688 行定义.
|
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().
|
protectedinherited |
用于执行线程安全操作的互斥锁。
在文件 numeric_vector.h 第 928 行定义.
|
mutableprivate |
用于 _get_array 和 _restore_array 的互斥锁。这是对象的一部分,以减少从多个 PetscVectors 同时读取时的线程争用。
在文件 petsc_vector.h 第 709 行定义.
|
mutableprivate |
指向当前 PETSc 向量值的实际数组的指针。仅当 _array_is_present 为真时,此指针才有效。
在文件 petsc_vector.h 第 698 行定义.
|
protectedinherited |
向量的类型。
在文件 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().
|
mutableprivate |
指向当前 PETSc 向量值的实际数组的指针。仅当 _array_is_present 为真时,此指针才有效。 我们使用了 PETSc 的 VecGetArrayRead() 函数,它需要一个常量 PetscScalar *,但是 _get_array 和 _restore_array 是 const 成员函数,因此 _values 也需要是可变的(否则在那个上下文中它是 "const PetscScalar * const")。
在文件 petsc_vector.h 第 704 行定义.
|
mutableprivate |
数据数组是否已经通过 get_array() 或 get_array_read() 手动检索。
在文件 petsc_vector.h 第 741 行定义.
|
mutableprivate |
数据数组是否仅用于只读访问。
在文件 petsc_vector.h 第 746 行定义.
|
private |
用于保存向量元素的实际 PETSc 向量数据类型。
在文件 petsc_vector.h 第 659 行定义.
参考自 libMesh::PetscVector< T >::add_vector(), libMesh::PetscVector< T >::add_vector_conjugate_transpose(), libMesh::PetscVector< T >::add_vector_transpose(), libMesh::PetscVector< T >::create_subvector(), libMesh::PetscVector< T >::dot(), libMesh::PetscVector< T >::indefinite_dot(), libMesh::PetscVector< T >::init(), libMesh::PetscVector< T >::localize(), libMesh::PetscVector< T >::operator*=(), libMesh::PetscVector< T >::operator/=(), libMesh::PetscVector< T >::operator=(), libMesh::PetscVector< T >::PetscVector(), libMesh::PetscVector< T >::swap() , 以及 libMesh::PetscVector< T >::vec().