diff --git a/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacement/fixedDisplacementFvPatchVectorField.C b/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacement/fixedDisplacementFvPatchVectorField.C index 206004aae..90ca9ee0f 100644 --- a/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacement/fixedDisplacementFvPatchVectorField.C +++ b/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacement/fixedDisplacementFvPatchVectorField.C @@ -74,12 +74,21 @@ fixedDisplacementFvPatchVectorField::fixedDisplacementFvPatchVectorField //- the leastSquares has zero non-orthogonal correction //- on the boundary //- so the gradient scheme should be extendedLeastSquares - if(Foam::word(dimensionedInternalField().mesh().gradScheme("grad(" + fieldName_ + ")")) != "extendedLeastSquares") - { - Warning << "The gradScheme for " << fieldName_ + if + ( + Foam::word + ( + dimensionedInternalField().mesh().schemesDict().gradScheme + ( + "grad(" + fieldName_ + ")" + ) + ) != "extendedLeastSquares" + ) + { + Warning << "The gradScheme for " << fieldName_ << " should be \"extendedLeastSquares 0\" for the boundary " << "non-orthogonal correction to be right" << endl; - } + } } diff --git a/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C b/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C index e0d8c1478..01ca316e9 100644 --- a/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C +++ b/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C @@ -86,56 +86,65 @@ fixedDisplacementZeroShearFvPatchVectorField::fixedDisplacementZeroShearFvPatchV { //- check if traction boundary is for non linear solver - if(dict.found("nonLinear")) - { - nonLinear_ = nonLinearNames_.read(dict.lookup("nonLinear"));; + if (dict.found("nonLinear")) + { + nonLinear_ = nonLinearNames_.read(dict.lookup("nonLinear"));; - if(nonLinear_ == UPDATED_LAGRANGIAN) - { - Info << "\tnonLinear set to updated Lagrangian" - << endl; - } - else if(nonLinear_ == TOTAL_LAGRANGIAN) - { - Info << "\tnonLinear set to total Lagrangian" - << endl; - } - } + if (nonLinear_ == UPDATED_LAGRANGIAN) + { + Info << "\tnonLinear set to updated Lagrangian" + << endl; + } + else if (nonLinear_ == TOTAL_LAGRANGIAN) + { + Info << "\tnonLinear set to total Lagrangian" << endl; + } + } //- the leastSquares has zero non-orthogonal correction //- on the boundary //- so the gradient scheme should be extendedLeastSquares - if(Foam::word(dimensionedInternalField().mesh().gradScheme("grad(" + fieldName_ + ")")) != "extendedLeastSquares") - { - Warning << "The gradScheme for " << fieldName_ + if + ( + Foam::word + ( + dimensionedInternalField().mesh().schemesDict().gradScheme + ( + "grad(" + fieldName_ + ")" + ) + ) != "extendedLeastSquares" + ) + { + Warning << "The gradScheme for " << fieldName_ << " should be \"extendedLeastSquares 0\" for the boundary " << "non-orthogonal correction to be right" << endl; - } - - this->refGrad() = vector::zero; - - vectorField n = patch().nf(); - this->valueFraction() = sqr(n); - - if (dict.found("value")) - { - Field::operator=(vectorField("value", dict, p.size())); } - else - { - FatalError << "value entry not found for patch " << patch().name() << endl; - } - this->refValue() = *this; - Field normalValue = transform(valueFraction(), refValue()); - - Field gradValue = - this->patchInternalField() + refGrad()/this->patch().deltaCoeffs(); - - Field transformGradValue = - transform(I - valueFraction(), gradValue); - - Field::operator=(normalValue + transformGradValue); + this->refGrad() = vector::zero; + + vectorField n = patch().nf(); + this->valueFraction() = sqr(n); + + if (dict.found("value")) + { + Field::operator=(vectorField("value", dict, p.size())); + } + else + { + FatalError << "value entry not found for patch " + << patch().name() << endl; + } + this->refValue() = *this; + + Field normalValue = transform(valueFraction(), refValue()); + + Field gradValue = + this->patchInternalField() + refGrad()/this->patch().deltaCoeffs(); + + Field transformGradValue = + transform(I - valueFraction(), gradValue); + + Field::operator=(normalValue + transformGradValue); } diff --git a/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedRotation/fixedRotationFvPatchVectorField.C b/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedRotation/fixedRotationFvPatchVectorField.C index 9bbc3fd27..0f56006b6 100644 --- a/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedRotation/fixedRotationFvPatchVectorField.C +++ b/applications/solvers/solidMechanics/solidModels/fvPatchFields/fixedRotation/fixedRotationFvPatchVectorField.C @@ -85,11 +85,20 @@ fixedRotationFvPatchVectorField::fixedRotationFvPatchVectorField //- the leastSquares has zero non-orthogonal correction //- on the boundary //- so the gradient scheme should be extendedLeastSquares - if(Foam::word(dimensionedInternalField().mesh().gradScheme("grad(" + fieldName_ + ")")) != "extendedLeastSquares") + if + ( + Foam::word + ( + dimensionedInternalField().mesh().schemesDict().gradScheme + ( + "grad(" + fieldName_ + ")" + ) + ) != "extendedLeastSquares" + ) { - Warning << "The gradScheme for " << fieldName_ - << " should be \"extendedLeastSquares 0\" for the boundary " - << "non-orthogonal correction to be right" << endl; + Warning << "The gradScheme for " << fieldName_ + << " should be \"extendedLeastSquares 0\" for the boundary " + << "non-orthogonal correction to be right" << endl; } } diff --git a/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C b/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C index 88eb6b11b..666b6367a 100644 --- a/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C +++ b/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C @@ -77,31 +77,40 @@ solidTractionFvPatchVectorField << "\tTraction boundary field: " << fieldName_ << endl; //- check if traction boundary is for non linear solver - if(dict.found("nonLinear")) - { - nonLinear_ = nonLinearNames_.read(dict.lookup("nonLinear"));; + if (dict.found("nonLinear")) + { + nonLinear_ = nonLinearNames_.read(dict.lookup("nonLinear")); - if(nonLinear_ == UPDATED_LAGRANGIAN) - { - Info << "\tnonLinear set to updated Lagrangian" - << endl; - } - else if(nonLinear_ == TOTAL_LAGRANGIAN) - { - Info << "\tnonLinear set to total Lagrangian" - << endl; - } - } + if (nonLinear_ == UPDATED_LAGRANGIAN) + { + Info << "\tnonLinear set to updated Lagrangian" + << endl; + } + else if (nonLinear_ == TOTAL_LAGRANGIAN) + { + Info << "\tnonLinear set to total Lagrangian" + << endl; + } + } //- the leastSquares has zero non-orthogonal correction //- on the boundary //- so the gradient scheme should be extendedLeastSquares - if(Foam::word(dimensionedInternalField().mesh().gradScheme("grad(" + fieldName_ + ")")) != "extendedLeastSquares") - { - Warning << "The gradScheme for " << fieldName_ + if + ( + Foam::word + ( + dimensionedInternalField().mesh().schemesDict().gradScheme + ( + "grad(" + fieldName_ + ")" + ) + ) != "extendedLeastSquares" + ) + { + Warning << "The gradScheme for " << fieldName_ << " should be \"extendedLeastSquares 0\" for the boundary " << "non-orthogonal correction to be right" << endl; - } + } } diff --git a/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C b/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C index 0d4b1f8b7..79c90c974 100644 --- a/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C +++ b/applications/solvers/solidMechanics/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C @@ -92,12 +92,21 @@ solidTractionFreeFvPatchVectorField //- the leastSquares has zero non-orthogonal correction //- on the boundary //- so the gradient scheme should be extendedLeastSquares - if(Foam::word(dimensionedInternalField().mesh().gradScheme("grad(" + fieldName_ + ")")) != "extendedLeastSquares") - { - Warning << "The gradScheme for " << fieldName_ + if + ( + Foam::word + ( + dimensionedInternalField().mesh().schemesDict().gradScheme + ( + "grad(" + fieldName_ + ")" + ) + ) != "extendedLeastSquares" + ) + { + Warning << "The gradScheme for " << fieldName_ << " should be \"extendedLeastSquares 0\" for the boundary " << "non-orthogonal correction to be right" << endl; - } + } } diff --git a/applications/solvers/solidMechanics/solidModels/fvPatchFields/timeVaryingSolidTraction/timeVaryingSolidTractionFvPatchVectorField.C b/applications/solvers/solidMechanics/solidModels/fvPatchFields/timeVaryingSolidTraction/timeVaryingSolidTractionFvPatchVectorField.C index 5fd86facb..38046834b 100644 --- a/applications/solvers/solidMechanics/solidModels/fvPatchFields/timeVaryingSolidTraction/timeVaryingSolidTractionFvPatchVectorField.C +++ b/applications/solvers/solidMechanics/solidModels/fvPatchFields/timeVaryingSolidTraction/timeVaryingSolidTractionFvPatchVectorField.C @@ -55,25 +55,34 @@ timeVaryingSolidTractionFvPatchVectorField const dictionary& dict ) : - solidTractionFvPatchVectorField(p, iF), - timeSeries_(dict) +solidTractionFvPatchVectorField(p, iF), +timeSeries_(dict) { - fieldName() = dimensionedInternalField().name(); - traction() = vector::zero; - pressure() = 0.0; + fieldName() = dimensionedInternalField().name(); + traction() = vector::zero; + pressure() = 0.0; - nonLinear() = - nonLinearNames().read(dict.lookup("nonLinear")); + nonLinear() = + nonLinearNames().read(dict.lookup("nonLinear")); //- the leastSquares has zero non-orthogonal correction //- on the boundary //- so the gradient scheme should be extendedLeastSquares - if(Foam::word(dimensionedInternalField().mesh().gradScheme("grad(" + fieldName() + ")")) != "extendedLeastSquares") - { - Warning << "The gradScheme for " << fieldName() + if + ( + Foam::word + ( + dimensionedInternalField().mesh().schemesDict().gradScheme + ( + "grad(" + fieldName() + ")" + ) + ) != "extendedLeastSquares" + ) + { + Warning << "The gradScheme for " << fieldName() << " should be \"extendedLeastSquares 0\" for the boundary " << "non-orthogonal correction to be right" << endl; - } + } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C index 2fd735adc..1c2b65df1 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C @@ -754,7 +754,7 @@ void Foam::ggiPolyPatch::initAddressing() { // Calculate transforms for correct GGI cut calcTransforms(); - + if (master()) { shadow().calcTransforms(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.H index 0576e4f46..a1c18906b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.H @@ -130,7 +130,7 @@ class ggiPolyPatch void calcReconFaceCellCentres() const; //- Force calculation of transformation tensors - virtual void calcTransforms(); + virtual void calcTransforms() const; // Parallel communication optimisation, stored on master processor @@ -313,12 +313,6 @@ public: //- Return interpolation face zone const faceZone& zone() const; - //- Is this the slave side? - bool slave() const - { - return !master(); - } - // Interpolation data //- Is this the master side? diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index dbc7846eb..4c75dbba8 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -31,8 +31,8 @@ License #include "slicedVolFields.H" #include "slicedSurfaceFields.H" #include "SubField.H" -#include "cyclicFvPatchField.H" -#include "cyclicGgiFvPatchField.H" +#include "cyclicFvPatchFields.H" +#include "cyclicGgiFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //