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
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
InfoIn("bool faMesh::movePoints() const")
|
||||
<< "Moving points" << endl;
|
||||
}
|
||||
|
||||
// Grab point motion from polyMesh
|
||||
const vectorField& newPoints = mesh().allPoints();
|
||||
|
||||
|
@ -1278,13 +1284,11 @@ bool Foam::faMesh::movePoints() const
|
|||
{
|
||||
if (S00Ptr_ && S0Ptr_)
|
||||
{
|
||||
Info<< "Copy old-old S" << endl;
|
||||
*S00Ptr_ = *S0Ptr_;
|
||||
}
|
||||
|
||||
if (S0Ptr_)
|
||||
{
|
||||
Info<< "Copy old S" << endl;
|
||||
*S0Ptr_ = S();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -128,10 +128,8 @@ void faMesh::calcLe() const
|
|||
*this,
|
||||
dimLength
|
||||
);
|
||||
|
||||
edgeVectorField& Le = *LePtr_;
|
||||
|
||||
|
||||
const pointField& pPoints = points();
|
||||
const edgeList& pEdges = edges();
|
||||
|
||||
|
@ -187,16 +185,16 @@ void faMesh::calcLe() const
|
|||
patchLe[edgeI] *=
|
||||
- sign
|
||||
(
|
||||
patchLe[edgeI]&
|
||||
(
|
||||
patchLe[edgeI]
|
||||
& (
|
||||
fCentresInternal[bndEdgeFaces[edgeI]]
|
||||
- patchECentres[edgeI]
|
||||
)
|
||||
);
|
||||
|
||||
patchLe[edgeI] *=
|
||||
magLe().boundaryField()[patchI][edgeI]
|
||||
/mag(patchLe[edgeI]);
|
||||
magLe().boundaryField()[patchI][edgeI]/
|
||||
mag(patchLe[edgeI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,12 +38,6 @@ namespace Foam
|
|||
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
||||
|
||||
const Foam::debug::tolerancesSwitch cyclicFaPatch::matchTol_
|
||||
(
|
||||
"patchFaceMatchTol",
|
||||
1e-3
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::cyclicFaPatch::calcTransforms()
|
||||
|
|
|
@ -38,7 +38,6 @@ SourceFiles
|
|||
#include "coupledFaPatch.H"
|
||||
#include "cyclicLduInterface.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -62,12 +61,6 @@ class cyclicFaPatch
|
|||
|
||||
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
|
||||
|
||||
//- Make patch weighting factors
|
||||
|
|
|
@ -29,6 +29,7 @@ Description
|
|||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "IPstream.H"
|
||||
#include "OPstream.H"
|
||||
#include "IOmanip.H"
|
||||
#include "transformField.H"
|
||||
#include "faBoundaryMesh.H"
|
||||
#include "faMesh.H"
|
||||
|
@ -209,17 +210,25 @@ void processorFaPatch::calcGeometry()
|
|||
forAll(magEl, 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
|
||||
(
|
||||
"processorFaPatch::makeWeights(scalarField& w) const"
|
||||
) << "edge " << edgei
|
||||
<< " length does not match neighbour by "
|
||||
<< 100*mag(magEl[edgei] - nmagEl)/avEl
|
||||
<< "% -- possible edge ordering problem"
|
||||
<< 100*mag(magEl[edgei] - nmagEl)/maxEl
|
||||
<< "% -- 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,13 @@ namespace Foam
|
|||
}
|
||||
|
||||
|
||||
const Foam::debug::tolerancesSwitch Foam::faPatch::matchTol_
|
||||
(
|
||||
"faPatchFaceMatchTol",
|
||||
1e-5
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::faPatch::clearOut()
|
||||
|
|
|
@ -43,6 +43,7 @@ SourceFiles
|
|||
#include "faPatchFieldsFwd.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -98,6 +99,15 @@ private:
|
|||
|
||||
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
|
||||
friend class faBoundaryMesh;
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
movingImmersedBoundary/movingImmersedBoundary.C
|
||||
refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C
|
||||
|
||||
movingImmersedBoundary/movingImmersedBoundary.C
|
||||
immersedBoundarySolidBodyMotionFvMesh/immersedBoundarySolidBodyMotionFvMesh.C
|
||||
|
||||
immersedBoundaryDynamicRefineSolidBodyMotionFvMesh/immersedBoundaryDynamicRefineSolidBodyMotionFvMesh.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libimmersedBoundaryDynamicMesh
|
||||
|
|
|
@ -6,7 +6,7 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/meshMotion/solidBodyMotion/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/meshMotion/solidBodyMotion/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-limmersedBoundary \
|
||||
|
|
Reference in a new issue