PostprocessData update

Modifications on fieldsDataBase to work both during simulation and post-simulation
Some bug fixes and changes to the code based
Correction for region volume
This commit is contained in:
Hamidreza
2025-04-18 15:32:53 +03:30
parent 61be8c60fb
commit d69203168e
44 changed files with 1065 additions and 383 deletions

View File

@ -154,11 +154,34 @@ public:
).getVal<word>("field"))
{}
IncludeMask(
const word& type,
const dictionary& dict,
fieldsDataBase& feildsDB)
:
includeMask(type, dict, feildsDB),
operator_(dict.subDict(operatorName()+"Info")),
fieldName_(
dict.subDict
(
operatorName()+"Info"
).getVal<word>("field"))
{}
/// Add virtual constructor pattern for creating instances
add_vCtor(
add_vCtor
(
includeMask,
IncludeMask,
dictionary);
dictionary
);
add_vCtor
(
includeMask,
IncludeMask,
word
);
/// Returns the mask for filtering elements (updates the mask if necessary)
Mask getMask() override
@ -203,20 +226,40 @@ public:
TypeInfoTemplate12("IncludeMask", T, allOp<int8>);
IncludeMask(
const dictionary& opDict,
IncludeMask(
const dictionary& opDict,
fieldsDataBase& feildsDB)
:
includeMask(opDict, feildsDB)
{
:
includeMask(opDict, feildsDB)
{
span<realx3> s = database().updatePoints();
mask_.resize(s.size(), true);
}
}
add_vCtor(
includeMask,
IncludeMask,
dictionary);
IncludeMask(
const word& type,
const dictionary& opDict,
fieldsDataBase& feildsDB)
:
includeMask(type, opDict, feildsDB)
{
span<realx3> s = database().updatePoints();
mask_.resize(s.size(), true);
}
add_vCtor
(
includeMask,
IncludeMask,
dictionary
);
add_vCtor
(
includeMask,
IncludeMask,
word
);
Mask getMask()override
{

View File

@ -57,7 +57,7 @@ pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
auto& maskDict = opDict.subDict(mask+"Info");
word maskField = maskDict.getVal<word>("field");
if( !fieldsDB.getPointFieldType(maskField, fieldType) )
if( !fieldsDB.getFieldType(maskField, fieldType) )
{
fatalErrorInFunction<<"Error in retriving the type of field"
<< maskField <<" from dictionary "
@ -111,7 +111,7 @@ pFlow::uniquePtr<pFlow::includeMask>
auto& maskDict = opDict.subDict(type+"Info");
word maskField = maskDict.getVal<word>("field");
if( !fieldsDB.getPointFieldType(maskField, fieldType) )
if( !fieldsDB.getFieldType(maskField, fieldType) )
{
fatalErrorInFunction<<"Error in retriving the type of field"
<< maskField <<" from dictionary "
@ -143,7 +143,7 @@ pFlow::uniquePtr<pFlow::includeMask>
method << " dose not exist. \n"
<<"Avaiable ones are: \n\n"
,
dictionaryvCtorSelector_
wordvCtorSelector_
);
fatalExit;
return nullptr;