|
FEAT 3
Finite Element Analysis Toolbox
|
Global vector wrapper class template. More...
#include <vector.hpp>
Public Types | |
| template<typename LocalVector2_ , typename Mirror2_ = Mirror_> | |
| using | ContainerType = Vector< LocalVector2_, Mirror2_ > |
| Our 'base' class type. More... | |
| template<typename DataType2_ , typename IndexType2_ > | |
| using | ContainerTypeByMDI = Vector< typename LocalVector_::template ContainerType< DataType2_, IndexType2_ >, typename Mirror_::template MirrorType< DataType2_, IndexType2_ > > |
| this typedef lets you create a vector container with new Datatype and Index types More... | |
| typedef LocalVector_::DataType | DataType |
| typedef Gate< LocalVector_, Mirror_ > | GateType |
| typedef LocalVector_::IndexType | IndexType |
| typedef LocalVector_ | LocalVectorType |
| typedef Mirror_ | MirrorType |
Public Member Functions | |
| Vector () | |
| standard constructor More... | |
| template<typename... Args_> | |
| Vector (const GateType *gate, Args_ &&... args) | |
| Forwarding constructor. More... | |
| void | axpy (const Vector &x, const DataType alpha=DataType(1)) |
| Performs an AXPY operation: this <- this + alpha*x. More... | |
| void | clear () |
| Clears the underlying vector. More... | |
| void | clone (const Vector &other, LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) |
| Creates this as a clone of another global vector. More... | |
| Vector | clone (LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) const |
| Creates and returns a clone of this global vector. More... | |
| void | component_invert (const Vector &x, const DataType alpha=DataType(1)) |
| Computes the component-wise inverse of a vector. More... | |
| void | component_product (const Vector &x, const Vector &y) |
| Computes the component-wise product of two vector. More... | |
| template<typename OtherGlobalVector_ > | |
| void | convert (const GateType *gate, const OtherGlobalVector_ &other) |
| void | copy (const Vector &x) |
| Copies the contents of another vector into this vector. More... | |
| DataType | dot (const Vector &x) const |
| Computes the dot-product of this vector and another vector. More... | |
| SynchScalarTicket< DataType > | dot_async (const Vector &x) const |
| Computes the dot-product of this vector and another vector. More... | |
| void | format (DataType alpha=DataType(0)) |
| Reset all elements of the container to a given value or zero if missing. More... | |
| void | format (Random &rng, DataType min, DataType max) |
| Reset all elements of the container to random values. More... | |
| void | from_1_to_0 () |
| Converts a type-1 vector into a type-0 vector. More... | |
| std::uint64_t | get_checkpoint_size (LAFEM::SerialConfig &config) |
| Calculate size. More... | |
| const Dist::Comm * | get_comm () const |
| Returns a const pointer to the internal communicator of the gate of the vector. More... | |
| const GateType * | get_gate () const |
| Returns a const pointer to the internal gate of the vector. More... | |
| LocalVector_ & | local () |
| Returns a reference to the internal local LAFEM vector object. More... | |
| const LocalVector_ & | local () const |
| Returns a const reference to the internal local LAFEM vector object. More... | |
| DataType | max_abs_element () const |
| Retrieve the absolute maximum value of this vector. More... | |
| SynchScalarTicket< DataType > | max_abs_element_async () const |
| Retrieve the absolute maximum value of this vector. More... | |
| DataType | max_element () const |
| Retrieve the maximum value of this vector. More... | |
| SynchScalarTicket< DataType > | max_element_async () const |
| Retrieve the maximum value of this vector. More... | |
| DataType | max_rel_diff (const Vector &x) const |
| Retrieve the maximum relative difference of this vector and another one y.max_rel_diff(x) returns \( \max_{0\leq i < n}\frac{|x_i-y_i|}{\max{|x_i|+|y_i|, eps}} \). More... | |
| SynchScalarTicket< DataType > | max_rel_diff_async (const Vector &x) const |
| Retrieve the maximum relative difference of this vector and another one y.max_rel_diff(x) returns \( \max_{0\leq i < n}\frac{|x_i-y_i|}{\max{|x_i|+|y_i|, eps}} \). More... | |
| DataType | min_abs_element () const |
| Retrieve the absolute minimum value of this vector. More... | |
| SynchScalarTicket< DataType > | min_abs_element_async () const |
| Retrieve the absolute minimum value of this vector. More... | |
| DataType | min_element () const |
| Retrieve the minimum value of this vector. More... | |
| SynchScalarTicket< DataType > | min_element_async () const |
| Retrieve the minimum value of this vector. More... | |
| DataType | norm2 () const |
| Computes the Euclid norm of this vector. More... | |
| SynchScalarTicket< DataType > | norm2_async () const |
| Computes the Euclid norm of this vector. More... | |
| DataType | norm2sqr () const |
| Computes the squared Euclid norm of this vector. More... | |
| SynchScalarTicket< DataType > | norm2sqr_async () const |
| Computes the squared Euclid norm of this vector. More... | |
| void | restore_from_checkpoint_data (std::vector< char > &data) |
| Extract object from checkpoint. More... | |
| void | scale (const Vector &x, const DataType alpha) |
| Sets this to a scaled vector: this <- alpha*x. More... | |
| std::uint64_t | set_checkpoint_data (std::vector< char > &data, LAFEM::SerialConfig &config) |
| Index | size () const |
| Returns the total number of entries in this distributed vector. More... | |
| Index | size_raw () const |
| Returns the total number of entries in this distributed vector. More... | |
| void | sync_0 () |
| Performs a type-0 synchronization of the vector, i.e. sums up all local DOF contributions. More... | |
| auto | sync_0_async () -> decltype(_gate->sync_0_async(_vector)) |
| Performs a type-0 synchronization of the vector, i.e. sums up all local DOF contributions. More... | |
| void | sync_1 () |
| Performs a type-1 synchronization of the vector, i.e. averages all local DOF contributions. More... | |
| auto | sync_1_async () -> decltype(_gate->sync_1_async(_vector)) |
| Performs a type-1 synchronization of the vector, i.e. averages all local DOF contributions. More... | |
Protected Attributes | |
| const GateType * | _gate |
| a pointer to the gate responsible for synchronization More... | |
| LocalVector_ | _vector |
| the internal local vector object More... | |
Global vector wrapper class template.
This class implements a wrapper that contains a LAFEM vector as its core data object and provides the necessary synchronization functions required in an MPI-parallel simulation based on the overlapping domain decomposition approach. Effectively, this class only couples a local LAFEM vector with its corresponding Global::Gate, which actually performs all the dirty MPI work.
This wrapper class implements all the 'black-box' functionality of a LAFEM vector and includes the required synchronization for each operation. In the end, the only operations which require direct synchronization/communication are the dot-product and all types of norm functions. Most other functions (such as axpy, copy or scale) are parallel by nature and do not require any type of synchronization, however, they should still be called on all processes for the sake of consistency, unless a purely patch-local modification of the vector is desired, of course.
The class provides the two explicit synchronization functions sync_0() and synch_1(), which synchronize the vector data between nearest neighbors in the overlapping domain decomposition approach, thus ensuring that after all call to one of these functions, each DOF, which is shared by more than one process, has the same value on each if these processes, thus ensuring consistency of the DOF values across all processes. The difference between these two function is as follows: Each DOF, which is shared by more than one process, ...
The 'sync_0' function is used after each assembly of a dual (right-hand-side or defect) vector to sum up all the linearform contributions for each DOF among all processes. This function is also used to synchronize a dual vector after a matrix-vector multiplication.
The 'sync_1' function is used whenever the local vectors are inconsistent over the processes, e.g. after applying a patch-local preconditioner, by averaging each DOF over all processes that contribute to that DOF.
Finally, this class also offers a function named 'from_1_to_0', which effectively scales each DOF by 1/K, where K is the number of processes that share the corresponding DOF. With this function, a call to 'sync_1' is effectively equivalent to a call to 'from_1_to_0' followed by a call to 'sync_0'.
| LocalVector_ | The type of the local vector container; may be any valid combination of LAFEM (meta-)vector types |
| Mirror_ | The type of the vector mirror; must be compatible to the local vector type |
Definition at line 67 of file vector.hpp.
| using FEAT::Global::Vector< LocalVector_, Mirror_ >::ContainerType = Vector<LocalVector2_, Mirror2_> |
Our 'base' class type.
Definition at line 79 of file vector.hpp.
| using FEAT::Global::Vector< LocalVector_, Mirror_ >::ContainerTypeByMDI = Vector< typename LocalVector_::template ContainerType<DataType2_, IndexType2_>, typename Mirror_::template MirrorType<DataType2_, IndexType2_> > |
this typedef lets you create a vector container with new Datatype and Index types
Definition at line 83 of file vector.hpp.
| typedef LocalVector_::DataType FEAT::Global::Vector< LocalVector_, Mirror_ >::DataType |
Definition at line 72 of file vector.hpp.
| typedef Gate<LocalVector_, Mirror_> FEAT::Global::Vector< LocalVector_, Mirror_ >::GateType |
Definition at line 70 of file vector.hpp.
| typedef LocalVector_::IndexType FEAT::Global::Vector< LocalVector_, Mirror_ >::IndexType |
Definition at line 73 of file vector.hpp.
| typedef LocalVector_ FEAT::Global::Vector< LocalVector_, Mirror_ >::LocalVectorType |
Definition at line 75 of file vector.hpp.
| typedef Mirror_ FEAT::Global::Vector< LocalVector_, Mirror_ >::MirrorType |
Definition at line 74 of file vector.hpp.
|
inline |
standard constructor
Definition at line 95 of file vector.hpp.
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::clone().
|
inlineexplicit |
Forwarding constructor.
| [in] | gate | A resident pointer to the gate to be used for synchronization |
| [in] | args | The arguments that are to be passed to the local vector object constructor |
Definition at line 111 of file vector.hpp.
|
inline |
Performs an AXPY operation: this <- this + alpha*x.
| [in] | x,y | The transient references to the two input vectors |
| [in] | alpha | The scaling factor for the input vector x |
Definition at line 366 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
Referenced by FEAT::Solver::AmaVankaRichardson< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::_apply_intern(), and FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform().
|
inline |
Clears the underlying vector.
Definition at line 308 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
Referenced by FEAT::Solver::BFBT< Global::Matrix< MatrixA_, MirrorV_, MirrorV_ >, Global::Matrix< MatrixB_, MirrorV_, MirrorP_ >, Global::Matrix< MatrixD_, MirrorP_, MirrorV_ >, Global::Filter< FilterV_, MirrorV_ >, Global::Filter< FilterP_, MirrorP_ > >::done_numeric(), FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::done_symbolic(), FEAT::Solver::AmaVankaRichardson< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::done_symbolic(), and FEAT::Solver::UzawaPrecond< Global::Matrix< MatrixA_, MirrorV_, MirrorV_ >, Global::Matrix< MatrixB_, MirrorV_, MirrorP_ >, Global::Matrix< MatrixD_, MirrorP_, MirrorV_ >, Global::Filter< FilterV_, MirrorV_ >, Global::Filter< FilterP_, MirrorP_ > >::done_symbolic().
|
inline |
Creates this as a clone of another global vector.
| [in] | vector | A transient reference to the vector that is to be cloned |
| [in] | mode | Specifies the clone mode for the internal vector object. |
Definition at line 299 of file vector.hpp.
References XASSERTM.
|
inline |
Creates and returns a clone of this global vector.
| [in] | mode | Specifies the clone mode for the internal vector object. |
Definition at line 285 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::Vector(), FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, and FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
Referenced by FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform(), FEAT::Solver::ConvertPrecond< Global::Vector< LocalVectorOuter_, MirrorOuter_ >, Global::Vector< LocalVectorInner_, MirrorInner_ > >::apply(), and FEAT::Global::Splitter< LocalVector_, Mirror_ >::join().
|
inline |
Computes the component-wise inverse of a vector.
This function performs \( this_i \leftarrow \alpha / x_i \)
| [in] | x | A transient reference to the vector whose components are to be inverted |
| [in] | alpha | The scaling factor for the component inversion |
Definition at line 483 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
Referenced by FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform().
|
inline |
Computes the component-wise product of two vector.
This function performs \( this_i \leftarrow x_i \cdot y_i \)
| [in] | x,y | The transient references to the two vectors whose components are to be multiplied |
Definition at line 496 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
|
inline |
Definition at line 138 of file vector.hpp.
|
inline |
Copies the contents of another vector into this vector.
| [in] | x | A transient reference from which to copy the contents from. |
Definition at line 348 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
Referenced by FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_async(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed(), and FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed_async().
|
inline |
Computes the dot-product of this vector and another vector.
| [in] | x | A transient reference to the other vector for the dot-product |
x Definition at line 396 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, FEAT::Global::Gate< LocalVector_, Mirror_ >::dot(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2sqr().
|
inline |
Computes the dot-product of this vector and another vector.
| [in] | x | A transient reference to the other vector for the dot-product |
Definition at line 413 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, FEAT::Global::Gate< LocalVector_, Mirror_ >::dot_async(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2sqr_async().
|
inline |
Reset all elements of the container to a given value or zero if missing.
| [in] | alpha | The value to be set (defaults to 0) |
Definition at line 318 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
Referenced by FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform(), FEAT::Solver::AmaVankaRichardson< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::apply(), FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::apply(), FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_rhs_vector(), FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::init_symbolic(), and FEAT::Solver::AmaVankaRichardson< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::init_symbolic().
|
inline |
Reset all elements of the container to random values.
| [in] | rng | The random number generator. |
| [in] | min | Lower rng bound. |
| [in] | max | Upper rng bound. |
Definition at line 336 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, and FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1().
|
inline |
Converts a type-1 vector into a type-0 vector.
This function scales each DOF (local vector value) x_i by 1/P_i, where P_i is the number of processes that share the DOF x_i.
Definition at line 173 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::from_1_to_0().
Referenced by FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_async(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed_async(), and FEAT::Global::Splitter< LocalVector_, Mirror_ >::join().
|
inline |
Calculate size.
Calculate size of complete object as it is stored in the checkpoint
Definition at line 645 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
|
inline |
Returns a const pointer to the internal communicator of the gate of the vector.
Definition at line 159 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, and FEAT::Global::Gate< LocalVector_, Mirror_ >::get_comm().
Referenced by FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >::apply(), and FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::get_comm().
|
inline |
Returns a const pointer to the internal gate of the vector.
Definition at line 149 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate.
Referenced by FEAT::Solver::ConvertPrecond< Global::Vector< LocalVectorOuter_, MirrorOuter_ >, Global::Vector< LocalVectorInner_, MirrorInner_ > >::apply(), FEAT::Assembly::BurgersAssemblyJobBase< DataType_, Space_, ConvVector_ >::calc_sd_v_norm(), FEAT::Assembly::BurgersCarreauAssemblyJobBase< DataType_, Space_, ConvVector_ >::calc_sd_v_norm(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::set_sd_v_norm(), and FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::set_sd_v_norm().
|
inline |
Returns a reference to the internal local LAFEM vector object.
Definition at line 122 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
Referenced by FEAT::Control::Meshopt::DuDvFunctionalControl< DT_, IT_, DomainControl_ >::DuDvFunctionalControl(), FEAT::Solver::AmaVankaRichardson< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::_apply_intern(), FEAT::MeshOpt::MeshDeformer< MeshType_ >::_area_function(), FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform(), FEAT::Solver::ADPSolverBase< Global::Matrix< LocalMatrix_, Mirror_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ >, SolverBase_ >::_download_vector(), FEAT::Solver::ADPSolverBase< Global::Matrix< LocalMatrix_, Mirror_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ >, SolverBase_ >::_upload_vector(), FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >::apply(), FEAT::Solver::DirectStokesSolver< Global::Matrix< LocalMatrix_, Mirror_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >::apply(), FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::apply(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::apply(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_async(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed_async(), FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_sol_vector(), FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_system_transfer(), FEAT::Global::Vector< LocalVector_, Mirror_ >::axpy(), FEAT::Assembly::BurgersAssemblyJobBase< DataType_, Space_, ConvVector_ >::calc_sd_v_norm(), FEAT::Assembly::BurgersCarreauAssemblyJobBase< DataType_, Space_, ConvVector_ >::calc_sd_v_norm(), FEAT::Global::Vector< LocalVector_, Mirror_ >::component_invert(), FEAT::Global::Vector< LocalVector_, Mirror_ >::component_product(), FEAT::Global::Vector< LocalVector_, Mirror_ >::copy(), FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::correct(), FEAT::Global::Vector< LocalVector_, Mirror_ >::dot(), FEAT::Global::Vector< LocalVector_, Mirror_ >::dot_async(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::extract_diag(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::extract_diag(), FEAT::Global::Splitter< LocalVector_, Mirror_ >::join(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::lump_rows(), FEAT::Control::Meshopt::DuDvFunctionalControl< DT_, IT_, DomainControl_ >::optimize(), FEAT::Control::Meshopt::HyperelasticityFunctionalControl< DT_, IT_, DomainControl_, Hyperelasticity_ >::optimize(), FEAT::Control::Meshopt::DuDvFunctionalControl< DT_, IT_, DomainControl_ >::prepare(), FEAT::Control::Meshopt::HyperelasticityFunctionalControl< DT_, IT_, DomainControl_, Hyperelasticity_ >::prepare(), FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::prepare(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::prol(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::prol_recv(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::rest(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::rest_send(), FEAT::Global::Vector< LocalVector_, Mirror_ >::scale(), FEAT::MeshOpt::MeshDeformer< MeshType_ >::scale_to_same_integral_mean(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::set_sd_v_norm(), FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::set_sd_v_norm(), FEAT::Global::Splitter< LocalVector_, Mirror_ >::split(), FEAT::Global::Splitter< LocalVector_, Mirror_ >::split_read_from(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::trunc(), and FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::trunc_send().
|
inline |
Returns a const reference to the internal local LAFEM vector object.
Definition at line 132 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
|
inline |
Retrieve the absolute maximum value of this vector.
Definition at line 509 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::max().
|
inline |
Retrieve the absolute maximum value of this vector.
Definition at line 523 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::max_async().
|
inline |
Retrieve the maximum value of this vector.
Definition at line 565 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::max_async().
|
inline |
Retrieve the maximum value of this vector.
Definition at line 579 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::max_async().
|
inline |
Retrieve the maximum relative difference of this vector and another one y.max_rel_diff(x) returns \( \max_{0\leq i < n}\frac{|x_i-y_i|}{\max{|x_i|+|y_i|, eps}} \).
Definition at line 622 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::max().
|
inline |
Retrieve the maximum relative difference of this vector and another one y.max_rel_diff(x) returns \( \max_{0\leq i < n}\frac{|x_i-y_i|}{\max{|x_i|+|y_i|, eps}} \).
Definition at line 637 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::max_async().
|
inline |
Retrieve the absolute minimum value of this vector.
Definition at line 537 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::min().
|
inline |
Retrieve the absolute minimum value of this vector.
Definition at line 551 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::min_async().
|
inline |
Retrieve the minimum value of this vector.
Definition at line 593 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::min().
|
inline |
Retrieve the minimum value of this vector.
Definition at line 607 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::min_async().
|
inline |
Computes the Euclid norm of this vector.
Definition at line 453 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2sqr(), and FEAT::Math::sqrt().
|
inline |
Computes the Euclid norm of this vector.
Definition at line 466 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::dot_async().
|
inline |
Computes the squared Euclid norm of this vector.
Definition at line 427 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::dot().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2().
|
inline |
Computes the squared Euclid norm of this vector.
Definition at line 440 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::dot_async().
|
inline |
Extract object from checkpoint.
Restores complete object with all its contents from checkpoint data
| [out] | data | object as bytestrem |
Definition at line 651 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
|
inline |
Sets this to a scaled vector: this <- alpha*x.
| [in] | x | A transient reference to the input vector that is to be scaled |
| [in] | alpha | The scaling factor for the input vector x |
Definition at line 380 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, and FEAT::Global::Vector< LocalVector_, Mirror_ >::local().
Referenced by FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform(), and FEAT::MeshOpt::MeshDeformer< MeshType_ >::scale_to_same_integral_mean().
|
inline |
Definition at line 657 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector.
|
inline |
Returns the total number of entries in this distributed vector.
Definition at line 255 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs().
|
inline |
Returns the total number of entries in this distributed vector.
Definition at line 271 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs_raw().
|
inline |
Performs a type-0 synchronization of the vector, i.e. sums up all local DOF contributions.
This function performs a type-0 synchronization, i.e. sums up all local DOF contributions for each DOF, by exchanging the DOF values of each shared DOF among all nearest neighbors.
Definition at line 188 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_0().
Referenced by FEAT::MeshOpt::MeshDeformer< MeshType_ >::_area_function(), FEAT::MeshOpt::MeshDeformer< MeshType_ >::_deform(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed(), FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_system_transfer(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::extract_diag(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::lump_rows(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::prol(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::prol_recv(), FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::rest(), and FEAT::Global::Transfer< LocalTransfer_, Mirror_ >::trunc().
|
inline |
Performs a type-0 synchronization of the vector, i.e. sums up all local DOF contributions.
This function performs a type-0 synchronization, i.e. sums up all local DOF contributions for each DOF, by exchanging the DOF values of each shared DOF among all nearest neighbors.
Definition at line 205 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_0_async().
Referenced by FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_async(), and FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::apply_transposed_async().
|
inline |
Performs a type-1 synchronization of the vector, i.e. averages all local DOF contributions.
This function performs a type-1 synchronization, i.e. averages all local DOF contributions for each DOF, by exchanging the DOF values of each shared DOF among all nearest neighbors.
Definition at line 221 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1().
Referenced by FEAT::Solver::AmaVankaRichardson< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::_apply_intern(), FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >::apply(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::format().
|
inline |
Performs a type-1 synchronization of the vector, i.e. averages all local DOF contributions.
This function performs a type-1 synchronization, i.e. averages all local DOF contributions for each DOF, by exchanging the DOF values of each shared DOF among all nearest neighbors.
Definition at line 238 of file vector.hpp.
References FEAT::Global::Vector< LocalVector_, Mirror_ >::_gate, FEAT::Global::Vector< LocalVector_, Mirror_ >::_vector, ASSERTM, and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1_async().
|
protected |
a pointer to the gate responsible for synchronization
Definition at line 89 of file vector.hpp.
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::clone(), FEAT::Global::Vector< LocalVector_, Mirror_ >::dot(), FEAT::Global::Vector< LocalVector_, Mirror_ >::dot_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::from_1_to_0(), FEAT::Global::Vector< LocalVector_, Mirror_ >::get_comm(), FEAT::Global::Vector< LocalVector_, Mirror_ >::get_gate(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_abs_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_abs_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_rel_diff(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_rel_diff_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_abs_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_abs_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::size(), FEAT::Global::Vector< LocalVector_, Mirror_ >::size_raw(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_0(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_0_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1_async().
|
protected |
the internal local vector object
Definition at line 91 of file vector.hpp.
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::axpy(), FEAT::Global::Vector< LocalVector_, Mirror_ >::clear(), FEAT::Global::Vector< LocalVector_, Mirror_ >::clone(), FEAT::Global::Vector< LocalVector_, Mirror_ >::component_invert(), FEAT::Global::Vector< LocalVector_, Mirror_ >::component_product(), FEAT::Global::Vector< LocalVector_, Mirror_ >::copy(), FEAT::Global::Vector< LocalVector_, Mirror_ >::dot(), FEAT::Global::Vector< LocalVector_, Mirror_ >::dot_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::format(), FEAT::Global::Vector< LocalVector_, Mirror_ >::get_checkpoint_size(), FEAT::Global::Vector< LocalVector_, Mirror_ >::local(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_abs_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_abs_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_rel_diff(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_rel_diff_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_abs_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_abs_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::restore_from_checkpoint_data(), FEAT::Global::Vector< LocalVector_, Mirror_ >::scale(), FEAT::Global::Vector< LocalVector_, Mirror_ >::set_checkpoint_data(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_0(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_0_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1_async().