mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-07-28 03:27:05 +00:00
updates for rectMesh in postprocess
This commit is contained in:
@ -85,9 +85,12 @@ pFlow::postprocessData::rectMeshRegionPoints::rectMeshRegionPoints
|
||||
:
|
||||
regionPoints(dict, fieldsDataBase),
|
||||
boxRegion_(dict.subDict("rectMeshInfo")),
|
||||
cellExtension_(dict.subDict("rectMeshInfo").getValOrSet<real>("cellExtension", 2.0)),
|
||||
pointsOnCells_("selectedPoints"),
|
||||
selectedPoints_(pointsOnCells_)
|
||||
{
|
||||
cellExtension_ = max(cellExtension_, one);
|
||||
|
||||
const auto& rectMeshInfo = dict.subDict("rectMeshInfo");
|
||||
|
||||
auto nx = rectMeshInfo.getValMax<uint32>("nx", 1);
|
||||
@ -124,10 +127,12 @@ pFlow::postprocessData::rectMeshRegionPoints::rectMeshRegionPoints
|
||||
}
|
||||
}
|
||||
|
||||
void pFlow::postprocessData::rectMeshRegionPoints::setRegionExtension(real ext)
|
||||
void pFlow::postprocessData::rectMeshRegionPoints::applyRegionExtension()
|
||||
{
|
||||
regionExtension_ = max(one, ext);
|
||||
real vf = pow(regionExtension_, 3);
|
||||
// it cannot be lower than 1
|
||||
cellExtension_ = max(one, cellExtension_);
|
||||
|
||||
real vf = pow(cellExtension_, 3);
|
||||
for(auto& v:volumes_)
|
||||
{
|
||||
v *= vf;
|
||||
@ -135,7 +140,7 @@ void pFlow::postprocessData::rectMeshRegionPoints::setRegionExtension(real ext)
|
||||
|
||||
for(auto& d:diameter_)
|
||||
{
|
||||
d *= regionExtension_;
|
||||
d *= cellExtension_;
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +168,7 @@ bool pFlow::postprocessData::rectMeshRegionPoints::update()
|
||||
}
|
||||
|
||||
// search beyound cells is not required
|
||||
if( equal(regionExtension_,one))
|
||||
if( equal(cellExtension_,one))
|
||||
{
|
||||
selectedPoints_ = pointsOnCells_;
|
||||
return true;
|
||||
|
@ -50,7 +50,7 @@ class rectMeshRegionPoints
|
||||
private:
|
||||
|
||||
/// box object defining the region for point selection
|
||||
box boxRegion_;
|
||||
box boxRegion_;
|
||||
|
||||
/// store the cells that are inside the box region
|
||||
cellMapper mapper_;
|
||||
@ -59,10 +59,12 @@ private:
|
||||
realx3Vector centerPoints_;
|
||||
|
||||
/// Volume of each cell in the rectMesh region
|
||||
realVector volumes_;
|
||||
realVector volumes_;
|
||||
|
||||
/// Diameter of each cell in the rectMesh region
|
||||
realVector diameter_;
|
||||
realVector diameter_;
|
||||
|
||||
real cellExtension_;
|
||||
|
||||
Vector<uint32Vector> pointsOnCells_;
|
||||
|
||||
@ -121,7 +123,13 @@ public:
|
||||
return volumes_.empty();
|
||||
}
|
||||
|
||||
void setRegionExtension(real ext) override;
|
||||
void applyRegionExtension() override;
|
||||
|
||||
|
||||
real regionExtensionRatio()const override
|
||||
{
|
||||
return cellExtension_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the volume of the rectMesh region
|
||||
|
@ -49,15 +49,10 @@ class fieldsDataBase;
|
||||
*/
|
||||
class regionPoints
|
||||
{
|
||||
using PointsTypeHost = typename pointStructure::PointsTypeHost;
|
||||
using PointsTypeHost = typename pointStructure::PointsTypeHost;
|
||||
|
||||
/// Reference to the fields database containing simulation data
|
||||
fieldsDataBase& fieldsDataBase_;
|
||||
|
||||
protected:
|
||||
|
||||
/// extends the search radius to a distance farther than the region
|
||||
real regionExtension_ = 1.0;
|
||||
fieldsDataBase& fieldsDataBase_;
|
||||
|
||||
public:
|
||||
|
||||
@ -97,9 +92,15 @@ public:
|
||||
/// by default it does nothing
|
||||
/// But, it can be used for the methods that needs to search for
|
||||
/// particles which are beyound the region
|
||||
virtual void setRegionExtension(real ext)
|
||||
virtual void applyRegionExtension()
|
||||
{}
|
||||
|
||||
virtual
|
||||
real regionExtensionRatio()const
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
/// @brief volume of elements
|
||||
/// @return sapn for accessing the volume of elements
|
||||
virtual
|
||||
|
Reference in New Issue
Block a user