|
FEAT 3
Finite Element Analysis Toolbox
|
Global gate implementation. More...
#include <gate.hpp>
Public Types | |
| typedef LAFEM::DenseVector< DataType, IndexType > | BufferVectorType |
| the internal buffer vector type More... | |
| typedef LocalVector_::DataType | DataType |
| the data type More... | |
| template<typename LocalVector2_ , typename Mirror2_ > | |
| using | GateType = Gate< LocalVector2_, Mirror2_ > |
| Our 'base' class type. More... | |
| template<typename DataType2_ , typename IndexType2_ > | |
| using | GateTypeByDI = Gate< typename LocalVector_::template ContainerType< DataType2_, IndexType2_ >, typename Mirror_::template MirrorType< DataType2_, IndexType2_ > > |
| this typedef lets you create a gate container with new Data and Index types More... | |
| typedef LocalVector_::IndexType | IndexType |
| the index type More... | |
| typedef LocalVector_ | LocalVectorType |
| the local vector type More... | |
| typedef Mirror_ | MirrorType |
| the mirror type More... | |
| typedef SynchScalarTicket< DataType > | ScalarTicketType |
| typedef SynchVectorTicket< LocalVector_, Mirror_ > | VectorTicketType |
Public Member Functions | |
| Gate () | |
| standard constructor More... | |
| Gate (const Dist::Comm &comm) | |
| Constructor. More... | |
| Gate (Gate &&other) | |
| move constructor More... | |
| virtual | ~Gate () |
| virtual destructor More... | |
| std::size_t | bytes () const |
| Returns the total amount of bytes allocated. More... | |
| void | compile (LocalVector_ &&vector) |
| Compiles the gate to finish its setup. More... | |
| template<typename LVT2_ > | |
| void | convert (const Gate< LVT2_, Mirror_ > &other, LocalVector_ &&vector, LAFEM::CloneMode mode=LAFEM::CloneMode::Shallow) |
| Conversion function for different vector container type. More... | |
| template<typename LVT2_ , typename MT2_ > | |
| void | convert (const Gate< LVT2_, MT2_ > &other) |
| Conversion function for same vector container type but with different MDI-Type. More... | |
| DataType | dot (const LocalVector_ &x, const LocalVector_ &y) const |
| Computes a synchronized dot-product of two type-1 vectors. More... | |
| ScalarTicketType | dot_async (const LocalVector_ &x, const LocalVector_ &y, bool sqrt=false) const |
| Computes a synchronized dot-product of two type-1 vectors. More... | |
| void | from_1_to_0 (LocalVector_ &vector) const |
| Converts a type-1 vector into a type-0 vector. More... | |
| const Dist::Comm * | get_comm () const |
| Returns a const pointer to the underlying communicator. More... | |
| const LocalVector_ & | get_freqs () const |
| Returns a const reference to the frequencies vector. More... | |
| const std::vector< Mirror_ > & | get_mirrors () const |
| Returns a const reference to the neighbor mirrors vector. More... | |
| Index | get_num_global_dofs () const |
| Returns the number of native global DOFs. More... | |
| Index | get_num_global_dofs_raw () const |
| Returns the number of raw global DOFs. More... | |
| Index | get_num_local_dofs () const |
| Returns the number of native local DOFs. More... | |
| Index | get_num_local_dofs_raw () const |
| Returns the number of raw local DOFs. More... | |
| const std::vector< int > | get_ranks () const |
| Returns a const reference to the neighbor ranks vector. More... | |
| SyncLocation | get_sync_location () const |
| DataType | max (DataType x) const |
| Computes the maximum of a scalar variable over all processes. More... | |
| ScalarTicketType | max_async (DataType x) const |
| Computes the maximum of a scalar variable over all processes. More... | |
| DataType | min (DataType x) const |
| Computes the minimum of a scalar variable over all processes. More... | |
| ScalarTicketType | min_async (DataType x) const |
| Computes the minimum of a scalar variable over all processes. More... | |
| DataType | norm2 (DataType x) const |
| Computes a reduced 2-norm over all processes. More... | |
| ScalarTicketType | norm2_async (DataType x) const |
| Computes a reduced 2-norm over all processes. More... | |
| Gate & | operator= (Gate &&other) |
| move-assign operator More... | |
| void | push (int rank, Mirror_ &&mirror) |
| Adds a mirror for a neighbor process. More... | |
| void | set_comm (const Dist::Comm *comm_) |
| Sets the communicator for this gate. More... | |
| void | set_sync_location (SyncLocation sync_location) |
| Set the sync location to be used. More... | |
| DataType | sum (DataType x) const |
| Computes a reduced sum over all processes. More... | |
| ScalarTicketType | sum_async (DataType x, bool sqrt=false) const |
| Computes a reduced sum over all processes. More... | |
| void | sync_0 (LocalVector_ &vector) const |
| Synchronizes a type-0 vector, resulting in a type-1 vector. More... | |
| VectorTicketType | sync_0_async (LocalVector_ &vector) const |
| Synchronizes a type-0 vector, resulting in a type-1 vector. More... | |
| void | sync_1 (LocalVector_ &vector) const |
| Synchronizes a type-1 vector, resulting in a type-1 vector. More... | |
| VectorTicketType | sync_1_async (LocalVector_ &vector) const |
| Synchronizes a type-1 vector, resulting in a type-1 vector. More... | |
Public Attributes | |
| const Dist::Comm * | _comm |
| our communicator More... | |
| LocalVector_ | _freqs |
| frequency vector More... | |
| std::vector< Mirror_ > | _mirrors |
| vector mirrors More... | |
| std::vector< int > | _ranks |
| communication ranks More... | |
| std::vector< BufferVectorType > | _recv_buffers |
| Dist::RequestVector | _recv_reqs |
| std::vector< Memory::TypedView< DataType > > | _recv_views |
| std::vector< BufferVectorType > | _send_buffers |
| persistent buffer vectors More... | |
| Dist::RequestVector | _send_reqs |
| persistent MPI Requests More... | |
| std::vector< Memory::TypedView< DataType > > | _send_views |
| send and receive buffer views More... | |
| SyncLocation | _sync_location = SyncLocation::host |
Protected Member Functions | |
| PreferredBackend | _get_sync_backend () const |
| void | _sync_vec (LocalVector_ &vector) const |
| Sychronizes a vector by adding all mirrors elements. More... | |
Global gate implementation.
This class provides the functionality for the synchronization of data across interfaces between nearest neighbors (aka 'halos') in the overlapping domain decomposition approach and is used by most other Global classes. Note that a gate is tied to one finite element space (or a tuple thereof) and one vector type, i.e. if you need to synchronize different vector types belonging to possibly different finite element spaces, then you also need one gate object for each space-vector pair. In the case where you need two gate objects for the same finite element space object, but for different vector classes, you can make use of the convert functions to convert one gate into another one for the second vector type.
| 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 |
To set up an object of this class, one has to perform three separate steps:
| typedef LAFEM::DenseVector<DataType, IndexType> FEAT::Global::Gate< LocalVector_, Mirror_ >::BufferVectorType |
| typedef LocalVector_::DataType FEAT::Global::Gate< LocalVector_, Mirror_ >::DataType |
| using FEAT::Global::Gate< LocalVector_, Mirror_ >::GateType = Gate<LocalVector2_, Mirror2_> |
| using FEAT::Global::Gate< LocalVector_, Mirror_ >::GateTypeByDI = Gate<typename LocalVector_::template ContainerType<DataType2_, IndexType2_>, typename Mirror_::template MirrorType<DataType2_, IndexType2_> > |
| typedef LocalVector_::IndexType FEAT::Global::Gate< LocalVector_, Mirror_ >::IndexType |
| typedef LocalVector_ FEAT::Global::Gate< LocalVector_, Mirror_ >::LocalVectorType |
| typedef Mirror_ FEAT::Global::Gate< LocalVector_, Mirror_ >::MirrorType |
| typedef SynchScalarTicket<DataType> FEAT::Global::Gate< LocalVector_, Mirror_ >::ScalarTicketType |
| typedef SynchVectorTicket<LocalVector_, Mirror_> FEAT::Global::Gate< LocalVector_, Mirror_ >::VectorTicketType |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
Sychronizes a vector by adding all mirrors elements.
| [in] | vector | The vector to be sychnroied |
Definition at line 840 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_buffers, FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_reqs, FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_views, FEAT::Dist::RequestVector::clear(), FEAT::cuda, FEAT::Backend::get_preferred_backend(), FEAT::Dist::Comm::irecv(), FEAT::Dist::Comm::isend(), FEAT::Dist::RequestVector::push_back(), FEAT::Runtime::synchronize_devices(), FEAT::Dist::RequestVector::wait_all(), and FEAT::Dist::RequestVector::wait_any().
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_0(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1().
|
inline |
Returns the total amount of bytes allocated.
Definition at line 318 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, and FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_buffers.
Referenced by FEAT::Control::BlockedBasicSystemLevel< dim_, DataType_, IndexType_, BlockedMatrix_, TransferMatrix_ >::bytes(), and FEAT::Control::ScalarBasicSystemLevel< DataType_, IndexType_, ScalarMatrix_, TransferMatrix_ >::bytes().
|
inline |
Compiles the gate to finish its setup.
| [in] | vector | A temporary vector allocated to the correct size which is used for initialization of the internal frequencies vector. Its numerical contents are ignored. |
Definition at line 370 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_buffers, FEAT::Dist::RequestVector::clear(), and FEAT::Dist::RequestVector::reserve().
Referenced by FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::AmaVankaGMRES(), FEAT::Control::StokesPowerSystemLevel< dim_, DataType_, IndexType_, ScalarMatrix_, TransferMatrix_ >::assemble_gates(), FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_gates(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::convert().
|
inline |
Conversion function for different vector container type.
This function (re)creates this gate from another gate with a different vector type, but the same mirrors. This can be used to create a gate using DenseVectorBlocked from a gate using DenseVector or vice versa.
| [in] | other | A (transient) reference to the gate using the other vector type to create this gate from. |
| [in] | vector | A temporary vector allocated to the correct size that is to be used for internal initialization. |
| [in] | mode | The clone-mode to be used for cloning the mirrors. Defaults to shallow clone. |
Definition at line 289 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, and FEAT::Global::Gate< LocalVector_, Mirror_ >::compile().
|
inline |
Conversion function for same vector container type but with different MDI-Type.
| [in] | other | A transient reference to the gate to convert from |
Definition at line 238 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Dist::RequestVector::clear(), and FEAT::Dist::RequestVector::reserve().
|
inline |
Computes a synchronized dot-product of two type-1 vectors.
| [in] | x,y | The two type-1 vector whose dot-product is to be computed. |
x and y.Definition at line 645 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs, FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, FEAT::Dist::Comm::size(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sum().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::dot().
|
inline |
Computes a synchronized dot-product of two type-1 vectors.
| [in] | x,y | The two type-1 vector whose dot-product is to be computed. |
Definition at line 675 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs, and FEAT::Global::Gate< LocalVector_, Mirror_ >::sum_async().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::dot_async(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::norm2_async().
|
inline |
Converts a type-1 vector into a type-0 vector.
| [in,out] | vector | On entry, the type-1 vector to be converted. On exit, the converted type-0 vector. |
Definition at line 530 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs, and FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks.
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::from_1_to_0(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1_async().
|
inline |
Returns a const pointer to the underlying communicator.
Definition at line 185 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm.
Referenced by FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::Matrix(), FEAT::Global::AlgDofParti< LocalVector_, Mirror_ >::assemble_by_gate(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::bytes(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::get_comm(), FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::get_comm(), FEAT::Global::Vector< LocalVector_, Mirror_ >::get_comm(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic(), and FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::num_nzes().
|
inline |
Returns a const reference to the frequencies vector.
Definition at line 226 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs.
Referenced by FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::_orthogonalize_cpu(), and FEAT::Global::AlgDofParti< LocalVector_, Mirror_ >::assemble_by_gate().
|
inline |
Returns a const reference to the neighbor mirrors vector.
Definition at line 216 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors.
Referenced by FEAT::Global::AlgDofParti< LocalVector_, Mirror_ >::assemble_by_gate().
|
inline |
Returns the number of native global DOFs.
Definition at line 443 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Dist::Comm::allreduce(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_local_dofs(), FEAT::Dist::op_sum, FEAT::Dist::Comm::rank(), FEAT::Dist::Comm::size(), and XASSERT.
Referenced by FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::num_cols(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::num_rows(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::size().
|
inline |
Returns the number of raw global DOFs.
Definition at line 486 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Dist::Comm::allreduce(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_local_dofs_raw(), FEAT::Dist::op_sum, FEAT::Dist::Comm::rank(), FEAT::Dist::Comm::size(), and XASSERT.
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::size_raw().
|
inline |
Returns the number of native local DOFs.
Definition at line 420 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs().
|
inline |
Returns the number of raw local DOFs.
Definition at line 430 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs_raw().
|
inline |
Returns a const reference to the neighbor ranks vector.
Definition at line 206 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks.
|
inline |
|
inline |
Computes the maximum of a scalar variable over all processes.
| [in] | x | What we want to compute the maximum over all processes of. |
x.Definition at line 758 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::max_async(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().
Referenced by 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_ >::max_abs_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_rel_diff(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::set_sd_v_norm(), and FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::set_sd_v_norm().
|
inline |
Computes the maximum of a scalar variable over all processes.
| [in] | x | What we want to compute the maximum over all processes of. |
Definition at line 774 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, and FEAT::Dist::op_max.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::max(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_abs_element_async(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_element(), FEAT::Global::Vector< LocalVector_, Mirror_ >::max_element_async(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::max_rel_diff_async().
|
inline |
Computes the minimum of a scalar variable over all processes.
| [in] | x | What we want to compute the minimum over all processes of. |
x.Definition at line 725 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::min_async(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::min_abs_element(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::min_element().
|
inline |
Computes the minimum of a scalar variable over all processes.
| [in] | x | What we want to compute the minimum over all processes of. |
Definition at line 741 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, and FEAT::Dist::op_min.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::min(), FEAT::Global::Vector< LocalVector_, Mirror_ >::min_abs_element_async(), and FEAT::Global::Vector< LocalVector_, Mirror_ >::min_element_async().
|
inline |
Computes a reduced 2-norm over all processes.
This function is equivalent to the call Math::sqrt(this->sum(x*x))
| [in] | x | The value that is to be summarized over all processes. |
x.Definition at line 794 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::norm2_async(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().
|
inline |
Computes a reduced 2-norm over all processes.
This function is equivalent to the call Math::sqrt(this->sum(x*x))
| [in] | x | The value that is to be summarized over all processes. |
Definition at line 813 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, and FEAT::Dist::op_sum.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::norm2().
|
inline |
move-assign operator
Definition at line 154 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_buffers, FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_reqs, and FEAT::Global::Gate< LocalVector_, Mirror_ >::_send_views.
|
inline |
Adds a mirror for a neighbor process.
| [in] | rank | The rank of the neighbor with respect to our communicator |
| [in] | mirror | The mirror assembled for the halo of this neighbor process. |
Definition at line 348 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, FEAT::Dist::Comm::size(), and XASSERT.
Referenced by FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::AmaVankaGMRES(), FEAT::Control::StokesPowerSystemLevel< dim_, DataType_, IndexType_, ScalarMatrix_, TransferMatrix_ >::assemble_gates(), and FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_gates().
|
inline |
Sets the communicator for this gate.
| [in] | comm_ | A resident pointer to the communicator object to use. |
Definition at line 196 of file gate.hpp.
Referenced by FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::AmaVankaGMRES(), FEAT::Control::StokesPowerSystemLevel< dim_, DataType_, IndexType_, ScalarMatrix_, TransferMatrix_ >::assemble_gates(), and FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_gates().
|
inline |
|
inline |
Computes a reduced sum over all processes.
| [in] | x | The value that is to be summed over all processes. |
x.Definition at line 692 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::sum_async(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::dot(), FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::eval_fval_grad(), FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::init(), and FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::prepare().
|
inline |
Computes a reduced sum over all processes.
| [in] | x | The value that is to be summed over all processes. |
Definition at line 708 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, and FEAT::Dist::op_sum.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::dot_async(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sum().
|
inline |
Synchronizes a type-0 vector, resulting in a type-1 vector.
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.
| [in,out] | vector | On entry, the type-0 vector to be synchronized. On exit, the synchronized type-1 vector. |
Definition at line 552 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec().
Referenced by FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::init(), FEAT::Global::NonlinearFunctional< LocalNonlinearFunctional_, RowMirrorType_, ColMirrorType_ >::prepare(), FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_0(), and FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::sync_system_filter().
|
inline |
Synchronizes a type-0 vector, resulting in a type-1 vector.
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.
| [in,out] | vector | On entry, the type-0 vector to be synchronized. On exit, the synchronized type-1 vector. |
Definition at line 573 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, and FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks.
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_0_async().
|
inline |
Synchronizes a type-1 vector, resulting in a type-1 vector.
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.
| [in,out] | vector | On entry, the type-1 vector to be synchronized. On exit, the synchronized type-1 vector. |
| [in] | sync_backend | The backend on which the sychronization should take place |
Definition at line 599 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::from_1_to_0().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1().
|
inline |
Synchronizes a type-1 vector, resulting in a type-1 vector.
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.
| [in,out] | vector | On entry, the type-1 vector to be synchronized. On exit, the synchronized type-1 vector. |
Definition at line 627 of file gate.hpp.
References FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm, FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors, FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks, and FEAT::Global::Gate< LocalVector_, Mirror_ >::from_1_to_0().
Referenced by FEAT::Global::Vector< LocalVector_, Mirror_ >::sync_1_async().
| const Dist::Comm* FEAT::Global::Gate< LocalVector_, Mirror_ >::_comm |
our communicator
Definition at line 96 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::convert_to_1(), FEAT::Global::Gate< LocalVector_, Mirror_ >::dot(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_comm(), FEAT::Control::AFCTransportSolver< MatrixType_ >::init_symbolic(), FEAT::Control::AFCTransportSolver< MatrixType_ >::limit_fct(), FEAT::Global::Gate< LocalVector_, Mirror_ >::max_async(), FEAT::Global::Gate< LocalVector_, Mirror_ >::min_async(), FEAT::Global::Gate< LocalVector_, Mirror_ >::norm2_async(), FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=(), FEAT::Control::AFCTransportSolver< MatrixType_ >::print_times(), FEAT::Global::Gate< LocalVector_, Mirror_ >::push(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sum_async(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_0_async(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1_async().
| LocalVector_ FEAT::Global::Gate< LocalVector_, Mirror_ >::_freqs |
frequency vector
Definition at line 108 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::bytes(), FEAT::Global::Gate< LocalVector_, Mirror_ >::compile(), FEAT::Global::Gate< LocalVector_, Mirror_ >::dot(), FEAT::Global::Gate< LocalVector_, Mirror_ >::dot_async(), FEAT::Global::Gate< LocalVector_, Mirror_ >::from_1_to_0(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_freqs(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_local_dofs(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_local_dofs_raw(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=().
| std::vector<Mirror_> FEAT::Global::Gate< LocalVector_, Mirror_ >::_mirrors |
vector mirrors
Definition at line 100 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), FEAT::Global::Gate< LocalVector_, Mirror_ >::bytes(), FEAT::Global::Gate< LocalVector_, Mirror_ >::compile(), FEAT::Global::Gate< LocalVector_, Mirror_ >::convert(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::convert_to_1(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_mirrors(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs_raw(), FEAT::Control::AFCTransportSolver< MatrixType_ >::init_symbolic(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic(), FEAT::Control::AFCTransportSolver< MatrixType_ >::limit_fct(), FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=(), FEAT::Global::Gate< LocalVector_, Mirror_ >::push(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_0_async(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1_async().
| std::vector<int> FEAT::Global::Gate< LocalVector_, Mirror_ >::_ranks |
communication ranks
Definition at line 98 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), FEAT::Global::AlgDofParti< LocalVector_, Mirror_ >::assemble_by_gate(), FEAT::Global::Gate< LocalVector_, Mirror_ >::bytes(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::convert_to_1(), FEAT::Global::Gate< LocalVector_, Mirror_ >::dot(), FEAT::Global::Gate< LocalVector_, Mirror_ >::from_1_to_0(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_ranks(), FEAT::Control::AFCTransportSolver< MatrixType_ >::init_symbolic(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic(), FEAT::Control::AFCTransportSolver< MatrixType_ >::limit_fct(), FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=(), FEAT::Global::Gate< LocalVector_, Mirror_ >::push(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_0_async(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::sync_1_async().
| std::vector<BufferVectorType> FEAT::Global::Gate< LocalVector_, Mirror_ >::_recv_buffers |
| Dist::RequestVector FEAT::Global::Gate< LocalVector_, Mirror_ >::_recv_reqs |
| std::vector<Memory::TypedView<DataType> > FEAT::Global::Gate< LocalVector_, Mirror_ >::_recv_views |
|
mutable |
persistent buffer vectors
Definition at line 102 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), FEAT::Global::Gate< LocalVector_, Mirror_ >::bytes(), FEAT::Global::Gate< LocalVector_, Mirror_ >::compile(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=().
|
mutable |
persistent MPI Requests
Definition at line 104 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=().
|
mutable |
send and receive buffer views
Definition at line 106 of file gate.hpp.
Referenced by FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_vec(), and FEAT::Global::Gate< LocalVector_, Mirror_ >::operator=().
| SyncLocation FEAT::Global::Gate< LocalVector_, Mirror_ >::_sync_location = SyncLocation::host |