Bugfix: Added handling for matrix constraints
This commit is contained in:
parent
c373b855ba
commit
f9540ece34
3 changed files with 38 additions and 0 deletions
|
@ -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
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
Reference in a new issue