Bugfix: Added handling for matrix constraints

This commit is contained in:
Hrvoje Jasak 2017-02-10 10:01:22 +00:00
parent c373b855ba
commit f9540ece34
3 changed files with 38 additions and 0 deletions

View file

@ -161,6 +161,15 @@ public:
const Pstream::commsTypes commsType,
const bool switchToLhs
) const = 0;
//- Update the constraints
virtual void updateConstraints
(
const scalarField&,
scalarField&,
const label
) const
{}
};

View file

@ -838,6 +838,15 @@ public:
const bool switchToLhs = false
) const;
//- Update the constraints operating on the solution and the source
// of the system
void updateInterfaceConstraints
(
const scalarField& xif,
scalarField& residual,
const lduInterfaceFieldPtrsList& interfaces
) const;
template<class Type>
tmp<Field<Type> > H(const Field<Type>&) const;

View file

@ -285,4 +285,24 @@ void Foam::lduMatrix::updateMatrixInterfaces
}
void Foam::lduMatrix::updateInterfaceConstraints
(
const scalarField& xif,
scalarField& residual,
const lduInterfaceFieldPtrsList& interfaces
) const
{
label counter = 0;
forAll (interfaces, interfaceI)
{
if (interfaces.set(interfaceI))
{
interfaces[interfaceI].updateConstraints(xif, residual, counter);
++counter;
}
}
}
// ************************************************************************* //