mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Consistency updates after Foundation merge and code tidying
This commit is contained in:
@ -275,7 +275,7 @@ class externalCoupledFunctionObject
|
||||
|
||||
//- Helper: append data from all processors onto master
|
||||
template<class Type>
|
||||
static tmp<Field<Type> > gatherAndCombine(const Field<Type>& fld);
|
||||
static tmp<Field<Type>> gatherAndCombine(const Field<Type>& fld);
|
||||
|
||||
static void checkOrder(const wordList&);
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
// additional processing by derived type.
|
||||
pf.patchFieldType::evaluate();
|
||||
}
|
||||
else if (isA<mixedFvPatchField<Type> >(bf[patchI]))
|
||||
else if (isA<mixedFvPatchField<Type>>(bf[patchI]))
|
||||
{
|
||||
// Read columns from file for
|
||||
// value, snGrad, refValue, refGrad, valueFraction
|
||||
@ -159,7 +159,7 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
mixedFvPatchField<Type>& pf =
|
||||
const_cast<mixedFvPatchField<Type>&>
|
||||
(
|
||||
refCast<const mixedFvPatchField<Type> >
|
||||
refCast<const mixedFvPatchField<Type>>
|
||||
(
|
||||
bf[patchI]
|
||||
)
|
||||
@ -195,7 +195,7 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
// additional processing by derived type.
|
||||
pf.mixedFvPatchField<Type>::evaluate();
|
||||
}
|
||||
else if (isA<fixedGradientFvPatchField<Type> >(bf[patchI]))
|
||||
else if (isA<fixedGradientFvPatchField<Type>>(bf[patchI]))
|
||||
{
|
||||
// Read columns for value and gradient
|
||||
List<scalarField> data;
|
||||
@ -210,7 +210,7 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
fixedGradientFvPatchField<Type>& pf =
|
||||
const_cast<fixedGradientFvPatchField<Type>&>
|
||||
(
|
||||
refCast<const fixedGradientFvPatchField<Type> >
|
||||
refCast<const fixedGradientFvPatchField<Type>>
|
||||
(
|
||||
bf[patchI]
|
||||
)
|
||||
@ -236,7 +236,7 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
// additional processing by derived type.
|
||||
pf.fixedGradientFvPatchField<Type>::evaluate();
|
||||
}
|
||||
else if (isA<fixedValueFvPatchField<Type> >(bf[patchI]))
|
||||
else if (isA<fixedValueFvPatchField<Type>>(bf[patchI]))
|
||||
{
|
||||
// Read columns for value only
|
||||
List<scalarField> data;
|
||||
@ -263,7 +263,7 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
fixedValueFvPatchField<Type>& pf =
|
||||
const_cast<fixedValueFvPatchField<Type>&>
|
||||
(
|
||||
refCast<const fixedValueFvPatchField<Type> >
|
||||
refCast<const fixedValueFvPatchField<Type>>
|
||||
(
|
||||
bf[patchI]
|
||||
)
|
||||
@ -293,20 +293,20 @@ bool Foam::externalCoupledFunctionObject::readData
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::externalCoupledFunctionObject::gatherAndCombine
|
||||
(
|
||||
const Field<Type>& fld
|
||||
)
|
||||
{
|
||||
// Collect values from all processors
|
||||
List<Field<Type> > gatheredValues(Pstream::nProcs());
|
||||
List<Field<Type>> gatheredValues(Pstream::nProcs());
|
||||
gatheredValues[Pstream::myProcNo()] = fld;
|
||||
Pstream::gatherList(gatheredValues);
|
||||
|
||||
|
||||
tmp<Field<Type> > tresult(new Field<Type>(0));
|
||||
Field<Type>& result = tresult();
|
||||
tmp<Field<Type>> tresult(new Field<Type>(0));
|
||||
Field<Type>& result = tresult.ref();
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
@ -456,10 +456,10 @@ bool Foam::externalCoupledFunctionObject::writeData
|
||||
toMaster << os.str();
|
||||
}
|
||||
}
|
||||
else if (isA<mixedFvPatchField<Type> >(bf[patchI]))
|
||||
else if (isA<mixedFvPatchField<Type>>(bf[patchI]))
|
||||
{
|
||||
const mixedFvPatchField<Type>& pf =
|
||||
refCast<const mixedFvPatchField<Type> >(bf[patchI]);
|
||||
refCast<const mixedFvPatchField<Type>>(bf[patchI]);
|
||||
|
||||
Field<Type> value(gatherAndCombine(pf));
|
||||
Field<Type> snGrad(gatherAndCombine(pf.snGrad()()));
|
||||
|
||||
@ -39,8 +39,8 @@ externalCoupledMixedFvPatchField
|
||||
:
|
||||
mixedFvPatchField<Type>(p, iF)
|
||||
{
|
||||
this->refValue() = pTraits<Type>::zero;
|
||||
this->refGrad() = pTraits<Type>::zero;
|
||||
this->refValue() = Type(Zero);
|
||||
this->refGrad() = Type(Zero);
|
||||
this->valueFraction() = 0.0;
|
||||
}
|
||||
|
||||
|
||||
@ -112,9 +112,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchField<Type> > clone() const
|
||||
virtual tmp<fvPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<fvPatchField<Type> >
|
||||
return tmp<fvPatchField<Type>>
|
||||
(
|
||||
new externalCoupledMixedFvPatchField<Type>(*this)
|
||||
);
|
||||
@ -128,12 +128,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchField<Type> > clone
|
||||
virtual tmp<fvPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchField<Type> >
|
||||
return tmp<fvPatchField<Type>>
|
||||
(
|
||||
new externalCoupledMixedFvPatchField<Type>(*this, iF)
|
||||
);
|
||||
|
||||
@ -104,7 +104,7 @@ externalCoupledTemperatureMixedFvPatchScalarField
|
||||
|
||||
// Initialise as a fixed value
|
||||
this->refValue() = *this;
|
||||
this->refGrad() = pTraits<scalar>::zero;
|
||||
this->refGrad() = Zero;
|
||||
this->valueFraction() = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user