gcc-4.8 compilation updates. Andreas Feymark
This commit is contained in:
parent
5a18de14fb
commit
30b35bab83
26 changed files with 287 additions and 162 deletions
|
@ -37,7 +37,7 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePointPatchTypeField
|
makeTemplatePointPatchTypeField
|
||||||
(
|
(
|
||||||
tetPolyPatchVectorField,
|
tetPolyPatchVectorField,
|
||||||
tractionTetPolyPatchVectorField
|
tractionTetPolyPatchVectorField
|
||||||
|
|
|
@ -69,14 +69,13 @@ void Foam::UPtrList<T>::setSize(const label newSize)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
else if (newSize < oldSize)
|
else if (newSize != oldSize)
|
||||||
{
|
{
|
||||||
ptrs_.setSize(newSize);
|
ptrs_.setSize(newSize);
|
||||||
}
|
}
|
||||||
else if (newSize > oldSize)
|
|
||||||
{
|
|
||||||
ptrs_.setSize(newSize);
|
|
||||||
|
|
||||||
|
if (newSize > oldSize)
|
||||||
|
{
|
||||||
// set new elements to NULL
|
// set new elements to NULL
|
||||||
for (register label i = oldSize; i < newSize; i++)
|
for (register label i = oldSize; i < newSize; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -689,8 +689,7 @@ template<class Type>
|
||||||
template<class Form, class Cmpt, int nCmpt>
|
template<class Form, class Cmpt, int nCmpt>
|
||||||
void Field<Type>::operator=(const VectorSpace<Form,Cmpt,nCmpt>& vs)
|
void Field<Type>::operator=(const VectorSpace<Form,Cmpt,nCmpt>& vs)
|
||||||
{
|
{
|
||||||
typedef VectorSpace<Form,Cmpt,nCmpt> VSType;
|
TFOR_ALL_F_OP_S(Type, *this, =, (VectorSpace<Form,Cmpt,nCmpt>), vs)
|
||||||
TFOR_ALL_F_OP_S(Type, *this, =, VSType, vs)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -589,21 +589,7 @@ const PointPatchField<PatchField, Mesh, PointPatch, MatrixType, Type>& operator+
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define makePointPatchTypeFieldTypeName(typePatchTypeField) \
|
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||||
\
|
|
||||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);
|
|
||||||
|
|
||||||
#define makePointPatchFieldsTypeName(typePatchField, pointPatchType) \
|
|
||||||
\
|
|
||||||
makePointPatchTypeFieldTypeName(typePatchField##pointPatchType##ScalarField); \
|
|
||||||
makePointPatchTypeFieldTypeName(typePatchField##pointPatchType##VectorField); \
|
|
||||||
makePointPatchTypeFieldTypeName(typePatchField##pointPatchType##SphericalTensorField); \
|
|
||||||
makePointPatchTypeFieldTypeName(typePatchField##pointPatchType##SymmTensorField); \
|
|
||||||
makePointPatchTypeFieldTypeName(typePatchField##pointPatchType##TensorField);
|
|
||||||
|
|
||||||
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
|
||||||
\
|
|
||||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
|
||||||
\
|
\
|
||||||
addToRunTimeSelectionTable \
|
addToRunTimeSelectionTable \
|
||||||
( \
|
( \
|
||||||
|
@ -623,33 +609,85 @@ addToRunTimeSelectionTable \
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePointPatchTypeFieldTypeName(typePatchTypeField) \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePointPatchFieldsTypeName(typePatchField, pointPatchType) \
|
||||||
|
\
|
||||||
|
makePointPatchTypeFieldTypeName \
|
||||||
|
( \
|
||||||
|
typePatchField##pointPatchType##ScalarField \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
makePointPatchTypeFieldTypeName \
|
||||||
|
( \
|
||||||
|
typePatchField##pointPatchType##VectorField \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
makePointPatchTypeFieldTypeName \
|
||||||
|
( \
|
||||||
|
typePatchField##pointPatchType##SphericalTensorField \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
makePointPatchTypeFieldTypeName \
|
||||||
|
( \
|
||||||
|
typePatchField##pointPatchType##SymmTensorField \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
makePointPatchTypeFieldTypeName \
|
||||||
|
( \
|
||||||
|
typePatchField##pointPatchType##TensorField \
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||||
|
\
|
||||||
|
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||||
|
\
|
||||||
|
addToPointPatchFieldRunTimeSelection \
|
||||||
|
( \
|
||||||
|
PatchTypeField, typePatchTypeField \
|
||||||
|
);
|
||||||
|
|
||||||
|
#define makeTemplatePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||||
|
\
|
||||||
|
addToPointPatchFieldRunTimeSelection \
|
||||||
|
( \
|
||||||
|
PatchTypeField, typePatchTypeField \
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
#define makePointPatchFields(type, pointPatch, pointPatchType) \
|
#define makePointPatchFields(type, pointPatch, pointPatchType) \
|
||||||
\
|
\
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatch##ScalarField, \
|
pointPatch##ScalarField, \
|
||||||
type##pointPatchType##ScalarField \
|
type##pointPatchType##ScalarField \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatch##VectorField, \
|
pointPatch##VectorField, \
|
||||||
type##pointPatchType##VectorField \
|
type##pointPatchType##VectorField \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatch##SphericalTensorField, \
|
pointPatch##SphericalTensorField, \
|
||||||
type##pointPatchType##SphericalTensorField \
|
type##pointPatchType##SphericalTensorField \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatch##SymmTensorField, \
|
pointPatch##SymmTensorField, \
|
||||||
type##pointPatchType##SymmTensorField \
|
type##pointPatchType##SymmTensorField \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatch##TensorField, \
|
pointPatch##TensorField, \
|
||||||
type##pointPatchType##TensorField \
|
type##pointPatchType##TensorField \
|
||||||
|
@ -683,10 +721,24 @@ typedef Type##PointPatchField \
|
||||||
<pointPatch##Field, mesh, patchPatch, typePointPatch, matrixType, vector> \
|
<pointPatch##Field, mesh, patchPatch, typePointPatch, matrixType, vector> \
|
||||||
type##pointPatchType##VectorField; \
|
type##pointPatchType##VectorField; \
|
||||||
typedef Type##PointPatchField \
|
typedef Type##PointPatchField \
|
||||||
<pointPatch##Field, mesh, patchPatch, typePointPatch, matrixType, sphericalTensor>\
|
< \
|
||||||
|
pointPatch##Field, \
|
||||||
|
mesh, \
|
||||||
|
patchPatch, \
|
||||||
|
typePointPatch, \
|
||||||
|
matrixType, \
|
||||||
|
sphericalTensor \
|
||||||
|
> \
|
||||||
type##pointPatchType##SphericalTensorField; \
|
type##pointPatchType##SphericalTensorField; \
|
||||||
typedef Type##PointPatchField \
|
typedef Type##PointPatchField \
|
||||||
<pointPatch##Field, mesh, patchPatch, typePointPatch, matrixType, symmTensor>\
|
< \
|
||||||
|
pointPatch##Field, \
|
||||||
|
mesh, \
|
||||||
|
patchPatch, \
|
||||||
|
typePointPatch, \
|
||||||
|
matrixType, \
|
||||||
|
symmTensor \
|
||||||
|
> \
|
||||||
type##pointPatchType##SymmTensorField; \
|
type##pointPatchType##SymmTensorField; \
|
||||||
typedef Type##PointPatchField \
|
typedef Type##PointPatchField \
|
||||||
<pointPatch##Field, mesh, patchPatch, typePointPatch, matrixType, tensor> \
|
<pointPatch##Field, mesh, patchPatch, typePointPatch, matrixType, tensor> \
|
||||||
|
|
|
@ -639,10 +639,7 @@ Foam::BlockAamgPolicy<Type>::restrictMatrix() const
|
||||||
// Matrix restriction done!
|
// Matrix restriction done!
|
||||||
|
|
||||||
typedef CoeffField<Type> TypeCoeffField;
|
typedef CoeffField<Type> TypeCoeffField;
|
||||||
typedef Field<Type> TypeField;
|
|
||||||
|
|
||||||
typedef typename TypeCoeffField::scalarTypeField scalarTypeField;
|
|
||||||
typedef typename TypeCoeffField::linearTypeField linearTypeField;
|
|
||||||
typedef typename TypeCoeffField::squareTypeField squareTypeField;
|
typedef typename TypeCoeffField::squareTypeField squareTypeField;
|
||||||
|
|
||||||
TypeCoeffField& coarseUpper = coarseMatrix.upper();
|
TypeCoeffField& coarseUpper = coarseMatrix.upper();
|
||||||
|
|
|
@ -57,12 +57,6 @@ void Foam::BlockGaussSeidelPrecon<Type>::BlockSweep
|
||||||
// Klas Jareteg: 2013-02-10:
|
// Klas Jareteg: 2013-02-10:
|
||||||
// Must transfer data between the different CPUs. Notes on the Jacobi
|
// Must transfer data between the different CPUs. Notes on the Jacobi
|
||||||
// iteration style can be seen in GaussSeidelSolver.C
|
// iteration style can be seen in GaussSeidelSolver.C
|
||||||
typedef CoeffField<Type> TypeCoeffField;
|
|
||||||
typedef Field<Type> TypeField;
|
|
||||||
|
|
||||||
typedef typename TypeCoeffField::scalarTypeField scalarTypeField;
|
|
||||||
typedef typename TypeCoeffField::linearTypeField linearTypeField;
|
|
||||||
typedef typename TypeCoeffField::squareTypeField squareTypeField;
|
|
||||||
|
|
||||||
for (label sweep = 0; sweep < nSweeps_; sweep++)
|
for (label sweep = 0; sweep < nSweeps_; sweep++)
|
||||||
{
|
{
|
||||||
|
@ -172,12 +166,6 @@ void Foam::BlockGaussSeidelPrecon<Type>::BlockSweep
|
||||||
// Klas Jareteg: 2013-02-10:
|
// Klas Jareteg: 2013-02-10:
|
||||||
// Must transfer data between the different CPUs. Notes on the Jacobi
|
// Must transfer data between the different CPUs. Notes on the Jacobi
|
||||||
// iteration style can be seen in GaussSeidelSolver.C
|
// iteration style can be seen in GaussSeidelSolver.C
|
||||||
typedef CoeffField<Type> TypeCoeffField;
|
|
||||||
typedef Field<Type> TypeField;
|
|
||||||
|
|
||||||
typedef typename TypeCoeffField::scalarTypeField scalarTypeField;
|
|
||||||
typedef typename TypeCoeffField::linearTypeField linearTypeField;
|
|
||||||
typedef typename TypeCoeffField::squareTypeField squareTypeField;
|
|
||||||
|
|
||||||
for (label sweep = 0; sweep < nSweeps_; sweep++)
|
for (label sweep = 0; sweep < nSweeps_; sweep++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,9 +56,7 @@ Foam::tmp<Foam::CoeffField<Type> > Foam::GAMGInterface::agglomerateBlockCoeffs
|
||||||
CoeffField<Type>& coarseCoeffs = tcoarseCoeffs();
|
CoeffField<Type>& coarseCoeffs = tcoarseCoeffs();
|
||||||
|
|
||||||
typedef CoeffField<Type> TypeCoeffField;
|
typedef CoeffField<Type> TypeCoeffField;
|
||||||
typedef Field<Type> TypeField;
|
|
||||||
|
|
||||||
typedef typename TypeCoeffField::scalarTypeField scalarTypeField;
|
|
||||||
typedef typename TypeCoeffField::linearTypeField linearTypeField;
|
typedef typename TypeCoeffField::linearTypeField linearTypeField;
|
||||||
typedef typename TypeCoeffField::squareTypeField squareTypeField;
|
typedef typename TypeCoeffField::squareTypeField squareTypeField;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,12 @@ namespace Foam
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
makePatchTypeField(fvPatch##Type##Field, calculatedFvPatch##Type##Field);
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
calculatedFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -88,9 +88,14 @@ void cyclicFvPatchField<Type>::updateInterfaceMatrix \
|
||||||
|
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
VectorNMatrixInterfaceFunc(type) \
|
|
||||||
\
|
\
|
||||||
makePatchTypeField(fvPatch##Type##Field, cyclicFvPatch##Type##Field);
|
VectorNMatrixInterfaceFunc(type) \
|
||||||
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
cyclicFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,13 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
makePatchTypeField(fvPatch##Type##Field, emptyFvPatch##Type##Field);
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
emptyFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,13 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
makePatchTypeField(fvPatch##Type##Field, fixedGradientFvPatch##Type##Field);
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
fixedGradientFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,13 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
makePatchTypeField(fvPatch##Type##Field, fixedValueFvPatch##Type##Field);
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
fixedValueFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,14 @@ void processorFvPatchField<Type>::updateInterfaceMatrix \
|
||||||
|
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
VectorNMatrixInterfaceFunc(type) \
|
|
||||||
\
|
\
|
||||||
makePatchTypeField(fvPatch##Type##Field, processorFvPatch##Type##Field);
|
VectorNMatrixInterfaceFunc(type) \
|
||||||
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
processorFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -34,44 +34,49 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define makeVectorTensorNWedgeFuncDefs(Type) \
|
#define makeVectorTensorNWedgeFuncDefs(Type) \
|
||||||
template<> \
|
template<> \
|
||||||
tmp<Field<Type> > wedgeFvPatchField<Type>::snGrad() const \
|
tmp<Field<Type> > wedgeFvPatchField<Type>::snGrad() const \
|
||||||
{ \
|
{ \
|
||||||
return tmp<Field<Type> > \
|
return tmp<Field<Type> > \
|
||||||
( \
|
( \
|
||||||
new Field<Type>(size(), pTraits<Type>::zero) \
|
new Field<Type>(size(), pTraits<Type>::zero) \
|
||||||
); \
|
); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
template<> \
|
template<> \
|
||||||
void wedgeFvPatchField<Type>::evaluate( \
|
void wedgeFvPatchField<Type>::evaluate( \
|
||||||
const Pstream::commsTypes commsType \
|
const Pstream::commsTypes commsType \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
if (!updated()) \
|
if (!updated()) \
|
||||||
{ \
|
{ \
|
||||||
updateCoeffs(); \
|
updateCoeffs(); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
operator==(patchInternalField()); \
|
operator==(patchInternalField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
template<> \
|
template<> \
|
||||||
tmp<Field<Type> > wedgeFvPatchField<Type>::snGradTransformDiag()\
|
tmp<Field<Type> > wedgeFvPatchField<Type>::snGradTransformDiag() \
|
||||||
const \
|
const \
|
||||||
{ \
|
{ \
|
||||||
return tmp<Field<Type> > \
|
return tmp<Field<Type> > \
|
||||||
( \
|
( \
|
||||||
new Field<Type>(this->size(), pTraits<Type>::zero) \
|
new Field<Type>(this->size(), pTraits<Type>::zero) \
|
||||||
); \
|
); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
makeVectorTensorNWedgeFuncDefs(type) \
|
\
|
||||||
\
|
makeVectorTensorNWedgeFuncDefs(type) \
|
||||||
makePatchTypeField(fvPatch##Type##Field, wedgeFvPatch##Type##Field);
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
wedgeFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
|
@ -34,8 +34,13 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define doMakePatchTypeField(type, Type, args...) \
|
#define doMakePatchTypeField(type, Type, args...) \
|
||||||
makePatchTypeField(fvPatch##Type##Field, zeroGradientFvPatch##Type##Field);
|
\
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatch##Type##Field, \
|
||||||
|
zeroGradientFvPatch##Type##Field \
|
||||||
|
);
|
||||||
|
|
||||||
forAllVectorNTypes(doMakePatchTypeField)
|
forAllVectorNTypes(doMakePatchTypeField)
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,10 @@ void eMesh::calcEdgePoints() const
|
||||||
// If a boundary point is present, that must begin the list.
|
// If a boundary point is present, that must begin the list.
|
||||||
// NOTE: Will work only on tetrahedral meshes!
|
// NOTE: Will work only on tetrahedral meshes!
|
||||||
|
|
||||||
|
# ifdef FULLDEBUG
|
||||||
bool found;
|
bool found;
|
||||||
|
# endif
|
||||||
|
|
||||||
label faceIndex = -1;
|
label faceIndex = -1;
|
||||||
label cellIndex = -1;
|
label cellIndex = -1;
|
||||||
const labelList& owner = mesh_.faceOwner();
|
const labelList& owner = mesh_.faceOwner();
|
||||||
|
@ -246,7 +249,9 @@ void eMesh::calcEdgePoints() const
|
||||||
|
|
||||||
const cell& cellToCheck = cells[cellIndex];
|
const cell& cellToCheck = cells[cellIndex];
|
||||||
|
|
||||||
|
# ifdef FULLDEBUG
|
||||||
found = false;
|
found = false;
|
||||||
|
# endif
|
||||||
|
|
||||||
// Assuming tet-cells,
|
// Assuming tet-cells,
|
||||||
// Loop through edgeFaces and get the next face
|
// Loop through edgeFaces and get the next face
|
||||||
|
@ -259,7 +264,11 @@ void eMesh::calcEdgePoints() const
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
faceIndex = cellToCheck[0];
|
faceIndex = cellToCheck[0];
|
||||||
|
|
||||||
|
# ifdef FULLDEBUG
|
||||||
found = true;
|
found = true;
|
||||||
|
# endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +279,11 @@ void eMesh::calcEdgePoints() const
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
faceIndex = cellToCheck[1];
|
faceIndex = cellToCheck[1];
|
||||||
|
|
||||||
|
# ifdef FULLDEBUG
|
||||||
found = true;
|
found = true;
|
||||||
|
# endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +294,11 @@ void eMesh::calcEdgePoints() const
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
faceIndex = cellToCheck[2];
|
faceIndex = cellToCheck[2];
|
||||||
|
|
||||||
|
# ifdef FULLDEBUG
|
||||||
found = true;
|
found = true;
|
||||||
|
# endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,7 +309,11 @@ void eMesh::calcEdgePoints() const
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
faceIndex = cellToCheck[3];
|
faceIndex = cellToCheck[3];
|
||||||
|
|
||||||
|
# ifdef FULLDEBUG
|
||||||
found = true;
|
found = true;
|
||||||
|
# endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection
|
||||||
const scalar projectLen = mag(mesh.bounds().max()-mesh.bounds().min());
|
const scalar projectLen = mag(mesh.bounds().max()-mesh.bounds().min());
|
||||||
|
|
||||||
// For case of fixed projection vector:
|
// For case of fixed projection vector:
|
||||||
vector projectVec;
|
vector projectVec(vector::zero);
|
||||||
if (projectMode_ == FIXEDNORMAL)
|
if (projectMode_ == FIXEDNORMAL)
|
||||||
{
|
{
|
||||||
vector n = projectDir_/mag(projectDir_);
|
vector n = projectDir_/mag(projectDir_);
|
||||||
|
|
|
@ -33,7 +33,7 @@ License
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
makePatchTypeField(fvPatchScalarField, fanFvPatchScalarField);
|
makeTemplatePatchTypeField(fvPatchScalarField, fanFvPatchScalarField);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
|
@ -35,8 +35,17 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePatchTypeField(fvPatchVectorField, fixedNormalSlipFvPatchVectorField);
|
makeTemplatePatchTypeField
|
||||||
makePatchTypeField(fvPatchTensorField, fixedNormalSlipFvPatchTensorField);
|
(
|
||||||
|
fvPatchVectorField,
|
||||||
|
fixedNormalSlipFvPatchVectorField
|
||||||
|
);
|
||||||
|
|
||||||
|
makeTemplatePatchTypeField
|
||||||
|
(
|
||||||
|
fvPatchTensorField,
|
||||||
|
fixedNormalSlipFvPatchTensorField
|
||||||
|
);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
|
@ -540,60 +540,84 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define makePatchTypeFieldTypeName(type) \
|
#define addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||||
\
|
\
|
||||||
defineNamedTemplateTypeNameAndDebug(type, 0);
|
addToRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
#define makePatchFieldsTypeName(type) \
|
PatchTypeField, typePatchTypeField, patch \
|
||||||
\
|
); \
|
||||||
makePatchTypeFieldTypeName(type##FvPatchScalarField); \
|
\
|
||||||
makePatchTypeFieldTypeName(type##FvPatchVectorField); \
|
addToRunTimeSelectionTable \
|
||||||
makePatchTypeFieldTypeName(type##FvPatchSphericalTensorField); \
|
( \
|
||||||
makePatchTypeFieldTypeName(type##FvPatchSymmTensorField); \
|
PatchTypeField, \
|
||||||
makePatchTypeFieldTypeName(type##FvPatchTensorField);
|
typePatchTypeField, \
|
||||||
|
patchMapper \
|
||||||
#define makePatchTypeField(PatchTypeField, typePatchTypeField) \
|
); \
|
||||||
\
|
\
|
||||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
addToRunTimeSelectionTable \
|
||||||
\
|
( \
|
||||||
addToRunTimeSelectionTable \
|
PatchTypeField, typePatchTypeField, dictionary \
|
||||||
( \
|
|
||||||
PatchTypeField, typePatchTypeField, patch \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
addToRunTimeSelectionTable \
|
|
||||||
( \
|
|
||||||
PatchTypeField, \
|
|
||||||
typePatchTypeField, \
|
|
||||||
patchMapper \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
addToRunTimeSelectionTable \
|
|
||||||
( \
|
|
||||||
PatchTypeField, typePatchTypeField, dictionary \
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
#define makePatchFields(type) \
|
#define makePatchTypeFieldTypeName(type) \
|
||||||
\
|
\
|
||||||
makePatchTypeField(fvPatchScalarField, type##FvPatchScalarField); \
|
defineNamedTemplateTypeNameAndDebug(type, 0);
|
||||||
makePatchTypeField(fvPatchVectorField, type##FvPatchVectorField); \
|
|
||||||
makePatchTypeField \
|
|
||||||
( \
|
|
||||||
fvPatchSphericalTensorField, \
|
|
||||||
type##FvPatchSphericalTensorField \
|
|
||||||
); \
|
|
||||||
makePatchTypeField(fvPatchSymmTensorField, type##FvPatchSymmTensorField); \
|
|
||||||
makePatchTypeField(fvPatchTensorField, type##FvPatchTensorField);
|
|
||||||
|
|
||||||
|
|
||||||
#define makePatchTypeFieldTypedefs(type) \
|
#define makePatchFieldsTypeName(type) \
|
||||||
\
|
\
|
||||||
typedef type##FvPatchField<scalar> type##FvPatchScalarField; \
|
makePatchTypeFieldTypeName(type##FvPatchScalarField); \
|
||||||
typedef type##FvPatchField<vector> type##FvPatchVectorField; \
|
makePatchTypeFieldTypeName(type##FvPatchVectorField); \
|
||||||
typedef type##FvPatchField<sphericalTensor> \
|
makePatchTypeFieldTypeName(type##FvPatchSphericalTensorField); \
|
||||||
type##FvPatchSphericalTensorField; \
|
makePatchTypeFieldTypeName(type##FvPatchSymmTensorField); \
|
||||||
typedef type##FvPatchField<symmTensor> type##FvPatchSymmTensorField; \
|
makePatchTypeFieldTypeName(type##FvPatchTensorField);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||||
|
\
|
||||||
|
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||||
|
\
|
||||||
|
addToPatchFieldRunTimeSelection \
|
||||||
|
( \
|
||||||
|
PatchTypeField, typePatchTypeField \
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#define makeTemplatePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||||
|
\
|
||||||
|
addToPatchFieldRunTimeSelection \
|
||||||
|
( \
|
||||||
|
PatchTypeField, typePatchTypeField \
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePatchFields(type) \
|
||||||
|
\
|
||||||
|
makeTemplatePatchTypeField(fvPatchScalarField, type##FvPatchScalarField); \
|
||||||
|
makeTemplatePatchTypeField(fvPatchVectorField, type##FvPatchVectorField); \
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatchSphericalTensorField, \
|
||||||
|
type##FvPatchSphericalTensorField \
|
||||||
|
); \
|
||||||
|
makeTemplatePatchTypeField \
|
||||||
|
( \
|
||||||
|
fvPatchSymmTensorField, \
|
||||||
|
type##FvPatchSymmTensorField \
|
||||||
|
); \
|
||||||
|
makeTemplatePatchTypeField(fvPatchTensorField, type##FvPatchTensorField);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePatchTypeFieldTypedefs(type) \
|
||||||
|
\
|
||||||
|
typedef type##FvPatchField<scalar> type##FvPatchScalarField; \
|
||||||
|
typedef type##FvPatchField<vector> type##FvPatchVectorField; \
|
||||||
|
typedef type##FvPatchField<sphericalTensor> \
|
||||||
|
type##FvPatchSphericalTensorField; \
|
||||||
|
typedef type##FvPatchField<symmTensor> type##FvPatchSymmTensorField; \
|
||||||
typedef type##FvPatchField<tensor> type##FvPatchTensorField;
|
typedef type##FvPatchField<tensor> type##FvPatchTensorField;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,5 +30,6 @@ $(amg)/coarseAmgLevel.C
|
||||||
amgPolicy = $(amg)/amgPolicy
|
amgPolicy = $(amg)/amgPolicy
|
||||||
$(amgPolicy)/amgPolicy.C
|
$(amgPolicy)/amgPolicy.C
|
||||||
$(amgPolicy)/pamgPolicy.C
|
$(amgPolicy)/pamgPolicy.C
|
||||||
|
$(amgPolicy)/aamgPolicy.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/liblduSolvers
|
LIB = $(FOAM_LIBBIN)/liblduSolvers
|
||||||
|
|
|
@ -140,7 +140,7 @@ void Foam::coarseAmgLevel::restrictResidual
|
||||||
// Calculate residual
|
// Calculate residual
|
||||||
scalarField::subField resBuf(xBuffer, x.size());
|
scalarField::subField resBuf(xBuffer, x.size());
|
||||||
|
|
||||||
scalarField& res = reinterpret_cast<scalarField&>(resBuf);
|
scalarField& res = const_cast<scalarField&>(resBuf.operator const scalarField&());
|
||||||
|
|
||||||
residual(x, b, cmpt, res);
|
residual(x, b, cmpt, res);
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ void Foam::coarseAmgLevel::scaleX
|
||||||
|
|
||||||
matrixPtr_->matrix().Amul
|
matrixPtr_->matrix().Amul
|
||||||
(
|
(
|
||||||
reinterpret_cast<scalarField&>(Ax),
|
const_cast<scalarField&>(Ax.operator const scalarField&()),
|
||||||
x,
|
x,
|
||||||
matrixPtr_->coupleBouCoeffs(),
|
matrixPtr_->coupleBouCoeffs(),
|
||||||
matrixPtr_->interfaceFields(),
|
matrixPtr_->interfaceFields(),
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePointPatchTypeField
|
makeTemplatePointPatchTypeField
|
||||||
(
|
(
|
||||||
tetPolyPatchVectorField,
|
tetPolyPatchVectorField,
|
||||||
componentMixedTetPolyPatchVectorField
|
componentMixedTetPolyPatchVectorField
|
||||||
|
|
|
@ -133,18 +133,18 @@ defineTemplateRunTimeSelectionTable(chemistryReader<Thermo>, dictionary);
|
||||||
|
|
||||||
#define makeChemistryReaderType(SS, Thermo) \
|
#define makeChemistryReaderType(SS, Thermo) \
|
||||||
\
|
\
|
||||||
defineNamedTemplateTypeNameAndDebug(SS<Thermo>, 0); \
|
defineNamedTemplateTypeNameAndDebug(SS<Thermo>, 0); \
|
||||||
\
|
\
|
||||||
chemistryReader<Thermo>::adddictionaryConstructorToTable<SS<Thermo> > \
|
chemistryReader<Thermo>::adddictionaryConstructorToTable<SS<Thermo> > \
|
||||||
add##SS##Thermo##ConstructorToTable_;
|
add##SS##Thermo##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
#define addChemistryReaderType(SS, Thermo) \
|
#define addChemistryReaderType(SS, Thermo) \
|
||||||
\
|
\
|
||||||
defineNamedTemplateTypeNameAndDebug(SS, 0); \
|
defineTypeNameAndDebug(SS, 0); \
|
||||||
\
|
\
|
||||||
chemistryReader<Thermo>::adddictionaryConstructorToTable<SS> \
|
chemistryReader<Thermo>::adddictionaryConstructorToTable<SS> \
|
||||||
add##SS##Thermo##ConstructorToTable_;
|
add##SS##Thermo##ConstructorToTable_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
|
@ -98,7 +98,7 @@ class janafThermo
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static const int nCoeffs_ = 7;
|
static const int nCoeffs_ = 7;
|
||||||
typedef scalar coeffArray[7];
|
typedef FixedList<scalar, nCoeffs_> coeffArray;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,8 @@ inline Foam::janafThermo<equationOfState>::janafThermo
|
||||||
Thigh_(Thigh),
|
Thigh_(Thigh),
|
||||||
Tcommon_(Tcommon)
|
Tcommon_(Tcommon)
|
||||||
{
|
{
|
||||||
for (register label coefLabel=0; coefLabel<nCoeffs_; coefLabel++)
|
highCpCoeffs_ == highCpCoeffs;
|
||||||
{
|
lowCpCoeffs_ == lowCpCoeffs;
|
||||||
highCpCoeffs_[coefLabel] = highCpCoeffs[coefLabel];
|
|
||||||
lowCpCoeffs_[coefLabel] = lowCpCoeffs[coefLabel];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue