mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: place more patch field attributes under template invariant Base
- attributes such as assignable(), coupled() etc - common patchField types: calculatedType(), zeroGradientType() etc. This simplifies reference to these types without actually needing a typed patchField version. ENH: add some basic patchField types to fieldTypes namespace - allows more general use of the names ENH: set extrapolated/calculated from patchInternalField directly - avoids intermediate tmp
This commit is contained in:
@ -105,7 +105,8 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
|
||||
if (!this->readValueEntry(dict))
|
||||
{
|
||||
fvPatchField<scalar>::operator=(patchInternalField());
|
||||
// Fallback: set to the internal field
|
||||
fvPatchField<scalar>::patchInternalField(*this);
|
||||
}
|
||||
|
||||
refValue() = *this;
|
||||
|
||||
@ -47,7 +47,7 @@ tractionDisplacementFvPatchVectorField
|
||||
traction_(p.size(), Zero),
|
||||
pressure_(p.size(), Zero)
|
||||
{
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
fvPatchField<vector>::patchInternalField(*this);
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ tractionDisplacementFvPatchVectorField
|
||||
traction_("traction", dict, p.size()),
|
||||
pressure_("pressure", dict, p.size())
|
||||
{
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
fvPatchField<vector>::patchInternalField(*this);
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ tractionDisplacementCorrectionFvPatchVectorField
|
||||
traction_(p.size(), Zero),
|
||||
pressure_(p.size(), Zero)
|
||||
{
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
fvPatchField<vector>::patchInternalField(*this);
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ tractionDisplacementCorrectionFvPatchVectorField
|
||||
traction_("traction", dict, p.size()),
|
||||
pressure_("pressure", dict, p.size())
|
||||
{
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
fvPatchField<vector>::patchInternalField(*this);
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
|
||||
@ -53,13 +53,13 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
pMesh.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
pMesh,
|
||||
dimensionedVector(dimLength, Zero),
|
||||
pointPatchVectorField::calculatedType()
|
||||
dimensionedVector(dimLength, Zero)
|
||||
// pointPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
pointVectorField V(U + 2*U);
|
||||
|
||||
Reference in New Issue
Block a user