Replace tabs by 4 spaces in bin, tutorials, src, ... & clean-up by hand

This commit is contained in:
Henrik Rusche 2015-05-15 20:07:49 +02:00
parent 4eb1b1f016
commit 82a0e1e7df
120 changed files with 1279 additions and 1226 deletions

View file

@ -140,16 +140,22 @@ void engineTimeVaryingUniformFixedValueFvPatchField<symmTensor>::updateCoeffs()
template<>
void engineTimeVaryingUniformFixedValueFvPatchField<symmTensor4thOrder>::updateCoeffs()
{
notImplemented("engineTimeVaryingUniformFixedValueFvPatchField"
"<symmTensor4thOrder>::updateCoeffs()");
notImplemented
(
"engineTimeVaryingUniformFixedValueFvPatchField"
"<symmTensor4thOrder>::updateCoeffs()"
);
}
template<>
void engineTimeVaryingUniformFixedValueFvPatchField<diagTensor>::updateCoeffs()
{
notImplemented("engineTimeVaryingUniformFixedValueFvPatchField"
"<diagTensor>::updateCoeffs()");
notImplemented
(
"engineTimeVaryingUniformFixedValueFvPatchField"
"<diagTensor>::updateCoeffs()"
);
}

View file

@ -84,11 +84,7 @@ void Foam::cyclicFaPatch::calcTransforms()
half0Normals[edgei] = point(1, 0, 0);
half1Normals[edgei] = half0Normals[edgei];
}
else if
(
mag(magLe - nbrMagLe)/avLe
> matchTol_()
)
else if(mag(magLe - nbrMagLe)/avLe > matchTol_())
{
// Error in area matching. Find largest error
maxMatchError =

View file

@ -234,8 +234,8 @@ skewCorrectedSnGrad<Type>::correction
(
min
(
limitCoeff_
*mag
limitCoeff_*
mag
(
uncorrectedSnGrad<Type>::snGrad
(

View file

@ -37,8 +37,11 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void leastSquaresVolPointInterpolation::calcA(List<scalarSquareMatrix>& A) const
{
void leastSquaresVolPointInterpolation::calcA
(
List<scalarSquareMatrix>& A
) const
{
//Info << "leastSquaresVolPointInterpolation calcA" << endl;
const fvMesh& mesh = mesh_;
@ -89,14 +92,17 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
//- for boundary points we will include the surrounding face centres
forAll(mesh.boundary(), patchi)
{
const vectorField& faceCentres = mesh.boundaryMesh()[patchi].faceCentres();
const labelListList& pointFaces = mesh.boundaryMesh()[patchi].pointFaces();
const vectorField& faceCentres =
mesh.boundaryMesh()[patchi].faceCentres();
const labelListList& pointFaces =
mesh.boundaryMesh()[patchi].pointFaces();
if(mesh.boundary()[patchi].coupled()) //- for proc boundaries
{
//- for coupled patches we will use the values at the neighbourField cell centres and we will
//- not use the boundary face values
//- neighbour cell centre are equal to the faceCell centres plus the delta vector
//- for coupled patches we will use the values at the
//- neighbourField cell centres and we will not use the boundary
//- face values neighbour cell centre are equal to the faceCell
//- centres plus the delta vector
vectorField pDelta = mesh.boundary()[patchi].delta();
vectorField faceCellC(faceCentres.size(), vector::zero);
forAll(faceCentres, facei)
@ -115,7 +121,8 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
const scalar& y = neiCellC[neiCelli].component(vector::Y);
const scalar& z = neiCellC[neiCelli].component(vector::Z);
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
label globalPointi =
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
A[globalPointi][0][0] += x*x;
A[globalPointi][0][1] += x*y;
@ -141,12 +148,14 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
}
else
{
//- each point must use at least 4 neighbouring locations otherwise A is singular
//- and simpleMatrix will cannot invert it
//- therefore empty patches values are included to make sure A is not singular
//- each point must use at least 4 neighbouring locations otherwise
//- A is singular and simpleMatrix will cannot invert it therefore
//- empty patches values are included to make sure A is not
//- singular
forAll(pointFaces, pointi)
{
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
label globalPointi =
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
forAll(pointFaces[pointi], pointFacei)
{
@ -179,11 +188,15 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
}
} //- end of else
} //- end of forAll boundary
}
}
void leastSquaresVolPointInterpolation::calcB(List<Field<vector> >& B, const GeometricField<vector, fvPatchField, volMesh>& vf) const
{
void leastSquaresVolPointInterpolation::calcB
(
List<Field<vector> >& B,
const GeometricField<vector, fvPatchField, volMesh>& vf
) const
{
//Info << "leastSquaresVolPointInterpolation calcB" << endl;
const fvMesh& mesh = mesh_;
@ -204,7 +217,8 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
const scalar& y = mesh.C()[celli].component(vector::Y);
const scalar& z = mesh.C()[celli].component(vector::Z);
const scalar& phiCompi = vf.internalField()[celli].component(compi);
const scalar& phiCompi =
vf.internalField()[celli].component(compi);
B[pointi][0].component(compi) += phiCompi*x;
B[pointi][1].component(compi) += phiCompi*y;
@ -216,40 +230,52 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
//- for boundary points we will include the surrounding face centres
forAll(mesh.boundary(), patchi)
{
const vectorField& faceCentres = mesh.boundaryMesh()[patchi].faceCentres();
const labelListList& pointFaces = mesh.boundaryMesh()[patchi].pointFaces();
const labelList& faceCells = mesh.boundaryMesh()[patchi].faceCells();
const vectorField& faceCentres =
mesh.boundaryMesh()[patchi].faceCentres();
const labelListList& pointFaces =
mesh.boundaryMesh()[patchi].pointFaces();
const labelList& faceCells =
mesh.boundaryMesh()[patchi].faceCells();
//- fix: do not calculate B for empty patches - philipc
if(mesh.boundary()[patchi].coupled())
{
//- for coupled patches we will use the values at the neighbourField cell centres and we will
//- not use the boundary face values
//- neighbour cell centre are equal to the faceCell centres plus the delta vector
//- for coupled patches we will use the values at the
//- neighbourField cell centres and we will not use the
//- boundary face values neighbour cell centre are equal to
//- the faceCell centres plus the delta vector
vectorField pDelta = mesh.boundary()[patchi].delta();
vectorField faceCellC(faceCentres.size(), vector::zero);
forAll(faceCentres, facei)
{
label celli = mesh.boundaryMesh()[patchi].faceCells()[facei];
label celli =
mesh.boundaryMesh()[patchi].faceCells()[facei];
faceCellC[facei] = mesh.C()[celli];
}
vectorField neiCellC = faceCellC + pDelta;
vectorField phiNeiField = vf.boundaryField()[patchi].patchNeighbourField();
vectorField phiNeiField =
vf.boundaryField()[patchi].patchNeighbourField();
forAll(pointFaces, pointi)
{
forAll(pointFaces[pointi], pointFacei)
{
label neiCelli = pointFaces[pointi][pointFacei];
const scalar& x = neiCellC[neiCelli].component(vector::X);
const scalar& y = neiCellC[neiCelli].component(vector::Y);
const scalar& z = neiCellC[neiCelli].component(vector::Z);
const scalar& x =
neiCellC[neiCelli].component(vector::X);
const scalar& y =
neiCellC[neiCelli].component(vector::Y);
const scalar& z =
neiCellC[neiCelli].component(vector::Z);
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
label globalPointi =
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
//- this is the value of phi at the cell centre in the neighbour (i.e. across the interface)
scalar phiCompi = phiNeiField[neiCelli].component(compi);
//- this is the value of phi at the cell centre in the
//- neighbour (i.e. across the interface)
scalar phiCompi =
phiNeiField[neiCelli].component(compi);
B[globalPointi][0].component(compi) += phiCompi*x;
B[globalPointi][1].component(compi) += phiCompi*y;
@ -260,31 +286,39 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
}
else
{
//- each point must use at least 4 neighbouring locations otherwise A is singular
//- and simpleMatrix will cannot invert it
//- therefore empty patches values are included to make sure A is not singular
//- each point must use at least 4 neighbouring locations
//- otherwise A is singular and simpleMatrix will cannot
//- make sure A is not singular invert it therefore empty
//- patches values are included to
forAll(pointFaces, pointi)
{
forAll(pointFaces[pointi], pointFacei)
{
//- fix: use pointFace not face philipc
label facei = pointFaces[pointi][pointFacei];
const scalar& x = faceCentres[facei].component(vector::X);
const scalar& y = faceCentres[facei].component(vector::Y);
const scalar& z = faceCentres[facei].component(vector::Z);
const scalar& x =
faceCentres[facei].component(vector::X);
const scalar& y =
faceCentres[facei].component(vector::Y);
const scalar& z =
faceCentres[facei].component(vector::Z);
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
label globalPointi =
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
scalar phiCompi = 0.0;
if(mesh.boundary()[patchi].type() == "empty")
{
//- use faceCell value for empty because empty patches do not store any values
//- use faceCell value for empty because empty
//- patches do not store any values
const label& ci = faceCells[facei];
phiCompi = vf.internalField()[ci].component(compi);
phiCompi =
vf.internalField()[ci].component(compi);
}
else
{
phiCompi = vf.boundaryField()[patchi][facei].component(compi);
phiCompi =
vf.boundaryField()[patchi][facei].component(compi);
}
B[globalPointi][0].component(compi) += phiCompi*x;
@ -296,15 +330,15 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
}
} //- end of forAll boundary
} //- end of for all components
}
}
void leastSquaresVolPointInterpolation::interpolate
(
void leastSquaresVolPointInterpolation::interpolate
(
const GeometricField<vector, fvPatchField, volMesh>& vf,
GeometricField<vector, pointPatchField, pointMesh>& pf //Field<vector>& pf
) const
{
) const
{
//Info << "Interpolating cell to point using leastSquaresVolPointInterpolation" << endl;
const fvMesh& mesh = mesh_;
@ -353,25 +387,28 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
//- proc patches are synchronised
pf.correctBoundaryConditions();
}
}
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
leastSquaresVolPointInterpolation::leastSquaresVolPointInterpolation(const fvMesh& vm)
:
leastSquaresVolPointInterpolation::leastSquaresVolPointInterpolation
(
const fvMesh& vm
)
:
MeshObject<fvMesh, leastSquaresVolPointInterpolation>(vm),
mesh_(vm) //,
//A_(vm.points().size(), scalarSquareMatrix(4, 0.0)),
//B_(vm.points().size(), Field<vector>(4, vector::zero))
{
{
//calcA();
}
}
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
leastSquaresVolPointInterpolation::~leastSquaresVolPointInterpolation()
{}
leastSquaresVolPointInterpolation::~leastSquaresVolPointInterpolation()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View file

@ -86,10 +86,17 @@ class leastSquaresVolPointInterpolation
void calcA(List<scalarSquareMatrix>& A) const;
//- calc B source for each point
void calcB(List<Field<vector> >& B, const GeometricField<vector, fvPatchField, volMesh>&) const;
void calcB
(
List<Field<vector> >& B,
const GeometricField<vector, fvPatchField, volMesh>&
) const;
//- Disallow default bitwise copy construct
leastSquaresVolPointInterpolation(const leastSquaresVolPointInterpolation&);
leastSquaresVolPointInterpolation
(
const leastSquaresVolPointInterpolation&
);
//- Disallow default bitwise assignment
void operator=(const leastSquaresVolPointInterpolation&);

View file

@ -304,16 +304,19 @@ inline DiagTensor<Cmpt> transform
(
const tensor& tt,
const DiagTensor<Cmpt>& st
)
)
{
notImplemented("transform.H\n"
notImplemented
(
"transform.H\n"
"template<>\n"
"inline DiagTensor<Cmpt> transform\n"
"(\n"
"const tensor& tt,\n"
"const DiagTensor<Cmpt>& st\n"
")\n"
"not implemented");
"not implemented"
);
return st;
}

View file

@ -299,7 +299,7 @@ Foam::iterativePenaltyFriction::iterativePenaltyFriction
// traction to cause slipping
//scalar slipTrac =
//frictionLawPtr_->slipTraction(magSlavePressure[faceI]);
// frictionLawPtr_->slipTraction(magSlavePressure[faceI]);
vector& slaveTrac = slaveTraction_[faceI];
// if mag(slaveTrac) is greater than slipTrac and

View file

@ -64,5 +64,7 @@ boundaryField
{
type empty;
}
} // ************************************************************************* //
}
// ************************************************************************* //

View file

@ -8,9 +8,9 @@
FoamFile
{
version 2.0;
format ascii; ;
class dictionary; ;
object decomposeParDict; ;
format ascii;
class dictionary;
object decomposeParDict;
}
numberOfSubdomains 4;
@ -38,6 +38,6 @@ simpleCoeffs
distributed no;
roots
(
);
(
);

View file

@ -8,9 +8,9 @@
FoamFile
{
version 2.0;
format ascii; ;
class dictionary; ;
object decomposeParDict; ;
format ascii;
class dictionary;
object decomposeParDict;
}
numberOfSubdomains 4;
@ -35,6 +35,6 @@ simpleCoeffs
distributed no;
roots
(
);
(
);

View file

@ -8,11 +8,11 @@
FoamFile
{
version 2;
format ascii;
class dictionary;
location "system";
object meshDict;
version 2;
format ascii;
class dictionary;
location "system";
object meshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -70,6 +70,7 @@ boundaryField
frictionCoeff 0.3;
}
}
value uniform (0 0 0);
}

View file

@ -82,6 +82,7 @@ boundaryField
frictionCoeff 0.1;
}
}
value uniform (0 0 0);
}