postprocessPhasicFlow

This commit is contained in:
hamidrezanorouzi
2022-09-26 11:08:03 +03:30
parent febe2ecc4c
commit f36a4d7782
36 changed files with 2678 additions and 110 deletions

View File

@ -38,12 +38,12 @@ public:
protected:
// - domain
box domain_;
box domain_{realx3(0.0), realx3(1.0)};
// - cell size
real cellSize_;
realx3 cellSize_{1,1,1};
CellType numCells_;
CellType numCells_{1,1,1};
// - protected methods
@ -69,12 +69,29 @@ public:
calculate();
}
INLINE_FUNCTION_H
cells(const box& domain, int32 nx, int32 ny, int32 nz)
:
domain_(domain),
cellSize_(
(domain_.maxPoint() - domain_.minPoint())/realx3(nx, ny, nz)
),
numCells_(nx, ny, nz)
{}
INLINE_FUNCTION_HD
cells(const cells&) = default;
INLINE_FUNCTION_HD
cells& operator = (const cells&) = default;
INLINE_FUNCTION_HD
cells(cells &&) = default;
INLINE_FUNCTION_HD
cells& operator=(cells&&) = default;
cells getCells()const
{
return *this;
@ -87,8 +104,15 @@ public:
calculate();
}
INLINE_FUNCTION_H
void setCellSize(realx3 cellSize)
{
cellSize_ = cellSize;
calculate();
}
INLINE_FUNCTION_HD
real cellSize()const
realx3 cellSize()const
{
return cellSize_;
}
@ -124,6 +148,11 @@ public:
static_cast<int64>(numCells_.y())*
static_cast<int64>(numCells_.z());
}
const auto& domain()const
{
return domain_;
}
INLINE_FUNCTION_HD
CellType pointIndex(const realx3& p)const
@ -221,9 +250,6 @@ public:
min( domain_.maxPoint().z(), max(domain_.minPoint().z(),p.z()))
);
}
};