OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Cartesian.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /***************************************************************************
3  *
4  * The IPPL Framework
5  *
6  *
7  * Visit http://people.web.psi.ch/adelmann/ for more details
8  *
9  ***************************************************************************/
10 
11 #ifndef CARTESIAN_H
12 #define CARTESIAN_H
13 
14 // Cartesian.h
15 // Cartesian class - represents non-uniform-spacing cartesian meshes.
16 
17 // include files
18 #include "Meshes/Mesh.h"
19 #include "Meshes/Centering.h"
21 #include "AppTypes/Vektor.h"
22 
23 #include <map>
24 
25 // forward declarations
26 template<class T, unsigned D> class BareField;
27 template<class T, unsigned D, class M, class C> class Field;
28 template <unsigned Dim, class MFLOAT> class Cartesian;
29 template <unsigned Dim, class MFLOAT>
30 std::ostream& operator<<(std::ostream&, const Cartesian<Dim,MFLOAT>&);
31 
32 template <unsigned Dim, class MFLOAT=double>
33 class Cartesian : public Mesh<Dim>
34 {
35 public:
36  //# public typedefs
38  typedef MFLOAT MeshValue_t;
40 
41  // Default constructor (use initialize() to make valid)
43  {
44  hasSpacingFields = false;
45  };
46  // Destructor
48  {
49  if (hasSpacingFields) {
50  delete VertSpacings;
51  delete CellSpacings;
52  delete FlVert;
53  delete FlCell;
54  }
55  };
56 
57  // Non-default constructors
58  Cartesian(const NDIndex<Dim>& ndi);
59  Cartesian(const Index& I);
60  Cartesian(const Index& I, const Index& J);
61  Cartesian(const Index& I, const Index& J, const Index& K);
62  // These also take a MFLOAT** specifying the mesh spacings:
63  Cartesian(const NDIndex<Dim>& ndi, MFLOAT** const delX);
64  Cartesian(const Index& I, MFLOAT** const delX);
65  Cartesian(const Index& I, const Index& J, MFLOAT** const delX);
66  Cartesian(const Index& I, const Index& J, const Index& K,
67  MFLOAT** const delX);
68  // These further take a Vektor<MFLOAT,Dim>& specifying the origin:
69  Cartesian(const NDIndex<Dim>& ndi, MFLOAT** const delX,
70  const Vektor<MFLOAT,Dim>& orig);
71  Cartesian(const Index& I, MFLOAT** const delX,
72  const Vektor<MFLOAT,Dim>& orig);
73  Cartesian(const Index& I, const Index& J, MFLOAT** const delX,
74  const Vektor<MFLOAT,Dim>& orig);
75  Cartesian(const Index& I, const Index& J, const Index& K,
76  MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig);
77  // These further take a MeshBC_E array specifying mesh boundary conditions.
78  Cartesian(const NDIndex<Dim>& ndi, MFLOAT** const delX,
79  const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
80  Cartesian(const Index& I, MFLOAT** const delX,
81  const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
82  Cartesian(const Index& I, const Index& J, MFLOAT** const delX,
83  const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
84  Cartesian(const Index& I, const Index& J, const Index& K,
85  MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig,
86  MeshBC_E* const mbc);
87 
88  // initialize functions
89  void initialize(const NDIndex<Dim>& ndi);
90  void initialize(const Index& I);
91  void initialize(const Index& I, const Index& J);
92  void initialize(const Index& I, const Index& J, const Index& K);
93  // These also take a MFLOAT** specifying the mesh spacings:
94  void initialize(const NDIndex<Dim>& ndi, MFLOAT** const delX);
95  void initialize(const Index& I, MFLOAT** const delX);
96  void initialize(const Index& I, const Index& J, MFLOAT** const delX);
97  void initialize(const Index& I, const Index& J, const Index& K,
98  MFLOAT** const delX);
99  // These further take a Vektor<MFLOAT,Dim>& specifying the origin:
100  void initialize(const NDIndex<Dim>& ndi, MFLOAT** const delX,
101  const Vektor<MFLOAT,Dim>& orig);
102  void initialize(const Index& I, MFLOAT** const delX,
103  const Vektor<MFLOAT,Dim>& orig);
104  void initialize(const Index& I, const Index& J, MFLOAT** const delX,
105  const Vektor<MFLOAT,Dim>& orig);
106  void initialize(const Index& I, const Index& J, const Index& K,
107  MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig);
108  // These further take a MeshBC_E array specifying mesh boundary conditions.
109  void initialize(const NDIndex<Dim>& ndi, MFLOAT** const delX,
110  const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
111  void initialize(const Index& I, MFLOAT** const delX,
112  const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
113  void initialize(const Index& I, const Index& J, MFLOAT** const delX,
114  const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
115  void initialize(const Index& I, const Index& J, const Index& K,
116  MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig,
117  MeshBC_E* const mbc);
118 
119 private:
120  // Private member data:
121  // Vert-vert spacings along each axis - including guard cells; use STL map:
122  std::map<int,MFLOAT> meshSpacing[Dim];
123  // Vertex positions along each axis - including guard cells; use STL map:
124  std::map<int,MFLOAT> meshPosition[Dim];
125  Vektor<MFLOAT,Dim> origin; // Origin of mesh coordinates (vertices)
126  MeshBC_E MeshBC[2*Dim]; // Mesh boundary conditions
127  FieldLayout<Dim>* FlCell; // Layouts for BareField* CellSpacings
128  FieldLayout<Dim>* FlVert; // Layouts for BareField* VertSpacings
129 
130  // Private member functions:
131  void updateMeshSpacingGuards(int face);// Update guard layers in meshSpacings
132  void setup(); // Private function doing tasks common to all constructors.
133 
134  // Set only the derivative constants, using pre-set spacings:
135  void set_Dvc();
136 
137 
138 public:
139 
140  // Public member data:
141  unsigned gridSizes[Dim]; // Sizes (number of vertices)
142  Vektor<MFLOAT,Dim> Dvc[1<<Dim]; // Constants for derivatives.
143  bool hasSpacingFields; // Flags allocation of the following:
146 
147  // Public member functions:
148 
149  // Create BareField's of vertex and cell spacings; allow for specifying
150  // layouts via the FieldLayout e_dim_tag and vnodes parameters (these
151  // get passed in to construct the FieldLayout used to construct the
152  // BareField's).
153  void storeSpacingFields(); // Default; will have default layout
154  // Special cases for 1-3 dimensions, ala FieldLayout ctors:
155  void storeSpacingFields(e_dim_tag p1, int vnodes=-1);
156  void storeSpacingFields(e_dim_tag p1, e_dim_tag p2, int vnodes=-1);
158  int vnodes=-1);
159  // Next we have one for arbitrary dimension, ala FieldLayout ctor:
160  // All the others call this one internally:
161  void storeSpacingFields(e_dim_tag *p, int vnodes=-1);
162 
163  // These specify both the total number of vnodes and the numbers of vnodes
164  // along each dimension for the partitioning of the index space. Obviously
165  // this restricts the number of vnodes to be a product of the numbers along
166  // each dimension (the constructor implementation checks this): Special
167  // cases for 1-3 dimensions, ala FieldLayout ctors (see FieldLayout.h for
168  // more relevant comments, including definition of recurse):
170  unsigned vnodes1,
171  bool recurse=false,
172  int vnodes=-1);
174  unsigned vnodes1, unsigned vnodes2,
175  bool recurse=false,int vnodes=-1);
177  unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
178  bool recurse=false, int vnodes=-1);
179  // Next we have one for arbitrary dimension, ala FieldLayout ctor:
180  // All the others call this one internally:
181  void storeSpacingFields(e_dim_tag *p,
182  unsigned* vnodesPerDirection,
183  bool recurse=false, int vnodes=-1);
184 
185  // Accessor functions for member data:
186  // Get the origin of mesh vertex positions:
188  // Get the spacings of mesh vertex positions along specified direction:
189  void get_meshSpacing(unsigned d, MFLOAT* spacings) const;
190  //leak MFLOAT* get_meshSpacing(unsigned d) const;
191  // Get mesh boundary conditions:
192  MeshBC_E get_MeshBC(unsigned face) const; // One face at a time
193  MeshBC_E* get_MeshBC() const; // All faces at once
194 
195  // Set functions for member data:
196  // Set the origin of mesh vertex positions:
197  void set_origin(const Vektor<MFLOAT,Dim>& o);
198  // Set the spacings of mesh vertex positions and Dvc:
199  void set_meshSpacing(MFLOAT** const del);
200  // Set up mesh boundary conditions:
201  // Face specifies the mesh face, following usual numbering convention.
202  // MeshBC_E "type" specifies the kind of BC reflective/periodic/none.
203  void set_MeshBC(unsigned face, MeshBC_E meshBCType); // One face at a time
204  void set_MeshBC(MeshBC_E* meshBCTypes); // All faces at once
205 
206  // Formatted output of Cartesian object:
207  void print(std::ostream&);
208 
209  //----Other Cartesian methods:-----------------------------------------------
210  // Volume of single cell indexed by input NDIndex;
211  MFLOAT getCellVolume(const NDIndex<Dim>&) const;
212  // Field of volumes of all cells:
215  // Volume of range of cells bounded by verticies specified by input NDIndex:
216  MFLOAT getVertRangeVolume(const NDIndex<Dim>&) const;
217  // Volume of range of cells spanned by input NDIndex (index of cells):
218  MFLOAT getCellRangeVolume(const NDIndex<Dim>&) const;
219  // Nearest vertex index to (x,y,z):
221  // Nearest vertex index with all vertex coordinates below (x,y,z):
223  // NDIndex for cell in cell-ctrd Field containing the point (x,y,z):
225  {
226  return getVertexBelow(x); // I think these functions are identical. -tjw
227  }
228  // (x,y,z) coordinates of indexed vertex:
230  // Field of (x,y,z) coordinates of all vertices:
233  Cartesian<Dim,MFLOAT>,Vert>& ) const;
234  // (x,y,z) coordinates of indexed cell:
236  // Field of (x,y,z) coordinates of all cells:
239  Cartesian<Dim,MFLOAT>,Cell>& ) const;
240  // Vertex-vertex grid spacing of indexed cell:
242  // Field of vertex-vertex grid spacings of all cells:
245  Cartesian<Dim,MFLOAT>,Cell>& ) const;
246  // Cell-cell grid spacing of indexed vertex:
248  // Field of cell-cell grid spacings of all vertices:
251  Cartesian<Dim,MFLOAT>,Vert>& ) const;
252  // Array of surface normals to cells adjoining indexed cell:
254  // Array of (pointers to) Fields of surface normals to all cells:
256  Cartesian<Dim,MFLOAT>,Cell>** ) const;
257  // Similar functions, but specify the surface normal to a single face, using
258  // the following numbering convention: 0 means low face of 1st dim, 1 means
259  // high face of 1st dim, 2 means low face of 2nd dim, 3 means high face of
260  // 2nd dim, and so on:
261  Vektor<MFLOAT,Dim> getSurfaceNormal(const NDIndex<Dim>&, unsigned) const;
264  Cartesian<Dim,MFLOAT>,Cell>&, unsigned) const;
265 
266 };
267 
268 // I/O
269 
270 // Stream formatted output of Cartesian object:
271 template< unsigned Dim, class MFLOAT >
272 inline
273 std::ostream& operator<<(std::ostream& out, const Cartesian<Dim,MFLOAT>& mesh)
274 {
275  Cartesian<Dim,MFLOAT>& ncmesh = const_cast<Cartesian<Dim,MFLOAT>&>(mesh);
276  ncmesh.print(out);
277  return out;
278 }
279 
280 //*****************************************************************************
281 // Stuff taken from old Cartesian.h, modified for new nonuniform Cartesian:
282 //*****************************************************************************
283 
284 #ifndef CARTESIAN_STENCIL_SETUP_H
286 #endif
287 
288 //----------------------------------------------------------------------
289 //
290 //
291 // Definitions of stencils.
292 //
293 // For each one we have first we have the user level function that takes
294 // a Field argument and returns an expression template.
295 // This is the thing the user code sees.
296 // These could use some asserts to make sure the Fields have
297 // enough guard cells.
298 //
299 // Then we have the 'apply' function that gets used in the inner loop
300 // when evaluating the expression. This would be better done as a
301 // member function of the tags above, but that would require member
302 // function templates, which we are holding off on for now.
303 //
304 //----------------------------------------------------------------------
305 
306 //----------------------------------------------------------------------
307 //
308 // Divergence Vert->Cell
309 //
310 // First is the user function for any dimension and element types.
311 // it returns a unary element type.
312 //
313 //----------------------------------------------------------------------
314 
316 //
317 // Here are the old style definitions.
318 //
320 
321 //----------------------------------------------------------------------
322 // Divergence Vektor/Vert -> Scalar/Cell
323 //----------------------------------------------------------------------
324 template < class T, class MFLOAT >
328 //----------------------------------------------------------------------
329 template < class T, class MFLOAT >
333 //----------------------------------------------------------------------
334 template < class T, class MFLOAT >
338 //----------------------------------------------------------------------
339 // Divergence Vektor/Cell -> Scalar/Vert
340 //----------------------------------------------------------------------
341 template < class T, class MFLOAT >
345 //----------------------------------------------------------------------
346 template < class T, class MFLOAT >
350 //----------------------------------------------------------------------
351 template < class T, class MFLOAT >
355 
356 //----------------------------------------------------------------------
357 // Divergence Vektor/Vert -> Scalar/Vert
358 //----------------------------------------------------------------------
359 template < class T, class MFLOAT >
363 //----------------------------------------------------------------------
364 template < class T, class MFLOAT >
368 //----------------------------------------------------------------------
369 template < class T, class MFLOAT >
373 //----------------------------------------------------------------------
374 // Divergence Vektor/Cell -> Scalar/Cell
375 //----------------------------------------------------------------------
376 template < class T, class MFLOAT >
380 //----------------------------------------------------------------------
381 template < class T, class MFLOAT >
385 //----------------------------------------------------------------------
386 template < class T, class MFLOAT >
390 //----------------------------------------------------------------------
391 // Divergence Tenzor/Vert -> Vektor/Cell
392 //----------------------------------------------------------------------
393 template < class T, class MFLOAT >
397 //----------------------------------------------------------------------
398 template < class T, class MFLOAT >
402 //----------------------------------------------------------------------
403 template < class T, class MFLOAT >
407 //----------------------------------------------------------------------
408 // Divergence SymTenzor/Vert -> Vektor/Cell
409 //----------------------------------------------------------------------
410 template < class T, class MFLOAT >
414 //----------------------------------------------------------------------
415 template < class T, class MFLOAT >
419 //----------------------------------------------------------------------
420 template < class T, class MFLOAT >
424 //----------------------------------------------------------------------
425 // Divergence Tenzor/Cell -> Vektor/Vert
426 //----------------------------------------------------------------------
427 template < class T, class MFLOAT >
431 //----------------------------------------------------------------------
432 template < class T, class MFLOAT >
436 //----------------------------------------------------------------------
437 template < class T, class MFLOAT >
441 //----------------------------------------------------------------------
442 // Divergence SymTenzor/Cell -> Vektor/Vert
443 //----------------------------------------------------------------------
444 template < class T, class MFLOAT >
448 //----------------------------------------------------------------------
449 template < class T, class MFLOAT >
453 //----------------------------------------------------------------------
454 template < class T, class MFLOAT >
458 
459 
460 //----------------------------------------------------------------------
461 // Grad Scalar/Vert -> Vektor/Cell
462 //----------------------------------------------------------------------
463 template < class T, class MFLOAT >
467 //----------------------------------------------------------------------
468 template < class T, class MFLOAT >
472 //----------------------------------------------------------------------
473 template < class T, class MFLOAT >
477 //----------------------------------------------------------------------
478 // Grad Scalar/Cell -> Vektor/Vert
479 //----------------------------------------------------------------------
480 template < class T, class MFLOAT >
484 //----------------------------------------------------------------------
485 template < class T, class MFLOAT >
489 //----------------------------------------------------------------------
490 template < class T, class MFLOAT >
494 
495 //----------------------------------------------------------------------
496 // Grad Scalar/Vert -> Vektor/Vert
497 //----------------------------------------------------------------------
498 template < class T, class MFLOAT >
502 //----------------------------------------------------------------------
503 template < class T, class MFLOAT >
507 //----------------------------------------------------------------------
508 template < class T, class MFLOAT >
512 //----------------------------------------------------------------------
513 // Grad Scalar/Cell -> Vektor/Cell
514 //----------------------------------------------------------------------
515 template < class T, class MFLOAT >
519 //----------------------------------------------------------------------
520 template < class T, class MFLOAT >
524 //----------------------------------------------------------------------
525 template < class T, class MFLOAT >
529 //----------------------------------------------------------------------
530 // Grad Vektor/Vert -> Tenzor/Cell
531 //----------------------------------------------------------------------
532 template < class T, class MFLOAT >
536 //----------------------------------------------------------------------
537 template < class T, class MFLOAT >
541 //----------------------------------------------------------------------
542 template < class T, class MFLOAT >
546 //----------------------------------------------------------------------
547 // Grad Vektor/Cell -> Tenzor/Vert
548 //----------------------------------------------------------------------
549 template < class T, class MFLOAT >
553 //----------------------------------------------------------------------
554 template < class T, class MFLOAT >
558 //----------------------------------------------------------------------
559 template < class T, class MFLOAT >
563 
564 namespace IPPL {
565 //----------------------------------------------------------------------
566 // Weighted average Cell to Vert
567 //----------------------------------------------------------------------
568 template < class T1, class T2, class MFLOAT >
571  Field<T2,1U,Cartesian<1U,MFLOAT>,Cell>& w,
572  Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& r) ;
573 //----------------------------------------------------------------------
574 template < class T1, class T2, class MFLOAT >
577  Field<T2,2U,Cartesian<2U,MFLOAT>,Cell>& w,
578  Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& r);
579 //----------------------------------------------------------------------
580 template < class T1, class T2, class MFLOAT >
583  Field<T2,3U,Cartesian<3U,MFLOAT>,Cell>& w,
584  Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& r);
585 
586 //----------------------------------------------------------------------
587 // Weighted average Vert to Cell
588 //----------------------------------------------------------------------
589 template < class T1, class T2, class MFLOAT >
592  Field<T2,1U,Cartesian<1U,MFLOAT>,Vert>& w,
593  Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& r) ;
594 //----------------------------------------------------------------------
595 template < class T1, class T2, class MFLOAT >
598  Field<T2,2U,Cartesian<2U,MFLOAT>,Vert>& w,
599  Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& r);
600 //----------------------------------------------------------------------
601 template < class T1, class T2, class MFLOAT >
604  Field<T2,3U,Cartesian<3U,MFLOAT>,Vert>& w,
605  Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& r);
606 
607 //----------------------------------------------------------------------
608 
609 //----------------------------------------------------------------------
610 // Unweighted average Cell to Vert
611 //----------------------------------------------------------------------
612 template < class T1, class MFLOAT >
615  Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& r) ;
616 //----------------------------------------------------------------------
617 template < class T1, class MFLOAT >
620  Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& r);
621 //----------------------------------------------------------------------
622 template < class T1, class MFLOAT >
625  Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& r);
626 
627 //----------------------------------------------------------------------
628 // Unweighted average Vert to Cell
629 //----------------------------------------------------------------------
630 template < class T1, class MFLOAT >
633  Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& r) ;
634 //----------------------------------------------------------------------
635 template < class T1, class MFLOAT >
638  Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& r);
639 //----------------------------------------------------------------------
640 template < class T1, class MFLOAT >
643  Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& r);
644 
645 //----------------------------------------------------------------------
646 }
647 #include "Meshes/Cartesian.hpp"
648 
649 #endif // CARTESIAN_H
650 
651 /***************************************************************************
652  * $RCSfile: Cartesian.h,v $ $Author: adelmann $
653  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:28 $
654  * IPPL_VERSION_ID: $Id: Cartesian.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $
655  ***************************************************************************/
const unsigned Dim
e_dim_tag
Definition: FieldLayout.h:55
Field< T, 1U, Cartesian< 1U, MFLOAT >, Cell > & Div(Field< Vektor< T, 1U >, 1U, Cartesian< 1U, MFLOAT >, Vert > &x, Field< T, 1U, Cartesian< 1U, MFLOAT >, Cell > &r)
Definition: Cartesian.hpp:2192
std::ostream & operator<<(std::ostream &, const Cartesian< Dim, MFLOAT > &)
Definition: Cartesian.h:273
Field< Vektor< T, 1U >, 1U, Cartesian< 1U, MFLOAT >, Cell > & Grad(Field< T, 1U, Cartesian< 1U, MFLOAT >, Vert > &x, Field< Vektor< T, 1U >, 1U, Cartesian< 1U, MFLOAT >, Cell > &r)
Definition: Cartesian.hpp:2702
Field< T1, 1U, Cartesian< 1U, MFLOAT >, Vert > & Average(Field< T1, 1U, Cartesian< 1U, MFLOAT >, Cell > &x, Field< T2, 1U, Cartesian< 1U, MFLOAT >, Cell > &w, Field< T1, 1U, Cartesian< 1U, MFLOAT >, Vert > &r)
Definition: Cartesian.hpp:3113
Definition: Tenzor.h:35
Definition: Vektor.h:32
Definition: Field.h:33
Definition: Index.h:237
Vektor< MFLOAT, Dim > MeshVektor_t
Definition: Cartesian.h:39
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > & getDeltaVertexField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > &) const
Definition: Cartesian.hpp:1861
bool hasSpacingFields
Definition: Cartesian.h:143
void get_meshSpacing(unsigned d, MFLOAT *spacings) const
Definition: Cartesian.hpp:787
MFLOAT getCellRangeVolume(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1573
MFLOAT MeshValue_t
Definition: Cartesian.h:38
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > & getVertexPositionField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > &) const
Definition: Cartesian.hpp:1755
Vektor< MFLOAT, Dim > Dvc[1<< Dim]
Definition: Cartesian.h:142
MeshBC_E MeshBC[2 *Dim]
Definition: Cartesian.h:126
unsigned gridSizes[Dim]
Definition: Cartesian.h:141
~Cartesian()
Definition: Cartesian.h:47
NDIndex< Dim > getCellContaining(const Vektor< MFLOAT, Dim > &x) const
Definition: Cartesian.h:224
NDIndex< Dim > getVertexBelow(const Vektor< MFLOAT, Dim > &) const
Definition: Cartesian.hpp:1671
BareField< Vektor< MFLOAT, Dim >, Dim > * CellSpacings
Definition: Cartesian.h:145
Vektor< MFLOAT, Dim > getSurfaceNormal(const NDIndex< Dim > &, unsigned) const
Definition: Cartesian.hpp:1982
Vektor< MFLOAT, Dim > origin
Definition: Cartesian.h:125
void set_meshSpacing(MFLOAT **const del)
Definition: Cartesian.hpp:748
void getSurfaceNormalFields(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > **) const
Definition: Cartesian.hpp:1956
Field< MFLOAT, Dim, Cartesian< Dim, MFLOAT >, Cell > & getCellVolumeField(Field< MFLOAT, Dim, Cartesian< Dim, MFLOAT >, Cell > &) const
Definition: Cartesian.hpp:1520
Vektor< MFLOAT, Dim > getDeltaCell(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1882
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > & getCellPositionField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > &) const
Definition: Cartesian.hpp:1802
FieldLayout< Dim > * FlCell
Definition: Cartesian.h:127
MFLOAT getCellVolume(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1503
Vektor< MFLOAT, Dim > getVertexPosition(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1732
Cell DefaultCentering
Definition: Cartesian.h:37
void set_Dvc()
Definition: Cartesian.hpp:769
Vektor< MFLOAT, Dim > getCellPosition(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1778
void storeSpacingFields()
Definition: Cartesian.hpp:840
void set_MeshBC(unsigned face, MeshBC_E meshBCType)
Definition: Cartesian.hpp:2051
FieldLayout< Dim > * FlVert
Definition: Cartesian.h:128
void set_origin(const Vektor< MFLOAT, Dim > &o)
Definition: Cartesian.hpp:723
MeshBC_E * get_MeshBC() const
Definition: Cartesian.hpp:2169
Cartesian()
Definition: Cartesian.h:42
void setup()
Definition: Cartesian.hpp:46
NDIndex< Dim > getNearestVertex(const Vektor< MFLOAT, Dim > &) const
Definition: Cartesian.hpp:1604
Vektor< MFLOAT, Dim > * getSurfaceNormals(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1938
std::map< int, MFLOAT > meshPosition[Dim]
Definition: Cartesian.h:124
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > & getDeltaCellField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > &) const
Definition: Cartesian.hpp:1917
Vektor< MFLOAT, Dim > getDeltaVertex(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1827
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > & getSurfaceNormalField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > &, unsigned) const
Definition: Cartesian.hpp:2013
void updateMeshSpacingGuards(int face)
Definition: Cartesian.hpp:2075
BareField< Vektor< MFLOAT, Dim >, Dim > * VertSpacings
Definition: Cartesian.h:144
std::map< int, MFLOAT > meshSpacing[Dim]
Definition: Cartesian.h:122
void print(std::ostream &)
Definition: Cartesian.hpp:1471
Vektor< MFLOAT, Dim > get_origin() const
Definition: Cartesian.hpp:740
void initialize(const NDIndex< Dim > &ndi)
Definition: Cartesian.hpp:382
MFLOAT getVertRangeVolume(const NDIndex< Dim > &) const
Definition: Cartesian.hpp:1542
Definition: Centering.h:32
Definition: Centering.h:43
Definition: Mesh.h:35
MeshBC_E
Definition: Mesh.h:32