MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
lptlib.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef MAIA_PARTICLELIB_H
8#define MAIA_PARTICLELIB_H
9
10#include <random>
11#include "UTIL/maiamath.h"
12#include "globals.h"
13
14template <MInt nDim, class SysEqn>
16
17template <MInt nDim>
18class LPTEllipsoidal;
19
20template <MInt nDim>
21class LPTSpherical;
22
23template <MInt nDim>
24class LPT;
25
26namespace maia {
27namespace lpt {
28
29template <MInt nDim>
30using ellipsListIterator = typename std::vector<LPTEllipsoidal<nDim>>::iterator;
31template <MInt nDim>
32using ellipsListIteratorConst = typename std::vector<LPTEllipsoidal<nDim>>::const_iterator;
33
34template <MInt nDim>
35using partListIterator = typename std::vector<LPTSpherical<nDim>>::iterator;
36template <MInt nDim>
37using partListIteratorConst = typename std::vector<LPTSpherical<nDim>>::const_iterator;
38
39template <MInt nDim>
41 typename std::vector<typename std::vector<LPTSpherical<nDim>>::iterator> subDomain;
42};
43
44template <MInt nDim>
46 typename std::vector<typename std::vector<LPTEllipsoidal<nDim>>::iterator> subDomain;
47};
48
49template <MInt nDim>
53};
54
55struct partType {
60};
61
68};
69
70
71template <class T>
73 public:
74 // NOTE: with secondary-break-up particle-ids might not be
75 // fully unique after a restart anymore, in this case they are additionally
76 // sorted by their x-position
77 static MBool compare(const T& i, const T& j) {
78 if(i.m_partId == j.m_partId) {
79 return i.m_position[0] < j.m_position[0];
80 }
81 return (i.m_partId < j.m_partId);
82 }
83};
84
85template <class T>
87 public:
88 static MBool compare(const T& i, const T& j) { return (i.m_diameter < j.m_diameter); }
89};
90
91template <class T>
93 public:
94 static MBool compare(const T& i, const T& j) { return (i.m_diameter > j.m_diameter); }
95};
96
97template <class T>
99 public:
100 static MBool compare(const T& i, const T& j) { return (i.m_temperature > j.m_temperature); }
101};
102
103template <class T>
105 public:
106 static MBool compare(const T& i, const T& j) { return (i.m_partId < j.m_partId); }
107 static MBool compare(const MInt i, const T& j) { return (i < j.m_partId); }
108 static MBool compare(const T& i, const MInt j) { return (i.m_partId < j); }
109};
110
111template <class T>
113 public:
114 static MBool compare(const T& i, const T& j) { return (i.m_cellId < j.m_cellId); }
115};
116
117template <class T>
119 public:
120 static MBool compare(const T& i, const T& j) {
121 if(i.cellId == j.cellId) {
122 return (i.partId < j.partId);
123 }
124 return (i.cellId < j.cellId);
125 }
126};
127
128template <MInt nDim>
130 return particle.isInvalid();
131}
132
133template <MInt nDim>
134inline MBool activeParticle(const LPTSpherical<nDim>& particle) {
135 return (!particle.isInvalid());
136}
137
138template <MInt nDim>
140 return particle.isInvalid();
141}
142
143template <MInt nDim>
145 return (!particle.isInvalid());
146}
147
148
149inline MFloat scalarProduct(const MFloat* a, const MFloat* b, const MInt length) {
150 MFloat returnValue = F0;
151 for(MInt count = 0; count < length; ++count) {
152 returnValue += a[count] * b[count];
153 }
154 return returnValue;
155}
156
157inline void slerp(const MFloat* before, const MFloat* now, const MFloat time, MFloat* result, const MInt length) {
158 // TRACE();
159 MFloat dotP = scalarProduct(before, now, length);
160 if(dotP < 0) {
161 dotP = -dotP;
162 for(MInt count = 0; count < length; ++count) {
163 result[count] = -now[count];
164 }
165 } else {
166 for(MInt count = 0; count < length; ++count) {
167 result[count] = now[count];
168 }
169 }
170
171 if(dotP < 0.95) {
172 MFloat angle = acos(dotP);
173 MFloat sint1 = sin(angle * (1 - time));
174 MFloat sint = sin(angle * time);
175 MFloat sinA = sin(angle);
176 for(MInt count = 0; count < length; ++count) {
177 result[count] = (before[count] * sint1 + result[count] * sint) / sinA;
178 }
179 } else {
180 for(MInt count = 0; count < length; ++count) {
181 result[count] = before[count] * (F1 - time) + result[count] * time;
182 }
183 }
184 maia::math::normalize(result, length);
185}
186
187
194inline void matrixMultiplyLeft(MFloat left[3][3], MFloat right[3][3]) {
195 TRACE();
196
197 MFloat temp[3][3];
198 for(MInt i = 0; i < 3; i++) {
199 for(MInt j = 0; j < 3; j++) {
200 temp[i][j] = right[i][j];
201 right[i][j] = 0.0;
202 }
203 }
204
205 for(MInt i = 0; i < 3; i++) {
206 for(MInt j = 0; j < 3; j++) {
207 for(MInt k = 0; k < 3; k++) {
208 right[i][j] += left[i][k] * temp[k][j];
209 }
210 }
211 }
212}
213
220inline void matrixMultiplyRight(MFloat left[3][3], MFloat right[3][3]) {
221 TRACE();
222
223 MFloat temp[3][3];
224 for(MInt i = 0; i < 3; i++) {
225 for(MInt j = 0; j < 3; j++) {
226 temp[i][j] = left[i][j];
227 left[i][j] = 0.0;
228 }
229 }
230
231 for(MInt i = 0; i < 3; i++) {
232 for(MInt j = 0; j < 3; j++) {
233 for(MInt k = 0; k < 3; k++) {
234 left[i][j] += temp[i][k] * right[k][j];
235 }
236 }
237 }
238}
239
248// will be halfed
251
252inline MInt randomVectorInCone(MFloat* vec, const MFloat* coneAxis, const MFloat length, const MFloat openingAngle,
253 const MInt dist, std::mt19937_64& PRNG, const MFloat distCoeff = 0.0,
254 const MFloat nozzleAngle = 0.0) {
255 using namespace std;
256
257 MFloat centerAxis[3]{};
258 MFloat v1[3]{};
259 MFloat v2[3]{};
260 MFloat temp[3]{};
261 MInt nPRNGCall = 0;
262
263 const MFloat correctedOpeningAngle = openingAngle - 2.0 * nozzleAngle;
264
265 std::copy_n(coneAxis, 3, &centerAxis[0]);
266 // angle between center cone axis and cone shell
267 MFloat distedAngle = 0;
269 //~68% of all particles are within in the center cone for distCoeff = 1.0
270 normal_distribution<MFloat> distAngle(0, distCoeff * correctedOpeningAngle);
271 // reject angles that are too large
272 do {
273 distedAngle = distAngle(PRNG);
274 nPRNGCall++;
275 } while(distedAngle > correctedOpeningAngle);
276 } else {
277 // uniform
278 distedAngle = correctedOpeningAngle;
279 }
280
281 // NOTE: actually half-cone angle
282 const MFloat coneAngleRad = (distedAngle / 360) * M_PI;
283
284 ASSERT(abs(coneAxis[0]) > std::numeric_limits<MFloat>::epsilon()
285 || abs(coneAxis[1]) > std::numeric_limits<MFloat>::epsilon()
286 || abs(coneAxis[2]) > std::numeric_limits<MFloat>::epsilon(),
287 "ERROR: ConeAxis cannot be Zero!");
288 ASSERT(openingAngle <= 360, "ERROR: Opening angle cannot be larger than 360 degrees!");
289
290 // 1. normalize centerAxis
291 maia::math::normalize(&centerAxis[0], 3);
292
293 // 2. find orthonormal basis to centerAxis
294 // 2.1 choose a linear independent vector to centerAxis
295 // that lies in the plane a * centerAxis = 1
296 if(abs(centerAxis[0]) > 0.0) {
297 v1[0] = 1.0 / centerAxis[0];
298 } else if(abs(centerAxis[1]) > 0.0) {
299 v1[1] = 1.0 / centerAxis[1];
300 } else {
301 v1[2] = 1.0 / centerAxis[2];
302 }
303
304 if(abs(coneAxis[0]) < std::numeric_limits<MFloat>::epsilon()) {
305 v1[0] = 1.0;
306 } else if(abs(coneAxis[1]) < std::numeric_limits<MFloat>::epsilon()) {
307 v1[1] = 1.0;
308 } else if(abs(coneAxis[2]) < std::numeric_limits<MFloat>::epsilon()) {
309 v1[2] = 1.0;
310 }
311
312 // 2.2 Use this vector to determine the first basis vector
313 // by calculating v1 = v1 x centerAxis
314 std::copy_n(&v1[0], 3, &temp[0]);
315 maia::math::cross(&temp[0], &centerAxis[0], &v1[0]);
316
317 // 2.3 Calculate crossproduct of v1 and centerAxis to determine the last vector v2
318 maia::math::cross(&v1[0], &centerAxis[0], &v2[0]);
319
320 // 2.4 Normalize v1 and v2
321 maia::math::normalize(&v1[0], 3);
322 maia::math::normalize(&v2[0], 3);
323
324 // 3. Use orthonormal basis to determine points on spherical cap
325 uniform_real_distribution<MFloat> dist0_2Pi(0, 2 * M_PI);
326 // the formulation of the random number in the cos-range
327 // and then taking the acos ensures the angle is in the range of:
328 // -coneAngle -> coneAngle
329 // when overlayed with second angle phi in the range of [ 0 -> 2 PI]
330 uniform_real_distribution<MFloat> randAngle(cos(coneAngleRad), 1);
331
332 MFloat phi = 0;
333 MFloat omega = coneAngleRad;
334#ifdef _OPENMP
335#pragma omp critical
336#endif
337 {
338 // determine random point on unit circle
339 phi = dist0_2Pi(PRNG);
340 nPRNGCall++;
341
342 // random angle in the given opening angle i.e in the range of [coneAngel -> 0]
343 omega = acos(randAngle(PRNG));
344 nPRNGCall++;
345 }
346
348 // avoid tan-formulation as omega is a random angle
349 vec[0] = sin(omega) * (cos(phi) * v1[0] + sin(phi) * v2[0]) + cos(omega) * centerAxis[0];
350 vec[1] = sin(omega) * (cos(phi) * v1[1] + sin(phi) * v2[1]) + cos(omega) * centerAxis[1];
351 vec[2] = sin(omega) * (cos(phi) * v1[2] + sin(phi) * v2[2]) + cos(omega) * centerAxis[2];
352
353 } else {
354 // coneAngleRad must be in definition region of tan!
355 // i.e. -pi/2 -> pi/2
356 vec[0] = tan(omega) * (cos(phi) * v1[0] + sin(phi) * v2[0]) + centerAxis[0];
357 vec[1] = tan(omega) * (cos(phi) * v1[1] + sin(phi) * v2[1]) + centerAxis[1];
358 vec[2] = tan(omega) * (cos(phi) * v1[2] + sin(phi) * v2[2]) + centerAxis[2];
359 // NOTE: at this point the resulting vector has the given magnitude plus the
360 // overlaying random tangential velocity component!
361 // used in some formulations of the secondary break-up!
362 }
363
364 // normalize result
365 // NOTE: in this case the resulting vector has the given magnitude
366 maia::math::normalize(vec, 3);
367
368
369 vec[0] *= length;
370 vec[1] *= length;
371 vec[2] *= length;
372
373 return nPRNGCall;
374}
375
383inline void randomPointInCircle(MFloat* vec, const MFloat* normalDirection, const MFloat diameter,
384 std::mt19937_64& PRNG) {
385 MFloat centerAxis[3]{};
386 std::copy_n(normalDirection, 3, &centerAxis[0]);
387
388 // 1. normalize centerAxis
389 maia::math::normalize(&centerAxis[0], 3);
390
391 // 2. find orthonormal basis to centerAxis
392 // 2.1 choose a linear independent vector to centerAxis that lies in the plane a v1 * centerAxis = 1
393 MFloat v1[3]{};
394 MFloat temp[3]{};
395
396
397 if(std::abs(centerAxis[0]) > 0.0) {
398 v1[0] = 1.0 / centerAxis[0];
399 } else if(std::abs(centerAxis[1]) > 0.0) {
400 v1[1] = 1.0 / centerAxis[1];
401 } else {
402 v1[2] = 1.0 / centerAxis[2];
403 }
404
405 if(std::abs(normalDirection[0]) < std::numeric_limits<MFloat>::epsilon()) {
406 v1[0] = 1.0;
407 } else if(std::abs(normalDirection[1]) < std::numeric_limits<MFloat>::epsilon()) {
408 v1[1] = 1.0;
409 } else if(std::abs(normalDirection[2]) < std::numeric_limits<MFloat>::epsilon()) {
410 v1[2] = 1.0;
411 }
412
413 // 2.2 Use this vector to determine the first basis vector by calculating v1 = v1 x centerAxis
414 std::copy_n(&v1[0], 3, &temp[0]);
415 maia::math::cross(&temp[0], &centerAxis[0], &v1[0]);
416
417 // 2.3 Calculate crossproduct of v1 and centerAxis to determine the last vector v2
418 MFloat v2[3]{};
419 maia::math::cross(&v1[0], &centerAxis[0], &v2[0]);
420
421 // 2.4 Normalize v1 and v2
422 maia::math::normalize(&v1[0], 3);
423 maia::math::normalize(&v2[0], 3);
424
425 // 3. Use orthonormal basis to determine points on circle
426
427 // angle of the point within the sphere
428 std::uniform_real_distribution<MFloat> dist0_2Pi(0, 2 * M_PI);
429 // distance of the point from the origin within the sphere
430 std::uniform_real_distribution<MFloat> randRadius(0, 1);
431
432 MFloat phi = 0;
433 MFloat radius = 0;
434#ifdef _OPENMP
435#pragma omp critical
436#endif
437 {
438 // determine random angle in unit circle
439 phi = dist0_2Pi(PRNG);
440
441 // random Radius in the unit circle
442 radius = randRadius(PRNG);
443 }
444
445 vec[0] = 0.5 * diameter * radius * (cos(phi) * v1[0] + sin(phi) * v2[0]);
446 vec[1] = 0.5 * diameter * radius * (cos(phi) * v1[1] + sin(phi) * v2[1]);
447 vec[2] = 0.5 * diameter * radius * (cos(phi) * v1[2] + sin(phi) * v2[2]);
448}
449
459inline void randomPointOnCircle(MFloat* vec, const MFloat* normalDirection, const MFloat diameter,
460 std::mt19937_64& PRNG, const MInt circleSplit = 1, const MInt splitNo = 0) {
461 MFloat centerAxis[3]{};
462 std::copy_n(normalDirection, 3, &centerAxis[0]);
463
464 // 1. normalize centerAxis
465 maia::math::normalize(&centerAxis[0], 3);
466
467 // 2. find orthonormal basis to centerAxis
468 // 2.1 choose a linear independent vector to centerAxis that lies in the plane a v1 * centerAxis = 1
469 MFloat v1[3]{};
470 MFloat temp[3]{};
471
472
473 if(std::abs(centerAxis[0]) > 0.0) {
474 v1[0] = 1.0 / centerAxis[0];
475 } else if(std::abs(centerAxis[1]) > 0.0) {
476 v1[1] = 1.0 / centerAxis[1];
477 } else {
478 v1[2] = 1.0 / centerAxis[2];
479 }
480
481 if(std::abs(normalDirection[0]) < std::numeric_limits<MFloat>::epsilon()) {
482 v1[0] = 1.0;
483 } else if(std::abs(normalDirection[1]) < std::numeric_limits<MFloat>::epsilon()) {
484 v1[1] = 1.0;
485 } else if(std::abs(normalDirection[2]) < std::numeric_limits<MFloat>::epsilon()) {
486 v1[2] = 1.0;
487 }
488
489 // 2.2 Use this vector to determine the first basis vector by calculating v1 = v1 x centerAxis
490 std::copy_n(&v1[0], 3, &temp[0]);
491 maia::math::cross(&temp[0], &centerAxis[0], &v1[0]);
492
493 // 2.3 Calculate crossproduct of v1 and centerAxis to determine the last vector v2
494 MFloat v2[3]{};
495 maia::math::cross(&v1[0], &centerAxis[0], &v2[0]);
496
497 // 2.4 Normalize v1 and v2
498 maia::math::normalize(&v1[0], 3);
499 maia::math::normalize(&v2[0], 3);
500
501 // 3. Use orthonormal basis to determine points on circle
502 const MFloat splitCircle = (2.0 * M_PI / static_cast<MFloat>(circleSplit));
503
504 // angle of the point within the sphere
505 std::uniform_real_distribution<MFloat> dist0_2Pi(splitCircle * splitNo, splitCircle * (splitNo + 1));
506
507 MFloat phi = 0;
508#ifdef _OPENMP
509#pragma omp critical
510#endif
511 {
512 phi = dist0_2Pi(PRNG); // determine random angle in unit circle
513 }
514
515
516 vec[0] = 0.5 * diameter * (cos(phi) * v1[0] + sin(phi) * v2[0]);
517 vec[1] = 0.5 * diameter * (cos(phi) * v1[1] + sin(phi) * v2[1]);
518 vec[2] = 0.5 * diameter * (cos(phi) * v1[2] + sin(phi) * v2[2]);
519}
520
528inline void pointOnCircle(MFloat* vec, const MFloat* normalDirection, const MFloat diameter, MFloat phi) {
529 MFloat centerAxis[3]{};
530 std::copy_n(normalDirection, 3, &centerAxis[0]);
531
532 // 1. normalize centerAxis
533 maia::math::normalize(&centerAxis[0], 3);
534
535 // 2. find orthonormal basis to centerAxis
536 // 2.1 choose a linear independent vector to centerAxis that lies in the plane a v1 * centerAxis = 1
537 MFloat v1[3]{};
538 MFloat temp[3]{};
539
540
541 if(std::abs(centerAxis[0]) > 0.0) {
542 v1[0] = 1.0 / centerAxis[0];
543 } else if(std::abs(centerAxis[1]) > 0.0) {
544 v1[1] = 1.0 / centerAxis[1];
545 } else {
546 v1[2] = 1.0 / centerAxis[2];
547 }
548
549 if(std::abs(normalDirection[0]) < std::numeric_limits<MFloat>::epsilon()) {
550 v1[0] = 1.0;
551 } else if(std::abs(normalDirection[1]) < std::numeric_limits<MFloat>::epsilon()) {
552 v1[1] = 1.0;
553 } else if(std::abs(normalDirection[2]) < std::numeric_limits<MFloat>::epsilon()) {
554 v1[2] = 1.0;
555 }
556
557 // 2.2 Use this vector to determine the first basis vector by calculating v1 = v1 x centerAxis
558 std::copy_n(&v1[0], 3, &temp[0]);
559 maia::math::cross(&temp[0], &centerAxis[0], &v1[0]);
560
561 // 2.3 Calculate crossproduct of v1 and centerAxis to determine the last vector v2
562 MFloat v2[3]{};
563 maia::math::cross(&v1[0], &centerAxis[0], &v2[0]);
564
565 // 2.4 Normalize v1 and v2
566 maia::math::normalize(&v1[0], 3);
567 maia::math::normalize(&v2[0], 3);
568
569 // 3. Use orthonormal basis to determine points on circle
570 vec[0] = 0.5 * diameter * (cos(phi) * v1[0] + sin(phi) * v2[0]);
571 vec[1] = 0.5 * diameter * (cos(phi) * v1[1] + sin(phi) * v2[1]);
572 vec[2] = 0.5 * diameter * (cos(phi) * v1[2] + sin(phi) * v2[2]);
573}
574
575
584inline MFloat rosinRammler(const MFloat min, const MFloat mean, const MFloat max, const MFloat spread,
585 std::mt19937_64& PRNG) {
586 const MFloat K = 1.0 - exp(-pow((max - min) / mean, spread));
587
588 std::uniform_real_distribution<MFloat> uni(0.0, 1.0);
589 const MFloat x = uni(PRNG);
590
591 return min + mean * pow(-log(1.0 - x * K), 1.0 / spread);
592}
593
601inline MFloat NTDistribution(const MFloat x_mean, std::mt19937_64& PRNG) {
602 std::uniform_real_distribution<MFloat> uni(0.0, 1.0);
603 const MFloat x = uni(PRNG);
604
605 return 4 / sqrt(M_PI) * POW2(x) / x_mean * exp(-POW2(x / x_mean));
606}
607
608} // namespace lpt
609} // namespace maia
610
611#endif // MAIA_PARTICLELIB_H
BitsetType::reference isInvalid()
Definition: lptbase.h:151
Definition: lpt.h:82
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:106
static MBool compare(const T &i, const MInt j)
Definition: lptlib.h:108
static MBool compare(const MInt i, const T &j)
Definition: lptlib.h:107
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:114
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:88
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:77
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:100
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:120
static MBool compare(const T &i, const T &j)
Definition: lptlib.h:94
@ PART_EMITT_DIST_GAUSSIAN
Definition: enums.h:348
@ PART_EMITT_DIST_NONE
Definition: enums.h:348
constexpr Real POW2(const Real x)
Definition: functions.h:119
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
int64_t MLong
Definition: maiatypes.h:64
bool MBool
Definition: maiatypes.h:58
typename std::vector< LPTSpherical< nDim > >::iterator partListIterator
Definition: lptlib.h:35
void slerp(const MFloat *before, const MFloat *now, const MFloat time, MFloat *result, const MInt length)
Definition: lptlib.h:157
MBool activeParticle(const LPTSpherical< nDim > &particle)
Definition: lptlib.h:134
MFloat NTDistribution(const MFloat x_mean, std::mt19937_64 &PRNG)
Definition: lptlib.h:601
void matrixMultiplyLeft(MFloat left[3][3], MFloat right[3][3])
Matrix multiplication; matrix right is changed and contains the result.
Definition: lptlib.h:194
MFloat scalarProduct(const MFloat *a, const MFloat *b, const MInt length)
Definition: lptlib.h:149
typename std::vector< LPTSpherical< nDim > >::const_iterator partListIteratorConst
Definition: lptlib.h:37
MBool inactiveParticle(const LPTSpherical< nDim > &particle)
Definition: lptlib.h:129
typename std::vector< LPTEllipsoidal< nDim > >::const_iterator ellipsListIteratorConst
Definition: lptlib.h:32
void randomPointInCircle(MFloat *vec, const MFloat *normalDirection, const MFloat diameter, std::mt19937_64 &PRNG)
Definition: lptlib.h:383
void randomPointOnCircle(MFloat *vec, const MFloat *normalDirection, const MFloat diameter, std::mt19937_64 &PRNG, const MInt circleSplit=1, const MInt splitNo=0)
Definition: lptlib.h:459
MInt randomVectorInCone(MFloat *vec, const MFloat *coneAxis, const MFloat length, const MFloat openingAngle, const MInt dist, std::mt19937_64 &PRNG, const MFloat distCoeff=0.0, const MFloat nozzleAngle=0.0)
Generate a random vector in a cone defined by its opening angle.
Definition: lptlib.h:252
MBool activeEllipsoid(const LPTEllipsoidal< nDim > &particle)
Definition: lptlib.h:144
void matrixMultiplyRight(MFloat left[3][3], MFloat right[3][3])
Matrix multiplication; matrix left is changed and contains the result.
Definition: lptlib.h:220
MFloat rosinRammler(const MFloat min, const MFloat mean, const MFloat max, const MFloat spread, std::mt19937_64 &PRNG)
Definition: lptlib.h:584
void pointOnCircle(MFloat *vec, const MFloat *normalDirection, const MFloat diameter, MFloat phi)
Definition: lptlib.h:528
typename std::vector< LPTEllipsoidal< nDim > >::iterator ellipsListIterator
Definition: lptlib.h:30
MBool inactiveEllipsoid(const LPTEllipsoidal< nDim > &particle)
Definition: lptlib.h:139
void cross(const T *const u, const T *const v, T *const c)
Definition: maiamath.h:101
void normalize(std::array< T, N > &u)
Definition: maiamath.h:191
Namespace for auxiliary functions/classes.
MFloat dist(const Point< DIM > &p, const Point< DIM > &q)
Definition: pointbox.h:54
Definition: contexttypes.h:19
MFloat densRatio
Definition: lptlib.h:59
std::vector< typename std::vector< LPTEllipsoidal< nDim > >::iterator > subDomain
Definition: lptlib.h:46
std::vector< typename std::vector< LPTSpherical< nDim > >::iterator > subDomain
Definition: lptlib.h:41