prime2 is added and readme update

This commit is contained in:
Hamidreza
2025-04-24 14:08:17 +03:30
parent a9e5b9bb59
commit f2e8e69899
7 changed files with 407 additions and 174 deletions

View File

@ -77,6 +77,7 @@ pFlow::PostprocessOperationAverage::PostprocessOperationAverage
}
}
/// Performs weighted average of field values within each region
bool pFlow::PostprocessOperationAverage::execute
(
@ -109,7 +110,7 @@ bool pFlow::PostprocessOperationAverage::execute
allField)
);
if(calculateFluctuation2_)
if(calculateFluctuation2_())
{
auto& processedRegField = processedRegFieldPtr_();
fluctuation2FieldPtr_ = makeUnique<processedRegFieldType>
@ -136,5 +137,40 @@ bool pFlow::PostprocessOperationAverage::execute
}
return true;
}
bool pFlow::PostprocessOperationAverage::write(const fileSystem &parDir) const
{
if(! postprocessOperation::write(parDir))
{
return false;
}
if(!calculateFluctuation2_())
{
return true;
}
auto ti = time().TimeInfo();
if(!os2Ptr_)
{
fileSystem path = parDir+(
processedFieldName()+"_prime2" + ".Start_" + ti.timeName());
os2Ptr_ = makeUnique<oFstream>(path);
regPoints().write(os2Ptr_());
}
std::visit
(
[&](auto&& arg)->bool
{
return writeField(os2Ptr_(), ti.t(), arg, threshold());
},
fluctuation2FieldPtr_()
);
return true;
}