Use labelField for refinement history to allow for parallel decomposition and reconstruction + load balancing
This commit is contained in:
parent
94af00fa04
commit
cffe702f75
3 changed files with 21 additions and 20 deletions
|
@ -1698,7 +1698,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh)
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
labelList(mesh_.nCells(), 0)
|
labelField(mesh_.nCells(), 0)
|
||||||
),
|
),
|
||||||
pointLevel_
|
pointLevel_
|
||||||
(
|
(
|
||||||
|
@ -1711,7 +1711,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh)
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
labelList(mesh_.nPoints(), 0)
|
labelField(mesh_.nPoints(), 0)
|
||||||
),
|
),
|
||||||
level0Edge_(getLevel0EdgeLength()),
|
level0Edge_(getLevel0EdgeLength()),
|
||||||
history_
|
history_
|
||||||
|
@ -1779,8 +1779,8 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh)
|
||||||
Foam::hexRef8::hexRef8
|
Foam::hexRef8::hexRef8
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const labelList& cellLevel,
|
const labelField& cellLevel,
|
||||||
const labelList& pointLevel,
|
const labelField& pointLevel,
|
||||||
const refinementHistory& history
|
const refinementHistory& history
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
@ -1833,8 +1833,8 @@ Foam::hexRef8::hexRef8
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"hexRef8::hexRef8(const polyMesh&, const labelList&"
|
"hexRef8::hexRef8(const polyMesh&, const labelField&"
|
||||||
", const labelList&, const refinementHistory&)"
|
", const labelField&, const refinementHistory&)"
|
||||||
) << "History enabled but number of visible cells in it "
|
) << "History enabled but number of visible cells in it "
|
||||||
<< history_.visibleCells().size()
|
<< history_.visibleCells().size()
|
||||||
<< " is not equal to the number of cells in the mesh "
|
<< " is not equal to the number of cells in the mesh "
|
||||||
|
@ -1849,8 +1849,8 @@ Foam::hexRef8::hexRef8
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"hexRef8::hexRef8(const polyMesh&, const labelList&"
|
"hexRef8::hexRef8(const polyMesh&, const labelField&"
|
||||||
", const labelList&, const refinementHistory&)"
|
", const labelField&, const refinementHistory&)"
|
||||||
) << "Incorrect cellLevel or pointLevel size." << endl
|
) << "Incorrect cellLevel or pointLevel size." << endl
|
||||||
<< "Number of cells in mesh:" << mesh_.nCells()
|
<< "Number of cells in mesh:" << mesh_.nCells()
|
||||||
<< " does not equal size of cellLevel:" << cellLevel_.size() << endl
|
<< " does not equal size of cellLevel:" << cellLevel_.size() << endl
|
||||||
|
@ -1876,8 +1876,8 @@ Foam::hexRef8::hexRef8
|
||||||
Foam::hexRef8::hexRef8
|
Foam::hexRef8::hexRef8
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const labelList& cellLevel,
|
const labelField& cellLevel,
|
||||||
const labelList& pointLevel
|
const labelField& pointLevel
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
|
|
|
@ -43,6 +43,7 @@ SourceFiles
|
||||||
#include "removeFaces.H"
|
#include "removeFaces.H"
|
||||||
#include "refinementHistory.H"
|
#include "refinementHistory.H"
|
||||||
#include "PackedList.H"
|
#include "PackedList.H"
|
||||||
|
#include "labelIOField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -68,10 +69,10 @@ class hexRef8
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
|
|
||||||
//- Per cell the refinement level
|
//- Per cell the refinement level
|
||||||
labelIOList cellLevel_;
|
labelIOField cellLevel_;
|
||||||
|
|
||||||
//- Per point the refinement level
|
//- Per point the refinement level
|
||||||
labelIOList pointLevel_;
|
labelIOField pointLevel_;
|
||||||
|
|
||||||
//- Typical edge length between unrefined points
|
//- Typical edge length between unrefined points
|
||||||
const scalar level0Edge_;
|
const scalar level0Edge_;
|
||||||
|
@ -326,8 +327,8 @@ public:
|
||||||
hexRef8
|
hexRef8
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const labelList& cellLevel,
|
const labelField& cellLevel,
|
||||||
const labelList& pointLevel,
|
const labelField& pointLevel,
|
||||||
const refinementHistory& history
|
const refinementHistory& history
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -335,8 +336,8 @@ public:
|
||||||
hexRef8
|
hexRef8
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const labelList& cellLevel,
|
const labelField& cellLevel,
|
||||||
const labelList& pointLevel
|
const labelField& pointLevel
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -344,12 +345,12 @@ public:
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
const labelIOList& cellLevel() const
|
const labelIOField& cellLevel() const
|
||||||
{
|
{
|
||||||
return cellLevel_;
|
return cellLevel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelIOList& pointLevel() const
|
const labelIOField& pointLevel() const
|
||||||
{
|
{
|
||||||
return pointLevel_;
|
return pointLevel_;
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,8 +264,8 @@ void Foam::multiDirRefinement::refineHex8
|
||||||
hexRef8 hexRefiner
|
hexRef8 hexRefiner
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
labelList(mesh.nCells(), 0), // cellLevel
|
labelField(mesh.nCells(), 0), // cellLevel
|
||||||
labelList(mesh.nPoints(), 0), // pointLevel
|
labelField(mesh.nPoints(), 0), // pointLevel
|
||||||
refinementHistory
|
refinementHistory
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|
Reference in a new issue