FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Assembly::GridTransfer Class Reference

Grid-Transfer assembly class template. More...

#include <grid_transfer.hpp>

Classes

class  LocalMassMatrixSingularException
 Exception for singular mass matrix errors. More...
 

Static Public Member Functions

template<typename Matrix_ , typename Vector_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int assemble_intermesh_transfer (Matrix_ &matrix, Vector_ &vector, const TargetSpace_ &space_target, const SourceSpace_ &space_source, const Target2SourceAdjactor_ &trg2src, const String &cubature_name)
 Assembles a generic inter-mesh transfer matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int assemble_intermesh_transfer_direct (Matrix_ &matrix, const TargetSpace_ &space_target, const SourceSpace_ &space_source, const Target2SourceAdjactor_ &trg2src, const String &cubature_name)
 Assembles a generic inter-mesh transfer matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_prolongation (Matrix_ &matrix, Vector_ &vector, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const Cubature::DynamicFactory &cubature_factory)
 Assembles a prolongation matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_prolongation (Matrix_ &matrix, Vector_ &vector, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
 Assembles a prolongation matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_prolongation_direct (Matrix_ &matrix, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const Cubature::DynamicFactory &cubature_factory)
 Assembles a prolongation matrix. More...
 
template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_prolongation_direct (Matrix_ &matrix, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
 Assembles a prolongation matrix. More...
 
template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_truncation (Matrix_ &matrix, Vector_ &vector, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const Cubature::DynamicFactory &cubature_factory)
 Assembles a truncation matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_truncation (Matrix_ &matrix, Vector_ &vector, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
 Assembles a truncation matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_truncation_direct (Matrix_ &matrix, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const Cubature::DynamicFactory &cubature_factory)
 Assembles a truncation matrix. More...
 
template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_truncation_direct (Matrix_ &matrix, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
 Assembles a truncation matrix. More...
 
template<typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void prolongate_vector (Vector_ &vector_f, Vector_ &vector_w, const Vector_ &vector_c, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
 Prolongates a primal vector and assembles a compatible weight vector. More...
 
template<typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void prolongate_vector_direct (Vector_ &vector_f, const Vector_ &vector_c, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
 Prolongates a primal vector directly. More...
 
template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int transfer_intermesh_vector (Vector_ &vector_target, Vector_ &vector_weight, const Vector_ &vector_source, const TargetSpace_ &space_target, const SourceSpace_ &space_source, const Target2SourceAdjactor_ &trg2src, const String &cubature_name)
 Performs a generic inter-mesh transfer of a primal vector and assembles a compatible weight vector. More...
 
template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int transfer_intermesh_vector_direct (Vector_ &vector_target, const Vector_ &vector_source, const TargetSpace_ &space_target, const SourceSpace_ &space_source, const Target2SourceAdjactor_ &trg2src, const String &cubature_name)
 Performs a generic inter-mesh transfer of a primal vector directly. More...
 

Detailed Description

Grid-Transfer assembly class template.

This class template implements the assembly of grid transfer operators.

Author
Peter Zajac

Definition at line 34 of file grid_transfer.hpp.

Member Function Documentation

◆ assemble_intermesh_transfer()

template<typename Matrix_ , typename Vector_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int FEAT::Assembly::GridTransfer::assemble_intermesh_transfer ( Matrix_ &  matrix,
Vector_ &  vector,
const TargetSpace_ &  space_target,
const SourceSpace_ &  space_source,
const Target2SourceAdjactor_ &  trg2src,
const String cubature_name 
)
inlinestatic

Assembles a generic inter-mesh transfer matrix and its corresponding weight vector.

To obtain the final inter-mesh transfer matrix, one needs to invert the weight vector component-wise and scale the matrix rows by the inverted weights afterwards. This can be accomplished by the component_invert and scale_rows operations of the vector and matrix containers, resp.

Note
This function is parallelized using OpenMP.
Attention
It is strongly recommended to use an open cubature rule, i.e. all points of the cubature rule shall be in the interior of the reference cell. This reduces the risk of point unmapping failures
Parameters
[in,out]matrixA transient reference to the transfer matrix that is to be assembled.
[in,out]vectorA transient reference to the weight vector for the transfer matrix.
[in]space_targetA transient reference to the target-mesh (test) space to be used.
[in]space_sourceA transient reference to the source-mesh (trial) space to be used.
[in]target_to_sourceA transient reference to a target-to-source mesh adjactor. If the source and/or target meshes are permuted, then the adjactor is assumed to be also permuted consistently.
[in]cubature_nameThe name of the cubature rule to be used for integration of the mass matrices. This should be an open cubature rule, i.e. all point shall be in the interior of the reference cell to avoid unmapping errors.
Returns
The number of cubature points that failed to be unmapped onto the source mesh. If the return value is 0, then all points were unmapped successfully and therefore the transfer matrix is assumed to be valid, otherwise the transfer matrix may be invalid.

Definition at line 875 of file grid_transfer.hpp.

References FEAT::Tiny::Vector< T_, n_, s_ >::format(), FEAT::img_point, FEAT::Math::invert_matrix(), FEAT::Math::isnormal(), FEAT::jac_det, XASSERT, and XASSERTM.

Referenced by assemble_intermesh_transfer_direct().

◆ assemble_intermesh_transfer_direct()

template<typename Matrix_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int FEAT::Assembly::GridTransfer::assemble_intermesh_transfer_direct ( Matrix_ &  matrix,
const TargetSpace_ &  space_target,
const SourceSpace_ &  space_source,
const Target2SourceAdjactor_ &  trg2src,
const String cubature_name 
)
inlinestatic

Assembles a generic inter-mesh transfer matrix and its corresponding weight vector.

Attention
This function must not be used to assemble transfer matrices for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight synchronization!
Use this function only in serial simulations!
Note
This function is parallelized using OpenMP.
Parameters
[in,out]matrixA transient reference to the transfer matrix that is to be assembled.
[in]space_targetA transient reference to the target-mesh (test) space to be used.
[in]space_sourceA transient reference to the source-mesh (trial) space to be used.
[in]target_to_sourceA transient reference to a target-to-source mesh adjactor. If the source and/or target meshes are permuted, then the adjactor is assumed to be also permuted consistently.
[in]cubature_nameThe name of the cubature rule to be used for integration of the mass matrices.
Returns
The number of cubature points that failed to be unmapped onto the source mesh. If the return value is 0, then all points were unmapped successfully and therefore the transfer matrix is assumed to be valid, otherwise the transfer matrix may be invalid.

Definition at line 1245 of file grid_transfer.hpp.

References assemble_intermesh_transfer().

◆ assemble_prolongation() [1/2]

template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_prolongation ( Matrix_ &  matrix,
Vector_ &  vector,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const Cubature::DynamicFactory cubature_factory 
)
inlinestatic

Assembles a prolongation matrix and its corresponding weight vector.

To obtain the final prolongation matrix, one needs to invert the weight vector component-wise and scale the matrix rows by the inverted weights afterwards. This can be accomplished by the component_invert and scale_rows operations of the vector and matrix containers, resp.

Parameters
[in,out]matrixA transient reference to the prolongation matrix that is to be assembled.
[in,out]vectorA transient reference to the weight vector for the prolongation matrix.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_factoryThe cubature factory to be used for integration.

Definition at line 120 of file grid_transfer.hpp.

References FEAT::Adjacency::Permutation::empty(), FEAT::Tiny::Vector< T_, n_, s_ >::format(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::format(), FEAT::Math::invert_matrix(), FEAT::Math::isnormal(), FEAT::jac_det, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::norm_frobenius(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_mat_mat_mult(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::sn, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v, and XASSERTM.

◆ assemble_prolongation() [2/2]

template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_prolongation ( Matrix_ &  matrix,
Vector_ &  vector,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const String cubature_name 
)
inlinestatic

Assembles a prolongation matrix and its corresponding weight vector.

To obtain the final prolongation matrix, one needs to invert the weight vector component-wise and scale the matrix rows by the inverted weights afterwards. This can be accomplished by the component_invert and scale_rows operations of the vector and matrix containers, resp.

Parameters
[in,out]matrixA transient reference to the prolongation matrix that is to be assembled.
[in,out]vectorA transient reference to the weight vector for the prolongation matrix.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_nameThe name of the cubature rule to be used for integration of the mass matrices.

Definition at line 81 of file grid_transfer.hpp.

References assemble_prolongation().

Referenced by assemble_prolongation(), assemble_prolongation_direct(), and FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_system_transfer().

◆ assemble_prolongation_direct() [1/2]

template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_prolongation_direct ( Matrix_ &  matrix,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const Cubature::DynamicFactory cubature_factory 
)
inlinestatic

Assembles a prolongation matrix.

Attention
This function must not be used to assemble prolongation matrices for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight synchronization!
Use this function only in serial simulations!
Parameters
[in,out]matrixA transient reference to the prolongation matrix that is to be assembled.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_factoryThe cubature factory to be used for integration.

Definition at line 421 of file grid_transfer.hpp.

References assemble_prolongation().

◆ assemble_prolongation_direct() [2/2]

template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_prolongation_direct ( Matrix_ &  matrix,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const String cubature_name 
)
inlinestatic

Assembles a prolongation matrix.

Attention
This function must not be used to assemble prolongation matrices for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight synchronization!
Use this function only in serial simulations!
Parameters
[in,out]matrixA transient reference to the prolongation matrix that is to be assembled.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_nameThe name of the cubature rule to be used for integration.

Definition at line 386 of file grid_transfer.hpp.

References assemble_prolongation_direct().

Referenced by assemble_prolongation_direct().

◆ assemble_truncation() [1/2]

template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_truncation ( Matrix_ &  matrix,
Vector_ &  vector,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const Cubature::DynamicFactory cubature_factory 
)
inlinestatic

Assembles a truncation matrix and its corresponding weight vector.

To obtain the final truncation matrix, one needs to invert the weight vector component-wise and scale the matrix rows by the inverted weights afterwards. This can be accomplished by the component_invert and scale_rows operations of the vector and matrix containers, resp.

Parameters
[in,out]matrixA transient reference to the truncation matrix that is to be assembled.
[in,out]vectorA transient reference to the weight vector for the reduction matrix.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_factoryThe cubature factory to be used for integration.

Definition at line 507 of file grid_transfer.hpp.

References FEAT::Adjacency::Permutation::empty(), FEAT::Tiny::Vector< T_, n_, s_ >::format(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::format(), FEAT::Math::invert_matrix(), FEAT::Math::isnormal(), FEAT::jac_det, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::norm_frobenius(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_mat_mat_mult(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::sn, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v, and XASSERTM.

◆ assemble_truncation() [2/2]

template<typename Matrix_ , typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_truncation ( Matrix_ &  matrix,
Vector_ &  vector,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const String cubature_name 
)
inlinestatic

Assembles a truncation matrix and its corresponding weight vector.

To obtain the final truncation matrix, one needs to invert the weight vector component-wise and scale the matrix rows by the inverted weights afterwards. This can be accomplished by the component_invert and scale_rows operations of the vector and matrix containers, resp.

Parameters
[in,out]matrixA transient reference to the truncation matrix that is to be assembled.
[in,out]vectorA transient reference to the weight vector for the reduction matrix.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_nameThe name of the cubature rule to be used for integration.

Definition at line 468 of file grid_transfer.hpp.

References assemble_truncation().

Referenced by assemble_truncation(), and assemble_truncation_direct().

◆ assemble_truncation_direct() [1/2]

template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_truncation_direct ( Matrix_ &  matrix,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const Cubature::DynamicFactory cubature_factory 
)
inlinestatic

Assembles a truncation matrix.

Attention
This function must not be used to assemble truncation matrices for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight synchronization!
Use this function only in serial simulations!
Parameters
[in,out]matrixA transient reference to the truncation matrix that is to be assembled.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_factoryThe cubature factory to be used for integration.

Definition at line 809 of file grid_transfer.hpp.

References assemble_truncation().

◆ assemble_truncation_direct() [2/2]

template<typename Matrix_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::assemble_truncation_direct ( Matrix_ &  matrix,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const String cubature_name 
)
inlinestatic

Assembles a truncation matrix.

Attention
This function must not be used to assemble truncation matrices for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight synchronization!
Use this function only in serial simulations!
Parameters
[in,out]matrixA transient reference to the truncation matrix that is to be assembled.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_nameThe name of the cubature rule to be used for integration.

Definition at line 774 of file grid_transfer.hpp.

References assemble_truncation_direct().

Referenced by assemble_truncation_direct().

◆ prolongate_vector()

template<typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::prolongate_vector ( Vector_ &  vector_f,
Vector_ &  vector_w,
const Vector_ &  vector_c,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const String cubature_name 
)
inlinestatic

Prolongates a primal vector and assembles a compatible weight vector.

To obtain the final prolongated vector, one needs to invert the weight vector component-wise and scale the prolongated vector component-wise by the inverted weights afterwards. This can be accomplished by the component_invert and component_product operations of the vector container, resp.

Attention
In the case of global vectors, the weight vector has to be synchronized via sync_0 before the component-wise inversion and scaling to obtain the correctly scaled primal vector.
Parameters
[in,out]vector_fA transient reference to the fine-mesh vector that is to be assembled Is assumed to be allocated and formatted to 0.
[in,out]vector_wA transient reference to the fine-mesh weight vector that is to be assembled. Is assumed to be allocated and formatted to 0.
[in]vector_cA transient reference to the coarse-mesh vector that is to be prolongated.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_nameThe name of the cubature rule to be used for integration.

Definition at line 1303 of file grid_transfer.hpp.

References FEAT::Adjacency::Permutation::empty(), FEAT::Tiny::Vector< T_, n_, s_ >::format(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::format(), FEAT::Math::invert_matrix(), FEAT::Math::isnormal(), FEAT::jac_det, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::norm_frobenius(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_mat_mat_mult(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::sn, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v, and XASSERTM.

Referenced by prolongate_vector_direct().

◆ prolongate_vector_direct()

template<typename Vector_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::GridTransfer::prolongate_vector_direct ( Vector_ &  vector_f,
const Vector_ &  vector_c,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space,
const String cubature_name 
)
inlinestatic

Prolongates a primal vector directly.

Attention
This function must not be used to prolongate vectors for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight vector synchronization!
Parameters
[in,out]vector_fA transient reference to the fine-mesh vector that is to be assembled Is assumed to be allocated and formatted to 0.
[in]vector_cA transient reference to the coarse-mesh vector that is to be prolongated.
[in]fine_spaceA transient reference to the fine-mesh test-space to be used.
[in]coarse_spaceA transient reference to the coarse-mesh trial-space to be used.
[in]cubature_nameThe name of the cubature rule to be used for integration.

Definition at line 1577 of file grid_transfer.hpp.

References FEAT::LAFEM::Layout, and prolongate_vector().

◆ transfer_intermesh_vector()

template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int FEAT::Assembly::GridTransfer::transfer_intermesh_vector ( Vector_ &  vector_target,
Vector_ &  vector_weight,
const Vector_ &  vector_source,
const TargetSpace_ &  space_target,
const SourceSpace_ &  space_source,
const Target2SourceAdjactor_ &  trg2src,
const String cubature_name 
)
inlinestatic

Performs a generic inter-mesh transfer of a primal vector and assembles a compatible weight vector.

To obtain the final transferred vector, one needs to invert the weight vector component-wise and scale the prolongated vector component-wise by the inverted weights afterwards. This can be accomplished by the component_invert and component_product operations of the vector container, resp.

Note
This function is parallelized using OpenMP.
Attention
It is strongly recommended to use an open cubature rule, i.e. all points of the cubature rule shall be in the interior of the reference cell. This reduces the risk of point unmapping failures
Parameters
[in,out]vector_targetA transient reference to the target vector that is to be assembled. Is assumed to be allocated and formatted to 0.
[in,out]vector_weightA transient reference to the weight vector for the transfer matrix. Is assumed to be allocated and formatted to 0.
[in]vector_sourceA transient reference to the source vector that is to be transferred.
[in]space_targetA transient reference to the target-mesh (test) space to be used.
[in]space_sourceA transient reference to the source-mesh (trial) space to be used.
[in]target_to_sourceA transient reference to a target-to-source mesh adjactor. If the source and/or target meshes are permuted, then the adjactor is assumed to be also permuted consistently.
[in]cubature_nameThe name of the cubature rule to be used for integration of the mass matrices. This should be an open cubature rule, i.e. all point shall be in the interior of the reference cell to avoid unmapping errors.
Returns
The number of cubature points that failed to be unmapped onto the source mesh. If the return value is 0, then all points were unmapped successfully and therefore the transfer matrix is assumed to be valid, otherwise the transfer matrix may be invalid.

Definition at line 1645 of file grid_transfer.hpp.

References FEAT::img_point, FEAT::Math::invert_matrix(), FEAT::Math::isnormal(), FEAT::jac_det, XASSERT, and XASSERTM.

◆ transfer_intermesh_vector_direct()

template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ , typename Target2SourceAdjactor_ >
static int FEAT::Assembly::GridTransfer::transfer_intermesh_vector_direct ( Vector_ &  vector_target,
const Vector_ &  vector_source,
const TargetSpace_ &  space_target,
const SourceSpace_ &  space_source,
const Target2SourceAdjactor_ &  trg2src,
const String cubature_name 
)
inlinestatic

Performs a generic inter-mesh transfer of a primal vector directly.

Attention
This function must not be used to transfer vectors for parallel (i.e. global) simulations, as it will be scaled incorrectly due to missing weight synchronization!
Use this function only in serial simulations!
Note
This function is parallelized using OpenMP.
Parameters
[in,out]vector_targetA transient reference to the target vector that is to be assembled. Is assumed to be allocated and formatted to 0.
[in]vector_sourceA transient reference to the source vector that is to be transferred.
[in]space_targetA transient reference to the target-mesh (test) space to be used.
[in]space_sourceA transient reference to the source-mesh (trial) space to be used.
[in]target_to_sourceA transient reference to a target-to-source mesh adjactor. If the source and/or target meshes are permuted, then the adjactor is assumed to be also permuted consistently.
[in]cubature_nameThe name of the cubature rule to be used for integration of the mass matrices.
Returns
The number of cubature points that failed to be unmapped onto the source mesh. If the return value is 0, then all points were unmapped successfully and therefore the transferred vector is assumed to be valid, otherwise the transferred vector may be invalid.

Definition at line 2018 of file grid_transfer.hpp.

References FEAT::LAFEM::Layout, and transfer_intermesh_vector_direct().

Referenced by transfer_intermesh_vector_direct().


The documentation for this class was generated from the following file: