Skip to content

Commit

Permalink
dsmcFoam+ #13: fixing labelList int / long int issue using the castin…
Browse files Browse the repository at this point in the history
…g function label()
  • Loading branch information
vincentcasseau committed Jul 4, 2022
1 parent 60783f7 commit b509956
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ bool Foam::AveragingMethod<Type>::write()
cellGrad[cellI] += v*interpolateGrad(mesh_.C()[cellI], tetIs);

const face& f = mesh_.faces()[tetIs.face()];
labelList vertices(3);
labelList vertices(label(3));
vertices[0] = f[tetIs.faceBasePt()];
vertices[1] = f[tetIs.facePtA()];
vertices[2] = f[tetIs.facePtB()];
Expand Down
2 changes: 1 addition & 1 deletion src/lagrangian/pic/averagingMethod/Basic/Basic.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Foam::AveragingMethods::Basic<Type>::Basic
const fvMesh& mesh
)
:
AveragingMethod<Type>(io, dict, mesh, labelList(1, mesh.nCells())),
AveragingMethod<Type>(io, dict, mesh, labelList(label(1), mesh.nCells())),
data_(FieldField<Field, Type>::operator[](0)),
dataGrad_(mesh.nCells())
{}
Expand Down
2 changes: 1 addition & 1 deletion src/lagrangian/pic/averagingMethod/Linear/Linear.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Foam::autoPtr<labelList> Foam::AveragingMethods::Linear<Type>::size
const fvMesh& mesh
)
{
autoPtr<labelList> s(new labelList(2));
autoPtr<labelList> s(new labelList(label(2)));
s()[0] = mesh.nCells();
s()[1] = mesh.nPoints();
return s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void noTimeCounterTCC::updateCollisionCellOccupancy()

//- assign 0th parent a new family number
scalar parent = 0;
labelList familyList(1,cellI);
labelList familyList(label(1),cellI);

familyN++;

Expand Down Expand Up @@ -577,7 +577,7 @@ void noTimeCounterTCC::collide()
// Select a possible second collision candidate from the
// nearest neighbour cell within the group with a candidate.
// If the same candidate is chosen, choose again.
labelList parentList(1,0);
labelList parentList(label(1),0);
parentList[0] = cellP;
label parent = 0;
label familyN = cO + 1;
Expand Down

0 comments on commit b509956

Please sign in to comment.