Merge pull request #122 from PhasicFlow/develop

bug fix for postprocessPhasicFlow
This commit is contained in:
PhasicFlow 2024-11-22 21:45:47 +03:30 committed by GitHub
commit a606e48e66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 11 deletions

View File

@ -49,7 +49,6 @@ public:
TypeInfoTemplate11("ProcessField", T);
ProcessField(
const dictionary& dict,
pointRectCell& pToCell,

View File

@ -46,9 +46,9 @@ uniquePtr<rectMeshField_H<T>> sumOp( pointField_H<T>& field, pointRectCell& poin
{
for(int32 k=0; k<mesh.nz(); k++)
{
auto n = iterator.start(i,j,k);
uint32 n = iterator.start(i,j,k);
T res (0);
while(n>-1)
while(n != cellMapper::NoPos)
{
res += f[n];
n = iterator.getNext(n);
@ -80,10 +80,10 @@ uniquePtr<rectMeshField_H<T>> sumMaksOp( pointField_H<T>& field, pointRectCell&
for(int32 k=0; k<mesh.nz(); k++)
{
//auto [loop, n] = pointToCell.startLoop(i,j,k);
auto n = iterator.start(i,j,k);
uint32 n = iterator.start(i,j,k);
T res (0);
while(n>-1)
while(n!= cellMapper::NoPos)
{
if(mask(n))

View File

@ -101,7 +101,6 @@ public:
map_.build(points, activeMask);
auto iterator = map_.getCellIterator();
for(int32 i=0; i<mesh_.nx(); i++)
{
@ -111,8 +110,8 @@ public:
{
int32 res = 0;
int32 n = iterator.start(i,j,k);
while( n>-1)
uint32 n = iterator.start(i,j,k);
while( n!= cellMapper::NoPos)
{
res+=1;
n = iterator.getNext(n);

View File

@ -35,7 +35,7 @@ pFlow::processField::processField(
processedFieldName_(dict.name()),
operation_(dict.getVal<word>("operation")),
includeMaskType_(dict.getVal<word>("includeMask")),
threshold_(dict.getValOrSet<int32>("threshold", 1))
threshold_(dict.getValOrSetMax<int32>("threshold", 1))
{
if(!processField::getFieldType(
@ -50,8 +50,7 @@ pFlow::processField::processField(
auto& incDict = dict_.subDictOrCreate(includeMaskType_+"Info");
includeMask_ = includeMask::create(incDict, includeMaskType_, timeFolder_);
}
bool pFlow::processField::getFieldType(