5#include "Utility/IpplInfo.h"
6#include "Utility/PAssert.h"
9#include "Field/Field.h"
13 template <
typename T,
unsigned Dim>
14 KOKKOS_INLINE_FUNCTION UniformCartesian<T, Dim>::UniformCartesian()
18 template <
typename T,
unsigned Dim>
19 KOKKOS_INLINE_FUNCTION UniformCartesian<T, Dim>::UniformCartesian(
const NDIndex<Dim>& ndi,
20 const vector_type& hx,
21 const vector_type& origin) {
22 this->initialize(ndi, hx, origin);
25 template <
typename T,
unsigned Dim>
26 KOKKOS_INLINE_FUNCTION
void UniformCartesian<T, Dim>::initialize(
const NDIndex<Dim>& ndi,
27 const vector_type& hx,
28 const vector_type& origin) {
32 for (
unsigned d = 0; d < Dim; ++d) {
33 this->gridSizes_m[d] = ndi[d].length();
34 volume_m *= meshSpacing_m[d];
37 this->setOrigin(origin);
40 template <
typename T,
unsigned Dim>
42 const vector_type& meshSpacing) {
43 meshSpacing_m = meshSpacing;
44 this->updateCellVolume_m();
47 template <
typename T,
unsigned Dim>
50 return meshSpacing_m[dim];
53 template <
typename T,
unsigned Dim>
54 KOKKOS_INLINE_FUNCTION
const typename UniformCartesian<T, Dim>::vector_type&
55 UniformCartesian<T, Dim>::getMeshSpacing()
const {
59 template <
typename T,
unsigned Dim>
64 template <
typename T,
unsigned Dim>
67 for (
unsigned int d = 0; d < Dim; ++d) {
68 ret *= this->getGridsize(d) * this->getMeshSpacing(d);
73 template <
typename T,
unsigned Dim>
77 for (
unsigned i = 0; i < Dim; ++i) {
78 volume_m *= meshSpacing_m[i];