waves
Basic FE playground
ElementsList.h
Go to the documentation of this file.
1 #ifndef KATOPTRON_ELEMENTLISTS_H
2 #define KATOPTRON_ELEMENTLISTS_H
3 
4 #include "katoptron.h"
5 
6 #include "Map.h"
7 
8 #include <Tpetra_Map.hpp>
9 #include <Tpetra_Vector.hpp>
10 #include <Kokkos_ViewFactory.hpp>
11 
12 namespace katoptron
13 {
14 
26 {
28 
29 private:
30  Kokkos::View<int **, Kokkos::LayoutRight> elements;
31 
38 
39 public:
40  ElementsList(Problem &pbl, Teuchos::RCP<Map> map);
41 
46  inline local_ordinal_type getElementNumber(void) const { return elements_number; }
47 
56  {
57  return elements(e, elements_type);
58  }
59 
68  {
69  return elements(e, elements_size);
70  }
71 
80  {
81  return elements(e, elements_material);
82  }
83 
93  {
94  return elements(e, elements_nodes + i);
95  }
96 
106  {
107  return elements(e, elements_owned);
108  }
109 };
110 }; // namespace katoptron
111 
112 #endif //KATOPTRON_ELEMENTLISTS_H
katoptron::Map::local_ordinal_type
int local_ordinal_type
Definition: Map.h:27
katoptron::ElementsList::local_ordinal_type
Map::local_ordinal_type local_ordinal_type
Definition: ElementsList.h:27
katoptron::ElementsList::elements_type
local_ordinal_type elements_type
Definition: ElementsList.h:33
katoptron::ElementsList::isLocal
local_ordinal_type isLocal(const local_ordinal_type e) const
Return whether local element of ID e is owned by this MPI process (i.e whether it is not a ghost elem...
Definition: ElementsList.h:105
katoptron::ElementsList::elements_nodes
local_ordinal_type elements_nodes
Definition: ElementsList.h:37
katoptron::ElementsList::getElementMaterial
local_ordinal_type getElementMaterial(const local_ordinal_type e) const
Return the material ID of the local element of ID e. Argument:
Definition: ElementsList.h:79
katoptron::ElementsList::getElementNumber
local_ordinal_type getElementNumber(void) const
Return the number of local elements i.e. the number of elements owned by the calling process.
Definition: ElementsList.h:46
katoptron::ElementsList::getElementType
local_ordinal_type getElementType(const local_ordinal_type e) const
Return the type of the local element of local ID e. Argument:
Definition: ElementsList.h:55
katoptron::ElementsList::ElementsList
ElementsList(Problem &pbl, Teuchos::RCP< Map > map)
ElementsList constructor.
Definition: ElementsList.cpp:27
katoptron::ElementsList::elements
Kokkos::View< int **, Kokkos::LayoutRight > elements
Definition: ElementsList.h:30
katoptron
katoptron namespace
Definition: Algebraic.h:18
katoptron::ElementsList
Class used to store the element information including:
Definition: ElementsList.h:25
katoptron::ElementsList::elements_owned
local_ordinal_type elements_owned
Definition: ElementsList.h:36
katoptron::Problem
Class which is used to specify in Python the thermomechanical to solve.
Definition: wProblem.h:19
katoptron.h
Map.h
katoptron::ElementsList::elements_material
local_ordinal_type elements_material
Definition: ElementsList.h:35
katoptron::ElementsList::getElementSize
local_ordinal_type getElementSize(const local_ordinal_type e) const
Return the size of the local element of local ID e. Argument:
Definition: ElementsList.h:67
katoptron::ElementsList::elements_size
local_ordinal_type elements_size
Definition: ElementsList.h:34
katoptron::ElementsList::elements_number
local_ordinal_type elements_number
Definition: ElementsList.h:32
katoptron::ElementsList::getElementNode
local_ordinal_type getElementNode(const local_ordinal_type e, local_ordinal_type i) const
Return the local ID of the ith node of the local element of ID e. Argument:
Definition: ElementsList.h:92