Loading...
Searching...
No Matches
terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim > Class Template Reference

#include <epsilon_divdiv.hpp>

Public Types

using SrcVectorType = linalg::VectorQ1Vec< ScalarT, VecDim >
 
using DstVectorType = linalg::VectorQ1Vec< ScalarT, VecDim >
 
using ScalarType = ScalarT
 
using Grid4DDataLocalMatrices = terra::grid::Grid4DDataMatrices< ScalarType, LocalMatrixDim, LocalMatrixDim, 2 >
 
using LocalMatrixStorage = linalg::solvers::LocalMatrixStorage< ScalarType, LocalMatrixDim >
 

Public Member Functions

 EpsilonDivDiv (const grid::shell::DistributedDomain &domain, const grid::Grid3DDataVec< ScalarT, 3 > &grid, const grid::Grid2DDataScalar< ScalarT > &radii, const grid::Grid4DDataScalar< grid::shell::ShellBoundaryFlag > &mask, const grid::Grid4DDataScalar< ScalarT > &k, bool treat_boundary, bool diagonal, linalg::OperatorApplyMode operator_apply_mode=linalg::OperatorApplyMode::Replace, linalg::OperatorCommunicationMode operator_communication_mode=linalg::OperatorCommunicationMode::CommunicateAdditively, linalg::OperatorStoredMatrixMode operator_stored_matrix_mode=linalg::OperatorStoredMatrixMode::Off)
 
void set_operator_apply_and_communication_modes (const linalg::OperatorApplyMode operator_apply_mode, const linalg::OperatorCommunicationMode operator_communication_mode)
 
void set_diagonal (bool v)
 S/Getter for diagonal member.
 
const grid::Grid4DDataScalar< ScalarType > & k_grid_data ()
 Getter for coefficient.
 
const grid::shell::DistributedDomainget_domain () const
 Getter for domain member.
 
grid::Grid2DDataScalar< ScalarT > get_radii () const
 Getter for radii member.
 
grid::Grid3DDataVec< ScalarT, 3 > get_grid ()
 Getter for grid member.
 
bool has_flag (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell, grid::shell::ShellBoundaryFlag flag) const
 Getter for mask member.
 
void set_stored_matrix_mode (linalg::OperatorStoredMatrixMode operator_stored_matrix_mode, std::optional< int > level_range, std::optional< grid::Grid4DDataScalar< ScalarType > > GCAElements)
 allocates memory for the local matrices
 
linalg::OperatorStoredMatrixMode get_stored_matrix_mode ()
 
void set_local_matrix (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell, const int wedge, const dense::Mat< ScalarT, LocalMatrixDim, LocalMatrixDim > &mat) const
 Set the local matrix stored in the operator.
 
dense::Mat< ScalarT, LocalMatrixDim, LocalMatrixDimget_local_matrix (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell, const int wedge) const
 Retrives the local matrix if there is stored local matrices, the desired local matrix is loaded and returned if not, the local matrix is assembled on-the-fly.
 
void apply_impl (const SrcVectorType &src, DstVectorType &dst)
 
void operator() (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell) const
 
void assemble_trial_test_vecs (const int wedge, const dense::Vec< ScalarType, VecDim > &quad_point, const ScalarType quad_weight, const ScalarT r_1, const ScalarT r_2, dense::Vec< ScalarT, 3 >(*wedge_phy_surf)[3], const dense::Vec< ScalarT, 6 > *k_local_hex, const int dimi, const int dimj, dense::Mat< ScalarType, VecDim, VecDim > *sym_grad_i, dense::Mat< ScalarType, VecDim, VecDim > *sym_grad_j, ScalarType &jdet_keval_quadweight) const
 : For both trial and test space this function sets up a vector: each vector element holds the symmetric gradient (a 3x3 matrix) of the shape function of the corresponding dof (if dimi == dimj, these are the same and we are on the diagonal of the vectorial diffusion operator) Additionally, we compute the scalar factor for the numerical integral comp: determinant of the jacobian, evaluation of the coefficient k on the element and the quadrature weight of the current quad-point.
 
