Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
quadrature.h
Go to the documentation of this file.
1
12#ifndef QUADRATURE_H
13#define QUADRATURE_H
14
15// https://people.sc.fsu.edu/~jburkardt/datasets/quadrature_rules_tri/quadrature_rules_tri.html
16
17#include "common.h"
18
23
24static const std::unordered_map<std::string, QuadratureType> QUADRATURE_TYPES = {
25 {"gauss_legendre", QuadratureType::GAUSS_LEGENDRE},
26 {"triangle_dunavant", QuadratureType::TRIANGLE_DUNAVANT},
27};
28
29static const std::unordered_map<QuadratureType, std::string> QUADRATURE_NAMES = {
30 {QuadratureType::GAUSS_LEGENDRE, "gauss_legendre"},
31 {QuadratureType::TRIANGLE_DUNAVANT, "triangle_dunavant"},
32};
33
35 public:
39 Quadrature();
40
44 ~Quadrature() = default;
45
50
53 Kokkos::View<rtype **> points;
54 Kokkos::View<rtype **>::host_mirror_type h_points;
55 Kokkos::View<rtype *> weights;
56 Kokkos::View<rtype *>::host_mirror_type h_weights;
57};
58
59class GaussLegendre : public Quadrature {
60 public:
65};
66
68 public:
73};
74
75#endif // QUADRATURE_H
Definition quadrature.h:59
Definition quadrature.h:34
Kokkos::View< rtype ** > points
Definition quadrature.h:53
~Quadrature()=default
Destroy the Quadrature object.
Kokkos::View< rtype ** >::host_mirror_type h_points
Definition quadrature.h:54
uint8_t order
Definition quadrature.h:52
Quadrature()
Construct a new Quadrature object.
Definition quadrature.cpp:16
void copy_host_to_device()
Copy the quadrature points to the device.
Definition quadrature.cpp:20
Kokkos::View< rtype * >::host_mirror_type h_weights
Definition quadrature.h:56
uint8_t dim
Definition quadrature.h:51
Kokkos::View< rtype * > weights
Definition quadrature.h:55
Definition quadrature.h:67
Common header file.
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
QuadratureType
Definition quadrature.h:19