MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
rigidbodies.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 _H_MAIA_RIGIDBODIES_
8#define _H_MAIA_RIGIDBODIES_
9
11#include "INCLUDE/maiatypes.h"
12#include "IO/context.h"
13#include "MEMORY/alloc.h"
14#include "UTIL/debug.h"
15#include "UTIL/functions.h"
16#include "UTIL/maiamath.h"
17#include "cartesiansolver.h"
19#include "typetraits.h"
20
21#include <algorithm>
22#include <fstream>
23#include <iostream>
24
25// Activate this pragma to get detailed debug output
26//#define RB_DEBUG
27
28template <MInt nDim>
29class RigidBodies : public maia::CartesianSolver<nDim, RigidBodies<nDim>> {
30 // Cartesian solver
31 public:
34
36 using Grid = typename CartesianSolver::Grid;
37 using GridProxy = typename CartesianSolver::GridProxy;
38
40
41 using CartesianSolver::domainId;
42 using CartesianSolver::domainOffset;
43 using CartesianSolver::grid;
44 using CartesianSolver::haloCellId;
45 using CartesianSolver::localPartitionCellOffsets;
46 using CartesianSolver::m_adaptation;
47 using CartesianSolver::m_bandWidth;
48 using CartesianSolver::m_freeIndices;
49 using CartesianSolver::m_innerBandWidth;
50 using CartesianSolver::m_Ma;
51 using CartesianSolver::m_outerBandWidth;
52 using CartesianSolver::m_Re;
53 using CartesianSolver::m_recalcIds;
54 using CartesianSolver::m_residualInterval;
55 using CartesianSolver::m_restartFile;
56 using CartesianSolver::m_solutionInterval;
57 using CartesianSolver::m_solutionOffset;
58 using CartesianSolver::m_solutionTimeSteps;
59 using CartesianSolver::m_solverId;
60 using CartesianSolver::maxLevel;
61 using CartesianSolver::maxNoGridCells;
62 using CartesianSolver::maxRefinementLevel;
63 using CartesianSolver::maxUniformRefinementLevel;
64 using CartesianSolver::minLevel;
65 using CartesianSolver::mpiComm;
66 using CartesianSolver::neighborDomain;
67 using CartesianSolver::noDomains;
68 using CartesianSolver::noHaloCells;
69 using CartesianSolver::noNeighborDomains;
70 using CartesianSolver::noWindowCells;
71 using CartesianSolver::outputDir;
72 using CartesianSolver::restartDir;
73 using CartesianSolver::restartInterval;
74 using CartesianSolver::solverId;
75 using CartesianSolver::solverMethod;
76 using CartesianSolver::updateDomainInfo;
77 using CartesianSolver::windowCellId;
78
80
82 Geom& geometry() const { return *m_geometry; }
83
84 void preTimeStep() override;
85 MBool solutionStep() override;
86 void postTimeStep(){};
87
88 void initSolver() override{};
89 void finalizeInitSolver() override{};
90 void saveSolverSolution(const MBool, const MBool){};
91 void cleanUp(){};
92
93 MFloat time() const override { return 0.0; };
94 MInt noInternalCells() const override { return 0; };
95
96 MBool prepareRestart(MBool writeRestart, MBool& /*writeRestartGrid*/) override { return writeRestart; }
97 void reIntAfterRestart(MBool /*doneRestart*/) override{};
98 void writeRestartFile(const MBool writeRestart, const MBool writeBackup, const MString ,
99 MInt* /*recaldIdTree*/) override;
100
101 MInt a_hasNeighbor(const MInt, const MInt) const { mTerm(1, AT_, "Not implemented for this solver!"); }
102
103 MPI_Comm mpiComm() const { return MPI_COMM_WORLD; }
104
105 // Adaptation related functions wich need to be overriden
106 // Most of them are meanignless for the RB solver itself
107 void prepareAdaptation(std::vector<std::vector<MFloat>>& NotUsed(sensors),
108 std::vector<MFloat>& NotUsed(sensorWeight),
109 std::vector<std::bitset<64>>& NotUsed(sensorCellFlag),
110 std::vector<MInt>& NotUsed(sensorSolverId)) override{};
111 void prepareAdaptation() override{};
112 void setSensors(std::vector<std::vector<MFloat>>& /*sensors*/, std::vector<MFloat>& /*sensorWeight*/,
113 std::vector<std::bitset<64>>& /*sensorCellFlag*/, std::vector<MInt>& /*sensorSolverId*/) override{};
114 // TODO dummy functions that are required to allow adaptation for another solver in a multisolver
115 // computation without changing the grid for the DG solver
117 // Note: resize with current tree size since the number of cells should not change
118 grid().resizeGridMap(grid().tree().size());
119 }
120 void postAdaptation() override{};
121 void finalizeAdaptation() override{};
122 void removeChilds(const MInt) override{};
123
124 void reinitAfterAdaptation() override{};
125 void refineCell(const MInt) override{};
126 void swapCells(const MInt, const MInt) override{};
127 void swapProxy(const MInt cellId0, const MInt cellId1) { grid().swapGridIds(cellId0, cellId1); }
128 void setCellWeights(MFloat* /*solverCellWeight*/) override{};
129
130 private:
131 static constexpr MInt nRot = (nDim == 3) ? 3 : 1;
132 static constexpr MInt nQuat = (nDim == 3) ? 4 : 0;
133
134 // TODO labels:toenhance Shift types and rm dummy
135 struct Shapes {
136 enum {
142
143 _count
144 };
145 };
146
147 // Timestep control
149
150
151 // Datastrucutre: collector (localBodies | remoteBodies | dummyBodies)
153
154 // additional collector to maintain structure of deprecated restartFiles, to be removed
156
158
159 // TODO labels:toenhance Use proper reference values incstead, use Prandtl ...
162
163 // Should be removed ~jv
165
166 // Properties
177 std::array<MFloat, nDim> gravity{};
179 std::vector<MString> m_logVars;
180 std::vector<MString> m_logAngVars;
181
182 // Reference values
184
185 // Time integration stuff
188
189 std::vector<MFloat> m_initialBodyCenters;
190 std::vector<MFloat> m_initBodyDensityRatios;
191 // For Spheres, i.e. one radius per body
192 std::vector<MFloat> m_initBodyRadius;
193 // For Ellipsoids, i.e. nDim radii per body
194 std::vector<MFloat> m_initBodyRadii;
195
196 // ... computeBodyProperties, not sure why named as static
213
214 void predictorStep();
215 void correctorStep();
216 void advanceBodies();
217
218 inline void predictRotation(const MInt bodyId);
219 inline void correctRotation(const MInt bodyId);
220
221 inline void transformToWorldFrame(const MFloat* const quaternion, const MFloat* const vectorBody,
222 MFloat* const vectorWorld);
223
224 inline void transformToBodyFrame(const MFloat* const quaternion, const MFloat* const vectorWorld,
225 MFloat* const vectorBody);
226
227 inline void transformToBodyFrame(const MFloat* const quaternion, MFloat* const vecInOut);
228
229 inline void advanceQuaternion(const MFloat* const angularVelocity, const MFloat dt, const MFloat* const qIn,
230 MFloat* const qOut);
231
232 inline void quaternionToEuler(const MFloat* const quaternion, MFloat* const angles);
233
234 void initTimers();
235 void averageTimer();
236 void readProperties();
237 void initBodyData();
238
239 struct Timers {
240 enum {
243
246
251
252 _count
253 };
254 };
255
256 std::array<MInt, Timers::_count> m_timers;
258
259 MFloat findClosestPointEllipsoid(const MFloat* const relPos, const MInt bodyId);
260 inline MFloat distancePointEllipsoid(const std::array<MFloat, 3> e, const std::array<MFloat, 3> y,
261 std::array<MFloat, 3> x);
262
263 void collideBodies();
264 void collideSpheres(const MInt bodyA, const MInt bodyB);
265
266 MString outputDir() const { return m_outputDir; }
267
268 MFloat c_cellLengthAtMaxLevel() const { return grid().cellLengthAtLevel(currMaxLevel()); }
269
271
272 MFloat globBBox(MInt n) { return grid().raw().globalBoundingBox()[n]; }
273
274 // communication relations:
275 // number of bodies that are local (center of mass is located in partition) for specific partition, contains
276 // localBodyIds
278 // number of bodies that are partially on partition, but it's center is located on neighbouring domain, contains
279 // remoteBodyIds
281 // number of dummy bodies, that are added to collector, if self-mapping occurs (due to periodic boundaries,
282 // the body would have two different body centers)
284
285 // vector of indirect neighbouring domains of a local body
286 std::vector<MInt> m_indirectHomeDomains;
287 // all bodies that are marked to be transfered
288 std::vector<std::vector<MInt>> m_transferBodies;
289 // in the case of self-mapping contains the actual bodyId and the bodyId of the corresponding "dummy" body
290 std::map<MInt, MInt> m_associatedDummyBodies;
291 // maps every global remote domain id to local body ids, which are edgebodies in other domains
292 std::map<MInt, std::vector<MInt>> m_remoteDomainLocalBodies;
293 // maps for every global remote Domain id to remote (global) body ids
294 std::map<MInt, std::vector<MInt>> m_homeDomainRemoteBodies;
295 // map from domain to body to periodic shift
296 std::map<MInt, std::map<MInt, std::array<MFloat, nDim>>> m_periodicShift;
297 // vector of globalBodyIds
298 std::vector<MInt> m_globalBodyIds;
299
301 std::array<MFloat, nDim> m_globDomainLength;
302 // Transforms a local body to a remote body
303 // collectorId and oldBodyId might differ because of multiple swaps
304 MInt localToRemoteBody(const MInt collectorId, const MInt oldBodyId, const MInt domain);
305 void deleteIrrelevantBodies(std::list<std::pair<MInt, MInt>>& removeList);
306 void deleteDummyBody(const MInt bodyId, const MInt collectorShift = 0);
307
308 public:
309 RigidBodies(const MInt solverId, GridProxy& gridProxy, Geom& geometry, MPI_Comm comm);
310 ~RigidBodies();
311
312 std::array<MFloat, 2> m_distFac{};
320 std::ofstream m_log;
321 std::ofstream m_anglog;
322 std::ofstream m_debugFileStream;
323
324 void initBodyLog();
325 void logBodyData();
327 void totalKineticEnergy();
328
329 void computeBodies();
330 void correctBodies();
332 void updateConnections();
334 void exchangeFsiData();
335 void boxSeedInitialize();
336 void linSpace(MFloat start, MFloat end, MInt num, std::vector<MFloat>& linspaced);
337 void computeBodyPropertiesForced(MInt returnMode, MFloat* bodyData, MInt bodyId, MFloat time);
338
339 void initGridProperties();
340 void updateInfoDiameter(const MBool initCall = false);
341 void updateMaxLevel(MInt newMaxLevel) { m_currMaxLevel = newMaxLevel; }
342 void findLocalBodies();
343 void findTransferBodies();
344 void updateBodyDomainConnections(MBool initCall);
345 void createDummyBody(MInt bodyId);
346
347 // exchange methods
349 void initRemoteDummyBodyData(const MInt bodyId);
352 void exchangeNeighborNeighborRemote(std::vector<std::vector<MInt>>& bodyIdsForRemoteDomain,
353 std::vector<std::vector<MInt>>& homeDomainIdsForRemoteDomain,
354 std::map<MInt, std::vector<MInt>>& tmpRemoteMap);
355 void exchangeNeighborNeighborHome(std::vector<std::vector<MInt>>& bodyIdsForHomeDomain,
356 std::vector<std::vector<MInt>>& remoteDomainIdsForHomeDomain,
357 std::vector<std::vector<std::array<MFloat, nDim>>>& shiftForHomeDomain);
358 MFloat calculatePeriodicShift(MInt intersectingCellId, MInt direction);
359
360 void exchangeBufferLengthsNeighbor(std::vector<MInt>& noToRecv, std::vector<std::vector<MInt>>& bodyList);
361 void exchangeBufferLengthsNeighbor(std::vector<MInt>& noToRecv, std::map<MInt, std::vector<MInt>>& bodyList);
362
363 void exchangeBufferLengthsAllToRoot(std::vector<MInt>& noToRecv, const MInt noToSend);
364 void exchangeBufferLengthsAllToAll(std::vector<MInt>& noToRecv, const MInt noToSend);
365 void exchangeBufferLengthsNeighbors(std::vector<MInt>& noToRecv, const MInt noToSend);
366 void exchangeBufferLengthsRemoteToHome(std::vector<MInt>& noToRecv, std::vector<MInt>& noToSend);
369
370 // debug
372
383 template <MInt bodyType>
384 MFloat getDistance(const MFloat* const coordinates, const MInt bodyId) {
385 ASSERT(bodyId > -1 && bodyId < noCollectorBodies(), "BodyId " << bodyId);
386 MFloat dist = F1;
387 if(bodyType == Shapes::Sphere) {
388 dist = getDistanceSphere(coordinates, bodyId);
389 } else if(bodyType == Shapes::Piston) {
390 dist = getDistancePiston(coordinates, bodyId);
391 } else if(bodyType == Shapes::Cube) {
392 dist = getDistanceCube(coordinates, bodyId);
393 } else if(bodyType == Shapes::Ellipsoid) {
394 dist = getDistanceEllipsoid(coordinates, bodyId);
395 } else {
396 mTerm(1, AT_, "BodyType not implemented!");
397 }
398
399 return dist;
400 }
401
402 MFloat getDistanceSphere(const MFloat* coordinates, const MInt bodyId);
403 MFloat getDistancePiston(const MFloat* coordinates, const MInt bodyId);
404 MFloat getDistanceCube(const MFloat* coordinates, const MInt bodyId);
405 MFloat getDistanceEllipsoid(const MFloat* coordinates, const MInt bodyId);
406
407 MInt size() const { return noCollectorBodies(); }
408 MInt getLocalBodyId(MInt globalBodyId) {
409 std::vector<MInt>::iterator itr = std::find(m_globalBodyIds.begin(), m_globalBodyIds.end(), globalBodyId);
410 if(itr != m_globalBodyIds.cend()) {
411 return std::distance(m_globalBodyIds.begin(), itr);
412 }
413 return -1;
414 }
415 inline MInt getGlobalBodyId(MInt localBodyId) { return m_globalBodyIds.at(localBodyId); }
416
417 inline MBool isLocalBody(MInt bodyId) { return bodyId < m_noLocalBodies; }
418
419 inline MBool isRemoteBody(MInt bodyId) { return bodyId >= m_noLocalBodies; }
420
421 inline MInt noEmbeddedBodies() const { return m_noEmbeddedBodies; }
422
424
426
427 inline MInt noHomeDomains() const { return m_homeDomainRemoteBodies.size(); }
428
429 inline MInt noRemoteDomains() const { return m_remoteDomainLocalBodies.size(); }
430
431 MBool hasAssociatedDummyBody(const MInt bodyId) const {
432 if(m_associatedDummyBodies.empty()) {
433 return false;
434 }
435 return m_associatedDummyBodies.find(bodyId) != m_associatedDummyBodies.end();
436 }
437
438 void addForce(const MInt bodyId, const std::array<MFloat, nDim>& force) {
439 for(MInt n = 0; n < nDim; n++) {
440 m_bodies.bodyForce(bodyId, n) += force[n];
441 }
442 }
443
444 void addTorque(const MInt bodyId, const std::array<MFloat, nRot>& torque) {
445 if(!m_rotXYaxis && nRot == 3) {
446 a_bodyTorque(bodyId, 0) = 0.0;
447 a_bodyTorque(bodyId, 1) = 0.0;
448 a_bodyTorque(bodyId, 2) += torque[2];
449 } else {
450 for(MInt n = 0; n < nRot; n++) {
451 a_bodyTorque(bodyId, n) += torque[n];
452 }
453 }
454 }
455
456 void resetForce() {
457 // Reset bodyForces
458 std::fill_n(a_bodyForce(0), noCollectorBodies() * nDim, 0.0);
459 }
460
461 void resetTorque() {
462 // Reset bodyTorques
463 std::fill_n(a_bodyTorque(0), noCollectorBodies() * nRot, 0.0);
464 }
465
466 MFloat a_bodyMass(const MInt bodyId) { return a_bodyDensityRatio(bodyId) * a_volume(bodyId); }
467
468 MFloat a_volume(const MInt bodyId) {
469 IF_CONSTEXPR(nDim == 2) { std::cout << "Revise volume for 2D!" << std::endl; }
470
471 MFloat volume = 1.0;
473 volume = PI * F4B3 * a_bodyRadii(bodyId, 0) * a_bodyRadii(bodyId, 1) * a_bodyRadii(bodyId, 2);
474 } else {
475 std::cerr << "Implement volume formula!" << std::endl;
476 }
477 return volume;
478 }
479
480 MFloat& a_bodyRadii(const MInt bodyId, const MInt n) { return m_bodies.bodyRadii(bodyId, n); }
481 MFloat& a_bodyRadius(const MInt bodyId) { return m_bodies.bodyRadius(bodyId); }
482
483 void getVelocity(const MInt bodyId, std::array<MFloat, nDim>& velocity) {
484 for(MInt n = 0; n < nDim; n++) {
485 velocity[n] = m_bodies.bodyVelocity(bodyId, n);
486 }
487 }
488
489 void incrementHeatFlux(const MInt bodyId, MFloat heatflux) { m_bodies.bodyHeatFlux(bodyId) += heatflux; }
490
491 MFloat getHeatFlux(const MInt bodyId) { return m_bodies.bodyHeatFlux(bodyId); }
492
493 MFloat* a_bodyForce(const MInt bodyId) { return &m_bodies.bodyForce(bodyId, 0); }
494 MFloat& a_bodyForce(const MInt bodyId, const MInt dim) { return m_bodies.bodyForce(bodyId, dim); }
495 MFloat a_bodyForce(const MInt bodyId, const MInt dim) const { return m_bodies.bodyForce(bodyId, dim); }
496
497 MFloat& a_bodyCenter(const MInt bodyId, const MInt dim) { return m_bodies.bodyCenter(bodyId, dim); }
498 MFloat a_bodyCenter(const MInt bodyId, const MInt dim) const { return m_bodies.bodyCenter(bodyId, dim); }
499
500 MFloat& a_bodyCenterOld(const MInt bodyId, const MInt dim) { return m_bodies.bodyCenterOld(bodyId, dim); }
501 MFloat a_bodyCenterOld(const MInt bodyId, const MInt dim) const { return m_bodies.bodyCenterOld(bodyId, dim); }
502
503 MFloat& a_bodyVelocity(const MInt bodyId, const MInt dim) { return m_bodies.bodyVelocity(bodyId, dim); }
504 MFloat a_bodyVelocity(const MInt bodyId, const MInt dim) const { return m_bodies.bodyVelocity(bodyId, dim); }
505
506 MFloat& a_bodyVelocityOld(const MInt bodyId, const MInt dim) { return m_bodies.bodyVelocityOld(bodyId, dim); }
507 MFloat a_bodyVelocityOld(const MInt bodyId, const MInt dim) const { return m_bodies.bodyVelocityOld(bodyId, dim); }
508
509 MFloat& a_bodyAcceleration(const MInt bodyId, const MInt dim) { return m_bodies.bodyAcceleration(bodyId, dim); }
510 MFloat a_bodyAcceleration(const MInt bodyId, const MInt dim) const { return m_bodies.bodyAcceleration(bodyId, dim); }
511
512 MFloat& a_bodyAccelerationOld(const MInt bodyId, const MInt dim) { return m_bodies.bodyAccelerationOld(bodyId, dim); }
513 MFloat a_bodyAccelerationOld(const MInt bodyId, const MInt dim) const {
514 return m_bodies.bodyAccelerationOld(bodyId, dim);
515 }
516
517 MFloat& a_bodyTemperature(const MInt bodyId) { return m_bodies.bodyTemperature(bodyId); }
518 MFloat a_bodyTemperature(const MInt bodyId) const { return m_bodies.bodyTemperature(bodyId); }
519
520 MFloat& a_bodyTemperatureOld(const MInt bodyId) { return m_bodies.bodyTemperatureOld(bodyId); }
521 MFloat a_bodyTemperatureOld(const MInt bodyId) const { return m_bodies.bodyTemperatureOld(bodyId); }
522
523 MFloat& a_bodyHeatFlux(const MInt bodyId) { return m_bodies.bodyHeatFlux(bodyId); }
524 MFloat a_bodyHeatFlux(const MInt bodyId) const { return m_bodies.bodyHeatFlux(bodyId); }
525
526 MFloat& a_bodyDensityRatio(const MInt bodyId) { return m_bodies.bodyDensityRatio(bodyId); }
527 MFloat a_bodyDensityRatio(const MInt bodyId) const { return m_bodies.bodyDensityRatio(bodyId); }
528
529 MFloat& a_bodyInertia(const MInt bodyId, const MInt dim) { return m_bodies.bodyInertia(bodyId, dim); }
530 MFloat a_bodyInertia(const MInt bodyId, const MInt dim) const { return m_bodies.bodyInertia(bodyId, dim); }
531
532 MFloat& a_bodyQuaternionT1(const MInt bodyId, const MInt dim) { return m_bodies.bodyQuaternionT1(bodyId, dim); }
533 MFloat a_bodyQuaternionT1(const MInt bodyId, const MInt dim) const { return m_bodies.bodyQuaternionT1(bodyId, dim); }
534
535 MFloat& a_bodyQuaternionT1B2(const MInt bodyId, const MInt dim) { return m_bodies.bodyQuaternionT1B2(bodyId, dim); }
536 MFloat a_bodyQuaternionT1B2(const MInt bodyId, const MInt dim) const {
537 return m_bodies.bodyQuaternionT1B2(bodyId, dim);
538 }
539
540 MFloat& a_angularVelocityT1(const MInt bodyId, const MInt dim) { return m_bodies.angularVelocityT1(bodyId, dim); }
541 MFloat a_angularVelocityT1(const MInt bodyId, const MInt dim) const {
542 return m_bodies.angularVelocityT1(bodyId, dim);
543 }
544
545 MFloat& a_angularVelocityT1B2(const MInt bodyId, const MInt dim) { return m_bodies.angularVelocityT1B2(bodyId, dim); }
546 MFloat a_angularVelocityT1B2(const MInt bodyId, const MInt dim) const {
547 return m_bodies.angularVelocityT1B2(bodyId, dim);
548 }
549
550 MFloat& a_angularVelocityBodyT1(const MInt bodyId, const MInt dim) {
551 return m_bodies.angularVelocityBodyT1(bodyId, dim);
552 }
553 MFloat a_angularVelocityBodyT1(const MInt bodyId, const MInt dim) const {
554 return m_bodies.angularVelocityBodyT1(bodyId, dim);
555 }
556
557 MFloat& a_angularVelocityBodyT1B2(const MInt bodyId, const MInt dim) {
558 return m_bodies.angularVelocityBodyT1B2(bodyId, dim);
559 }
560 MFloat a_angularVelocityBodyT1B2(const MInt bodyId, const MInt dim) const {
561 return m_bodies.angularVelocityBodyT1B2(bodyId, dim);
562 }
563
564 MFloat& a_angularAccelerationT1(const MInt bodyId, const MInt dim) {
565 return m_bodies.angularAccelerationT1(bodyId, dim);
566 }
567 MFloat a_angularAccelerationT1(const MInt bodyId, const MInt dim) const {
568 return m_bodies.angularAccelerationT1(bodyId, dim);
569 }
570
571 MFloat& a_angularAccelerationBody(const MInt bodyId, const MInt dim) {
572 return m_bodies.angularAccelerationBody(bodyId, dim);
573 }
574 MFloat a_angularAccelerationBody(const MInt bodyId, const MInt dim) const {
575 return m_bodies.angularAccelerationBody(bodyId, dim);
576 }
577
578 MFloat& a_torqueT1(const MInt bodyId, const MInt dim) { return m_bodies.torqueT1(bodyId, dim); }
579 MFloat a_torqueT1(const MInt bodyId, const MInt dim) const { return m_bodies.torqueT1(bodyId, dim); }
580
581 Status& a_status(const MInt bodyId) { return m_bodies.status(bodyId); }
582 Status a_status(const MInt bodyId) const { return m_bodies.status(bodyId); }
583
584 MFloat* a_bodyTorque(const MInt bodyId) { return &m_bodies.torqueT1(bodyId, 0); }
585 MFloat& a_bodyTorque(const MInt bodyId, const MInt dim) { return a_torqueT1(bodyId, dim); }
586 MFloat a_bodyTorque(const MInt bodyId, const MInt dim) const { return a_torqueT1(bodyId, dim); }
587
588 MFloat& a_angularVelocity(const MInt bodyId, const MInt dim) { return a_angularVelocityT1(bodyId, dim); }
589 MFloat a_angularVelocity(const MInt bodyId, const MInt dim) const { return a_angularVelocityT1(bodyId, dim); }
590
591 MFloat& a_angularVelocityBody(const MInt bodyId, const MInt dim) { return a_angularVelocityBodyT1(bodyId, dim); }
592 MFloat a_angularVelocityBody(const MInt bodyId, const MInt dim) const { return a_angularVelocityBodyT1(bodyId, dim); }
593
594 void getAngularVelocity(const MInt bodyId, std::array<MFloat, nRot>& angularVelocity) {
595 for(MInt n = 0; n < nRot; n++) {
596 angularVelocity[n] = a_angularVelocityT1(bodyId, n);
597 }
598 }
599
601 MFloat velMag = 0.0;
602 for(MInt n = 0; n < nDim; n++) {
603 velMag += POW2(a_bodyVelocity(bodyId, n));
604 }
605 return sqrt(velMag);
606 }
607
608 MFloat* getBodyProperties(MInt returnMode, MInt bodyId);
609
610 MInt a_bodyType() const { return m_bodyType; }
611
612 void setTimestep(const MFloat timestep) { m_timestep = timestep; }
613
614 void saveBodyRestartFile(const MBool backup);
615
616 void loadBodyRestartFile();
617
619 // dummy function for compatibility
620 MInt a_noCells() const { return 0; }
621};
622
623#endif
GridCell
Grid cell Property Labels.
MFloat & a_angularVelocity(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:588
MString m_bodyCenterInitMethod
Definition: rigidbodies.h:169
MInt m_bodyType
Definition: rigidbodies.h:170
void transformToBodyFrame(const MFloat *const quaternion, const MFloat *const vectorWorld, MFloat *const vectorBody)
Transform a vector form the world frame to the body frame.
MFloat time() const override
Return the time.
Definition: rigidbodies.h:93
MFloat getDistancePiston(const MFloat *coordinates, const MInt bodyId)
Calculates the closest distance between a given point and a piston.
std::ofstream m_debugFileStream
Definition: rigidbodies.h:322
void initBodyLog()
Initalize log-file.
MFloat a_angularVelocityBodyT1(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:553
MBool m_bodyWasDeleted
Definition: rigidbodies.h:318
void exchangeBufferLengthsAllToAll(std::vector< MInt > &noToRecv, const MInt noToSend)
exchange of Buffer lengths all to all
void resizeGridMap()
Swap the given cells.
Definition: rigidbodies.h:116
std::map< MInt, std::map< MInt, std::array< MFloat, nDim > > > m_periodicShift
Definition: rigidbodies.h:296
MFloat a_angularVelocityT1B2(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:546
MFloat & a_bodyTemperature(const MInt bodyId)
Definition: rigidbodies.h:517
void setTimestep(const MFloat timestep)
Definition: rigidbodies.h:612
MFloat a_bodyVelocityMag(const MInt bodyId)
Definition: rigidbodies.h:600
MFloat & a_bodyCenter(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:497
std::array< MFloat, nDim > gravity
Definition: rigidbodies.h:177
MBool isRemoteBody(MInt bodyId)
Definition: rigidbodies.h:419
void correctRotation(const MInt bodyId)
void getAngularVelocity(const MInt bodyId, std::array< MFloat, nRot > &angularVelocity)
Definition: rigidbodies.h:594
void exchangeNeighborConnectionInfo()
void swapCells(const MInt, const MInt) override
Swap the given cells.
Definition: rigidbodies.h:126
void preTimeStep() override
Resetting the 2-Step predictor-corrector cycle.
maia::rb::collector::RigidBodyCollector< nDim > m_bodies
Definition: rigidbodies.h:152
MInt m_noRemoteBodies
Definition: rigidbodies.h:280
void correctorStep()
Correct the state of all bodies using external forces/fluxes/torques.
void refineCell(const MInt) override
Refine the given cell.
Definition: rigidbodies.h:125
void checkDummyBodiesForSwap()
void loadBodyRestartFile()
Loads restart file for the RigidBodies solver.
MFloat & a_torqueT1(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:578
MBool hasAssociatedDummyBody(const MInt bodyId) const
Definition: rigidbodies.h:431
MFloat getDistanceEllipsoid(const MFloat *coordinates, const MInt bodyId)
Calculates the closest distance between a given point and a ellipsoid.
MFloat a_bodyHeatFlux(const MInt bodyId) const
Definition: rigidbodies.h:524
std::vector< MFloat > m_initBodyDensityRatios
Definition: rigidbodies.h:190
MBool solutionStep() override
void collideSpheres(const MInt bodyA, const MInt bodyB)
Calculate collision force between two spheres.
void resetForce()
Definition: rigidbodies.h:456
MFloat * m_static_computeBodyProperties_liftStartAngle1
Definition: rigidbodies.h:204
MFloat findClosestPointEllipsoid(const MFloat *const relPos, const MInt bodyId)
void initGridProperties()
MFloat & a_bodyRadius(const MInt bodyId)
Definition: rigidbodies.h:481
void exchangeNeighborNeighborRemote(std::vector< std::vector< MInt > > &bodyIdsForRemoteDomain, std::vector< std::vector< MInt > > &homeDomainIdsForRemoteDomain, std::map< MInt, std::vector< MInt > > &tmpRemoteMap)
std::vector< MFloat > m_initBodyRadius
Definition: rigidbodies.h:192
MFloat m_timestep
Definition: rigidbodies.h:186
MBool m_periodicBC
Definition: rigidbodies.h:300
MInt noEmbeddedBodies() const
Definition: rigidbodies.h:421
void reIntAfterRestart(MBool) override
Definition: rigidbodies.h:97
void exchangeBufferLengthsNeighbors(std::vector< MInt > &noToRecv, const MInt noToSend)
exchange of Buffer lengths all to all in direct neighborhood
MFloat a_angularAccelerationBody(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:574
void initTimers()
Definition: rigidbodies.cpp:88
void cleanUp()
Definition: rigidbodies.h:91
MFloat & a_bodyVelocityOld(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:506
MFloat getDistance(const MFloat *const coordinates, const MInt bodyId)
Calculates the closest distance between a given point and body.
Definition: rigidbodies.h:384
void transformToWorldFrame(const MFloat *const quaternion, const MFloat *const vectorBody, MFloat *const vectorWorld)
Transform a vector form the body frame to the world frame.
MFloat * a_bodyTorque(const MInt bodyId)
Definition: rigidbodies.h:584
MFloat & a_bodyForce(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:494
void postAdaptation() override
post adaptation for split adaptation within the adaptation loop
Definition: rigidbodies.h:120
typename maia::CartesianSolver< nDim, RigidBodies > CartesianSolver
Definition: rigidbodies.h:32
std::ofstream m_log
Definition: rigidbodies.h:320
void deleteDummyBody(const MInt bodyId, const MInt collectorShift=0)
Delete dummy bodies from collector that are not relevant anymore.
MFloat a_angularAccelerationT1(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:567
void correctBodies()
Correcting the state of all bodies using all available external forces/fluxes.
MFloat & a_bodyDensityRatio(const MInt bodyId)
Definition: rigidbodies.h:526
MFloat & a_angularVelocityBodyT1(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:550
MFloat a_bodyMass(const MInt bodyId)
Definition: rigidbodies.h:466
MFloat a_bodyCenterOld(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:501
void predictorStep()
Peform a prediction for all bodies.
MFloat c_cellLengthAtMaxLevel() const
Definition: rigidbodies.h:268
const MFloat m_bodyHeatCapacity
Definition: rigidbodies.h:160
void createDummyBody(MInt bodyId)
appends new DummyBody to collector
void loadBodiesSizeAndPosition()
loadind no of embedded bodies and it's position from restart file
void boxSeedInitialize()
void prepareAdaptation(std::vector< std::vector< MFloat > > &NotUsed(sensors), std::vector< MFloat > &NotUsed(sensorWeight), std::vector< std::bitset< 64 > > &NotUsed(sensorCellFlag), std::vector< MInt > &NotUsed(sensorSolverId)) override
Definition: rigidbodies.h:107
MBool m_newTimeStep
Definition: rigidbodies.h:148
MFloat a_angularVelocityT1(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:541
MFloat globBBox(MInt n)
Definition: rigidbodies.h:272
MInt a_hasNeighbor(const MInt, const MInt) const
Definition: rigidbodies.h:101
void resetTorque()
Definition: rigidbodies.h:461
MFloat a_bodyTemperature(const MInt bodyId) const
Definition: rigidbodies.h:518
MFloat calculatePeriodicShift(MInt intersectingCellId, MInt direction)
periodic shift for position for further data exchange
MFloat a_bodyVelocityOld(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:507
void finalizeAdaptation() override
finalize adaptation for split sadptation after the adaptation loop
Definition: rigidbodies.h:121
void printBodyDomainConnections()
debugging: print all necessary mappings for each partition in specific file
MFloat a_torqueT1(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:579
void readProperties()
Reading all necessary properties for the RigidBodies solver.
MInt getGlobalBodyId(MInt localBodyId)
Definition: rigidbodies.h:415
MFloat a_bodyCenter(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:498
MInt m_maxNoBodies
Definition: rigidbodies.h:167
MFloat & a_angularAccelerationBody(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:571
MInt * m_static_computeBodyProperties_bodyToFunction
Definition: rigidbodies.h:210
std::array< MFloat, 2 > m_distFac
Definition: rigidbodies.h:312
void deleteIrrelevantBodies(std::list< std::pair< MInt, MInt > > &removeList)
Delete remote bodies from collector that are not relevant anymore.
void collideBodies()
Calculate collisions forces for all bodies.
MFloat & a_angularVelocityT1B2(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:545
MFloat * m_static_computeBodyProperties_freqFactor
Definition: rigidbodies.h:199
void saveBodyRestartFile(const MBool backup)
Write restart file for the RigidBody solver.
Status a_status(const MInt bodyId) const
Definition: rigidbodies.h:582
MBool m_forcedMotion
Definition: rigidbodies.h:172
void addForce(const MInt bodyId, const std::array< MFloat, nDim > &force)
Definition: rigidbodies.h:438
MFloat * getBodyProperties(MInt returnMode, MInt bodyId)
MFloat getDistanceCube(const MFloat *coordinates, const MInt bodyId)
Calculates the closest distance between a given point and a cube.
void exchangeBufferLengthsRemoteToHome(std::vector< MInt > &noToRecv, std::vector< MInt > &noToSend)
MInt noInternalCells() const override
Return the number of internal cells within this solver.
Definition: rigidbodies.h:94
static constexpr MInt nQuat
Definition: rigidbodies.h:132
void exchangeFsiData()
exchange of summed forces and torques
MFloat & a_bodyVelocity(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:503
MFloat & a_bodyQuaternionT1B2(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:535
MInt m_currMaxLevel
Definition: rigidbodies.h:315
MFloat a_angularVelocityBody(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:592
MFloat * m_static_computeBodyProperties_rotAngle
Definition: rigidbodies.h:212
void exchangeBufferLengthsNeighbor(std::vector< MInt > &noToRecv, std::vector< std::vector< MInt > > &bodyList)
exchange of Buffer legnths for further exchanges
typename maia::grid::tree::Tree< nDim >::Cell Cell
Definition: rigidbodies.h:33
MFloat * m_static_computeBodyProperties_omega
Definition: rigidbodies.h:211
std::vector< std::vector< MInt > > m_transferBodies
Definition: rigidbodies.h:288
MFloat m_uniformBodyTemperature
Definition: rigidbodies.h:161
void findLocalBodies()
searches in all initial Bodies for local bodies
void addTorque(const MInt bodyId, const std::array< MFloat, nRot > &torque)
Definition: rigidbodies.h:444
std::map< MInt, MInt > m_associatedDummyBodies
Definition: rigidbodies.h:290
std::array< MFloat, nDim > m_globDomainLength
Definition: rigidbodies.h:301
void swapProxy(const MInt cellId0, const MInt cellId1)
Swap the given cells.
Definition: rigidbodies.h:127
MFloat a_bodyInertia(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:530
MBool m_rotation
Definition: rigidbodies.h:174
MInt a_noCells() const
Definition: rigidbodies.h:620
void logBodyData()
Writing a simple log file containing the current state for all bodies.
MFloat a_bodyQuaternionT1(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:533
MFloat & a_angularVelocityBody(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:591
void advanceBodies()
Copy the body data for time t to t-1 to prepare the next timestep.
MString outputDir() const
Definition: rigidbodies.h:266
void reinitAfterAdaptation() override
Definition: rigidbodies.h:124
maia::rb::collector::RigidBodyCollector< nDim > m_bResFile
Definition: rigidbodies.h:155
void writeRestartFile(const MBool writeRestart, const MBool writeBackup, const MString, MInt *) override
Write restart file for the RigidBody solver.
~RigidBodies()
D'tor for the RigidBodies solver.
Definition: rigidbodies.cpp:68
MFloat getDistanceSphere(const MFloat *coordinates, const MInt bodyId)
Calculates the closest distance between a given point and a sphere.
void findTransferBodies()
creates list with all edge bodies that are no longer contained within local domain
std::map< MInt, std::vector< MInt > > m_remoteDomainLocalBodies
Definition: rigidbodies.h:292
MFloat & a_angularAccelerationT1(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:564
MBool m_rotXYaxis
Definition: rigidbodies.h:175
MFloat & a_bodyCenterOld(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:500
MFloat a_bodyTorque(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:586
MBool m_logBodyData
Definition: rigidbodies.h:317
void updateConnections()
MFloat * m_static_computeBodyProperties_amplitude
Definition: rigidbodies.h:198
MBool m_restart
Definition: rigidbodies.h:176
MInt m_intervalBodyLog
Definition: rigidbodies.h:319
MInt m_maxSensorLevel
Definition: rigidbodies.h:314
void initRemoteDummyBodyData(const MInt bodyId)
initalize kinematic data of dummyBody that is associated with a remoteBody
void getVelocity(const MInt bodyId, std::array< MFloat, nDim > &velocity)
Definition: rigidbodies.h:483
void exchangeNeighborNeighborHome(std::vector< std::vector< MInt > > &bodyIdsForHomeDomain, std::vector< std::vector< MInt > > &remoteDomainIdsForHomeDomain, std::vector< std::vector< std::array< MFloat, nDim > > > &shiftForHomeDomain)
std::vector< MString > m_logVars
Definition: rigidbodies.h:179
MInt a_bodyType() const
Definition: rigidbodies.h:610
MInt noHomeDomains() const
Definition: rigidbodies.h:427
std::ofstream m_anglog
Definition: rigidbodies.h:321
MFloat * a_bodyForce(const MInt bodyId)
Definition: rigidbodies.h:493
MInt m_timesteps
Definition: rigidbodies.h:187
void prepareAdaptation() override
prepare adaptation for split adaptation before the adaptation loop
Definition: rigidbodies.h:111
MBool m_translation
Definition: rigidbodies.h:173
void exchangeBodyVariablesAllToAll()
exchange of Body Variables all to all
void computeBodies()
Calculates the new state for all bodies.
typename CartesianSolver::Grid Grid
Definition: rigidbodies.h:36
MPI_Comm mpiComm() const
Definition: rigidbodies.h:103
MFloat a_volume(const MInt bodyId)
Definition: rigidbodies.h:468
MInt noCollectorBodies() const
Definition: rigidbodies.h:425
void updateInfoDiameter(const MBool initCall=false)
MFloat * m_static_computeBodyProperties_normal
Definition: rigidbodies.h:209
MFloat a_angularVelocity(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:589
MFloat * m_static_computeBodyProperties_initialBodyCenter
Definition: rigidbodies.h:200
MFloat m_bodyHeight
Definition: rigidbodies.h:157
MFloat getHeatFlux(const MInt bodyId)
Definition: rigidbodies.h:491
MInt size() const
Definition: rigidbodies.h:407
MFloat * m_static_computeBodyProperties_circleStartAngle
Definition: rigidbodies.h:208
MFloat a_bodyDensityRatio(const MInt bodyId) const
Definition: rigidbodies.h:527
MInt localToRemoteBody(const MInt collectorId, const MInt oldBodyId, const MInt domain)
this function transforms a localBody to a remoteBody on the current domain, necessary if a body cross...
MFloat * m_static_computeBodyProperties_liftEndAngle1
Definition: rigidbodies.h:205
MBool isLocalBody(MInt bodyId)
Definition: rigidbodies.h:417
std::vector< MString > m_logAngVars
Definition: rigidbodies.h:180
void exchangeTransferBodies()
exchanges transfer bodies
void linSpace(MFloat start, MFloat end, MInt num, std::vector< MFloat > &linspaced)
MBool m_printKineticEnergy
Definition: rigidbodies.h:316
MFloat & a_bodyTemperatureOld(const MInt bodyId)
Definition: rigidbodies.h:520
std::map< MInt, std::vector< MInt > > m_homeDomainRemoteBodies
Definition: rigidbodies.h:294
void updateBodyDomainConnections(MBool initCall)
updates local/ edge body domain connections
MFloat distancePointEllipsoid(const std::array< MFloat, 3 > e, const std::array< MFloat, 3 > y, std::array< MFloat, 3 > x)
Calculates the closest distance between a given point and a ellipsoid in 3D.
MFloat & a_bodyHeatFlux(const MInt bodyId)
Definition: rigidbodies.h:523
MFloat * m_static_computeBodyProperties_Strouhal
Definition: rigidbodies.h:201
Geom & geometry() const
Access the solver's geometry.
Definition: rigidbodies.h:82
MFloat * m_static_computeBodyProperties_liftEndAngle2
Definition: rigidbodies.h:207
MLong getDomainOffset()
for new restartFile format
void quaternionToEuler(const MFloat *const quaternion, MFloat *const angles)
Transform the quaternion to Euler angles.
MFloat a_bodyAccelerationOld(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:513
static constexpr MInt nRot
Definition: rigidbodies.h:131
MString m_restartDir
Definition: rigidbodies.h:178
std::vector< MInt > m_globalBodyIds
Definition: rigidbodies.h:298
MFloat a_bodyTemperatureOld(const MInt bodyId) const
Definition: rigidbodies.h:521
MBool m_static_computeBodyProperties_first
Definition: rigidbodies.h:197
void computeBodyPropertiesForced(MInt returnMode, MFloat *bodyData, MInt bodyId, MFloat time)
typename CartesianSolver::GridProxy GridProxy
Definition: rigidbodies.h:37
void advanceQuaternion(const MFloat *const angularVelocity, const MFloat dt, const MFloat *const qIn, MFloat *const qOut)
Advance the rotational state by one timestep for a given angular velocity.
void initBodyData()
Allocating and initializing body data necessary for the solver run.
void exchangeKinematicData()
exchange of predictor & corrector step output
MInt getLocalBodyId(MInt globalBodyId)
Definition: rigidbodies.h:408
void saveSolverSolution(const MBool, const MBool)
Definition: rigidbodies.h:90
void setCellWeights(MFloat *) override
Set cell weights.
Definition: rigidbodies.h:128
std::vector< MFloat > m_initialBodyCenters
Definition: rigidbodies.h:189
std::vector< MFloat > m_initBodyRadii
Definition: rigidbodies.h:194
MFloat & a_bodyAccelerationOld(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:512
void postTimeStep()
Definition: rigidbodies.h:86
MInt m_restartTimeStep
Definition: rigidbodies.h:171
MInt m_noLocalBodies
Definition: rigidbodies.h:277
void exchangeBufferLengthsAllToRoot(std::vector< MInt > &noToRecv, const MInt noToSend)
exchange of Buffer lengths all to root
void removeChilds(const MInt) override
Coarsen the given cell.
Definition: rigidbodies.h:122
MFloat & a_bodyTorque(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:585
void setSensors(std::vector< std::vector< MFloat > > &, std::vector< MFloat > &, std::vector< std::bitset< 64 > > &, std::vector< MInt > &) override
set solver sensors for split adaptation within the adaptation loop
Definition: rigidbodies.h:112
MString m_outputDir
Definition: rigidbodies.h:164
void exchangeEdgeBodyData()
exchanges relevant body connections with new neighbor domains
void averageTimer()
MFloat a_bodyVelocity(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:504
Status & a_status(const MInt bodyId)
Definition: rigidbodies.h:581
MFloat & a_bodyAcceleration(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:509
MFloat * m_static_computeBodyProperties_mu2
Definition: rigidbodies.h:203
void totalKineticEnergy()
MFloat a_angularVelocityBodyT1B2(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:560
MFloat & a_bodyQuaternionT1(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:532
std::array< MInt, Timers::_count > m_timers
Definition: rigidbodies.h:256
void incrementHeatFlux(const MInt bodyId, MFloat heatflux)
Definition: rigidbodies.h:489
void predictRotation(const MInt bodyId)
void updateMaxLevel(MInt newMaxLevel)
Definition: rigidbodies.h:341
MFloat a_bodyAcceleration(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:510
void printScalingVariables()
MFloat currMaxLevel() const
Definition: rigidbodies.h:270
MFloat & a_angularVelocityBodyT1B2(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:557
MFloat a_bodyForce(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:495
MString m_timerType
Definition: rigidbodies.h:257
MFloat a_bodyQuaternionT1B2(const MInt bodyId, const MInt dim) const
Definition: rigidbodies.h:536
MBool prepareRestart(MBool writeRestart, MBool &) override
Prepare the solvers for a grid-restart.
Definition: rigidbodies.h:96
MFloat & a_bodyRadii(const MInt bodyId, const MInt n)
Definition: rigidbodies.h:480
void finalizeInitSolver() override
Definition: rigidbodies.h:89
MInt m_noDummyBodies
Definition: rigidbodies.h:283
MFloat & a_bodyInertia(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:529
void initSolver() override
Definition: rigidbodies.h:88
MFloat m_infoDiameter
Definition: rigidbodies.h:313
MInt noRemoteDomains() const
Definition: rigidbodies.h:429
MFloat m_uRef
Definition: rigidbodies.h:183
MFloat & a_angularVelocityT1(const MInt bodyId, const MInt dim)
Definition: rigidbodies.h:540
Geom * m_geometry
Definition: rigidbodies.h:79
MFloat * m_static_computeBodyProperties_mu
Definition: rigidbodies.h:202
MInt noConnectingBodies() const
Definition: rigidbodies.h:423
MFloat * m_static_computeBodyProperties_liftStartAngle2
Definition: rigidbodies.h:206
std::vector< MInt > m_indirectHomeDomains
Definition: rigidbodies.h:286
MInt m_noEmbeddedBodies
Definition: rigidbodies.h:168
MInt solverId() const
Return the solverId.
Definition: solver.h:425
Class that represents DG element collector.
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29
constexpr Real POW2(const Real x)
Definition: functions.h:119
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
double MFloat
Definition: maiatypes.h:52
int64_t MLong
Definition: maiatypes.h:64
bool MBool
Definition: maiatypes.h:58
MFloat dist(const Point< DIM > &p, const Point< DIM > &q)
Definition: pointbox.h:54
define array structures