Merge pull request #149 from PhasicFlow/develop

Binary conversion from pointFiled files to vtk format
This commit is contained in:
PhasicFlow
2025-01-09 19:20:25 +03:30
committed by GitHub
17 changed files with 530 additions and 106 deletions

View File

@ -167,6 +167,11 @@ pFlow::fileSystem pFlow::fileSystem::canonical
return res;
}
pFlow::fileSystem pFlow::fileSystem::relative(const fileSystem &base)const
{
return fileSystem( std::filesystem::relative(path_, base.path_));
}
bool pFlow::fileSystem::dirExist
(
) const

View File

@ -175,6 +175,9 @@ public:
/// Canonical path of this (it should exist)
fileSystem canonical()const;
/// relative path of this this with respect to base
fileSystem relative(const fileSystem& base)const;
/// Only operate on dir path
/// Check if the dir path exists
bool dirExist()const;

View File

@ -36,9 +36,9 @@ pFlow::pointSorting::pointSorting(const dictionary & dict)
)
{
if( performSorting_() )
REPORT(1)<<"Point sorting is "<<Yellow_Text("active")<<" in simulation"<<END_REPORT;
REPORT(2)<<"Point sorting is "<<Yellow_Text("active")<<" in simulation"<<END_REPORT;
else
REPORT(1)<<"Point sorting is "<<Yellow_Text("inactive")<<" in simulation"<<END_REPORT;
REPORT(2)<<"Point sorting is "<<Yellow_Text("inactive")<<" in simulation"<<END_REPORT;
}
pFlow::uint32IndexContainer

View File

@ -113,7 +113,7 @@ pFlow::pointStructure::pointStructure
(
simulationDomain::create(control)
),
pointSorting_(simulationDomain_->subDictOrCreate("pointSorting")),
//pointSorting_(simulationDomain_->subDictOrCreate("pointSorting")),
boundaries_
(
*this
@ -130,6 +130,8 @@ pFlow::pointStructure::pointStructure
"Error in reading from file "<<IOobject::path()<<endl;
fatalExit;
}
pointSorting_ = makeUnique<pointSorting>(simulationDomain_->subDictOrCreate("pointSorting"));
}
@ -155,7 +157,7 @@ pFlow::pointStructure::pointStructure(
(
simulationDomain::create(control)
),
pointSorting_(simulationDomain_->subDictOrCreate("pointSorting")),
//pointSorting_(simulationDomain_->subDictOrCreate("pointSorting")),
boundaries_
(
*this
@ -167,15 +169,16 @@ pFlow::pointStructure::pointStructure(
"Error in seting up pointStructure"<<endl;
fatalExit;
}
pointSorting_ = makeUnique<pointSorting>(simulationDomain_->subDictOrCreate("pointSorting"));
}
bool pFlow::pointStructure::beforeIteration()
{
const timeInfo ti = TimeInfo();
if(pointSorting_.sortTime(ti.iter(), ti.t(), ti.dt()))
if(pointSorting_().sortTime(ti.iter(), ti.t(), ti.dt()))
{
auto sortedIndices = pointSorting_.getSortedIndices(
auto sortedIndices = pointSorting_().getSortedIndices(
simulationDomain_().globalBox(),
pointPositionDevice(),
activePointsMaskDevice()

View File

@ -54,7 +54,7 @@ private:
//// - data members
uniquePtr<simulationDomain> simulationDomain_ = nullptr;
pointSorting pointSorting_;
uniquePtr<pointSorting> pointSorting_ = nullptr;
boundaryList boundaries_;