fvConstraints: Added support for mesh redistribution and load-balancing
This commit is contained in:
@ -148,18 +148,4 @@ bool Foam::fvConstraint::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvConstraint::updateMesh(const mapPolyMesh&)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fvConstraint::distribute(const mapDistributePolyMesh&)
|
||||
{}
|
||||
|
||||
|
||||
bool Foam::fvConstraint::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -213,13 +213,13 @@ public:
|
||||
// Mesh changes
|
||||
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
virtual void updateMesh(const mapPolyMesh&) = 0;
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
virtual void distribute(const mapDistributePolyMesh&) = 0;
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
virtual bool movePoints() = 0;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
@ -174,6 +174,13 @@ void Foam::fvCellSet::updateMesh(const mapPolyMesh&)
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvCellSet::distribute(const mapDistributePolyMesh&)
|
||||
{
|
||||
setCells();
|
||||
setV();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvCellSet::movePoints()
|
||||
{
|
||||
if (selectionMode_ == selectionModeType::points)
|
||||
|
||||
@ -70,6 +70,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
class fvMesh;
|
||||
class mapDistributePolyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fvCellSet Declaration
|
||||
@ -168,6 +169,9 @@ public:
|
||||
//- Update for mesh changes
|
||||
void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
void movePoints();
|
||||
|
||||
|
||||
@ -156,9 +156,18 @@ bool Foam::fv::fixedTemperatureConstraint::constrain
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::fixedTemperatureConstraint::updateMesh(const mapPolyMesh& mpm)
|
||||
void Foam::fv::fixedTemperatureConstraint::updateMesh(const mapPolyMesh& map)
|
||||
{
|
||||
set_.updateMesh(mpm);
|
||||
set_.updateMesh(map);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::fixedTemperatureConstraint::distribute
|
||||
(
|
||||
const mapDistributePolyMesh& map
|
||||
)
|
||||
{
|
||||
set_.distribute(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -158,6 +158,9 @@ public:
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
@ -117,9 +117,18 @@ FOR_ALL_FIELD_TYPES
|
||||
);
|
||||
|
||||
|
||||
void Foam::fv::fixedValueConstraint::updateMesh(const mapPolyMesh& mpm)
|
||||
void Foam::fv::fixedValueConstraint::updateMesh(const mapPolyMesh& map)
|
||||
{
|
||||
set_.updateMesh(mpm);
|
||||
set_.updateMesh(map);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::fixedValueConstraint::distribute
|
||||
(
|
||||
const mapDistributePolyMesh& map
|
||||
)
|
||||
{
|
||||
set_.distribute(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -121,6 +121,9 @@ public:
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
@ -219,6 +219,21 @@ bool Foam::fv::limitPressure::constrain(volScalarField& p) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::limitPressure::updateMesh(const mapPolyMesh&)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fv::limitPressure::distribute(const mapDistributePolyMesh&)
|
||||
{}
|
||||
|
||||
|
||||
bool Foam::fv::limitPressure::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Foam::fv::limitPressure::read(const dictionary& dict)
|
||||
{
|
||||
if (fvConstraint::read(dict))
|
||||
|
||||
@ -126,6 +126,15 @@ public:
|
||||
//- Constrain the energy field
|
||||
virtual bool constrain(volScalarField& he) const;
|
||||
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
|
||||
@ -183,9 +183,15 @@ bool Foam::fv::limitTemperature::constrain(volScalarField& he) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::limitTemperature::updateMesh(const mapPolyMesh& mpm)
|
||||
void Foam::fv::limitTemperature::updateMesh(const mapPolyMesh& map)
|
||||
{
|
||||
set_.updateMesh(mpm);
|
||||
set_.updateMesh(map);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::limitTemperature::distribute(const mapDistributePolyMesh& map)
|
||||
{
|
||||
set_.distribute(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -133,6 +133,9 @@ public:
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
@ -128,9 +128,15 @@ bool Foam::fv::limitVelocity::constrain(volVectorField& U) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::limitVelocity::updateMesh(const mapPolyMesh& mpm)
|
||||
void Foam::fv::limitVelocity::updateMesh(const mapPolyMesh& map)
|
||||
{
|
||||
set_.updateMesh(mpm);
|
||||
set_.updateMesh(map);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::limitVelocity::distribute(const mapDistributePolyMesh& map)
|
||||
{
|
||||
set_.distribute(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -121,6 +121,9 @@ public:
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
@ -248,9 +248,15 @@ bool Foam::fv::meanVelocityForce::constrain(volVectorField& U) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::meanVelocityForce::updateMesh(const mapPolyMesh& mpm)
|
||||
void Foam::fv::meanVelocityForce::updateMesh(const mapPolyMesh& map)
|
||||
{
|
||||
set_.updateMesh(mpm);
|
||||
set_.updateMesh(map);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::meanVelocityForce::distribute(const mapDistributePolyMesh& map)
|
||||
{
|
||||
set_.distribute(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -158,6 +158,9 @@ public:
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update mesh corresponding to the given distribution map
|
||||
virtual void distribute(const mapDistributePolyMesh&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user