waves
Basic FE playground
ElementMatrices< scalar, element_type, element_size > Class Template Reference

Class used to compute the element matrices: More...

#include <ElementMatrices.h>

Inheritance diagram for ElementMatrices< scalar, element_type, element_size >:
Collaboration diagram for ElementMatrices< scalar, element_type, element_size >:

Public Types

typedef Kokkos::View< scalar ***, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > view_type_3D
 
typedef Kokkos::View< scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > view_type_2D
 

Public Member Functions

 ElementMatrices (Teuchos::RCP< katoptron::Domain< scalar >> domain, size_t numPrimalDPN, size_t pool_size)
 ElementMatrices constructor. More...
 
 ~ElementMatrices ()
 
void compute (int e, int i_thread)
 Compute all the matrices and store them as member data. This function must be called before getK, getL, or getS. More...
 
view_type_2D getK (size_t i_thread) const
 Return the element stifness matrix \(\boldsymbol{K}\) computed by the thread i_thread. More...
 
view_type_2D getL (size_t i_thread) const
 Return the thermal element matrix \(\boldsymbol{L}\) computed by the thread i_thread. More...
 
view_type_2D getS (size_t i_thread) const
 Return the coupling element matrix \(\boldsymbol{S}\) computed by the thread i_thread. More...
 

Public Attributes

view_type_3D K
 
view_type_3D L
 
view_type_3D S
 
view_type_2D material
 
Teuchos::RCP< katoptron::Domain< scalar > > domain
 
size_t numPrimalDPN
 

Additional Inherited Members

- Protected Member Functions inherited from ElementComputation< scalar, element_type >
tbox::CacheHex8 & trilinosHex8GetCache ()
 Return the tbox cache of the hexahedron elements. More...
 
tbox::CacheTetra4 & trilinosTetra4GetCache ()
 Return the tbox cache of the tetrahedron elements. More...
 
tbox::CacheTri3 & trilinosTri3GetCache ()
 Return the tbox cache of the triangular elements. More...
 
tbox::CacheQuad4 & trilinosQuad4GetCache ()
 Return the tbox cache of the quadrangular elements. More...
 
double buildJ (int k, tMatrix< double, 3, 3 > &J, local_ordinal_type e, const katoptron::ElementsList &elementsList, const katoptron::NodesList &nodesList)
 Compute the Jacobian matrix \(\boldsymbol{J}\) of an element. More...
 

Detailed Description

template<typename scalar, int element_type, int element_size>
class ElementMatrices< scalar, element_type, element_size >

Class used to compute the element matrices:

  • The element stifness matrix \(\boldsymbol{K}\),
  • The thermal element matrix \(\boldsymbol{L}\),
  • The coupling element matrix \(\boldsymbol{S}\).

Member Typedef Documentation

◆ view_type_2D

template<typename scalar , int element_type, int element_size>
typedef Kokkos::View<scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace> ElementMatrices< scalar, element_type, element_size >::view_type_2D

◆ view_type_3D

template<typename scalar , int element_type, int element_size>
typedef Kokkos::View<scalar ***, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace> ElementMatrices< scalar, element_type, element_size >::view_type_3D

Constructor & Destructor Documentation

◆ ElementMatrices()

template<typename scalar , int element_type, int element_size>
ElementMatrices< scalar, element_type, element_size >::ElementMatrices ( Teuchos::RCP< katoptron::Domain< scalar >>  _domain,
size_t  _numPrimalDPN,
size_t  pool_size 
)

ElementMatrices constructor.

Arguments:

  • domain: an RCP to a Domain object,
  • numPrimalDPN: the number of degrees of freedom per node (without taking into account the Lagrange multipliers),
  • pool_size: the number of threads that will be used to compute the element matrices.

The number of used threads is specify to allocate distinct memory for each thread to ensure that the threads do not use the same memory addresses.

◆ ~ElementMatrices()

template<typename scalar , int element_type, int element_size>
ElementMatrices< scalar, element_type, element_size >::~ElementMatrices ( )
inline

Member Function Documentation

◆ compute()

template<typename scalar , int element_type, int element_size>
void ElementMatrices< scalar, element_type, element_size >::compute ( int  e,
int  i_thread 
)

Compute all the matrices and store them as member data. This function must be called before getK, getL, or getS.

The computations have been gathered into one function to reuse reusable data such as Jacobian computations.

Arguments:

  • e: the local ID of the element for which the matrices have to be computed,
  • i_thread: the ID of the thread used to compute the element matrices.

◆ getK()

template<typename scalar , int element_type, int element_size>
Kokkos::View< scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > ElementMatrices< scalar, element_type, element_size >::getK ( size_t  i_thread) const

Return the element stifness matrix \(\boldsymbol{K}\) computed by the thread i_thread.

Argument:

  • i_thread: the ID of the thread used to compute the element matrices.

◆ getL()

template<typename scalar , int element_type, int element_size>
Kokkos::View< scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > ElementMatrices< scalar, element_type, element_size >::getL ( size_t  i_thread) const

Return the thermal element matrix \(\boldsymbol{L}\) computed by the thread i_thread.

Argument:

  • i_thread: the ID of the thread used to compute the element matrices.

◆ getS()

template<typename scalar , int element_type, int element_size>
Kokkos::View< scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > ElementMatrices< scalar, element_type, element_size >::getS ( size_t  i_thread) const

Return the coupling element matrix \(\boldsymbol{S}\) computed by the thread i_thread.

Argument:

  • i_thread: the ID of the thread used to compute the element matrices.

Member Data Documentation

◆ domain

template<typename scalar , int element_type, int element_size>
Teuchos::RCP<katoptron::Domain<scalar> > ElementMatrices< scalar, element_type, element_size >::domain

◆ K

template<typename scalar , int element_type, int element_size>
view_type_3D ElementMatrices< scalar, element_type, element_size >::K

◆ L

template<typename scalar , int element_type, int element_size>
view_type_3D ElementMatrices< scalar, element_type, element_size >::L

◆ material

template<typename scalar , int element_type, int element_size>
view_type_2D ElementMatrices< scalar, element_type, element_size >::material

◆ numPrimalDPN

template<typename scalar , int element_type, int element_size>
size_t ElementMatrices< scalar, element_type, element_size >::numPrimalDPN

◆ S

template<typename scalar , int element_type, int element_size>
view_type_3D ElementMatrices< scalar, element_type, element_size >::S

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