Load balancing development
This commit is contained in:
parent
40e5a3d38c
commit
87d9e2f396
9 changed files with 42 additions and 28 deletions
|
@ -1270,6 +1270,12 @@ const Foam::lduAddressing& Foam::faMesh::lduAddr() const
|
||||||
|
|
||||||
bool Foam::faMesh::movePoints() const
|
bool Foam::faMesh::movePoints() const
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
InfoIn("bool faMesh::movePoints() const")
|
||||||
|
<< "Moving points" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Grab point motion from polyMesh
|
// Grab point motion from polyMesh
|
||||||
const vectorField& newPoints = mesh().allPoints();
|
const vectorField& newPoints = mesh().allPoints();
|
||||||
|
|
||||||
|
@ -1278,13 +1284,11 @@ bool Foam::faMesh::movePoints() const
|
||||||
{
|
{
|
||||||
if (S00Ptr_ && S0Ptr_)
|
if (S00Ptr_ && S0Ptr_)
|
||||||
{
|
{
|
||||||
Info<< "Copy old-old S" << endl;
|
|
||||||
*S00Ptr_ = *S0Ptr_;
|
*S00Ptr_ = *S0Ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (S0Ptr_)
|
if (S0Ptr_)
|
||||||
{
|
{
|
||||||
Info<< "Copy old S" << endl;
|
|
||||||
*S0Ptr_ = S();
|
*S0Ptr_ = S();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -128,10 +128,8 @@ void faMesh::calcLe() const
|
||||||
*this,
|
*this,
|
||||||
dimLength
|
dimLength
|
||||||
);
|
);
|
||||||
|
|
||||||
edgeVectorField& Le = *LePtr_;
|
edgeVectorField& Le = *LePtr_;
|
||||||
|
|
||||||
|
|
||||||
const pointField& pPoints = points();
|
const pointField& pPoints = points();
|
||||||
const edgeList& pEdges = edges();
|
const edgeList& pEdges = edges();
|
||||||
|
|
||||||
|
@ -187,16 +185,16 @@ void faMesh::calcLe() const
|
||||||
patchLe[edgeI] *=
|
patchLe[edgeI] *=
|
||||||
- sign
|
- sign
|
||||||
(
|
(
|
||||||
patchLe[edgeI]&
|
patchLe[edgeI]
|
||||||
(
|
& (
|
||||||
fCentresInternal[bndEdgeFaces[edgeI]]
|
fCentresInternal[bndEdgeFaces[edgeI]]
|
||||||
- patchECentres[edgeI]
|
- patchECentres[edgeI]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
patchLe[edgeI] *=
|
patchLe[edgeI] *=
|
||||||
magLe().boundaryField()[patchI][edgeI]
|
magLe().boundaryField()[patchI][edgeI]/
|
||||||
/mag(patchLe[edgeI]);
|
mag(patchLe[edgeI]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,12 +38,6 @@ namespace Foam
|
||||||
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
||||||
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
||||||
|
|
||||||
const Foam::debug::tolerancesSwitch cyclicFaPatch::matchTol_
|
|
||||||
(
|
|
||||||
"patchFaceMatchTol",
|
|
||||||
1e-3
|
|
||||||
);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::cyclicFaPatch::calcTransforms()
|
void Foam::cyclicFaPatch::calcTransforms()
|
||||||
|
|
|
@ -38,7 +38,6 @@ SourceFiles
|
||||||
#include "coupledFaPatch.H"
|
#include "coupledFaPatch.H"
|
||||||
#include "cyclicLduInterface.H"
|
#include "cyclicLduInterface.H"
|
||||||
#include "cyclicPolyPatch.H"
|
#include "cyclicPolyPatch.H"
|
||||||
#include "tolerancesSwitch.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -62,12 +61,6 @@ class cyclicFaPatch
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected static data
|
|
||||||
|
|
||||||
//- Relative tolerance (for geometric matching). Is factor of
|
|
||||||
// maximum edge length per face.
|
|
||||||
static const debug::tolerancesSwitch matchTol_;
|
|
||||||
|
|
||||||
// Protected Member functions
|
// Protected Member functions
|
||||||
|
|
||||||
//- Make patch weighting factors
|
//- Make patch weighting factors
|
||||||
|
|
|
@ -29,6 +29,7 @@ Description
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "IPstream.H"
|
#include "IPstream.H"
|
||||||
#include "OPstream.H"
|
#include "OPstream.H"
|
||||||
|
#include "IOmanip.H"
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
#include "faBoundaryMesh.H"
|
#include "faBoundaryMesh.H"
|
||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
|
@ -209,17 +210,25 @@ void processorFaPatch::calcGeometry()
|
||||||
forAll(magEl, edgei)
|
forAll(magEl, edgei)
|
||||||
{
|
{
|
||||||
scalar nmagEl = mag(neighbEdgeLengths_[edgei]);
|
scalar nmagEl = mag(neighbEdgeLengths_[edgei]);
|
||||||
scalar avEl = (magEl[edgei] + nmagEl)/2.0;
|
scalar maxEl = Foam::max(magEl[edgei], nmagEl);
|
||||||
|
|
||||||
if (mag(magEl[edgei] - nmagEl)/avEl > 1e-6)
|
if (mag(magEl[edgei] - nmagEl) > faPatch::matchTol_()*maxEl)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"processorFaPatch::makeWeights(scalarField& w) const"
|
"processorFaPatch::makeWeights(scalarField& w) const"
|
||||||
) << "edge " << edgei
|
) << "edge " << edgei
|
||||||
<< " length does not match neighbour by "
|
<< " length does not match neighbour by "
|
||||||
<< 100*mag(magEl[edgei] - nmagEl)/avEl
|
<< 100*mag(magEl[edgei] - nmagEl)/maxEl
|
||||||
<< "% -- possible edge ordering problem"
|
<< "% -- possible edge ordering problem." << nl
|
||||||
|
<< "Local: " << magEl[edgei]
|
||||||
|
<< " Remote: " << nmagEl
|
||||||
|
<< " diff: " << magEl[edgei] - nmagEl << nl
|
||||||
|
<< "Edge: "
|
||||||
|
<< boundaryMesh().mesh().edges()[start() + edgei]
|
||||||
|
<< " points: "
|
||||||
|
<< boundaryMesh().mesh().edges()[start() + edgei]
|
||||||
|
.line(boundaryMesh().mesh().points())
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,13 @@ namespace Foam
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::debug::tolerancesSwitch Foam::faPatch::matchTol_
|
||||||
|
(
|
||||||
|
"faPatchFaceMatchTol",
|
||||||
|
1e-5
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::faPatch::clearOut()
|
void Foam::faPatch::clearOut()
|
||||||
|
|
|
@ -43,6 +43,7 @@ SourceFiles
|
||||||
#include "faPatchFieldsFwd.H"
|
#include "faPatchFieldsFwd.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
|
#include "tolerancesSwitch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -98,6 +99,15 @@ private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
// Protected static data
|
||||||
|
|
||||||
|
//- Relative tolerance (for geometric matching). Is factor of
|
||||||
|
// maximum edge length per face.
|
||||||
|
static const debug::tolerancesSwitch matchTol_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected Member functions
|
||||||
|
|
||||||
// The faPatch geometry initialisation is called by faBoundaryMesh
|
// The faPatch geometry initialisation is called by faBoundaryMesh
|
||||||
friend class faBoundaryMesh;
|
friend class faBoundaryMesh;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
movingImmersedBoundary/movingImmersedBoundary.C
|
||||||
refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C
|
refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C
|
||||||
|
|
||||||
movingImmersedBoundary/movingImmersedBoundary.C
|
|
||||||
immersedBoundarySolidBodyMotionFvMesh/immersedBoundarySolidBodyMotionFvMesh.C
|
immersedBoundarySolidBodyMotionFvMesh/immersedBoundarySolidBodyMotionFvMesh.C
|
||||||
|
|
||||||
immersedBoundaryDynamicRefineSolidBodyMotionFvMesh/immersedBoundaryDynamicRefineSolidBodyMotionFvMesh.C
|
immersedBoundaryDynamicRefineSolidBodyMotionFvMesh/immersedBoundaryDynamicRefineSolidBodyMotionFvMesh.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libimmersedBoundaryDynamicMesh
|
LIB = $(FOAM_LIBBIN)/libimmersedBoundaryDynamicMesh
|
||||||
|
|
|
@ -6,7 +6,7 @@ EXE_INC = \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/meshMotion/solidBodyMotion/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/meshMotion/solidBodyMotion/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-limmersedBoundary \
|
-limmersedBoundary \
|
||||||
|
|
Reference in a new issue