7#ifndef FVMBCARTESIANSOLVERXD_H
8#define FVMBCARTESIANSOLVERXD_H
14#include <unordered_map>
27#ifndef MAIA_MS_COMPILER
29#include <sys/socket.h>
32#define FINITE_VOLUME_METHOD
34#undef FINITE_VOLUME_METHOD
36#ifndef MB_EXTRA_STUFF_
37#define MB_EXTRA_STUFF_
49template <MInt nDim,
class SysEqn>
52template <MInt nDim,
class SysEqn>
550 const MPI_Comm comm);
559 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
561 MBool returnCellId =
true) {
562 std::ignore = returnCellId;
566 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
927 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
929 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
975 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
977 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
979 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
1003 void balance(
const MInt*
const noCellsToReceiveByDomain,
const MInt*
const noCellsToSendByDomain,
1004 const MInt*
const targetDomainsByCell,
const MInt oldNoCells)
override;
1024 TERMM(1,
"solverCelldataType: invalid data id " + std::to_string(dataId));
1032 MFloat*
const data)
override;
1053 void setSensors(std::vector<std::vector<MFloat>>& sensors,
1054 std::vector<MFloat>& sensorWeight,
1055 std::vector<std::bitset<64>>& sensorCellFlag,
1056 std::vector<MInt>& sensorSolverId)
override;
1059 void sensorPatch(std::vector<std::vector<MFloat>>&, std::vector<std::bitset<64>>&, std::vector<MFloat>&,
MInt,
1106 template <MInt timeStepMethod>
1108 MBool rungeKuttaStepStandard();
1109 template <MInt timeStepMethod>
1111 MBool rungeKuttaStepNew();
1146 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1148 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
1158 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1160 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
1162 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1171 const MFloat maxDistConstructed);
1174 const std::vector<MFloat>& setup = std::vector<MFloat>(),
1175 MInt* skipBodies =
nullptr,
MFloat* meanBodyState =
nullptr,
1177 MFloat* nearestFac =
nullptr);
1225 template <
typename T>
1314 std::vector<std::pair<MInt, MInt>>
1333 std::list<std::pair<MInt, MInt>>
1372 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1374 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1376 const std::vector<polyVertex>*,
MInt);
1377 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1378 void outputPolyData(
const MInt,
const std::vector<polyCutCell>*,
const std::vector<polyEdge2D>*,
1379 const std::vector<polyVertex>*,
MInt);
1380 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
1381 void outputPolyData(
const MInt,
const std::vector<polyCutCell>*,
const std::vector<polyFace>*,
1382 const std::vector<polyEdge3D>*,
const std::vector<polyVertex>*,
MInt);
1383 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1384 void compVolumeIntegrals(std::vector<polyCutCell>*, std::vector<polyEdge2D>*,
const std::vector<polyVertex>*);
1385 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1387 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1396 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1398 const MFloat dx = p1[0] - p0[0];
1399 const MFloat dy = p1[1] - p0[1];
1402 const MFloat abs = sqrt(res[0] * res[0] + res[1] * res[1]);
1405 w = -res[0] * p0[0] - res[1] * p0[1];
1413 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
1415 const MFloat a0 = p1[0] - p0[0], a1 = p1[1] - p0[1], a2 = p1[2] - p0[2], b0 = p2[0] - p0[0], b1 = p2[1] - p0[1],
1417 res[0] = a1 * b2 - a2 * b1;
1418 res[1] = a2 * b0 - a0 * b2;
1419 res[2] = a0 * b1 - a1 * b0;
1420 const MFloat abs = sqrt(res[0] * res[0] + res[1] * res[1] + res[2] * res[2]);
1424 w = -res[0] * p0[0] - res[1] * p0[1] - res[2] * p0[2];
1444 std::copy(this->xx, this->xx +
nDim, tmp.
xx);
1450 tmp.
xx[i] = this->xx[i] +
a.xx[i];
1456 tmp.
xx[i] = this->xx[i] -
a.xx[i];
1462 tmp.
xx[i] = this->xx[i] *
a;
1468 tmp.
xx[i] = this->xx[i] /
a;
1474 dotp += this->xx[i] *
a.xx[i];
1480 template <
class X =
void, std::enable_if_t<nDim == 3, X*> =
nullptr>
1483 tmp.
xx[0] = this->xx[1] *
a.xx[2] - this->xx[2] *
a.xx[1];
1484 tmp.
xx[1] = this->xx[2] *
a.xx[0] - this->xx[0] *
a.xx[2];
1485 tmp.
xx[2] = this->xx[0] *
a.xx[1] - this->xx[1] *
a.xx[0];
1488 template <
class X =
void, std::enable_if_t<nDim == 2, X*> =
nullptr>
1490 TERMM(1,
"Get your ass out of this function. This is 3D code!");
1494 this->xx[i] = -this->xx[i];
1519 static constexpr MFloat eps = (
nDim == 3) ? 10000 * MFloatEps : 1000 * MFloatEps;
1529 IF_CONSTEXPR(
nDim == 3) {
1534 else IF_CONSTEXPR(
nDim == 2) {
1551 std::vector<CsgPolygon>* coplanarFront,
1552 std::vector<CsgPolygon>* coplanarBack,
1553 std::vector<CsgPolygon>* front,
1554 std::vector<CsgPolygon>* back)
const;
1556 std::vector<CsgPolygon>* coplanarFront,
1557 std::vector<CsgPolygon>* coplanarBack)
const;
1571 for(
MInt i = 0; (unsigned)i < _vertices.size(); i++) {
1587 for(
MInt i = 0; (unsigned)i < _vertices.size(); i++) {
1606 std::vector<CsgVertex> tmp;
1608 tmp.push_back((*rit));
1625 explicit CsgNode(std::vector<CsgPolygon> _polygons) {
1630 this->
build(std::move(_polygons));
1641 this->polygons.clear();
1647 for(
MInt i = 0; (unsigned)i < this->
polygons.size(); i++) {
1648 this->polygons[i].flip();
1651 if(this->front) this->front->
invert();
1652 if(this->back) this->back->
invert();
1654 this->front = this->
back;
1662 std::vector<CsgPolygon> _front;
1663 std::vector<CsgPolygon> _back;
1664 for(
MInt i = 0; (unsigned)i < _polygons.size(); i++) {
1665 this->plane.
splitPolygon(&_polygons[i], &_front, &_back, &_front, &_back);
1667 if(this->front) _front = this->front->
clipPolygons(_front);
1672 for(
MInt i = 0; (unsigned)i < _back.size(); i++)
1673 _front.push_back(_back[i]);
1679 if(this->front) this->front->
clipTo(bsp);
1680 if(this->back) this->back->
clipTo(bsp);
1684 std::vector<CsgPolygon> _polygons(this->polygons);
1686 std::vector<CsgPolygon> _polygons_front = this->front->
allPolygons();
1687 for(
MInt i = 0; (unsigned)i < _polygons_front.size(); i++)
1688 _polygons.push_back(_polygons_front[i]);
1691 std::vector<CsgPolygon> _polygons_back = this->back->
allPolygons();
1692 for(
MInt i = 0; (unsigned)i < _polygons_back.size(); i++)
1693 _polygons.push_back(_polygons_back[i]);
1698 void build(std::vector<CsgPolygon> _polygons);
1703 if(tabCounter == 0) {
1708 if(this->front) this->front->
plot(tabCounter + 1, fileName);
1710 ofl.open(fileName, std::ofstream::app);
1713 for(
MInt count = 0; count < tabCounter; count++)
1715 ofl <<
"node plane normal, w:";
1716 for(
MInt dim = 0; dim <
nDim; ++dim)
1717 ofl <<
" " << this->plane.
normal.
xx[dim];
1718 ofl <<
", " << this->plane.w << std::endl;
1720 for(
MInt p = 0; (
unsigned)p < this->
polygons.size(); p++) {
1721 for(
MInt count = 0; count < tabCounter; count++)
1723 ofl <<
"polygon " << p <<
" plane normal, w:";
1724 for(
MInt dim = 0; dim <
nDim; ++dim)
1726 ofl <<
", " << this->polygons[p].plane.w << std::endl;
1728 for(
MInt count = 0; count < tabCounter; count++)
1730 ofl <<
"polygon setIndex: " << this->polygons[p].setIndex <<
", bodyId: " << this->polygons[p].bodyId
1731 <<
", faceId: " << this->polygons[p].faceId <<
", faceType: " << this->polygons[p].faceType << std::endl;
1733 ofl << std::endl << std::endl;
1737 if(this->back) this->back->
plot(tabCounter + 1, fileName);
1747 explicit Csg(std::vector<CsgPolygon> _polygons) {
1748 for(
MInt i = 0; (unsigned)i < _polygons.size(); i++) {
1749 polygons.push_back(_polygons[i].clone());
1764 a.build(
b.allPolygons());
1766 return a.allPolygons();
1770 for(
MInt i = 0; (unsigned)i < this->
polygons.size(); i++) {
1771 this->polygons[i].flip();
1791template <MInt nDim_,
class SysEqn>
1793 static constexpr const MInt count = 8;
1795 static constexpr const MInt ELEM_AVARIABLE = 0;
1796 static constexpr const MInt ELEM_CELLVOLUMES = 1;
1797 static constexpr const MInt ELEM_RIGHTHANDSIDE = 2;
1798 static constexpr const MInt ELEM_CELLVOLUMESDT1 = 3;
1799 static constexpr const MInt ELEM_SWEPTVOLUMES = 4;
1800 static constexpr const MInt ELEM_PROPERTIES = 5;
1801 static constexpr const MInt ELEM_AZIMUTHAL_LONG = 6;
1802 static constexpr const MInt ELEM_AZIMUTHAL_FLOAT = 7;
1803 static constexpr const MInt ELEM_LESAVERAGE = 8;
1808template <MInt nDim,
class SysEqn>
1809const std::array<MInt, FvMbCartesianSolverXD<nDim, SysEqn>::CellDataDlb::count>
1814template <MInt nDim_,
class SysEqn>
1822 const MInt cellId = grid().tree().grid2solver(gridCellId);
1823 if(cellId < 0 || cellId >= noInternalCells()) {
1830 case CellDataDlb::ELEM_AVARIABLE: {
1831 dataSize = m_noCVars;
1834 case CellDataDlb::ELEM_CELLVOLUMES: {
1838 case CellDataDlb::ELEM_RIGHTHANDSIDE: {
1839 dataSize = m_noFVars;
1842 case CellDataDlb::ELEM_CELLVOLUMESDT1: {
1846 case CellDataDlb::ELEM_SWEPTVOLUMES: {
1850 case CellDataDlb::ELEM_PROPERTIES: {
1854 case CellDataDlb::ELEM_AZIMUTHAL_LONG: {
1855 if(grid().azimuthalPeriodicity()) {
1856 dataSize = m_azimuthalNearBoundaryBackupMaxCount * m_noLongDataBalance;
1862 case CellDataDlb::ELEM_AZIMUTHAL_FLOAT: {
1863 if(grid().azimuthalPeriodicity()) {
1864 dataSize = m_azimuthalNearBoundaryBackupMaxCount * (nDim_ + m_noFloatDataBalance);
1871 TERMM(1,
"Unknown data id.");
1881template <MInt nDim_,
class SysEqn_>
1883 const MInt*
const bufferIdToCellId,
MFloat*
const data) {
1886 MInt localBufferId = 0;
1887 for(
MInt i = 0; i < oldNoCells; i++) {
1888 const MInt gridCellId = bufferIdToCellId[i];
1890 if(gridCellId < 0)
continue;
1892 const MInt cellId = grid().tree().grid2solver(gridCellId);
1893 if(cellId < 0 || cellId >= noInternalCells()) {
1898 case CellDataDlb::ELEM_AVARIABLE: {
1899 std::copy_n(&a_variable(cellId, 0), m_noCVars, &data[localBufferId * m_noCVars]);
1902 case CellDataDlb::ELEM_CELLVOLUMES: {
1903 std::copy_n(&a_cellVolume(cellId), 1, &data[localBufferId]);
1906 case CellDataDlb::ELEM_RIGHTHANDSIDE: {
1907 std::copy_n(&a_rightHandSide(cellId, 0), m_noFVars, &data[localBufferId * m_noFVars]);
1910 case CellDataDlb::ELEM_CELLVOLUMESDT1: {
1911 std::copy_n(&m_cellVolumesDt1[cellId], 1, &data[localBufferId]);
1914 case CellDataDlb::ELEM_SWEPTVOLUMES: {
1915 MInt bndryId_ = a_bndryId(cellId);
1917 data[localBufferId] = m_sweptVolume[bndryId_];
1919 data[localBufferId] = -1;
1923 case CellDataDlb::ELEM_AZIMUTHAL_FLOAT: {
1924 if(grid().azimuthalPeriodicity()) {
1925 MInt noFloatData = m_azimuthalNearBoundaryBackupMaxCount * (nDim_ + m_noFloatDataBalance);
1926 std::copy_n(&m_azimuthalNearBoundaryBackupBalFloat[cellId * noFloatData], noFloatData,
1927 &data[localBufferId * noFloatData]);
1932 TERMM(1,
"Unknown data id.");
1941template <MInt nDim_,
class SysEqn_>
1943 const MInt*
const bufferIdToCellId,
MLong*
const data) {
1946 MInt localBufferId = 0;
1947 for(
MInt i = 0; i < oldNoCells; i++) {
1948 const MInt gridCellId = bufferIdToCellId[i];
1950 if(gridCellId < 0)
continue;
1952 const MInt cellId = grid().tree().grid2solver(gridCellId);
1953 if(cellId < 0 || cellId >= noInternalCells()) {
1958 case CellDataDlb::ELEM_PROPERTIES: {
1959 data[localBufferId] = (
MLong)a_properties(cellId).to_ulong();
1962 case CellDataDlb::ELEM_AZIMUTHAL_LONG: {
1963 if(grid().azimuthalPeriodicity()) {
1964 MInt noLongData = m_azimuthalNearBoundaryBackupMaxCount * m_noLongDataBalance;
1965 std::copy_n(&m_azimuthalNearBoundaryBackupBalLong[cellId * noLongData], noLongData,
1966 &data[localBufferId * noLongData]);
1971 TERMM(1,
"Unknown data id.");
1980template <MInt nDim_,
class SysEqn_>
1990 if(m_loadBalancingReinitStage == 0) {
1992 case CellDataDlb::ELEM_AVARIABLE: {
1993 std::copy_n(data, noInternalCells() * m_noCVars, &a_variable(0, 0));
1996 case CellDataDlb::ELEM_CELLVOLUMES: {
1997 std::copy_n(data, noInternalCells(), &a_cellVolume(0));
2000 case CellDataDlb::ELEM_RIGHTHANDSIDE: {
2001 std::copy_n(data, noInternalCells() * m_noFVars, &a_rightHandSide(0, 0));
2004 case CellDataDlb::ELEM_CELLVOLUMESDT1: {
2005 std::copy_n(data, noInternalCells(), &m_cellVolumesDt1[0]);
2008 case CellDataDlb::ELEM_SWEPTVOLUMES: {
2009 std::copy_n(data, noInternalCells(), &m_sweptVolumeBal[0]);
2012 case CellDataDlb::ELEM_AZIMUTHAL_FLOAT: {
2013 if(grid().azimuthalPeriodicity()) {
2014 MInt noFloatData = m_azimuthalNearBoundaryBackupMaxCount * (nDim_ + m_noFloatDataBalance);
2015 std::copy_n(data, noInternalCells() * noFloatData, &m_azimuthalNearBoundaryBackupBalFloat[0]);
2020 TERMM(1,
"Unknown data id.");
2027template <MInt nDim_,
class SysEqn_>
2037 if(m_loadBalancingReinitStage == 0) {
2039 case CellDataDlb::ELEM_PROPERTIES: {
2040 for(
MInt i = 0; i < noInternalCells(); i++) {
2045 case CellDataDlb::ELEM_AZIMUTHAL_LONG: {
2046 if(grid().azimuthalPeriodicity()) {
2047 MInt noLongData = m_azimuthalNearBoundaryBackupMaxCount * m_noLongDataBalance;
2048 std::copy_n(data, noInternalCells() * noLongData, &m_azimuthalNearBoundaryBackupBalLong[0]);
2053 TERMM(1,
"Unknown data id.");
GridCell
Grid cell Property Labels.
MFloat m_static_logData_ic45301_freqFactor[s_logData_ic45301_maxNoEmbeddedBodies]
void(FvCartesianSolverXD::* m_reconstructSurfaceData)(MInt)
std::vector< std::vector< MInt > > m_splitChilds
const MChar ** m_variablesName
MBool m_static_updateBodyProperties_c453_firstRun
MBool m_azimuthalRecConstSet
MBool m_vtuVelocityGradientOutput
virtual void computeConservativeVariables()
Dispatches the computation of the conservative variables for different number of species.
MInt c_level(const MInt cellId) const
Returns the grid level of the cell cellId.
std::vector< std::vector< MInt > > m_azimuthalMaxLevelWindowCells
MInt * m_noMaxLevelWindowCells
virtual void LSReconstructCellCenter()
Dispatch the reconstruction computation to the appropiate loop.
std::vector< MInt > m_associatedInternalCells
MBool m_useCentralDifferencingSlopes
MLong c_neighborId(const MInt cellId, const MInt dir, const MBool assertNeighborState=true) const
Returns the grid neighbor id of the grid cell cellId dir.
MPI_Request * m_mpi_wmRequest
MInt a_noSurfaces()
Returns the number of surfaces.
std::vector< MInt > m_reconstructionCellIds
MFloat * m_wmImgRecvBuffer
static constexpr const MInt m_noCorners
virtual void initNearBoundaryExchange(const MInt mode=0, const MInt offset=0)
Setup the near-boundary communicator needed for the flux-redistribution method.
MBool a_isPeriodic(const MInt cellId) const
Returns IsPeriodic of the cell cellId.
MFloat m_static_applyBoundaryCondition_refMass
MFloat m_static_logData_ic45301_pressurePoints[s_logData_ic45301_maxNoPressurePoints *nDim]
MInt m_levelSetAdaptationScheme
MFloat * m_wmImgSendBuffer
MInt ** m_maxLevelHaloCells
MInt * m_cellsInsideSpongeLayer
void exchangeFloatDataAzimuthal(MFloat *data, MInt noVars, const std::vector< MInt > &rotIndices)
MInt ** m_setToBodiesTable
MFloat m_adaptationDampingDistance
MFloat m_static_logData_ic45299_amplitude[s_logData_ic45299_maxNoEmbeddedBodies]
virtual void determineLESAverageCells()
MFloat m_static_applyBoundaryCondition_EVelL2
Collector< FvBndryCell< nDim, SysEqn > > * m_bndryCells
std::vector< MInt > m_reconstructionNghbrIds
MFloat reduceData(const MInt cellId, MFloat *data, const MInt dataBlockSize=1, const MBool average=true)
determines the value of 'data' in the given cell by recusively volumetric averaging among all its off...
MInt m_bndrySurfacesOffset
MLong c_childId(const MInt cellId, const MInt pos) const
Returns the grid child id of the grid cell cellId at position pos.
const MChar ** m_vorticityName
std::vector< std::vector< MInt > > m_azimuthalRemappedWindowCells
MFloat & a_rightHandSide(const MInt cellId, MInt const varId)
Returns the right hand side of the cell cellId for the variable varId.
MBool m_static_advanceSolution_firstRun
MFloat * m_wmSrfcProbeSendBuffer
void reInitActiveCellIdsMemory()
Allocate memory to arrays according to the current number of cells.
MFloat ** m_receiveBuffersNoBlocking
MFloat m_rhoVVInfinity[3]
MBool m_azimuthalNearBndryInit
virtual void writeListOfActiveFlowCells()
MInt m_loadBalancingReinitStage
MPI_Request * m_mpi_receiveRequest
MFloat c_cellLengthAtCell(const MInt cellId) const
Returns the length of the cell for level.
MInt m_wmSurfaceProbeInterval
MFloat c_cellLengthAtLevel(const MInt level) const
Returns the length of the cell for level.
void copyGridProperties()
std::vector< MFloat > m_azimuthalRecConsts
MBool m_static_redistributeMass_firstRun
virtual void setConservativeVariables(MInt cellId)
computes conservative from primitive variables for given cell id
MFloat & a_slope(const MInt cellId, MInt const varId, const MInt dir) override
Returns the slope of the cell cellId for the variable varId in direction dir.
MFloat m_static_advanceSolution_dragCnt
MInt m_wmGlobalNoSrfcProbeIds
MFloat m_targetDensityFactor
MBool m_vtuGeometryOutputExtended
MFloat m_sutherlandConstantThermal
MFloat & a_oldVariable(const MInt cellId, const MInt varId)
Returns oldVariablesv of the cell cellId variables varId.
MPI_Request * m_mpi_wmRecvReq
MFloat m_static_logData_ic45299_xCutOff
FvSurfaceCollector m_surfaces
MInt * m_noWMImgPointsSend
std::vector< MInt > m_rotIndVarsCV
void a_copyPropertiesSolver(const MInt fromCellId, const MInt toCellId)
Returns property p of the cell cellId.
void initAzimuthalReconstruction()
std::vector< std::vector< MInt > > m_wmImgCellIds
MFloat & a_surfaceVariable(const MInt srfcId, const MInt dir, const MInt varId)
Returns the variable varId of surface srfcId in direction dir.
MBool m_static_updateSpongeLayer_first
std::vector< MFloat > * m_LESVarAverageBal
MFloat & a_externalSource(MInt cellId, MInt var)
Return external source.
std::map< MInt, MInt > m_splitChildToSplitCell
MInt & a_surfaceOrientation(const MInt srfcId)
Returns the orientation of surface srfcId.
std::vector< MFloat > m_azimuthalCutRecCoord
virtual void cutOffBoundaryCondition()
MBool a_isBndryCell(const MInt cellId) const override
Returns isBndryCell of the cell cellId.
MBool m_hasExternalSource
maia::fv::collector::FvCellCollector< nDim > m_cells
Collector for FV cells.
MFloat m_static_applyBoundaryCondition_ERhoL1
std::vector< MInt > m_gapCellId
std::vector< MFloat > * m_RANSValues
virtual void findNghbrIds()
SysEqn::PrimitiveVariables * PV
MFloat m_static_applyBoundaryCondition_oldVol2
MInt m_static_logData_ic45301_containingCellIds[s_logData_ic45301_maxNoPressurePoints]
MInt * m_noWMImgPointsRecv
MBool a_isHalo(const MInt cellId) const
Returns IsHalo of the cell cellId.
MBool m_static_constructGFieldPredictor_adaptiveGravity
MBool m_vtuWriteGeometryFile
MFloat m_static_applyBoundaryCondition_EVelL1
maia::fv::cell::BitsetType & a_properties(const MInt cellId)
Returns properties of the cell cellId.
MBool m_static_logData_firstRun4
MInt m_noPeriodicGhostBodies
MBool m_static_logCellxd_firstRun
void setUpwindCoefficient()
std::set< MInt > m_vtuGeometryOutput
MFloat m_static_applyBoundaryCondition_oldMass
MFloat & a_surfaceArea(const MInt srfcId)
Returns the area of surface srfcId.
std::vector< MFloat > * m_LESValues
MFloat m_sutherlandPlusOne
void buildLeastSquaresStencilSimple()
Determine the least squares stencil.
void computeCellSurfaceDistanceVectors()
MInt a_cutCellLevel(const MInt cellId) const
Returns the level for cutCells, this can either be the maxRefinementLevel or the level of the current...
SysEqn::FluxVariables * FV
MBool m_saveVorticityToRestart
MBool m_static_getDistanceSplitSphere_first
MFloat & a_variable(const MInt cellId, const MInt varId)
Returns conservative variable v of the cell cellId for variables varId.
void setRestartFileOutputTimeStep()
constexpr MBool isMultilevelLowestSecondary() const
void a_resetPropertiesSolver(const MInt cellId)
Returns property p of the cell cellId.
std::vector< FvGapCell > m_gapCells
void assertValidGridCellId(const MInt cellId) const
Cecks wether the cell cellId is an actual grid-cell.
MInt noInternalCells() const override
MLong c_parentId(const MInt cellId) const
Returns the grid parent id of the cell cellId.
MInt m_noTimeStepsBetweenSamples
Collector< CartesianGridPoint< nDim > > * m_gridPoints
std::vector< std::vector< MInt > > m_wmImgWMSrfcIds
MFloat m_omegaInfinityFactor
MFloat m_static_logData_ic45299_freqFactor[s_logData_ic45299_maxNoEmbeddedBodies]
std::vector< std::vector< MInt > > m_azimuthalMaxLevelHaloCells
MInt m_noLevelSetsUsedForMb
MFloat & a_levelSetValuesMb(const MInt cellId, const MInt set)
Returns the levelSetMb-value for fv-CellId cellId and set.
std::vector< MInt > m_LESAverageCells
SysEqn::ConservativeVariables * CV
void(FvCartesianSolverXD::* m_computeViscousFlux)()
virtual void viscousFlux()
MString m_currentGridFileName
MFloat m_static_advanceSolution_meanDrag
MFloat & a_surfaceCoordinate(const MInt srfcId, const MInt dir)
Returns the coordinate of surface srfcId in direction dir.
void computeDomainAndSpongeDimensions()
Extracts the minimum and maximum coordinates of all cells in the grid.
MInt * m_associatedBodyIds
MBool a_isGapCell(const MInt cellId) const
Returns isGapCell of the cell cellId.
void saveGridFlowVarsPar(const MChar *fileName, MInt noTotalCells, MLong noInternalCells, MFloatScratchSpace &variables, std::vector< MString > &dbVariablesName, MInt, MIntScratchSpace &idVariables, std::vector< MString > &idVariablesName, MInt, MFloatScratchSpace &dbParameters, std::vector< MString > &dbParametersName, MIntScratchSpace &idParameters, std::vector< MString > &idParametersName, const MInt *recalcIds)
This function stores the massivley parallel flow information of the cells.
MFloat m_static_logData_ic45299_cutOffAngle
virtual void Ausm()
Dispatches the AUSM flux computation for different number of species.
MInt & a_associatedBodyIds(const MInt cellId, const MInt set)
Returns the associatedBodyIds for fv-CellId cellId and set.
MInt m_noActiveHaloCellOffset
MFloat & a_surfaceUpwindCoefficient(const MInt srfcId)
Returns the upwind coefficient of surface srfcId.
MInt a_noCells() const
Returns the number of cells.
MBool m_multilevel
Stores whether this solver is part of a multilevel computation.
std::vector< FvWMSurface< nDim > > m_wmSurfaces
void createBoundaryCells()
identifies bndry cells (Sets a_isInterface for the solver!)
MFloat * m_wmSrfcProbeRecvBuffer
MFloat ** m_externalSourceDt1
std::vector< MInt > m_wmSurfaceProbeIds
void writeCenterLineVel()
MFloat & a_surfaceFlux(const MInt srfcId, const MInt fVarId)
Returns the flux fVarId for surface srfcId.
MInt m_zonalAveragingTimeStep
MFloat * m_bodyAngularVelocity
MInt m_bndryCellSurfacesOffset
MBool m_adaptationSinceLastRestartBackup
MFloat m_weightActiveCell
MBool a_isBndryGhostCell(const MInt cellId) const
Returns isBndryGhostCell of the cell cellId.
MFloat m_weightMulitSolverFactor
MPI_Request * m_mpi_sendRequest
void initAzimuthalMaxLevelExchange()
MInt ** m_maxLevelWindowCells
const MInt m_maxNoAzimuthalRecConst
MFloat & a_surfaceDeltaX(const MInt srfcId, const MInt varId)
Returns the delta X of surface srfcId for variable varId.
MInt getAdjacentLeafCells(const MInt, const MInt, MIntScratchSpace &, MIntScratchSpace &)
retrieves the first 'noLayers' layers of direct and(or diagonal neighbors to the given cell
MFloat & a_dt1Variable(const MInt cellId, const MInt varId)
Returns dt1Variables of the cell CellId variables varId.
MBool m_static_writeVtkXmlFiles_firstCall
MUint m_reconstructionDataSize
MFloat * m_levelSetValuesMb
static constexpr MInt nDim
MBool calcSlopesAfterStep()
Return if slopes should be calculated at after each step (not before)
MBool m_static_logData_ic45301_first
MBool a_hasProperty(const MInt cellId, const Cell p) const
Returns grid cell property p of the cell cellId.
std::set< MInt > m_splitSurfaces
MFloat & a_surfaceFactor(const MInt srfcId, const MInt varId)
Returns the factor of surface srfcId for variable varId.
MBool m_static_updateBodyProperties_firstTime
MFloat & a_dt2Variable(const MInt cellId, const MInt varId)
Returns dt2Variables of the cell CellId variables varId.
static constexpr MFloat m_volumeThreshold
MInt m_static_logData_ic45301_noPressurePoints
std::vector< std::vector< MInt > > m_azimuthalMaxLevelWindowMap
MFloat * m_sweptVolumeBal
MBool c_isToDelete(const MInt cellId) const
Returns the delete of the cell cellId.
MFloat & a_localTimeStep(const MInt cellId)
Returns the local time-step of the cell cellId.
void azimuthalNearBoundaryExchange()
MBool m_vtuLevelSetOutput
MFloat m_globalUpwindCoefficient
static constexpr const MInt m_noDirs
MFloat * m_bodyAngularAcceleration
MPI_Request * m_mpi_wmSendReq
MFloat m_static_applyBoundaryCondition_EVelLoo
MFloat m_physicalTimeStep
MBool m_wmUseInterpolation
MFloat * m_bodyTemperature
void exchangeGapInfo()
exchanges the Gap-Information with the solver-own communicators!
MFloat m_sutherlandConstant
void determineStructuredCells()
MInt m_bndryGhostCellsOffset
MBool m_static_writeVtkXmlFiles_firstCall2
MInt c_noChildren(const MInt cellId) const
Returns the number of children of the cell cellId.
MBool m_resetInitialCondition
void initCutOffBoundaryCondition()
MFloat * m_bodyAcceleration
MBool m_static_updateSpongeLayer_mbSpongeLayer
void initAzimuthalCartesianHaloInterpolation()
MFloat c_coordinate(const MInt cellId, const MInt dir) const
Returns the coordinate of the cell from the grid().tree() cellId for dimension dir.
Geometry< nDim > * m_geometry
void forceTimeStep(const MFloat dt)
Force time step externally.
MInt & a_reconstructionData(const MInt cellId)
Returns reconstruction data offset i of the cell cellId.
std::vector< MInt > m_rotIndVarsPV
MInt m_totalnosplitchilds
MFloat & a_coordinate(const MInt cellId, const MInt dir)
Returns the coordinate of the cell from the fvcellcollector cellId for dimension dir.
std::vector< MInt > m_noAzimuthalReconstNghbrs
void initViscousFluxComputation()
MBool m_vtuGlobalIdOutput
std::vector< MInt > m_wmSurfaceProbeSrfcs
MInt * m_wmLocalNoSrfcProbeIds
virtual void getVorticity(MFloat *const vorticity)
wrapper for vorticity computation
std::vector< MInt > m_azimuthalBndrySide
std::vector< MFloat > * m_LESVarAverage
virtual void applyInitialCondition()
Initializes the entire flow field.
MLong c_globalId(const MInt cellId) const
Returns the global grid id of the grid cell cellId.
MInt m_maxLevelBeforeAdaptation
MBool m_restartOldVariables
MInt & a_surfaceNghbrCellId(const MInt srfcId, const MInt dir)
Returns the neighbor cell id of surface srfcId in direction dir.
MFloat computeTimeStepEulerDirectional(MInt cellId) const noexcept
virtual void computePrimitiveVariables()
Dispatches the computation of the primitive variables for different number of species.
MFloat m_static_advanceSolution_meanDragCoeff
MFloat * m_vtuCoordinatesThreshold
MFloat m_static_getDistanceSplitSphere_h
MInt m_orderOfReconstruction
MBool m_static_updateBodyProperties_c455_firstRun
MFloat m_sutherlandPlusOneThermal
virtual void distributeFluxToCells()
Distributes the surface fluxes to the cell RHS.
MFloat & a_spongeFactor(const MInt cellId)
Returns the spongeFactor of the cell cellId.
constexpr MBool isMultilevel() const
Return true if solver is part of a multilevel computation.
std::vector< MInt > m_azimuthalReconstNghbrIds
MInt noVariables() const override
Return the number of primitive variables.
maia::fv::cell::BitsetType::reference a_wasGapCell(const MInt cellId)
Returns wasGapCell of the cell cellId.
MInt & a_surfaceBndryCndId(const MInt srfcId)
Returns the boundary condition of surface srfcId.
virtual void resetZonalLESAverage()
Initializes zonal exchange arrays.
MBool c_isLeafCell(const MInt cellId) const
void setInfinityState()
Computes/defines the infinity values/state once and for all Ideally the infinity variables should not...
MFloat m_static_logData_ic45299_maxA
MFloat m_restartFileOutputTimeStep
MFloat & a_cellVolume(const MInt cellId)
Returns the cell volume of the cell from the fvcellcollector cellId.
MFloat m_static_applyBoundaryCondition_ERhoLoo
void setPrimitiveVariables(MInt cellId)
computes primitive from primitive variables for given cell id. This is the version for all SysEqn.
MInt ** m_cellSurfaceMapping
virtual MFloat entropy(MInt cellId)
void computeCellVolumes()
static constexpr const MInt m_noEdges
MInt & a_reconstructionNeighborId(const MInt cellId, const MInt nghbrNo)
Returns reconstruction neighbor n of the cell cellId.
Collector< PointBasedCell< nDim > > * m_extractedCells
void exchangeDataFV(T *data, const MInt blockSize=1, MBool cartesian=true, const std::vector< MInt > &rotIndex=std::vector< MInt >())
std::vector< std::vector< MFloat > > m_wmImgCoords
MFloat m_static_logData_ic45299_maxF
MBool a_isWindow(const MInt cellId) const
Returns IsWindow of the cell cellId.
MFloat m_restartTimeBc2800
void setActiveFlag(MIntScratchSpace &, const MInt mode, const MInt offset)
Set the flag for the cells needed for near bndry exchange.
const MInt m_azimuthalNearBoundaryBackupMaxCount
void allocateCommunicationMemory()
Allocates and initializes send/receive buffers for multiSolver computations.
MFloat * m_volumeAcceleration
MBool m_createSpongeBoundary
MInt & a_level(const MInt cellId)
Returns the level of the cell from the fvcellcollector cellId.
void initAzimuthalNearBoundaryExchange(MIntScratchSpace &activeFlag)
MInt a_hasNeighbor(const MInt cellId, const MInt dir, const MBool assertNeighborState=true) const
Returns noNeighborIds of the cell CellId for direction dir.
void resetCutOffCells()
resets all Cut-Off Information should only be called before the adaptation and balance!
std::vector< MFloat > m_reconstructionConstants
MBool m_adaptationSinceLastRestart
MBool m_static_constructGFieldPredictor_firstRun
virtual void resetZonalSolverData()
MFloat m_static_logData_ic45301_Strouhal
MFloat timeStep(MBool canSolver=false) noexcept
MFloat ** m_receiveBuffers
MFloat m_weightNearBndryCell
MInt m_lsCutCellBaseLevel
void computeVolumeForces()
MInt & a_bndryId(const MInt cellId)
Returns the bndryId of the cell cellId.
MFloat * m_bodyTemperatureDt1
std::vector< MInt > m_splitCells
MFloat m_static_applyBoundaryCondition_ERhoL2
std::vector< MInt > m_azimuthalHaloActive
void rebuildAzimuthalReconstructionConstants(MInt cellId, MInt offset, MFloat *recCoord, MInt mode=0)
constexpr MBool isMultilevelPrimary() const
Return true if solver is primary solver in multilevel computation.
void reduceVariables()
Check whether any of the extracted cells lie below the halo cell level and interpolate their variable...
MFloat computeDomainLength(MInt direction)
MBool m_static_saveSolverSolutionxd_firstRun
std::array< MInt, Timers::_count > m_timers
MInt m_dragOutputInterval
MFloat m_static_logData_ic45301_maxF
MInt & a_noReconstructionNeighbors(const MInt cellId)
Returns the noRcnstrctnNghbrIds of the cell cellId.
std::vector< MInt > m_azimuthalRemappedNeighborDomains
void tagCellsNeededForSurfaceFlux()
MFloat ** m_sendBuffersNoBlocking
MBool m_vtuDomainIdOutput
MFloat & a_pvariable(const MInt cellId, const MInt varId)
Returns primitive variable v of the cell cellId for variables varId.
MFloat computeRecConstSVD(const MInt cellId, const MInt offset, MFloatScratchSpace &tmpA, MFloatScratchSpace &tmpC, MFloatScratchSpace &weights, const MInt recDim, const MInt, const MInt, const std::array< MBool, nDim > dirs={}, const MBool relocateCenter=false)
compute the reconstruction constants of the given cell by a weighted least-squares approach via singu...
MInt m_noCellsInsideSpongeLayer
MInt * m_noMaxLevelHaloCells
MBool m_static_applyBoundaryCondition_firstRun
MFloat m_spongeLayerThickness
MBool checkNeighborActive(const MInt cellId, const MInt dir) const
Cecks wether the cell cellId has a valid neighbor in direction dir.
MFloat & a_FcellVolume(const MInt cellId) override
Returns the inverse cell volume of the cell from the fvcellcollector cellId.
const MInt & getAssociatedInternalCell(const MInt &cellId) const
Returns the Id of the split cell, if cellId is a split child.
std::vector< CsgPolygon > polygons
Csg(std::vector< CsgPolygon > _polygons)
std::vector< CsgPolygon > intersect(const Csg &csg) const
CsgNode(std::vector< CsgPolygon > _polygons)
void plot(MInt tabCounter, const MChar *fileName)
std::vector< CsgPolygon > clipPolygons(std::vector< CsgPolygon > _polygons)
void clipTo(CsgNode &bsp)
void build(std::vector< CsgPolygon > _polygons)
std::vector< CsgPolygon > allPolygons()
std::vector< CsgPolygon > polygons
CsgPlane(CsgVector abc[nDim])
CsgPlane(CsgVector *_normal, MFloat _w)
void splitPolygon(CsgPolygon *polygon, std::vector< CsgPolygon > *coplanarFront, std::vector< CsgPolygon > *coplanarBack, std::vector< CsgPolygon > *front, std::vector< CsgPolygon > *back) const
void insertCoplanarPolygon(CsgPolygon *polygon, std::vector< CsgPolygon > *coplanarFront, std::vector< CsgPolygon > *coplanarBack) const
static constexpr MFloat eps
CsgPolygon(std::vector< CsgVertex > _vertices, MInt _setIndex, MInt _faceId, MInt _faceType, MInt _bodyId, CsgPlane _plane)
CsgPolygon(std::vector< CsgVertex > _vertices, MInt _setIndex, MInt _faceId, MInt _faceType, MInt _bodyId)
std::vector< CsgVertex > vertices
CsgVector cross(const CsgVector &a) const
CsgVector times(const MFloat a) const
CsgVector minus(const CsgVector &a) const
CsgVector lerp(const CsgVector &a, const MFloat t) const
CsgVector(CsgVector &&) noexcept=default
MFloat dot(const CsgVector &a) const
CsgVector dividedBy(const MFloat a) const
CsgVector cross(const CsgVector &) const
CsgVector(const MFloat *X)
CsgVector plus(const CsgVector &a) const
CsgVector(const CsgVector &Y)
CsgVertex interpolate(CsgVertex *other, MFloat t) const
CsgVertex(const CsgVector &_pos, MInt _vertexId, MInt _setIndex)
cellWithSplitFace(MInt id)
std::vector< splitCartesianFace > splitFaces
polyCutCellBase(MInt cartCell, MFloat *_center)
std::vector< MInt > faces_edges
polyCutCell(MInt cartCell, MFloat *_center)
polyEdge2D(MInt v0, MInt v1, MInt eId, MInt eType, MInt _bodyId)
polyEdge3D(MInt v0, MInt v1, MInt eId, MInt eType)
polyEdgeBase(MInt v0, MInt v1, MInt eId, MInt eType)
std::vector< std::pair< MInt, MInt > > edges
polyFace(MInt fId, MInt fType, MInt _bodyId)
std::list< std::pair< MInt, MInt > > edges
std::vector< MInt > faces
polyVertex(MFloat *coords, MInt pId, MInt pType)
std::set< MInt > surfaceIdentificators
std::vector< MInt > edges
polyVertex(MInt pId, MInt pType)
std::vector< MInt > srfcIds
splitCartesianFace(MInt dir)
void logBoundaryData(const MChar *fileName, MBool forceOutput)
logs several boundary values to the given output file
void resetMbBoundaryCells()
resets all moving boundary cells - STL boundary remains intact
MFloat * m_particleTerminalVelocity
void printDynamicCoefficients(MBool firstRun, MFloat *pressureForce)
void reInitSolutionStep(const MInt mode)
Re-initializes the solver.
MBool(FvMbCartesianSolverXD::* execRungeKuttaStep)()
std::vector< MInt > m_massRedistributionIds
MInt returnNoActiveCorners(MInt)
returns the numer of active Corners for an arbitrary cell (the cell is not a bndryCandidate yet and t...
void applyInitialCondition() override
MFloat * m_slipDataParticleTorque
void copyVarsToSmallCells() override
calls m_fvBndryCnd->copyVarsToSmallCells()
std::vector< MFloat > m_particleQuaternions
void sensorPatch(std::vector< std::vector< MFloat > > &, std::vector< std::bitset< 64 > > &, std::vector< MFloat > &, MInt, MInt) override
MFloat getLevelSetValueNaca00XX(const MFloat *const, const MFloat sign)
MInt m_centralizeSurfaceVariables
MFloat * m_stableCellVolume
MFloat * m_slipDataParticleFluidVelRnd
void initPointParticleProperties()
MFloat * m_sweptVolumeDt1
void initGField()
initializes the level-set data at startup
MFloat * m_boundaryPressureDt1
std::map< MInt, MFloat > m_oldGeomBndryCells
static void computeNormal(const MFloat *p0, const MFloat *p1, MFloat *res, MFloat &w)
returns the normal corresponding to the triangle abc and returns the result in res
std::vector< MFloat > m_particleVelocityDt1
void leastSquaresReconstruction()
Least squares reconstruction.
MInt getAdjacentGridCells(MInt cellId, MInt *adjacentCells)
retrieves all direct and diagonal fluid cell neighbours of the given cell
static constexpr MFloat m_distThresholdStat[m_noMeanStatistics]
void storeAzimuthalPeriodicData(MInt mode=0)
Stored azimuthal periodic data from halo rank on window rank.
void checkCellState()
checks the cell state of the inactive cells based on the nodal ls values if a cell is inactive (level...
MFloat * m_slipDataParticleQuaternion
MInt broadcastSignal(const MInt sender, const MInt signal)
hijacked function to compute gradients in intial condition 122 for pressure poisson equation
static MInt writeGeometryToVtkXmlFile(const MString &fileName)
std::vector< std::tuple< MInt, MInt, MInt > > m_temporarilyLinkedCells
std::vector< MFloat > m_slipDataTimeSteps
MFloat * m_slipDataParticleVel
std::vector< MFloat > m_particleAngularAcceleration
static void matrixProduct(MFloatScratchSpace &C, MFloatScratchSpace &A, MFloatScratchSpace &B)
C=A*B.
MInt writeGeometryToVtkXmlFile(const MString &fileName)
Writes VTK file for the embedded geometry.
void loadRestartFile() override
Loads the restart files.
void computeFlowStatistics(MBool force)
MFloat updateCellVolumeGCL(MInt bndryId)
static MInt locatenear(const Point< nDim > &, MFloat, MInt *, MInt, MBool returnCellId=true)
static void matrixProductTranspose(MFloatScratchSpace &C, MFloatScratchSpace &A, MFloatScratchSpace &B)
C=A*B^t.
MInt ** m_cutFacePointIds
MFloat * m_bodyDataAverage2
MLong * m_azimuthalNearBoundaryBackupBalLong
std::map< MInt, std::vector< MFloat > > m_nearBoundaryBackup
MFloat * m_cellCoordinates
void transferLevelSetFieldValues(MBool)
void initAzimuthalLinkedHaloExc()
Create exchange for all window/halo cells which are used for the azimuthal periodic interpolation.
MFloat * m_sampleCoordinates
std::vector< MInt > * m_linkedWindowCells
MFloat * m_bodyDataAverage
ATTRIBUTES1(ATTRIBUTE_HOT) void distributeFluxToCells() override
MInt m_killSwitchCheckInterval
static void computeRotationMatrix(MFloatScratchSpace &, MFloat *q)
rotation matrix co-rotating(~inertial) frame -> body-fixed frame
static const std::array< MInt, CellDataDlb::count > s_cellDataTypeDlb
void computeSlipStatistics(const MIntScratchSpace &nearestBodies, const MFloatScratchSpace &nearestDist, const MFloat maxDistConstructed)
void exchangeLevelSetData()
void gapCellExchange(MInt)
exchanges variables and wasInactive for gapCells
std::vector< std::vector< MInt > > m_azimuthalLinkedWindowCells
void setBoundaryVelocity()
Sets the boundry velocity at the moving cut-cells. sets: m_primVars[PV->VV[i]] to m_bodyVelocity[i] f...
void buildAdditionalAzimuthalReconstructionStencil(MInt mode=0)
Rebuild azimuthal reconstruction constants for moving boundary cells.
void integrateBodyRotation()
std::vector< MInt > m_refOldBndryCells
ATTRIBUTES1(ATTRIBUTE_HOT) void computeSurfaceValues(MInt timerId
MFloat * m_boundaryDensityDt1
void computeBodySurfaceData(MFloat *pressureForce=nullptr)
computes relevant variables at the moving boundary surface and determines the resulting body force
void finalizeAdaptation() override
void recordBodyData(const MBool &firstRun)
void saveRestartFile(const MBool) override
Saves the restart file.
MFloat * m_cellVolumesDt1
ATTRIBUTES1(ATTRIBUTE_HOT) void computeSurfaceValuesLimited(MInt timerId
void finalizeInitSolver() override
Initializes the solver afer the initialRefinement!
std::vector< MFloat > m_particleCoords
MFloat * m_slipDataParticleFluidVelRotRnd
static constexpr MInt m_noMeanStatistics
void updateInfinityVariables()
update infinity state for certain testcases with constructed level-set field!
void writeVtkDebug(const MString suffix)
MString getConservativeVarName(MInt i)
returns the name of the conservative variable at the given index i
MFloat filterFloat(MFloat number)
filter nan's
MFloat * m_bodyReducedMass
void applyExternalOldSource() override
remove external sources from tho old RHS for new-RungeKutta-scheme for moving boundaries
MFloat * m_bodyQuaternion
MInt m_noFloatDataAdaptation
MFloat * m_slipDataParticleFluidVelGradRnd
virtual void generateBndryCells()
void resetRHSCutOffCells() override
std::vector< MFloat > m_particleCoordsDt1
MFloat * m_azimuthalNearBoundaryBackupBalFloat
void advancePointParticles()
void initSolutionStep(MInt mode) override
Initializes the solver.
MFloat getDistanceSplitSphere(const MInt, const MInt)
determines the level-set value for the given cell provided that the embedded body is spherical
void correctRefinedBndryCell()
correct old-BndryCells which are no-longer leaf-Cells after the adaptation NOTE: mas-conservative upd...
void updateViscousFluxComputation()
corrects the cell-surface distances at the boundary needed for the viscous flux computation
void updateAzimuthalNearBoundaryExchange()
Reset former azimuthal nearBoundaryCells.
void Muscl(MInt timerId=-1) override
Reconstructs the flux on the surfaces.
void setupBoundaryCandidatesAnalytical()
determine all possible fluid boundary cells for a spherical embedded body
ATTRIBUTES1(ATTRIBUTE_HOT) MBool rungeKuttaStepNew()
MFloat * m_bodyAccelerationDt1
void swapCells(const MInt, const MInt) override
MInt m_reconstructionOffset
MInt getFacingNghbrs(const MInt cellId, const MBool includeAllChilds)
determines the neighbors sharing a face with the given cell
void saveParticleSamples()
void updateGhostCellSlopesViscous()
void setCellDataDlb(const MInt dataId, const MFloat *const data) override
Set solver data for DLB.
void computeGhostCellsMb()
creates a ghost cell for all cells near(!) the moving boundary
void saveSolverSolution(const MBool forceOutput=false, const MBool finalTimeStep=false) override
Manages solver-specific output.
std::multimap< MLong, std::pair< std::vector< MFloat >, std::vector< MUlong > > > m_azimuthalNearBoundaryBackup
void initSolver() override
Initializes the solution.
void getBodyRotationDt1(const MInt bodyId, MFloat *bodyRotation)
void setSensors(std::vector< std::vector< MFloat > > &sensors, std::vector< MFloat > &sensorWeight, std::vector< std::bitset< 64 > > &sensorCellFlag, std::vector< MInt > &sensorSolverId) override
MInt loadInitCorrData(const std::vector< MInt > &saveInitCorrDataTimeSteps, MFloatScratchSpace &bodyVelocityInit, MFloatScratchSpace &bodyAngularVelocityInit, MFloatScratchSpace &bodyQuaternionInit, MFloatScratchSpace &velMeanInit, MFloatScratchSpace &velGradMeanInit, MFloatScratchSpace &particleFluidRotationMeanInit, MIntScratchSpace &corrBodies, MFloatScratchSpace &bodyForceInit, MFloatScratchSpace &bodyTorqueInit, const MIntScratchSpace &bodyOffsets)
MInt inverseGJ()
computes the Gauss Jordan matrix inversion of the first DxD-solver of m_A. The inverse A^-1 is stored...
std::vector< MInt > m_bndryCandidateIds
std::vector< MFloat > m_particleAccelerationDt1
void linkBndryCells()
Links bndryCells.
void correctSrfcsMb()
correct surfaces intersected by the moving boundary
void correctMasterSlaveSurfaces()
Removes surfaces between master-slave pairs and reassigns slave cell surfaces required in order to ma...
MFloat * m_bodyReducedVelocity
ATTRIBUTES1(ATTRIBUTE_HOT) MBool rungeKuttaStepStandard()
std::set< MInt > m_bodyWasActuallyInCollision
MFloat * m_bodyDampingCoefficient
void setParticleFluidVelocities(MFloat *=nullptr)
void restoreNeighbourLinks()
restores previously deleted neighbour information and reactivates cells
void applyDirichletCondition()
void saveBodyRestartFile(const MBool backup)
save restart body file
MBool * m_bodyDataCollision
void initBodyVelocities()
MFloat * m_slipDataParticleFluidVelGrad
ATTRIBUTES1(ATTRIBUTE_HOT) void viscousFlux() override
MInt * m_sampleNghbrOffsets
void updateGhostCellSlopesInviscid()
void setAdditionalActiveFlag(MIntScratchSpace &) override
void computeBodyMomentOfInertia()
void generateBndryCellsMb(const MInt mode)
call all routines necessary for the generation of boundary cells mode = -1: default argument,...
MBool m_static_initSolutionStep_frstrn
std::set< MInt > m_freeSurfaceIndices
MFloat * m_bodyReducedFrequency
const MFloat m_azimuthalCornerEps
void computeAzimuthalReconstructionConstants(MInt mode=0) override
Compute the reconstruction constants for azimuthal periodic exchange using a weighted least squares a...
void preSolutionStep(const MInt=-1) override
step before the solver solution Step
std::vector< MInt > * m_gapHaloCells
MBool m_generateOuterBndryCells
void transferBodyState(MInt k, MInt b)
MBool adaptationTrigger() override
void checkNormalVectors()
MFloat * m_volumeFraction
static MFloat sgn(MFloat val)
void commAzimuthalPeriodicData(MInt mode=0)
Send stored azimuthal periodic data from window to halo.
void removeSurfaces(MInt cellId)
removes the surfaces of the given cell
void applyALECorrection()
std::vector< MFloat > m_particleAngularVelocityDt1
MPI_Request * g_mpiRequestMb
void resetRHSNonInternalCells() override
std::vector< CutCandidate< nDim > > m_cutCandidates
void initializeMb()
called by the constructor 1) read additional fvmb properties 2) allocate fvmb specific memory 3) init...
MFloat * m_slipDataParticleFluidVel
void updateMultiSolverInformation(MBool fullReset=false) override
MInt m_noEmergedWindowCells
void buildAdditionalReconstructionStencil()
correct reconstruction stencil for all cells near moving boundaries
MFloat getDistance(const MFloat *const, const MInt)
void allocateBodyMemory(MInt mode=0)
void exchangeAzimuthalOuterNodalValues(std::vector< CutCandidate< nDim > > &candidates, std::vector< MInt > &candidateIds)
Exchange of nodal values of azimuthal periodic halo cells.
MInt m_timeStepAdaptationEnd
void correctCoarsenedBndryCellVolume()
correct BndryCells volume of bndryCells which were a bndryCell on a coarser level before
MInt cellDataTypeDlb(const MInt dataId) const override
void saveInitCorrData(const std::vector< MInt > &saveInitCorrDataTimeSteps, const MFloatScratchSpace &bodyVelocityInit, const MFloatScratchSpace &bodyAngularVelocityInit, const MFloatScratchSpace &bodyQuaternionInit, const MFloatScratchSpace &velMeanInit, const MFloatScratchSpace &velGradMeanInit, const MFloatScratchSpace &particleFluidRotationMeanInit, const MIntScratchSpace &corrBodies, const MFloatScratchSpace &bodyForceInit, const MFloatScratchSpace &bodyTorqueInit, const MIntScratchSpace &bodyOffsets)
MBool m_gapCellExchangeInit
void deleteNeighbourLinks()
deletes links to neighbours tagged inactive
void updateSpongeLayer() override
computes the additional rhs of all cells lying inside the sponge layer to dissipate outgoing waves.
MInt m_pointParticleTwoWayCoupling
void initBndryLayer()
initializes the bndryLayer data and is/was inactive at solver initialisation
GeometryIntersection< nDim > * m_geometryIntersection
MBool hasSplitBalancing() const override
Return if load balancing for solver is split into multiple methods or implemented in balance()
void createCutFaceMb_MGC()
determines the geometric cut-cell data
MInt getAdjacentCellsAllLevels(MInt cellId, MInt *adjacentCells)
retrieves all direct and diagonal fluid cell neighbours of the given cell
void moveSurface(const MInt toSrfcId, const MInt fromSrfcId)
void createPeriodicGhostBodies()
std::vector< MFloat > m_particleHeatFlux
void updateBodyProperties()
update properties of the embedded body (mainly forced structural motion)
void initializeRungeKutta() override
This function loads all terms used by Runge Kutta.
void getCellDataDlb(const MInt dataId, const MInt oldNoCells, const MInt *const bufferIdToCellId, MFloat *const data) override
Return solver data for DLB.
std::vector< MFloat > m_particleTemperature
MInt m_maxBndryLayerLevel
void writeListOfActiveFlowCells() override
stores all cells and surfaces needed for the flux computation
void writeVTKFileOfCell(MInt, const std::vector< polyEdge2D > *, const std::vector< polyVertex > *, MInt)
MBool m_static_createCutFaceMb_MGC_first
void computeNearBodyFluidVelocity(const MIntScratchSpace &nearestBodies, const MFloatScratchSpace &nearestDist, MFloat *vel, MFloat *velGrad, MFloat *rotation, const std::vector< MFloat > &setup=std::vector< MFloat >(), MInt *skipBodies=nullptr, MFloat *meanBodyState=nullptr, MFloat *pressure=nullptr, MFloat *velDt=nullptr, MFloat *rotationDt=nullptr, MFloat *nearestFac=nullptr)
Mean parameters: near body data estimated by weighted filtering procedure All parameters after "setup...
MFloat * m_bodyNeutralCenter
void setGapCellId()
set the gapCellId for gapInitMethod = 0, otherwise handeled in gapHandling!
MFloat temperature(MInt cellId)
temperature
MInt locatenear(const Point< nDim > &pt, MFloat r, MInt *list, MInt nmax, MBool returnCellId=true)
MInt cellDataSizeDlb(const MInt dataId, const MInt gridCellId) override
Return data size to be communicated during DLB for a grid cell and given data id.
MFloat * m_bodyVelocityDt2
void initializeMaxLevelExchange() override
update window/halo cell collectors
FvBndryCndXD< nDim, SysEqn > * m_fvBndryCnd
void compVolumeIntegrals(std::vector< polyCutCell > *, std::vector< polyEdge2D > *, const std::vector< polyVertex > *)
void getBodyRotation(const MInt bodyId, MFloat *bodyRotation)
void writeVtkXmlFiles(const MString fileName, const MString GFileName, MBool regularOutput, MBool diverged) override
write flow variables as XML VTK files
void resetSolver() override
Reset the solver prior to load balancing.
MFloat m_stableVolumeFraction
void writeVtkXmlOutput(const MString &fileName, MBool debugOutput=false)
write flow variables as XML VTK
void determineNearBndryCells()
determines cells at the boundary (i.e. boundary cells and their direct neighbors)
MFloat m_bodyDistThreshold
MBool rungeKuttaStep() override
calls a Runge Kutta substep
std::vector< MInt > m_azimuthalBndryCandidates
void updateCellSurfaceDistanceVectors()
correct the cell-surface distance vectors for cells near the moving boundary
static constexpr MFloat FD
void balancePre() override
Reinitialize solver for DLB prior to setting solution data.
MFloat * m_slipDataParticlePosition
void readStlFile(const MChar *fileName, MBool readNormals)
read specified STL file
void balancePost() override
Reinitialize solver after setting solution data in DLB.
void computeBodyVolume(MFloatScratchSpace &partVol)
void loadBodyRestartFile(MInt)
load restart body file readMode = 0 : do not read the cellVolume from file (read only bodyData) readM...
ATTRIBUTES1(ATTRIBUTE_HOT) MBool rungeKuttaStepNewLocalTimeStepping()
MInt m_onlineRestartInterval
void adaptTimeStep()
computes the time step
void createSurfaceSplit(MInt srfcId, MInt cellId, MInt splitChildId, MInt direction)
restores the surfaces of the given cell
void restoreSurfaces(const MInt cellId)
restores the surfaces of the given cell
void applyExternalSource() override
Add external sources to the RHS for new-RungeKutta-scheme for moving boundaries differs from the base...
void checkBoundaryCells()
performs an integrety check of the boundary cells
MBool test_face(MInt, MInt, MInt)
Test a face (MarchingCubes helper routine) receives MAIA face if face>0 return true if the face conta...
static MFloat distancePointEllipseSpecial(const MFloat e[2], const MFloat y[2], MFloat x[2])
MInt getEqualLevelNeighbors(MInt cellId, MInt(&nghbrs)[27])
retrieves all direct and diagonal fluid cell neighbours of the given cell
void checkGapCells()
determines Gap-state, and organises GapCells
std::vector< MInt > m_particleGlobalId
void getNormalSphere(const MInt, const MInt, MFloat[])
MBool constructGFieldCorrector()
determine the displacement of the embedded body – corrector step
std::set< MInt > m_bodyWasInCollision
MFloat ** m_maxBndryLayerDistances
MInt ** m_noCutFacePoints
void initGapCellExchange()
creates the gap-cell exchange communicators based on initializeMaxLevelExchange
MFloat * m_cellVolumesDt2
void computeBoundarySurfaceForces()
static void setAdditionalCellProperties()
set the properties of cells and determines the state of halo cells
void initEmergingGapCells()
initializes variables of cells which occur in a freshly opened gap (valve gap etc....
void updateSplitParentVariables() override
MFloat * m_slipDataParticleAngularVel
void localToGlobalIds() override
Change local into global ids.
void advanceBodies()
advances the time and stores the flow variables
const MFloat m_gammaMinusOne
void applyNeumannCondition()
void resetSolverFull() override
resets the solver
void initializeEmergedCells()
initializes variables of cells which recently became active and therefore have no up-to-date history ...
std::vector< MFloat > m_massRedistributionRhs
std::vector< MFloat > m_particleRadii
MFloat m_capacityConstantVolumeRatio
void finalizeBalance() override
Reinitialize solver after all data structures have been recreated.
MBool solutionStep() override
Performs the solutionStep of the FVMB solver the loop over the different RK-steps is done in the exec...
void resetSolverMb()
resets the solver to an empty domain without moving boundary
MFloat checkAreaDiff(MInt srfcId1, MInt srfcId2)
MInt m_static_createCutFaceMb_MGC_bodyFaceJoinMode
std::vector< MFloat > m_massRedistributionSweptVol
std::vector< MFloat > m_massRedistributionVolume
void setCellWeights(MFloat *) override
set static cell weights for solver cells, which are used for the domain decomposition
void getNormalEllipsoid(const MInt, const MInt, MFloat[])
void setOldGeomBndryCellVolume()
set bndryCell volume from m_oldGeomBndryCells which is read from bodyRestartFile at initSolver and th...
static MFloat computeNormal(const MFloat *p0, const MFloat *p1, const MFloat *p2, MFloat *res, MFloat &w)
returns the normal corresponding to the triangle abc and returns the result in res
void setGapOpened()
sets the global-Trigger m_gapOpened, to determine if Gap-Cells are opened! old and incorrect version!...
std::vector< MFloat > m_particleTemperatureDt1
MInt getAdjacentCellsExtended(MInt cellId, MInt *adjacentCells)
retrieves the first two layers of direct and diagonal fluid cell neighbours of the given cell
void computeLocalBoundingBox()
static void crossProduct(MFloat *c, MFloat *a, MFloat *b)
computes the cross product c <- (a x b) for a, b, c in R^3
void checkHaloBndryCells(MBool sweptVol)
void compFaceIntegrals(polyCutCell *, std::vector< polyEdge2D > *, const std::vector< polyVertex > *, MInt, MInt)
void computeNodalLSValues()
compute the level-set values at the mesh vertices
void constructGField(MBool updateBody=true)
manually constructs the level-set field after each time step
MFloat getDistanceEllipsoid(const MFloat *const, const MInt)
void correctRefinedBndryCellVolume()
correct BndryCells volume of bndryCells which were a bndryCell on a coarser level before
void compProjectionIntegrals(polyCutCell *, std::vector< polyEdge2D > *, const std::vector< polyVertex > *, MInt, MInt, MFloat *)
compute various integrations over projection of face
MFloat getDistancePiston(const MFloat *const, const MInt)
void setTimeStep() override
calls sets() and stores the time step for all cells
void advanceExternalSource() override
advance external sources
void addBoundarySurfacesMb()
adds a surface for the ghost-boundary cell intersections
MString getPrimitiveVarName(MInt i)
returns the name of the primitive variable at the given index i
std::vector< MInt > m_particleCellLink
void updateGeometry()
Updates the member-variables in the geometry-intersection class.
MFloat * m_bodyQuaternionDt1
MInt createSplitCell(MInt cellId, MInt noSplitChilds)
MLong getNumberOfCells(MInt mode)
mode=0: total mode=1: min mode=2: max mode=3: average
MBool fileExists(const MChar *fileName)
MBool gridPointIsInside(MInt, MInt) override
std::vector< MFloat > m_particleAngularAccelerationDt1
void getBoundaryDistance(MFloatScratchSpace &) override
ATTRIBUTES1(ATTRIBUTE_HOT) void LSReconstructCellCenter() override
std::vector< MFloat > m_particleVelocityFluid
MBool maxResidual(MInt mode=0) override
Computes the maxResiduum for all cells.
MFloat * m_bodyAngularVelocityDt1
typename maia::grid::tree::Tree< nDim >::Cell Cell
static constexpr MInt m_noCellNodes
std::vector< MFloat > m_particleQuaternionsDt1
void writeVtkXmlOutput_MGC(const MString &fileName)
write flow variables as XML VTK
void applyBoundaryCondition() override
dummy, since applyBoundaryCondition() it is placed wrong for moving boundary problems,...
void prepareAdaptation() override
std::vector< MFloat > m_particleVelocity
MInt m_noAzimuthalBndryCandidates
std::vector< MFloat > m_particleAngularVelocity
std::vector< MFloat > m_massRedistributionVariables
MInt createBndryCellMb(MInt cellId)
creates a moving boundary cell for the given cell
MFloat * m_bodyCenterInitial
void descendDistance(const MInt cellId, const MInt *const bodyIds, const MInt bodyCnt, MIntScratchSpace &nearestBodies, MFloatScratchSpace &nearestDist)
void computeReconstructionConstants() override
computes the reconstruction constants using inverse distance weighted least squares
std::vector< MFloat > m_movingPosDiff
MFloat CalculateLSV(MInt, MIntScratchSpace &)
Calculate LevelSetValue with an Approximation of the Neighbours for a grid in the NarrowBand.
MInt constructDistance(const MFloat deltaMax, MIntScratchSpace &nearestBodies, MFloatScratchSpace &nearestDist)
MInt * m_slipDataParticleCollision
MInt * m_fixedBodyComponents
void crankAngleSolutionOutput()
save a full solutionOutput at timeSteps closesed to a specified crankAngle Interval save a solution s...
void deleteSurface(MInt srfcId)
removes the surfaces of the given cell
std::set< MInt > m_coarseOldBndryCells
void logOutput()
logs several collector sizes
std::vector< MFloat > m_particleVelocityGradientFluid
void advanceSolution()
advances the time and stores the flow variables
MFloat * m_bodyAngularAccelerationDt1
MFloat interpolateLevelSet(MInt *, MFloat *, MInt)
interpolates levelset function to a given coordinate
MFloat distancePointEllipsoidSpecial(const MFloat e[3], const MFloat y[3], MFloat x[3])
MInt checkNeighborActivity(MInt)
ckecks that a new bndry-Cell has at least one neighbor which was active before if this is not the cas...
void setRungeKuttaFunctionPointer()
This function sets the function pointers for rungeKutta (also used in splitBalance)
ATTRIBUTES1(ATTRIBUTE_HOT) void resetRHS() override
void writeVTKFileOfCutCell(MInt, std::vector< polyCutCell > *, const std::vector< polyEdge2D > *, const std::vector< polyVertex > *, MInt)
std::vector< MInt > * m_linkedHaloCells
MFloat * m_bodyTerminalVelocity
void getNormal(const MInt, const MInt, MFloat[])
MFloat m_couplingRateViscous
static MFloat CdLaw(MFloat Re)
void refineCell(const MInt) override
void computeCutPointsMb_MGC()
Computes cutpoints of zero level-set with grid edges and creates boundary cells for cut-cells.
MFloat getDistanceTetrahedron(const MFloat *const, const MInt)
void checkDiv() override
Check for divergence in case we use MB_DEBUG or debug.
MFloat * m_bodySumAverage
MBool prepareRestart(MBool, MBool &) override
Prepare the solvers for a grid-restart.
MFloat * m_slipDataParticleFluidVelRot
void updateCellSurfaceDistanceVector(MInt srfcId)
correct the cell-surface distance vectors for cells near the moving boundary
MFloat * m_bodyDataDevAverage
std::vector< MFloat > m_oldBodyPosition
void updateLinkedCells()
update the temporarly-linked cells
std::vector< std::vector< MInt > > m_azimuthalLinkedHaloCells
void saveParticleSlipData()
MFloat * m_bodyMomentOfInertia
static void matrixProductTranspose2(MFloatScratchSpace &C, MFloatScratchSpace &A, MFloatScratchSpace &B)
C=A^t*B.
void constructGFieldPredictor()
determine the displacement of the embedded body – predictor step
void descendLevelSetValue(const MInt cellId, const MInt *const bodyIds, const MInt bodyCnt)
KDtree< nDim > * m_bodyTree
MInt * m_fixedBodyComponentsRotation
MInt m_maxNoEmbeddedBodiesPeriodic
MFloat getDistanceSphere(const MFloat *const, const MInt)
MInt m_maxNoSurfacePointSamples
MFloat m_oldMeanState[m_noMeanStatistics][4]
MBool m_buildCollectedLevelSetFunction
MBool m_alwaysResetCutOff
void computeAzimuthalHaloNodalValues()
init exchange of nodal values of azimuthal periodic halo cells
MFloat * m_bodyAccelerationDt3
MFloat * m_bodyVelocityDt1
MInt copyFile(const MChar *fromName, const MChar *toName)
std::vector< MFloat > m_particleCoordsInitial
void determineBndryCandidates()
determine all possible fluid boundary cells for a generic embedded body
void setLevelSetMbCellProperties()
determines relevant cell properties
std::vector< MFloat > m_candidateNodeValues
MFloat * m_surfaceVariables
MFloat m_addedMassCoefficient
void balance(const MInt *const noCellsToReceiveByDomain, const MInt *const noCellsToSendByDomain, const MInt *const targetDomainsByCell, const MInt oldNoCells) override
Balance the solver.
std::map< MInt, MFloat > m_oldBndryCells
std::vector< MInt > m_particleOffsets
std::vector< Point< nDim > > m_bodyCentersLocal
void gapHandling()
determines Gap-state, and organises GapCells
MString printTime(const MFloat t)
MFloat determineCoupling(MFloatScratchSpace &coupling)
MFloat m_previousTimeStep
MInt m_maxBndryLayerWidth
void reIntAfterRestart(MBool) override
void setOuterBoundaryGhostCells()
MInt m_reConstSVDWeightMode
void updateGapBoundaryCells()
set the velocity at gap-Boundary-Cells due to the irregular movement of the gap-surface during wideni...
MFloat getDistanceNaca00XX(const MInt, const MInt)
static void matrixVectorProduct(MFloat *c, MFloatScratchSpace &A, MFloat *b)
c=A*b
void computeForceCoefficients(MFloat *&)
dummy
MBool m_trackBodySurfaceData
std::vector< MInt > m_azimuthalWasNearBndryIds
MInt getAdjacentCells(MInt cellId, MInt *adjacentCells)
retrieves all direct and diagonal fluid cell neighbours of the given cell
void rebuildReconstructionConstants(MInt cellId)
computes the reconstruction constants using inverse distance weighted least squares
std::vector< MInt > m_azimuthalBndryCandidateIds
void setOuterBoundarySurfaces()
MInt m_particleSamplingInterval
std::vector< Point< nDim > > m_bodyCenters
MFloat distEllipsoidEllipsoid(const MInt k0, const MInt k1, MFloat *xc0, MFloat *xc1)
Compute the distance between two ellipsoids by iteratively searching the nearest point on the respect...
MFloat * m_bodyAccelerationDt2
MFloat m_periodicGhostBodyDist
std::vector< MFloat > m_particleFluidTemperature
void setBodyQuaternions(const MInt bodyId, MFloat *bodyRotation)
MInt * m_receiveBufferSize
MInt getNewSurfaceId()
returns a new surface id
void rebuildKDTreeLocal()
std::vector< MFloat > m_particleShapeParams
std::vector< MInt > * m_periodicGhostBodies
void initAnalyticalLevelSet()
This function creats the bodyTree for analytical LevelSets.
void interpolateGapBodyVelocity()
sets the interpolated velocity for a bndryCell NOTE: all neighbors need to be available for levelset-...
void exchangeNodalLSValues()
std::vector< MInt > m_bndryLayerCells
void initBodyProperties()
initialize properties of the embedded body at startup
std::vector< MFloat > m_particleAcceleration
void createSurface(MInt srfcId, MInt nghbrId0, MInt nghbrId1, MInt orientation)
restores the surfaces of the given cell
KDtree< nDim > * m_bodyTreeLocal
MBool m_conservationCheck
void applyBoundaryConditionMb()
applies the boundary condition at all boundaries
void resetSurfaces() override
ATTRIBUTES1(ATTRIBUTE_HOT) void exchange() override
static constexpr MInt m_noAngleSetups
MBool inside(MFloat x, MFloat a, MFloat b)
void writeStencil(const MInt bndryId)
void applyBoundaryConditionSlope()
void updateLevelSetOutsideBand()
computes an approximate level set value for cells outside the level-set computing band
void preTimeStep() override
Performs the preTimeStep of the FVMB solver.
MBool postSolutionStep() override
step after the solver solution Step
std::vector< MInt > * m_gapWindowCells
std::vector< MInt > m_forceFVMBStatistics
std::vector< MInt > m_bndryCandidates
MFloat distancePointEllipsoid(const MFloat e[3], const MFloat y[3], MFloat x[3])
ATTRIBUTES1(ATTRIBUTE_HOT) void Ausm() override
MFloat * m_surfaceCoordinates
MBool m_applyCollisionModel
void resetSlopes()
does what it says
void prepareNextTimeStep() override
Updates the old Variables, the body positions and the increases the time.
MInt m_noSurfacePointSamples
MBool m_static_initSolutionStep_firstRun
MInt m_noOuterBoundarySurfaces
MFloat m_static_createCutFaceMb_MGC_maxA
void checkHaloCells(MInt mode=0)
Checks a couple of important properties and variables of halo-cells.
MFloat checkCentroidDiff(MInt srfcId1, MInt srfcId2)
void writeVtkErrorFile()
write flow variables as XML VTK files
MInt m_initialSurfacesOffset
MFloat * m_slipDataParticleForce
MInt m_bodySamplingInterval
MInt m_noPointParticlesLocal
~FvMbCartesianSolverXD() override
void createInitialSrfcs()
computes initial set of internal grid surfaces
MFloat distancePointEllipsoidSpecial2(const MFloat e[3], const MFloat y[3], MFloat x[3])
void postAdaptation() override
void outputPolyData(const MInt, const std::vector< polyCutCell > *, const std::vector< polyEdge2D > *, const std::vector< polyVertex > *, MInt)
void postTimeStep() override
Performs the postTimeStep of the FVMB solver.
void setCellProperties() override
set the properties of cells and determines the state of halo cells
void removeChilds(const MInt) override
static constexpr MInt m_noDistSetups
void computeVolumeFraction()
computes the volume fraction V/h^d and the level-set value in the volumetric center of all boundary c...
MInt m_timeStepAdaptationStart
MInt m_noFloatDataBalance
MFloat m_couplingRateLinear
void correctBoundarySurfaceVariablesMb()
sets boundary surface variables to their correct values
std::vector< MInt > m_candidateNodeSet
MInt noCellDataDlb() const override
Methods to inquire solver data information.
void exchangeLinkedHaloCellsForAzimuthalReconstruction()
Create exchange for all window/halo cells which are used for the azimuthal periodic interpolation.
void updateAzimuthalMaxLevelRecCoords()
Update reconstruction coordinate for azimuthal halo cells on max level This is done because of moving...
MFloat m_couplingRatePressure
MBool m_writeCenterLineData
MBool m_applyRotationalCollisionModel
static void matrixVectorProductTranspose(MFloat *c, MFloatScratchSpace &A, MFloat *b)
c=A^t*b
This class is a ScratchSpace.
MString outputDir() const
Return the directory for output files.
std::set< MInt > m_solutionTimeSteps
virtual MInt domainId() const
Return the domainId (rank)
virtual MBool isActive() const
MPI_Comm mpiComm() const
Return the MPI communicator used by this solver.
MFloat * m_outerBandWidth
MInt solverId() const
Return the solverId.
MBool m_useNonSpecifiedRestartFile
MInt m_restartInterval
The number of timesteps before writing the next restart file.
MString getIdentifier(const MBool useSolverId=false, const MString preString="", const MString postString="_")
MInt m_residualInterval
The number of timesteps before writing the next residual.
const MInt m_solverId
a unique solver identifier
virtual MInt noDomains() const
MInt m_solutionInterval
The number of timesteps before writing the next solution file.
MString restartDir() const
Return the directory for restart files.
MFloat m_Re
the Reynolds number
MFloat m_Ma
the Mach number
MInt noWindowCells(const MInt domainId) const
MInt minLevel() const
Read-only accessors for grid data.
constexpr GridProxy & grid() const
MLong domainOffset(const MInt id) const
void collectVariables(T *variablesIn, ScratchSpace< T > &variablesOut, const std::vector< MString > &variablesNameIn, std::vector< MString > &variablesNameOut, const MInt noVars, const MInt noCells, const MBool reverseOrder=false)
generalised helper function for writing restart files! This is necessary for example if the minLevel ...
MInt maxRefinementLevel() const
void extractPointIdsFromGrid(Collector< PointBasedCell< nDim > > *&, Collector< CartesianGridPoint< nDim > > *&, const MBool, const std::map< MInt, MInt > &, MInt levelThreshold=999999, MFloat *bBox=nullptr, MBool levelSetMb=false) const
Creates a list of unique corner points for all cells using a hash map levelThreshold optionally speci...
void collectParameters(T, ScratchSpace< T > &, const MChar *, std::vector< MString > &)
This function collects a single parameters for the massivley parallel IO functions.
MInt noHaloCells(const MInt domainId) const
MBool isActive() const override
MInt windowCellId(const MInt domainId, const MInt cellId) const
MInt noNeighborDomains() const
MInt haloCellId(const MInt domainId, const MInt cellId) const
MInt maxUniformRefinementLevel() const
MInt neighborDomain(const MInt id) const
MInt maxNoGridCells() const
void exchangeData(T *data, const MInt dataBlockSize=1)
Exchange memory in 'data' assuming a solver size of 'dataBlockSize' per cell.
MInt noHaloLayers() const
MInt minCell(const MInt id) const
MInt m_adaptationInterval
FvCell
FV cell Property Labels.
constexpr MLong IPOW2(MInt x)
std::basic_string< char > MString
std::bitset< p(FvCell::NumProperties)> BitsetType
static constexpr const MInt count
MInt locatenear(Point< DIM > pt, MFloat r, MInt *list, MInt nmax, MBool returnCellId=true)