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

@ -30,7 +30,14 @@ pFlow::postprocessData::postprocessData(const systemControl &control)
:
auxFunctions(control),
time_(control.time()),
fieldsDataBase_(control.time(), true),
fieldsDataBasePtr_
(
fieldsDataBase::create
(
const_cast<systemControl&>(control),
true
)
),
dict_
(
objectFile
@ -73,6 +80,12 @@ pFlow::postprocessData::postprocessData(const systemControl &control)
control.time().saveInterval(),
"execution");
}
shapeType_ = dict_.getValOrSet<word>
(
"shapeType",
word("sphere")
);
componentsDictsPtr_ = makeUnique<dictionaryList>(readDictList("components", dict_));
@ -80,7 +93,7 @@ pFlow::postprocessData::postprocessData(const systemControl &control)
{
postprocesses_.push_back( postprocessComponent::create(
compDict,
fieldsDataBase_,
fieldsDataBasePtr_(),
defaultTimeControlPtr_() ));
}

View File

@ -57,11 +57,14 @@ class postprocessData
const Time& time_;
/// Database for all the points fields on the host
fieldsDataBase fieldsDataBase_;
uniquePtr<fieldsDataBase> fieldsDataBasePtr_;
/// file dictionary that is constructed from the file (postProcessDataDict)
fileDictionary dict_;
/// name of the shape for use in the time of postprocess after simulation
word shapeType_;
/// list of dictionaries for postprocess components
uniquePtr<dictionaryList> componentsDictsPtr_ = nullptr;

View File

@ -27,7 +27,7 @@ namespace pFlow::postProcessGlobals
{
static fileSystem defaultDir__;
inline const word defaultRelDir__ = "VTK/postprocessData";
inline const word defaultRelDir__ = "postprocessData";
}