Removed some compile-time errors

This commit is contained in:
Dominik Christ 2013-07-09 11:06:50 +01:00
parent b6c16f1065
commit 2d4a625388
9 changed files with 140 additions and 92 deletions

View file

@ -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;
}
}
}

View file

@ -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<vector>::operator=(vectorField("value", dict, p.size()));
}
else
{
FatalError << "value entry not found for patch " << patch().name() << endl;
}
this->refValue() = *this;
Field<vector> normalValue = transform(valueFraction(), refValue());
Field<vector> gradValue =
this->patchInternalField() + refGrad()/this->patch().deltaCoeffs();
Field<vector> transformGradValue =
transform(I - valueFraction(), gradValue);
Field<vector>::operator=(normalValue + transformGradValue);
this->refGrad() = vector::zero;
vectorField n = patch().nf();
this->valueFraction() = sqr(n);
if (dict.found("value"))
{
Field<vector>::operator=(vectorField("value", dict, p.size()));
}
else
{
FatalError << "value entry not found for patch "
<< patch().name() << endl;
}
this->refValue() = *this;
Field<vector> normalValue = transform(valueFraction(), refValue());
Field<vector> gradValue =
this->patchInternalField() + refGrad()/this->patch().deltaCoeffs();
Field<vector> transformGradValue =
transform(I - valueFraction(), gradValue);
Field<vector>::operator=(normalValue + transformGradValue);
}

View file

@ -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;
}
}

View file

@ -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;
}
}
}

View file

@ -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;
}
}
}

View file

@ -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;
}
}
}

View file

@ -754,7 +754,7 @@ void Foam::ggiPolyPatch::initAddressing()
{
// Calculate transforms for correct GGI cut
calcTransforms();
if (master())
{
shadow().calcTransforms();

View file

@ -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?

View file

@ -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"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //