boundaryField() -> boundaryFieldRef()
This commit is contained in:
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
pf[faceI] = Foam::sqrt(allFaceInfo[faceI].distSqr());
|
||||
}
|
||||
vsf.boundaryField()[patch.index()] = pf;
|
||||
vsf.boundaryFieldRef()[patch.index()] = pf;
|
||||
|
||||
Info<< "Writing patchDist volScalarField to " << runTime.value()
|
||||
<< endl;
|
||||
@ -152,7 +152,7 @@ int main(int argc, char *argv[])
|
||||
mesh,
|
||||
dimensionedScalar("otherPatchDist", dimLength, 0.0)
|
||||
);
|
||||
vsf.boundaryField()[patch.index()] = pwd;
|
||||
vsf.boundaryFieldRef()[patch.index()] = pwd;
|
||||
|
||||
Info<< "Writing otherPatchDist volScalarField to " << runTime.value()
|
||||
<< endl;
|
||||
|
||||
@ -87,7 +87,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
cc.internalField() = mesh.C().internalField();
|
||||
cc.boundaryField().updateCoeffs();
|
||||
cc.boundaryFieldRef().updateCoeffs();
|
||||
|
||||
forAll(cc.boundaryField(), patchI)
|
||||
{
|
||||
|
||||
@ -428,7 +428,7 @@ void Foam::motionSmootherAlgo::setDisplacementPatchFields
|
||||
pointVectorField& displacement
|
||||
)
|
||||
{
|
||||
typename pointVectorField::GeometricBoundaryField& displacementBf =
|
||||
pointVectorField::GeometricBoundaryField& displacementBf =
|
||||
displacement.boundaryFieldRef();
|
||||
|
||||
// Adapt the fixedValue bc's (i.e. copy internal point data to
|
||||
@ -584,7 +584,7 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
|
||||
|
||||
const lduSchedule& patchSchedule = mesh_.globalData().patchSchedule();
|
||||
|
||||
typename pointVectorField::GeometricBoundaryField& displacementBf =
|
||||
pointVectorField::GeometricBoundaryField& displacementBf =
|
||||
displacement.boundaryFieldRef();
|
||||
|
||||
// 1. evaluate on adaptPatches
|
||||
|
||||
@ -90,7 +90,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
|
||||
Cpf - ((Sf[facei] & Cpf)/(Sf[facei] & d))*d;
|
||||
}
|
||||
|
||||
typename surfaceVectorField::GeometricBoundaryField& skewCorrVecsBf =
|
||||
surfaceVectorField::GeometricBoundaryField& skewCorrVecsBf =
|
||||
skewCorrectionVectors_.boundaryFieldRef();
|
||||
|
||||
forAll(skewCorrVecsBf, patchi)
|
||||
|
||||
@ -183,7 +183,7 @@ void Foam::surfaceInterpolation::makeWeights() const
|
||||
w[facei] = SfdNei/(SfdOwn + SfdNei);
|
||||
}
|
||||
|
||||
typename surfaceScalarField::GeometricBoundaryField& wBf =
|
||||
surfaceScalarField::GeometricBoundaryField& wBf =
|
||||
weights.boundaryFieldRef();
|
||||
|
||||
forAll(mesh_.boundary(), patchi)
|
||||
@ -240,7 +240,7 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const
|
||||
deltaCoeffs[facei] = 1.0/mag(C[neighbour[facei]] - C[owner[facei]]);
|
||||
}
|
||||
|
||||
typename surfaceScalarField::GeometricBoundaryField& deltaCoeffsBf =
|
||||
surfaceScalarField::GeometricBoundaryField& deltaCoeffsBf =
|
||||
deltaCoeffs.boundaryFieldRef();
|
||||
|
||||
forAll(deltaCoeffsBf, patchi)
|
||||
@ -305,7 +305,7 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const
|
||||
nonOrthDeltaCoeffs[facei] = 1.0/max(unitArea & delta, 0.05*mag(delta));
|
||||
}
|
||||
|
||||
typename surfaceScalarField::GeometricBoundaryField& nonOrthDeltaCoeffsBf =
|
||||
surfaceScalarField::GeometricBoundaryField& nonOrthDeltaCoeffsBf =
|
||||
nonOrthDeltaCoeffs.boundaryFieldRef();
|
||||
|
||||
forAll(nonOrthDeltaCoeffsBf, patchi)
|
||||
@ -363,7 +363,7 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
|
||||
// and calculated consistently with internal corrections for
|
||||
// coupled patches
|
||||
|
||||
typename surfaceVectorField::GeometricBoundaryField& corrVecsBf =
|
||||
surfaceVectorField::GeometricBoundaryField& corrVecsBf =
|
||||
corrVecs.boundaryFieldRef();
|
||||
|
||||
forAll(corrVecsBf, patchi)
|
||||
|
||||
@ -127,7 +127,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
|
||||
faceDiffusivity_[faceI] = 1.0/sqrt(dist);
|
||||
}
|
||||
|
||||
typename surfaceScalarField::GeometricBoundaryField& faceDiffusivityBf =
|
||||
surfaceScalarField::GeometricBoundaryField& faceDiffusivityBf =
|
||||
faceDiffusivity_.boundaryFieldRef();
|
||||
|
||||
forAll(faceDiffusivityBf, patchI)
|
||||
|
||||
@ -153,7 +153,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
}
|
||||
|
||||
|
||||
typename surfaceScalarField::GeometricBoundaryField& faceDiffusivityBf =
|
||||
surfaceScalarField::GeometricBoundaryField& faceDiffusivityBf =
|
||||
faceDiffusivity_.boundaryFieldRef();
|
||||
|
||||
forAll(faceDiffusivityBf, patchI)
|
||||
|
||||
@ -2658,7 +2658,7 @@ bool Foam::snappyLayerDriver::writeLayerData
|
||||
);
|
||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||
|
||||
typename volScalarField::GeometricBoundaryField& fldBf =
|
||||
volScalarField::GeometricBoundaryField& fldBf =
|
||||
fld.boundaryFieldRef();
|
||||
|
||||
forAll(patchIDs, i)
|
||||
@ -2697,7 +2697,7 @@ bool Foam::snappyLayerDriver::writeLayerData
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||
|
||||
typename volScalarField::GeometricBoundaryField& fldBf =
|
||||
volScalarField::GeometricBoundaryField& fldBf =
|
||||
fld.boundaryFieldRef();
|
||||
|
||||
forAll(patchIDs, i)
|
||||
@ -2732,7 +2732,7 @@ bool Foam::snappyLayerDriver::writeLayerData
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||
|
||||
typename volScalarField::GeometricBoundaryField& fldBf =
|
||||
volScalarField::GeometricBoundaryField& fldBf =
|
||||
fld.boundaryFieldRef();
|
||||
|
||||
forAll(patchIDs, i)
|
||||
|
||||
@ -103,15 +103,15 @@ void reactingOneDim::updateQr()
|
||||
// Retrieve field from coupled region using mapped boundary conditions
|
||||
Qr_.correctBoundaryConditions();
|
||||
|
||||
volScalarField::GeometricBoundaryField& QrBf = Qr_.boundaryFieldRef();
|
||||
|
||||
forAll(intCoupledPatchIDs_, i)
|
||||
{
|
||||
const label patchI = intCoupledPatchIDs_[i];
|
||||
|
||||
scalarField& Qrp = Qr_.boundaryField()[patchI];
|
||||
const label patchi = intCoupledPatchIDs_[i];
|
||||
|
||||
// Qr is positive going in the solid
|
||||
// If the surface is emitting the radiative flux is set to zero
|
||||
Qrp = max(Qrp, scalar(0.0));
|
||||
QrBf[patchi] = max(QrBf[patchi], scalar(0.0));
|
||||
}
|
||||
|
||||
const vectorField& cellC = regionMesh().cellCentres();
|
||||
@ -122,10 +122,10 @@ void reactingOneDim::updateQr()
|
||||
label localPyrolysisFaceI = 0;
|
||||
forAll(intCoupledPatchIDs_, i)
|
||||
{
|
||||
const label patchI = intCoupledPatchIDs_[i];
|
||||
const label patchi = intCoupledPatchIDs_[i];
|
||||
|
||||
const scalarField& Qrp = Qr_.boundaryField()[patchI];
|
||||
const vectorField& Cf = regionMesh().Cf().boundaryField()[patchI];
|
||||
const scalarField& Qrp = Qr_.boundaryField()[patchi];
|
||||
const vectorField& Cf = regionMesh().Cf().boundaryField()[patchi];
|
||||
|
||||
forAll(Qrp, faceI)
|
||||
{
|
||||
@ -164,12 +164,15 @@ void reactingOneDim::updatePhiGas()
|
||||
const DimensionedField<scalar, volMesh>& RRiGas =
|
||||
solidChemistry_->RRg(gasI);
|
||||
|
||||
surfaceScalarField::GeometricBoundaryField& phiGasBf =
|
||||
phiGas_.boundaryFieldRef();
|
||||
|
||||
label totalFaceId = 0;
|
||||
forAll(intCoupledPatchIDs_, i)
|
||||
{
|
||||
const label patchI = intCoupledPatchIDs_[i];
|
||||
const label patchi = intCoupledPatchIDs_[i];
|
||||
|
||||
scalarField& phiGasp = phiGas_.boundaryField()[patchI];
|
||||
scalarField& phiGasp = phiGasBf[patchi];
|
||||
const scalarField& cellVol = regionMesh().V();
|
||||
|
||||
forAll(phiGasp, faceI)
|
||||
@ -188,7 +191,7 @@ void reactingOneDim::updatePhiGas()
|
||||
if (debug)
|
||||
{
|
||||
Info<< " Gas : " << gasTable[gasI]
|
||||
<< " on patch : " << patchI
|
||||
<< " on patch : " << patchi
|
||||
<< " mass produced at face(local) : "
|
||||
<< faceI
|
||||
<< " is : " << massInt
|
||||
@ -362,8 +365,8 @@ void reactingOneDim::calculateMassTransfer()
|
||||
totalGasMassFlux_ = 0;
|
||||
forAll(intCoupledPatchIDs_, i)
|
||||
{
|
||||
const label patchI = intCoupledPatchIDs_[i];
|
||||
totalGasMassFlux_ += gSum(phiGas_.boundaryField()[patchI]);
|
||||
const label patchi = intCoupledPatchIDs_[i];
|
||||
totalGasMassFlux_ += gSum(phiGas_.boundaryField()[patchi]);
|
||||
}
|
||||
|
||||
if (infoOutput_)
|
||||
@ -587,12 +590,12 @@ reactingOneDim::~reactingOneDim()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
scalar reactingOneDim::addMassSources(const label patchI, const label faceI)
|
||||
scalar reactingOneDim::addMassSources(const label patchi, const label faceI)
|
||||
{
|
||||
label index = 0;
|
||||
forAll(primaryPatchIDs_, i)
|
||||
{
|
||||
if (primaryPatchIDs_[i] == patchI)
|
||||
if (primaryPatchIDs_[i] == patchi)
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
|
||||
@ -122,14 +122,17 @@ void Foam::regionModels::regionModel1D::initialise()
|
||||
|
||||
surfaceScalarField& nMagSf = nMagSfPtr_();
|
||||
|
||||
surfaceScalarField::GeometricBoundaryField nMagSfBf =
|
||||
nMagSf.boundaryFieldRef();
|
||||
|
||||
localPyrolysisFaceI = 0;
|
||||
|
||||
forAll(intCoupledPatchIDs_, i)
|
||||
{
|
||||
const label patchI = intCoupledPatchIDs_[i];
|
||||
const polyPatch& ppCoupled = rbm[patchI];
|
||||
const vectorField& pNormals = ppCoupled.faceNormals();
|
||||
nMagSf.boundaryField()[patchI] =
|
||||
regionMesh().Sf().boundaryField()[patchI] & pNormals;
|
||||
nMagSfBf[patchI] = regionMesh().Sf().boundaryField()[patchI] & pNormals;
|
||||
forAll(pNormals, localFaceI)
|
||||
{
|
||||
const vector& n = pNormals[localFaceI];
|
||||
|
||||
Reference in New Issue
Block a user