Bugfix: fvMesh.C and sixDOFqODE.C. Minor changes to lduMatrix and lduAdressing.

This commit is contained in:
Inno Gatin 2017-01-25 14:09:01 +01:00
parent 8bc571ee46
commit c0de9b1b1e
5 changed files with 57 additions and 1 deletions

View file

@ -598,7 +598,7 @@ void Foam::sixDOFqODE::relaxAcceleration
const scalar maxRelFactor
)
{
if (minRelFactor - maxRelFactor < SMALL)
if (mag(minRelFactor - maxRelFactor) < SMALL)
{
// Fixed relaxation
relaxFactorT_ = minRelFactor;

View file

@ -556,6 +556,12 @@ void Foam::fvMesh::updateMesh(const mapPolyMesh& mpm)
// This is a temporary solution
surfaceInterpolation::movePoints();
// Note: deltaCoeffs cannot be left on lazy evaluation on mesh motion
// because tangled comms will occur when they are accessed from
// individual boundary conditions
// HJ, VV and IG, 25/Oct/2016
deltaCoeffs();
// Function object update moved to polyMesh
// HJ, 29/Aug/2010
}
@ -577,6 +583,12 @@ void Foam::fvMesh::syncUpdateMesh()
// This is a temporary solution
surfaceInterpolation::movePoints();
// Note: deltaCoeffs cannot be left on lazy evaluation on mesh motion
// because tangled comms will occur when they are accessed from
// individual boundary conditions
// HJ, VV and IG, 25/Oct/2016
deltaCoeffs();
// Function object update moved to polyMesh
// HJ, 29/Aug/2010
}
@ -681,6 +693,12 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p)
// Function object update moved to polyMesh
// HJ, 29/Aug/2010
// Note: deltaCoeffs cannot be left on lazy evaluation on mesh motion
// because tangled comms will occur when they are accessed from
// individual boundary conditions
// HJ, VV and IG, 25/Oct/2016
deltaCoeffs();
return tsweptVols;
}

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

@ -837,6 +837,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

@ -226,4 +226,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;
}
}
}
// ************************************************************************* //