just cleaning up whitespaces
This commit is contained in:
@ -180,6 +180,7 @@ void particleProbe::initialize(word typeName, word logFileName) const
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void particleProbe::writeHeader() const
|
||||
{
|
||||
|
||||
@ -194,97 +195,92 @@ void particleProbe::writeHeader() const
|
||||
forAll(vectorFields_, iter)
|
||||
{
|
||||
if(!probeDebug_ && iter>0) break;
|
||||
*sPtr << vectorFields_(iter) << " ";
|
||||
}
|
||||
*sPtr << vectorFields_(iter) << " ";
|
||||
}
|
||||
|
||||
if(probeDebug_)
|
||||
{
|
||||
*sPtr<<"|| scalarData: " << " ";
|
||||
*sPtr<<"|| scalarData: " << " ";
|
||||
forAll(scalarFields_, iter)
|
||||
{
|
||||
*sPtr << scalarFields_(iter) << " ";
|
||||
}
|
||||
}
|
||||
|
||||
if(includePosition_) *sPtr<<" || position" << endl;
|
||||
else *sPtr << endl;
|
||||
if(includePosition_) *sPtr<<" || position" << endl;
|
||||
else *sPtr << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void particleProbe::clearProbes() const
|
||||
{
|
||||
for (unsigned int i=0; i<vProbes_.size(); i++)
|
||||
delete vProbes_[i];
|
||||
|
||||
sProbes_.clear();
|
||||
vProbes_.clear();
|
||||
|
||||
for (unsigned int i=0; i<vProbes_.size(); i++)
|
||||
delete vProbes_[i];
|
||||
|
||||
sProbes_.clear();
|
||||
vProbes_.clear();
|
||||
}
|
||||
|
||||
void particleProbe::writeProbe(int index, Field<scalar> sValues, Field<vector> vValues) const
|
||||
{
|
||||
|
||||
|
||||
if(printNow_ && checkIDForPrint(index) && verboseToFile_)
|
||||
if(printNow_ && checkIDForPrint(index) && verboseToFile_)
|
||||
{
|
||||
|
||||
//index and time
|
||||
*sPtr << setprecision(IOstream::defaultPrecision()+7) ;
|
||||
*sPtr << index << tab
|
||||
<< particleCloud_.mesh().time().value() << " " ;
|
||||
*sPtr << setprecision(IOstream::defaultPrecision()+7);
|
||||
*sPtr << index << tab << particleCloud_.mesh().time().value() << " ";
|
||||
*sPtr << "|| ";
|
||||
|
||||
int vsize_=vProbes_.size();
|
||||
|
||||
int vsize_ = vProbes_.size();
|
||||
//vectorFields
|
||||
*sPtr << setprecision(writePrecision_) ;
|
||||
forAll(vValues, iter)
|
||||
{
|
||||
// if(!probeDebug_ && iter>0) break;
|
||||
*sPtr << vValues[iter][0] << " ";
|
||||
*sPtr << vValues[iter][1] << " ";
|
||||
*sPtr << vValues[iter][2] << " ";
|
||||
|
||||
|
||||
if(index<vsize_)
|
||||
{
|
||||
vProbes_[index][0]+=vValues[iter][0];
|
||||
vProbes_[index][1]+=vValues[iter][1];
|
||||
vProbes_[index][2]+=vValues[iter][2];
|
||||
}
|
||||
else
|
||||
{
|
||||
double * vprobe_= new double[3];
|
||||
vprobe_[0]=vValues[iter][0];
|
||||
vprobe_[1]=vValues[iter][1];
|
||||
vprobe_[2]=vValues[iter][2];
|
||||
|
||||
vProbes_.push_back(vprobe_);
|
||||
}
|
||||
|
||||
}
|
||||
*sPtr << setprecision(writePrecision_);
|
||||
forAll(vValues, iter)
|
||||
{
|
||||
// if(!probeDebug_ && iter>0) break;
|
||||
*sPtr << vValues[iter][0] << " ";
|
||||
*sPtr << vValues[iter][1] << " ";
|
||||
*sPtr << vValues[iter][2] << " ";
|
||||
|
||||
if(index < vsize_)
|
||||
{
|
||||
vProbes_[index][0] += vValues[iter][0];
|
||||
vProbes_[index][1] += vValues[iter][1];
|
||||
vProbes_[index][2] += vValues[iter][2];
|
||||
}
|
||||
else
|
||||
{
|
||||
double * vprobe_ = new double[3];
|
||||
vprobe_[0] = vValues[iter][0];
|
||||
vprobe_[1] = vValues[iter][1];
|
||||
vprobe_[2] = vValues[iter][2];
|
||||
|
||||
vProbes_.push_back(vprobe_);
|
||||
}
|
||||
}
|
||||
|
||||
//scalarFields
|
||||
if(probeDebug_)
|
||||
{
|
||||
*sPtr << "|| ";
|
||||
forAll(sValues, iter)
|
||||
{
|
||||
*sPtr << sValues[iter] << " ";
|
||||
sProbes_.push_back(sValues[iter]);
|
||||
*sPtr << "|| ";
|
||||
forAll(sValues, iter)
|
||||
{
|
||||
*sPtr << sValues[iter] << " ";
|
||||
sProbes_.push_back(sValues[iter]);
|
||||
}
|
||||
}
|
||||
|
||||
if(includePosition_)
|
||||
{
|
||||
*sPtr << "|| ";
|
||||
*sPtr << particleCloud_.position(index)[0] << " "
|
||||
<< particleCloud_.position(index)[1] << " "
|
||||
<< particleCloud_.position(index)[2]
|
||||
<< endl;
|
||||
*sPtr << particleCloud_.position(index)[0] << " "
|
||||
<< particleCloud_.position(index)[1] << " "
|
||||
<< particleCloud_.position(index)[2]
|
||||
<< endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
*sPtr << endl;
|
||||
}
|
||||
else *sPtr << endl;
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
@ -292,7 +288,6 @@ void particleProbe::writeProbe(int index, Field<scalar> sValues, Field<vector> v
|
||||
|
||||
bool particleProbe::checkIDForPrint(int index) const
|
||||
{
|
||||
|
||||
bool sampleThisId_ = false;
|
||||
if(sampleAll_) sampleThisId_ = true;
|
||||
else
|
||||
|
||||
@ -131,8 +131,8 @@ void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfraction
|
||||
vector minPeriodicParticlePos=positionCenter;
|
||||
if(checkPeriodicCells_) //consider minimal distance to all periodic images of this particle
|
||||
{
|
||||
centreDist = minPeriodicDistance(cellCentrePosition, positionCenter, globalBb,
|
||||
minPeriodicParticlePos);
|
||||
centreDist = minPeriodicDistance(cellCentrePosition, positionCenter, globalBb,
|
||||
minPeriodicParticlePos);
|
||||
}
|
||||
|
||||
if(centreDist + 0.5*sqrt(3.0)*pow(particleCloud_.mesh().V()[particleCenterCellID],0.33333) < radius)
|
||||
@ -141,46 +141,46 @@ void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfraction
|
||||
}
|
||||
else
|
||||
{
|
||||
const labelList& vertices = particleCloud_.mesh().cellPoints()[particleCenterCellID];
|
||||
forAll(vertices, i)
|
||||
const labelList& vertices = particleCloud_.mesh().cellPoints()[particleCenterCellID];
|
||||
forAll(vertices, i)
|
||||
{
|
||||
vector vertexPosition = particleCloud_.mesh().points()[vertices[i]];
|
||||
scalar centreVertexDist = mag(vertexPosition-positionCenter);
|
||||
vector vertexPosition = particleCloud_.mesh().points()[vertices[i]];
|
||||
scalar centreVertexDist = mag(vertexPosition-positionCenter);
|
||||
if(checkPeriodicCells_) //consider minimal distance to all periodic images of this particle
|
||||
{
|
||||
centreVertexDist = minPeriodicDistance(vertexPosition, positionCenter, globalBb,
|
||||
minPeriodicParticlePos);
|
||||
}
|
||||
|
||||
if(centreDist<radius && centreVertexDist<radius)
|
||||
{
|
||||
voidfractionNext_[particleCenterCellID]-=0.125;
|
||||
}
|
||||
else if(centreDist<radius && centreVertexDist>radius)
|
||||
{
|
||||
//compute lambda
|
||||
scalar a = (vertexPosition - cellCentrePosition)
|
||||
& (vertexPosition - cellCentrePosition);
|
||||
scalar b = 2. * (vertexPosition - cellCentrePosition)
|
||||
& (cellCentrePosition-minPeriodicParticlePos);
|
||||
scalar c = ((cellCentrePosition-minPeriodicParticlePos)
|
||||
& (cellCentrePosition-minPeriodicParticlePos)
|
||||
)
|
||||
- radius*radius;
|
||||
{
|
||||
centreVertexDist = minPeriodicDistance(vertexPosition, positionCenter, globalBb,
|
||||
minPeriodicParticlePos);
|
||||
}
|
||||
|
||||
scalar lambda = 0.;
|
||||
if(centreDist<radius && centreVertexDist<radius)
|
||||
{
|
||||
voidfractionNext_[particleCenterCellID]-=0.125;
|
||||
}
|
||||
else if(centreDist<radius && centreVertexDist>radius)
|
||||
{
|
||||
//compute lambda
|
||||
scalar a = (vertexPosition - cellCentrePosition)
|
||||
& (vertexPosition - cellCentrePosition);
|
||||
scalar b = 2. * (vertexPosition - cellCentrePosition)
|
||||
& (cellCentrePosition-minPeriodicParticlePos);
|
||||
scalar c = ( (cellCentrePosition-minPeriodicParticlePos)
|
||||
&(cellCentrePosition-minPeriodicParticlePos)
|
||||
)
|
||||
- radius*radius;
|
||||
|
||||
if (b*b-4*a*c>=0) lambda = (-b+sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) voidfractionNext_[particleCenterCellID]-=lambda*.125;
|
||||
else
|
||||
{
|
||||
lambda = (-b-sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) voidfractionNext_[particleCenterCellID]-=lambda*.125;
|
||||
}
|
||||
}
|
||||
else if(centreDist>radius && centreVertexDist<radius)
|
||||
{
|
||||
//compute another lambda too
|
||||
scalar lambda = 0.;
|
||||
|
||||
if (b*b-4.*a*c>=0.) lambda = (-b+sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0 && lambda <=1) voidfractionNext_[particleCenterCellID]-=lambda*0.125;
|
||||
else
|
||||
{
|
||||
lambda = (-b-sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0. && lambda <=1.) voidfractionNext_[particleCenterCellID]-=lambda*0.125;
|
||||
}
|
||||
}
|
||||
else if(centreDist>radius && centreVertexDist<radius)
|
||||
{
|
||||
//compute another lambda too
|
||||
scalar a = (vertexPosition - cellCentrePosition)
|
||||
& (vertexPosition - cellCentrePosition);
|
||||
scalar b = 2.* (vertexPosition - cellCentrePosition)
|
||||
@ -191,106 +191,101 @@ void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfraction
|
||||
- radius*radius;
|
||||
scalar lambda = 0.;
|
||||
|
||||
if(b*b-4*a*c>=0) lambda = (-b+sqrt(b*b-4*a*c))/(2*a);
|
||||
if(lambda > 0 && lambda <=1) voidfractionNext_[particleCenterCellID]-=(1-lambda)*0.125;
|
||||
else
|
||||
if(b*b-4.*a*c>=0.) lambda = (-b+sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if(lambda > 0. && lambda <=1.) voidfractionNext_[particleCenterCellID]-=(1.-lambda)*0.125;
|
||||
else
|
||||
{
|
||||
lambda = (-b-sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) voidfractionNext_[particleCenterCellID]-=(1-lambda)*0.125;
|
||||
lambda = (-b-sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0. && lambda <=1.) voidfractionNext_[particleCenterCellID]-=(1.-lambda)*0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} //end particle partially overlapping with cell
|
||||
|
||||
//generating list with cell and subcells
|
||||
buildLabelHashSet(radius, minPeriodicParticlePos, particleCenterCellID, hashSett, true);
|
||||
|
||||
//Add cells of periodic particle images on same processor
|
||||
if(checkPeriodicCells_)
|
||||
{
|
||||
int doPeriodicImage[3];
|
||||
for(int iDir=0;iDir<3;iDir++)
|
||||
{
|
||||
doPeriodicImage[iDir]= 0;
|
||||
if( (minPeriodicParticlePos[iDir]+radius)>globalBb.max()[iDir] )
|
||||
{
|
||||
doPeriodicImage[iDir] =-1;
|
||||
}
|
||||
if( (minPeriodicParticlePos[iDir]-radius)<globalBb.min()[iDir] )
|
||||
{
|
||||
doPeriodicImage[iDir] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//scan directions and map particles
|
||||
List<vector> particlePosList; //List of particle center position
|
||||
List<label> particleLabelList;
|
||||
if(checkPeriodicCells_)
|
||||
{
|
||||
int doPeriodicImage[3];
|
||||
for (int iDir=0; iDir<3; iDir++)
|
||||
{
|
||||
doPeriodicImage[iDir]= 0;
|
||||
if ((minPeriodicParticlePos[iDir]+radius) > globalBb.max()[iDir])
|
||||
{
|
||||
doPeriodicImage[iDir] = -1;
|
||||
}
|
||||
if ((minPeriodicParticlePos[iDir]-radius) < globalBb.min()[iDir])
|
||||
{
|
||||
doPeriodicImage[iDir] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
vector nearestPosInMesh=vector(0.0,0.0,0.0);
|
||||
int copyCounter=0;
|
||||
particlePosList.append(minPeriodicParticlePos);
|
||||
|
||||
//x-direction
|
||||
if(doPeriodicImage[0]!=0)
|
||||
{
|
||||
particlePosList.append( particlePosList[copyCounter]
|
||||
+ vector(
|
||||
(double)doPeriodicImage[0]
|
||||
*(globalBb.max()[0]-globalBb.min()[0]),
|
||||
0.0,
|
||||
0.0)
|
||||
);
|
||||
copyCounter++;
|
||||
}
|
||||
//y-direction
|
||||
int currCopyCounter=copyCounter;
|
||||
if(doPeriodicImage[1]!=0)
|
||||
{
|
||||
for(int yDirCop=0; yDirCop<=currCopyCounter; yDirCop++)
|
||||
{
|
||||
particlePosList.append( particlePosList[yDirCop]
|
||||
+ vector(
|
||||
0.0,
|
||||
(double)doPeriodicImage[1]
|
||||
*(globalBb.max()[1]-globalBb.min()[1]),
|
||||
0.0)
|
||||
);
|
||||
copyCounter++;
|
||||
}
|
||||
}
|
||||
//z-direction
|
||||
currCopyCounter=copyCounter;
|
||||
if(doPeriodicImage[2]!=0)
|
||||
{
|
||||
for(int zDirCop=0; zDirCop<=currCopyCounter; zDirCop++)
|
||||
{
|
||||
particlePosList.append( particlePosList[zDirCop]
|
||||
+ vector(
|
||||
0.0,
|
||||
0.0,
|
||||
(double)doPeriodicImage[2]
|
||||
*(globalBb.max()[2]-globalBb.min()[2])
|
||||
)
|
||||
);
|
||||
copyCounter++;
|
||||
}
|
||||
}
|
||||
//scan directions and map particles
|
||||
List<vector> particlePosList; //List of particle center position
|
||||
List<label> particleLabelList;
|
||||
|
||||
int copyCounter = 0;
|
||||
particlePosList.append(minPeriodicParticlePos);
|
||||
|
||||
//x-direction
|
||||
if (doPeriodicImage[0] != 0)
|
||||
{
|
||||
particlePosList.append( particlePosList[copyCounter]
|
||||
+ vector(
|
||||
static_cast<double>(doPeriodicImage[0])
|
||||
*(globalBb.max()[0]-globalBb.min()[0]),
|
||||
0.0,
|
||||
0.0)
|
||||
);
|
||||
copyCounter++;
|
||||
}
|
||||
//y-direction
|
||||
int currCopyCounter=copyCounter;
|
||||
if (doPeriodicImage[1] != 0)
|
||||
{
|
||||
for(int yDirCop=0; yDirCop<=currCopyCounter; yDirCop++)
|
||||
{
|
||||
particlePosList.append( particlePosList[yDirCop]
|
||||
+ vector(
|
||||
0.0,
|
||||
static_cast<double>(doPeriodicImage[1])
|
||||
*(globalBb.max()[1]-globalBb.min()[1]),
|
||||
0.0)
|
||||
);
|
||||
copyCounter++;
|
||||
}
|
||||
}
|
||||
//z-direction
|
||||
currCopyCounter=copyCounter;
|
||||
if (doPeriodicImage[2] != 0)
|
||||
{
|
||||
for(int zDirCop=0; zDirCop<=currCopyCounter; zDirCop++)
|
||||
{
|
||||
particlePosList.append( particlePosList[zDirCop]
|
||||
+ vector(
|
||||
0.0,
|
||||
0.0,
|
||||
static_cast<double>(doPeriodicImage[2])
|
||||
*(globalBb.max()[2]-globalBb.min()[2])
|
||||
)
|
||||
);
|
||||
copyCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
//add the nearest cell labels
|
||||
particleLabelList.append(particleCenterCellID);
|
||||
for(int iPeriodicImage=1;iPeriodicImage<=copyCounter; iPeriodicImage++)
|
||||
for(int iPeriodicImage=1; iPeriodicImage<=copyCounter; iPeriodicImage++)
|
||||
{
|
||||
label copyCellID=-1;
|
||||
label partCellId =
|
||||
|
||||
particleCloud_.mesh().findNearestCell(particlePosList[iPeriodicImage]);
|
||||
label partCellId = particleCloud_.mesh().findNearestCell(particlePosList[iPeriodicImage]);
|
||||
particleLabelList.append(partCellId);
|
||||
|
||||
buildLabelHashSet(radius, particlePosList[iPeriodicImage], particleLabelList[iPeriodicImage], hashSett, false);
|
||||
|
||||
}
|
||||
|
||||
} //end checkPeriodicCells_
|
||||
} //end checkPeriodicCells_
|
||||
|
||||
|
||||
scalar hashSetLength = hashSett.size();
|
||||
@ -337,71 +332,92 @@ void IBVoidFraction::buildLabelHashSet
|
||||
const scalar radius,
|
||||
const vector position,
|
||||
const label cellID,
|
||||
labelHashSet& hashSett,
|
||||
labelHashSet& hashSett,
|
||||
bool initialInsert //initial insertion of own cell
|
||||
)const
|
||||
{
|
||||
|
||||
int numprocs, me;
|
||||
{
|
||||
int me;
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &me);
|
||||
|
||||
if(initialInsert) hashSett.insert(cellID);
|
||||
|
||||
|
||||
const labelList& nc = particleCloud_.mesh().cellCells()[cellID];
|
||||
forAll(nc,i){
|
||||
forAll(nc,i)
|
||||
{
|
||||
label neighbor=nc[i];
|
||||
vector cellCentrePosition = particleCloud_.mesh().C()[neighbor];
|
||||
scalar centreDist = mag(cellCentrePosition-position);
|
||||
|
||||
if(!hashSett.found(neighbor) && centreDist + 0.5*sqrt(3.0)*pow(particleCloud_.mesh().V()[neighbor],0.33333) < radius){
|
||||
voidfractionNext_[neighbor] = 0;
|
||||
|
||||
if(!hashSett.found(neighbor) && centreDist + 0.5*sqrt(3.0)*pow(particleCloud_.mesh().V()[neighbor],0.33333) < radius)
|
||||
{
|
||||
voidfractionNext_[neighbor] = 0.;
|
||||
buildLabelHashSet(radius,position,neighbor,hashSett,true);
|
||||
}
|
||||
else if(!hashSett.found(neighbor) && centreDist < radius + sqrt(3.0)*pow(particleCloud_.mesh().V()[neighbor],0.33333)){
|
||||
scalar scale = 1;
|
||||
else if(!hashSett.found(neighbor) && centreDist < radius + sqrt(3.0)*pow(particleCloud_.mesh().V()[neighbor],0.33333))
|
||||
{
|
||||
scalar scale = 1.;
|
||||
const labelList& vertexPoints = particleCloud_.mesh().cellPoints()[neighbor];
|
||||
|
||||
forAll(vertexPoints, j){
|
||||
forAll(vertexPoints, j)
|
||||
{
|
||||
vector vertexPosition = particleCloud_.mesh().points()[vertexPoints[j]];
|
||||
scalar vertexDist = mag(vertexPosition - position);
|
||||
|
||||
if (centreDist < radius){
|
||||
if (vertexDist < radius) scale -= 0.125;
|
||||
else {
|
||||
if (centreDist < radius)
|
||||
{
|
||||
if (vertexDist < radius)
|
||||
{
|
||||
scale -= 0.125;
|
||||
}
|
||||
else
|
||||
{
|
||||
scalar a = (vertexPosition - cellCentrePosition)&(vertexPosition - cellCentrePosition);
|
||||
scalar b = 2.* (vertexPosition - cellCentrePosition)&(cellCentrePosition-position);
|
||||
scalar c = ((cellCentrePosition-position)&(cellCentrePosition-position))-radius*radius;
|
||||
scalar lambda = 0.;
|
||||
|
||||
if(b*b-4*a*c>=0) lambda = (-b+sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) scale -=lambda * 0.125;
|
||||
else {
|
||||
lambda = (-b-sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) scale -=lambda * 0.125;
|
||||
if(b*b-4.*a*c >= 0.) lambda = (-b+sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0. && lambda <=1.)
|
||||
{
|
||||
scale -=lambda * 0.125;
|
||||
}
|
||||
else
|
||||
{
|
||||
lambda = (-b-sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0. && lambda <= 1.) scale -=lambda * 0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (vertexDist < radius){
|
||||
else if (vertexDist < radius)
|
||||
{
|
||||
scalar a = (vertexPosition - cellCentrePosition)&(vertexPosition - cellCentrePosition);
|
||||
scalar b = 2.* (vertexPosition - cellCentrePosition)&(cellCentrePosition-position);
|
||||
scalar c = ((cellCentrePosition-position)&(cellCentrePosition-position))-radius*radius;
|
||||
scalar lambda = 0.;
|
||||
|
||||
if(b*b-4*a*c>=0) lambda = (-b+sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) scale -=(1-lambda) * 0.125;
|
||||
else {
|
||||
lambda = (-b-sqrt(b*b-4*a*c))/(2*a);
|
||||
if (lambda > 0 && lambda <=1) scale -=(1-lambda) * 0.125;
|
||||
if (b*b-4.*a*c >= 0.) lambda = (-b+sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0. && lambda <= 1.)
|
||||
{
|
||||
scale -=(1.-lambda) * 0.125;
|
||||
}
|
||||
else
|
||||
{
|
||||
lambda = (-b-sqrt(b*b-4.*a*c))/(2.*a);
|
||||
if (lambda > 0. && lambda <= 1.) scale -= (1.-lambda) * 0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(voidfractionNext_[neighbor]==1) voidfractionNext_[neighbor] = scale;
|
||||
else {
|
||||
voidfractionNext_[neighbor] -= (1-scale);
|
||||
if(voidfractionNext_[neighbor]<0) voidfractionNext_[neighbor] = 0;
|
||||
if(voidfractionNext_[neighbor] == 1.0)
|
||||
{
|
||||
voidfractionNext_[neighbor] = scale;
|
||||
}
|
||||
if(!(scale == 1)) buildLabelHashSet(radius,position,neighbor,hashSett, true);
|
||||
else
|
||||
{
|
||||
voidfractionNext_[neighbor] -= (1.0-scale);
|
||||
if(voidfractionNext_[neighbor] < 0.) voidfractionNext_[neighbor] = 0.0;
|
||||
}
|
||||
if(!(scale == 1.0)) buildLabelHashSet(radius,position,neighbor,hashSett, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user