Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
Hex8CVFEM.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 Sandia Corporation. */
3 /* This software is released under the license detailed */
4 /* in the file, LICENSE, which is located in the top-level Nalu */
5 /* directory structure */
6 /*------------------------------------------------------------------------*/
7 
8 
9 #ifndef Hex8CVFEM_h
10 #define Hex8CVFEM_h
11 
13 
14 namespace sierra{
15 namespace nalu{
16 
17 // Hex 8 subcontrol volume
18 class HexSCV : public MasterElement
19 {
20 public:
21 
22  HexSCV();
23  virtual ~HexSCV();
24 
25  const int * ipNodeMap(int ordinal = 0);
26 
27  void determinant(
28  const int nelem,
29  const double *coords,
30  double *volume,
31  double * error );
32 
33  void determinant(
36 
37  void grad_op(
38  const int nelem,
39  const double *coords,
40  double *gradop,
41  double *deriv,
42  double *det_j,
43  double * error );
44 
45  void shape_fcn(
46  double *shpfc);
47 
48  void shifted_shape_fcn(
49  double *shpfc);
50 };
51 
52 // Hex 8 subcontrol surface
53 class HexSCS : public MasterElement
54 {
55 public:
56 
57  HexSCS();
58  virtual ~HexSCS();
59 
60  const int * ipNodeMap(int ordinal = 0);
61 
62  // NGP-ready methods first
63  void shape_fcn(
65 
66  void shifted_shape_fcn(
68 
69  void hex8_shape_fcn(
70  const int &numIp,
71  const double *isoParCoord,
73 
74  void hex8_derivative(
75  const int npt,
76  const double *par_coord,
78 
79  void hex8_gradient_operator(
80  const int nodesPerElem,
81  const int numIntgPts,
86  DoubleType &error,
87  int &lerr);
88 
89  void grad_op(
93 
94  void shifted_grad_op(
98 
99  void determinant(
102 
103  void gij(
108 
109 
110  // non NGP-ready methods second
111  void determinant(
112  const int nelem,
113  const double *coords,
114  double *areav,
115  double * error );
116 
117  void grad_op(
118  const int nelem,
119  const double *coords,
120  double *gradop,
121  double *deriv,
122  double *det_j,
123  double * error );
124 
125  void shifted_grad_op(
126  const int nelem,
127  const double *coords,
128  double *gradop,
129  double *deriv,
130  double *det_j,
131  double * error );
132 
133  void face_grad_op(
134  const int nelem,
135  const int face_ordinal,
136  const double *coords,
137  double *gradop,
138  double *det_j,
139  double * error );
140 
142  const int nelem,
143  const int face_ordinal,
144  const double *coords,
145  double *gradop,
146  double *det_j,
147  double * error );
148 
149  void gij(
150  const double *coords,
151  double *gupperij,
152  double *glowerij,
153  double *deriv);
154 
155  const int * adjacentNodes();
156 
157  void shape_fcn(
158  double *shpfc);
159 
160  void shifted_shape_fcn(
161  double *shpfc);
162 
163  int opposingNodes(
164  const int ordinal, const int node);
165 
166  int opposingFace(
167  const int ordinal, const int node);
168 
169  double isInElement(
170  const double *elemNodalCoord,
171  const double *pointCoord,
172  double *isoParCoord);
173 
174  void interpolatePoint(
175  const int &nComp,
176  const double *isoParCoord,
177  const double *field,
178  double *result);
179 
180  void general_shape_fcn(
181  const int numIp,
182  const double *isoParCoord,
183  double *shpfc);
184 
186  const int face_ordinal,
187  const double *isoParCoord,
188  const double *coords,
189  double *gradop,
190  double *det_j,
191  double * error );
192 
194  const int & side_ordinal,
195  const int & npoints,
196  const double *side_pcoords,
197  double *elem_pcoords);
198 
199  const int* side_node_ordinals(int sideOrdinal) final;
200 
201  double parametric_distance(const std::vector<double> &x);
202 };
203 
204 } // namespace nalu
205 } // namespace Sierra
206 
207 #endif
Definition: Hex8CVFEM.h:53
virtual void interpolatePoint(const int &nComp, const double *isoParCoord, const double *field, double *result)
Definition: MasterElement.h:202
Definition: ABLForcingAlgorithm.C:26
virtual void face_grad_op(const int nelem, const int face_ordinal, const double *coords, double *gradop, double *det_j, double *error)
Definition: MasterElement.h:152
Definition: MasterElement.h:53
virtual const int * side_node_ordinals(int sideOrdinal)
Definition: MasterElement.h:237
virtual int opposingNodes(const int ordinal, const int node)
Definition: MasterElement.h:186
virtual void shifted_face_grad_op(const int nelem, const int face_ordinal, const double *coords, double *gradop, double *det_j, double *error)
Definition: MasterElement.h:161
virtual void general_shape_fcn(const int numIp, const double *isoParCoord, double *shpfc)
Definition: MasterElement.h:209
virtual double isInElement(const double *elemNodalCoord, const double *pointCoord, double *isoParCoord)
Definition: MasterElement.h:195
void determinant(const int nelem, const double *coords, double *volume, double *error)
Definition: Hex8CVFEM.C:82
virtual const int * adjacentNodes()
Definition: MasterElement.h:170
void shape_fcn(double *shpfc)
Definition: Hex8CVFEM.C:162
const int * ipNodeMap(int ordinal=0)
Definition: Hex8CVFEM.C:72
virtual int opposingFace(const int ordinal, const int node)
Definition: MasterElement.h:190
HexSCV()
Definition: Hex8CVFEM.C:25
Definition: Hex8CVFEM.h:18
virtual void sidePcoords_to_elemPcoords(const int &side_ordinal, const int &npoints, const double *side_pcoords, double *elem_pcoords)
Definition: MasterElement.h:230
void grad_op(const int nelem, const double *coords, double *gradop, double *deriv, double *det_j, double *error)
Definition: Hex8CVFEM.C:133
SimdDouble DoubleType
Definition: SimdInterface.h:27
void shifted_shape_fcn(double *shpfc)
Definition: Hex8CVFEM.C:172
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
virtual ~HexSCV()
Definition: Hex8CVFEM.C:63
virtual void gij(SharedMemView< DoubleType ** > coords, SharedMemView< DoubleType *** > gupper, SharedMemView< DoubleType *** > glower, SharedMemView< DoubleType *** > deriv)
Definition: MasterElement.h:99
virtual void shifted_grad_op(SharedMemView< DoubleType ** > &coords, SharedMemView< DoubleType *** > &gradop, SharedMemView< DoubleType *** > &deriv)
Definition: MasterElement.h:74
virtual void general_face_grad_op(const int face_ordinal, const double *isoParCoord, const double *coords, double *gradop, double *det_j, double *error)
Definition: MasterElement.h:215