dense::Mat< ScalarT, LocalMatrixDim, LocalMatrixDimassemble_local_matrix (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell, const int wedge) const
 assemble the local matrix and return it for a given element, wedge, and vectorial component (determined by dimi, dimj)
 
void fused_local_mv (ScalarType src_local_hex[8], ScalarType dst_local_hex[8], const int wedge, const ScalarType jdet_keval_quadweight, dense::Mat< ScalarType, 3, 3 > *sym_grad_i, dense::Mat< ScalarType, 3, 3 > *sym_grad_j, const int dimi, const int dimj, int r_cell) const
 

Static Public Attributes

static constexpr int LocalMatrixDim = 18
 

Member Typedef Documentation

◆ DstVectorType

template<typename ScalarT , int VecDim = 3>
using terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::DstVectorType = linalg::VectorQ1Vec< ScalarT, VecDim >

◆ Grid4DDataLocalMatrices

template<typename ScalarT , int VecDim = 3>
using terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::Grid4DDataLocalMatrices = terra::grid::Grid4DDataMatrices< ScalarType, LocalMatrixDim, LocalMatrixDim, 2 >

◆ LocalMatrixStorage

template<typename ScalarT , int VecDim = 3>
using terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::LocalMatrixStorage = linalg::solvers::LocalMatrixStorage< ScalarType, LocalMatrixDim >

◆ ScalarType

template<typename ScalarT , int VecDim = 3>
using terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::ScalarType = ScalarT

◆ SrcVectorType

template<typename ScalarT , int VecDim = 3>
using terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::SrcVectorType = linalg::VectorQ1Vec< ScalarT, VecDim >

Constructor & Destructor Documentation

◆ EpsilonDivDiv()

template<typename ScalarT , int VecDim = 3>
terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::EpsilonDivDiv ( const grid::shell::DistributedDomain domain,
const grid::Grid3DDataVec< ScalarT, 3 > &  grid,
const grid::Grid2DDataScalar< ScalarT > &  radii,
const grid::Grid4DDataScalar< grid::shell::ShellBoundaryFlag > &  mask,
const grid::Grid4DDataScalar< ScalarT > &  k,
bool  treat_boundary,
bool  diagonal,
linalg::OperatorApplyMode  operator_apply_mode = linalg::OperatorApplyMode::Replace,
linalg::OperatorCommunicationMode  operator_communication_mode = linalg::OperatorCommunicationMode::CommunicateAdditively,
linalg::OperatorStoredMatrixMode  operator_stored_matrix_mode = linalg::OperatorStoredMatrixMode::Off 
)
inline

Member Function Documentation

◆ apply_impl()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::apply_impl ( const SrcVectorType src,
DstVectorType dst 
)
inline

◆ assemble_local_matrix()

template<typename ScalarT , int VecDim = 3>
dense::Mat< ScalarT, LocalMatrixDim, LocalMatrixDim > terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::assemble_local_matrix ( const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell,
const int  wedge 
) const
inline

assemble the local matrix and return it for a given element, wedge, and vectorial component (determined by dimi, dimj)

◆ assemble_trial_test_vecs()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::assemble_trial_test_vecs ( const int  wedge,
const dense::Vec< ScalarType, VecDim > &  quad_point,
const ScalarType  quad_weight,
const ScalarT  r_1,
const ScalarT  r_2,
dense::Vec< ScalarT, 3 >(*)  wedge_phy_surf[3],
const dense::Vec< ScalarT, 6 > *  k_local_hex,
const int  dimi,
const int  dimj,
dense::Mat< ScalarType, VecDim, VecDim > *  sym_grad_i,
dense::Mat< ScalarType, VecDim, VecDim > *  sym_grad_j,
ScalarType jdet_keval_quadweight 
) const
inline

