IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
Mesh.h
1
//
2
// Class Mesh
3
// The Mesh base class. Right now, this mainly acts as a standard base
4
// class for all meshes so that other objects can register as users of
5
// the mesh and can be notified if the mesh changes (e.g., it is rescaled
6
// or restructured entirely).
7
//
8
#ifndef IPPL_MESH_H
9
#define IPPL_MESH_H
10
11
#include "
Types/Vector.h
"
12
13
namespace
ippl
{
14
template
<
typename
T,
unsigned
Dim>
15
class
Mesh
{
16
public
:
17
typedef
T value_type;
18
enum
{
19
Dimension = Dim
20
};
21
22
typedef
Vector<T, Dim>
vector_type
;
23
typedef
Vector<vector_type, Dim>
matrix_type
;
24
25
KOKKOS_INLINE_FUNCTION
Mesh
(){};
26
27
KOKKOS_INLINE_FUNCTION
virtual
~Mesh
(){};
28
29
// Get the origin of mesh vertex positions
30
KOKKOS_INLINE_FUNCTION
vector_type
getOrigin()
const
;
31
32
// Set the origin of mesh vertex positions
33
KOKKOS_INLINE_FUNCTION
void
setOrigin(
const
vector_type
& origin);
34
35
KOKKOS_INLINE_FUNCTION
const
vector_type
& getGridsize()
const
;
36
41
KOKKOS_INLINE_FUNCTION
virtual
T
getCellVolume
()
const
= 0;
42
47
KOKKOS_INLINE_FUNCTION
virtual
T
getMeshVolume
()
const
= 0;
48
49
KOKKOS_INLINE_FUNCTION T getGridsize(
size_t
dim)
const
;
50
51
KOKKOS_INLINE_FUNCTION
virtual
vector_type
getVertexPosition(
52
const
NDIndex<Dim>
& ndi)
const
= 0;
53
54
KOKKOS_INLINE_FUNCTION
virtual
const
vector_type
& getMeshSpacing()
const
= 0;
55
56
KOKKOS_INLINE_FUNCTION
virtual
vector_type
getDeltaVertex(
57
const
NDIndex<Dim>
& ndi)
const
= 0;
58
59
protected
:
60
vector_type
origin_m;
// Origin of mesh coordinates (vertices)
61
vector_type
gridSizes_m;
// Sizes (number of vertices)
62
};
63
}
// namespace ippl
64
65
#include "Meshes/Mesh.hpp"
66
67
#endif
Vector.h
ippl::Mesh
Definition
Mesh.h:15
ippl::Mesh::getCellVolume
virtual KOKKOS_INLINE_FUNCTION T getCellVolume() const =0
ippl::Mesh::getMeshVolume
virtual KOKKOS_INLINE_FUNCTION T getMeshVolume() const =0
ippl::NDIndex
Definition
NDIndex.h:21
ippl::Vector
Definition
Vector.h:23
ippl
Definition
Archive.h:20
ippl-src
src
Meshes
Mesh.h
Generated by
1.9.8