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

Classes

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

Static Public Member Functions

template<typename Matrix_ , typename Vector_ , typename TargetSpace_ , typename SourceSpace_ >
static void assemble_transfer (Matrix_ &matrix, Vector_ &vector, const TargetSpace_ &target_space, const SourceSpace_ &source_space, const String &cubature_name)
 Assembles an inter-space transfer matrix and its corresponding weight vector. More...
 
template<typename Matrix_ , typename TargetSpace_ , typename SourceSpace_ >
static void assemble_transfer_direct (Matrix_ &matrix, const TargetSpace_ &target_space, const SourceSpace_ &source_space, const String &cubature_name)
 Assembles an inter-space transfer matrix. More...
 
template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ >
static void transfer_vector (Vector_ &vector_f, Vector_ &vector_w, const Vector_ &vector_c, const TargetSpace_ &target_space, const SourceSpace_ &source_space, const String &cubature_name)
 Transfers a primal vector and assembles a compatible weight vector. More...
 
template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ >
static void transfer_vector_direct (Vector_ &vector_f, const Vector_ &vector_c, const TargetSpace_ &target_space, const SourceSpace_ &source_space, const String &cubature_name)
 Transfers a primal vector directly. More...
 

Detailed Description

Definition at line 23 of file space_transfer.hpp.

Member Function Documentation

◆ assemble_transfer()

template<typename Matrix_ , typename Vector_ , typename TargetSpace_ , typename SourceSpace_ >
static void FEAT::Assembly::SpaceTransfer::assemble_transfer ( Matrix_ &  matrix,
Vector_ &  vector,
const TargetSpace_ &  target_space,
const SourceSpace_ &  source_space,
const String cubature_name 
)
inlinestatic

Assembles an inter-space transfer matrix and its corresponding weight vector.

To obtain the final 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.

Parameters
[in,out]matrixA transient reference to the inter-space transfer matrix that is to be assembled.
[in,out]vectorA transient reference to the weight vector for the transfer matrix.
[in]target_spaceA transient reference to the fine-mesh test-space to be used.
[in]source_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 70 of file space_transfer.hpp.

References 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 assemble_transfer_direct().

◆ assemble_transfer_direct()

template<typename Matrix_ , typename TargetSpace_ , typename SourceSpace_ >
static void FEAT::Assembly::SpaceTransfer::assemble_transfer_direct ( Matrix_ &  matrix,
const TargetSpace_ &  target_space,
const SourceSpace_ &  source_space,
const String cubature_name 
)
inlinestatic

Assembles an inter-space transfer 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 transfer matrix that is to be assembled.
[in]target_spaceA transient reference to the fine-mesh test-space to be used.
[in]source_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 270 of file space_transfer.hpp.

References assemble_transfer().

◆ transfer_vector()

template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ >
static void FEAT::Assembly::SpaceTransfer::transfer_vector ( Vector_ &  vector_f,
Vector_ &  vector_w,
const Vector_ &  vector_c,
const TargetSpace_ &  target_space,
const SourceSpace_ &  source_space,
const String cubature_name 
)
inlinestatic

Transfers 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 transferred 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 transferred.
[in]target_spaceA transient reference to the fine-mesh test-space to be used.
[in]source_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 325 of file space_transfer.hpp.

References 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 transfer_vector_direct().

◆ transfer_vector_direct()

template<typename Vector_ , typename TargetSpace_ , typename SourceSpace_ >
static void FEAT::Assembly::SpaceTransfer::transfer_vector_direct ( Vector_ &  vector_f,
const Vector_ &  vector_c,
const TargetSpace_ &  target_space,
const SourceSpace_ &  source_space,
const String cubature_name 
)
inlinestatic

Transfers 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 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 transferred.
[in]target_spaceA transient reference to the fine-mesh test-space to be used.
[in]source_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 557 of file space_transfer.hpp.

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


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