: For both trial and test space this function sets up a vector: each vector element holds the symmetric gradient (a 3x3 matrix) of the shape function of the corresponding dof (if dimi == dimj, these are the same and we are on the diagonal of the vectorial diffusion operator) Additionally, we compute the scalar factor for the numerical integral comp: determinant of the jacobian, evaluation of the coefficient k on the element and the quadrature weight of the current quad-point.

The idea of this function is that the two vectors can be:

  • accumulated to the result of the local matvec with 2 * num_nodes_per_wedge complexity by scaling the dot product of the trial vec and local src dofs with each element of the test vec (and adding to the dst dofs, this is the fused local matvec).
  • propagated to the local matrix by an outer product of the two vectors (without applying it to dofs). This is e.g. required to assemble the finest grid local matrix on-the-fly during GCA/Galerkin coarsening.

◆ fused_local_mv()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::fused_local_mv ( ScalarType  src_local_hex[8],
ScalarType  dst_local_hex[8],
const int  wedge,
const ScalarType  jdet_keval_quadweight,
dense::Mat< ScalarType, 3, 3 > *  sym_grad_i,
dense::Mat< ScalarType, 3, 3 > *  sym_grad_j,
const int  dimi,
const int  dimj,
int  r_cell 
) const
inline

◆ get_domain()

template<typename ScalarT , int VecDim = 3>
const grid::shell::DistributedDomain & terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::get_domain ( ) const
inline

Getter for domain member.

◆ get_grid()

template<typename ScalarT , int VecDim = 3>
grid::Grid3DDataVec< ScalarT, 3 > terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::get_grid ( )
inline

Getter for grid member.

◆ get_local_matrix()

template<typename ScalarT , int VecDim = 3>
dense::Mat< ScalarT, LocalMatrixDim, LocalMatrixDim > terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::get_local_matrix ( const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell,
const int  wedge 
) const
inline

Retrives the local matrix if there is stored local matrices, the desired local matrix is loaded and returned if not, the local matrix is assembled on-the-fly.

◆ get_radii()

template<typename ScalarT , int VecDim = 3>
grid::Grid2DDataScalar< ScalarT > terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::get_radii ( ) const
inline

Getter for radii member.

◆ get_stored_matrix_mode()

template<typename ScalarT , int VecDim = 3>
linalg::OperatorStoredMatrixMode terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::get_stored_matrix_mode ( )
inline

◆ has_flag()

template<typename ScalarT , int VecDim = 3>
bool terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::has_flag ( const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell,
grid::shell::ShellBoundaryFlag  flag 
) const
inline

Getter for mask member.

◆ k_grid_data()

template<typename ScalarT , int VecDim = 3>
const grid::Grid4DDataScalar< ScalarType > & terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::k_grid_data ( )
inline

Getter for coefficient.

◆ operator()()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::operator() ( const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell 
) const
inline

◆ set_diagonal()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::set_diagonal ( bool  v)
inline

S/Getter for diagonal member.

◆ set_local_matrix()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::set_local_matrix ( const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell,
const int  wedge,
const dense::Mat< ScalarT, LocalMatrixDim, LocalMatrixDim > &  mat 
) const
inline

Set the local matrix stored in the operator.

◆ set_operator_apply_and_communication_modes()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::set_operator_apply_and_communication_modes ( const linalg::OperatorApplyMode  operator_apply_mode,
const linalg::OperatorCommunicationMode  operator_communication_mode 
)
inline

◆ set_stored_matrix_mode()

template<typename ScalarT , int VecDim = 3>
void terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::set_stored_matrix_mode ( linalg::OperatorStoredMatrixMode  operator_stored_matrix_mode,
std::optional< int >  level_range,
std::optional< grid::Grid4DDataScalar< ScalarType > >  GCAElements 
)
inline

allocates memory for the local matrices

Member Data Documentation

◆ LocalMatrixDim

template<typename ScalarT , int VecDim = 3>
constexpr int terra::fe::wedge::operators::shell::EpsilonDivDiv< ScalarT, VecDim >::LocalMatrixDim = 18
staticconstexpr

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