waves
Basic FE playground
ElementMatrices.h
Go to the documentation of this file.
1 #ifndef KATOPTRON_ELEMENTMATRICES_H
2 #define KATOPTRON_ELEMENTMATRICES_H
3 
4 #include "Stokhos_Sacado_Kokkos_MP_Vector.hpp"
5 #include "EnsembleTraits.h"
6 
7 /*
8 #include "Stokhos_Tpetra_MP_Vector.hpp"
9 #include "Stokhos_Tpetra_Utilities_MP_Vector.hpp"
10 #include "Stokhos_Sacado_Kokkos_MP_Vector.hpp"
11 */
12 
13 #include <Kokkos_Core.hpp>
14 #include "Kokkos_ViewFactory.hpp"
15 #include "wCacheHex8.h"
16 #include "wCacheQuad4.h"
17 #include "wCacheTetra4.h"
18 #include "wCacheTri3.h"
19 #include "tMatrix.h"
20 
21 //#include "Sacado_Fad_MP_Vector.hpp"
22 //#include "Sacado.hpp"
23 #include "Domain.h"
24 
25 #include "MaterialsList.h"
26 #include "Material.h"
27 
28 #include "wLazy.h"
29 #include "tMatrix.h"
30 
31 #include "ElementComputation.h"
32 
33 #include "EnsembleTraits.h"
34 
35 #include <iostream>
36 
45 template <typename scalar, int element_type, int element_size>
46 class ElementMatrices : public ElementComputation<scalar, element_type>
47 {
48 public:
49  typedef Kokkos::View<scalar ***, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace> view_type_3D;
50  typedef Kokkos::View<scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace> view_type_2D;
51 
53 
55 
56  Teuchos::RCP<katoptron::Domain<scalar>> domain;
57 
58  size_t numPrimalDPN;
59 
60  ElementMatrices(Teuchos::RCP<katoptron::Domain<scalar>> domain, size_t numPrimalDPN, size_t pool_size);
62 
63  void compute(int e, int i_thread);
64  view_type_2D getK(size_t i_thread) const;
65  view_type_2D getL(size_t i_thread) const;
66  view_type_2D getS(size_t i_thread) const;
67 };
68 
69 #endif //KATOPTRON_ELEMENTMATRICES_H
katoptron::Domain
Class which is used to store all the information related to the discretized domain:
Definition: Domain.h:26
ElementMatrices::material
view_type_2D material
Definition: ElementMatrices.h:54
Domain.h
ElementMatrices::S
view_type_3D S
Definition: ElementMatrices.h:52
ElementMatrices
Class used to compute the element matrices:
Definition: ElementMatrices.h:46
ElementMatrices::~ElementMatrices
~ElementMatrices()
Definition: ElementMatrices.h:61
ElementMatrices::L
view_type_3D L
Definition: ElementMatrices.h:52
Material.h
ElementMatrices::numPrimalDPN
size_t numPrimalDPN
Definition: ElementMatrices.h:58
ElementMatrices::getS
view_type_2D getS(size_t i_thread) const
Return the coupling element matrix computed by the thread i_thread.
Definition: ElementMatrices.hpp:296
ElementMatrices::getK
view_type_2D getK(size_t i_thread) const
Return the element stifness matrix computed by the thread i_thread.
Definition: ElementMatrices.hpp:264
ElementMatrices::ElementMatrices
ElementMatrices(Teuchos::RCP< katoptron::Domain< scalar >> domain, size_t numPrimalDPN, size_t pool_size)
ElementMatrices constructor.
Definition: ElementMatrices.hpp:17
tMatrix.h
ElementComputation.h
ElementMatrices::domain
Teuchos::RCP< katoptron::Domain< scalar > > domain
Definition: ElementMatrices.h:56
EnsembleTraits.h
ElementMatrices::view_type_3D
Kokkos::View< scalar ***, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > view_type_3D
Definition: ElementMatrices.h:49
MaterialsList.h
ElementMatrices::getL
view_type_2D getL(size_t i_thread) const
Return the thermal element matrix computed by the thread i_thread.
Definition: ElementMatrices.hpp:280
ElementMatrices::K
view_type_3D K
Definition: ElementMatrices.h:52
ElementMatrices::view_type_2D
Kokkos::View< scalar **, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace > view_type_2D
Definition: ElementMatrices.h:50
ElementMatrices::compute
void compute(int e, int i_thread)
Compute all the matrices and store them as member data. This function must be called before getK,...
Definition: ElementMatrices.hpp:43
ElementComputation
Base class for the element computations.
Definition: ElementComputation.h:30