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); TypeInfoTemplate11("ProcessField", T);
ProcessField( ProcessField(
const dictionary& dict, const dictionary& dict,
pointRectCell& pToCell, 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++) 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); T res (0);
while(n>-1) while(n != cellMapper::NoPos)
{ {
res += f[n]; res += f[n];
n = iterator.getNext(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++) for(int32 k=0; k<mesh.nz(); k++)
{ {
//auto [loop, n] = pointToCell.startLoop(i,j,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); T res (0);
while(n>-1) while(n!= cellMapper::NoPos)
{ {
if(mask(n)) if(mask(n))

View File

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

View File

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