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 "fvPatch.H"
#include "DimensionedField.H" #include "DimensionedField.H"
#include "coeffFields.H"
#include "debugSwitch.H" #include "debugSwitch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -329,6 +330,14 @@ public:
return false; 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 //- Return true if the boundary condition has already been updated
bool updated() const bool updated() const
{ {
@ -388,51 +397,125 @@ public:
); );
//- Return the matrix diagonal coefficients corresponding to the // Decoupled matrix coefficients
// evaluation of the value of this patchField with given weights
virtual tmp<Field<Type> > valueInternalCoeffs //- Return the matrix diagonal coefficients corresponding to the
( // evaluation of the value of this patchField with
const tmp<Field<scalar> >& // given weights
) const virtual tmp<Field<Type> > valueInternalCoeffs
{
notImplemented
( (
type() const tmp<Field<scalar> >&
+ "::valueInternalCoeffs(const tmp<Field<scalar> >&)" ) const
); {
return *this; notImplemented
} (
type()
+ "::valueInternalCoeffs(const tmp<Field<scalar> >&)"
);
//- Return the matrix source coefficients corresponding to the return *this;
// evaluation of the value of this patchField with given weights }
virtual tmp<Field<Type> > valueBoundaryCoeffs
( //- Return the matrix source coefficients corresponding to the
const tmp<Field<scalar> >& // evaluation of the value of this patchField with given
) const // weights
{ virtual tmp<Field<Type> > valueBoundaryCoeffs
notImplemented
( (
type() const tmp<Field<scalar> >&
+ "::valueBoundaryCoeffs(const tmp<Field<scalar> >&)" ) const
); {
return *this; notImplemented
} (
type()
+ "::valueBoundaryCoeffs(const tmp<Field<scalar> >&)"
);
return *this;
}
//- Return the matrix diagonal coefficients corresponding to the //- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField // evaluation of the gradient of this patchField
virtual tmp<Field<Type> > gradientInternalCoeffs() const virtual tmp<Field<Type> > gradientInternalCoeffs() const
{ {
notImplemented(type() + "::gradientInternalCoeffs()"); notImplemented(type() + "::gradientInternalCoeffs()");
return *this; return *this;
} }
//- Return the matrix source coefficients corresponding to the //- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField // evaluation of the gradient of this patchField
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const virtual tmp<Field<Type> > gradientBoundaryCoeffs() const
{ {
notImplemented(type() + "::gradientBoundaryCoeffs()"); notImplemented(type() + "::gradientBoundaryCoeffs()");
return *this; return *this;
} }
// 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 // Patch interpolation and patch flux