Added support for block-coupled coefficients in fvPatchFields

This commit is contained in:
Hrvoje Jasak 2017-04-04 16:35:14 +01:00
parent e74a1c666e
commit 3968a5c900

View file

@ -46,6 +46,7 @@ SourceFiles
#include "fvPatch.H"
#include "DimensionedField.H"
#include "coeffFields.H"
#include "debugSwitch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -329,6 +330,14 @@ public:
return false;
}
//- Return true if this patch field is block-coupled in the
// boundary condition, ie. if the coupling coefficient is a
// rank x rank implicit block
virtual bool blockCoupled() const
{
return false;
}
//- Return true if the boundary condition has already been updated
bool updated() const
{
@ -388,8 +397,11 @@ public:
);
// Decoupled matrix coefficients
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the value of this patchField with given weights
// evaluation of the value of this patchField with
// given weights
virtual tmp<Field<Type> > valueInternalCoeffs
(
const tmp<Field<scalar> >&
@ -400,11 +412,13 @@ public:
type()
+ "::valueInternalCoeffs(const tmp<Field<scalar> >&)"
);
return *this;
}
//- Return the matrix source coefficients corresponding to the
// evaluation of the value of this patchField with given weights
// evaluation of the value of this patchField with given
// weights
virtual tmp<Field<Type> > valueBoundaryCoeffs
(
const tmp<Field<scalar> >&
@ -435,6 +449,75 @@ public:
}
// Block-coupled matrix coefficients
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the value of this patchField with given
// weights
virtual tmp<CoeffField<Type> > blockValueInternalCoeffs
(
const tmp<scalarField>&
) const
{
notImplemented
(
type()
+ "::blockValueInternalCoeffs(const tmp<Field<scalar> >&)"
);
return tmp<CoeffField<Type> >
(
new CoeffField<Type>(this->size())
);
}
//- Return the matrix source coefficients corresponding to the
// evaluation of the value of this patchField with given
// weights
virtual tmp<Field<Type> > blockValueBoundaryCoeffs
(
const tmp<scalarField>&
) const
{
notImplemented
(
type()
+ "::blockValueBoundaryCoeffs(const tmp<Field<scalar> >&)"
);
return *this;
}
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField
virtual tmp<CoeffField<Type> >
blockGradientInternalCoeffs() const
{
notImplemented
(
type() + "blockGradientInternalCoeffs() const"
);
return tmp<CoeffField<Type> >
(
new CoeffField<Type>(this->size())
);
}
//- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField
virtual tmp<Field<Type> >
blockGradientBoundaryCoeffs() const
{
notImplemented
(
type() + "::blockGradientBoundaryCoeffs()"
);
return *this;
}
// Patch interpolation and patch flux
//- Calculate patch face interpolate given weighting factors