Added compilation instructions with respective fixes for following classes:

1. dynamicPolyRefinementFvMesh
2. refinementSelection
3. fieldBoundsRefinement
This commit is contained in:
Vuko Vukcevic 2018-01-24 10:53:46 +01:00
parent 9e0614a5b5
commit 8393e34d65
6 changed files with 31 additions and 24 deletions

View file

@ -11,4 +11,8 @@ mixerFvMesh/mixerFvMesh.C
multiMixerFvMesh/mixerRotor.C
multiMixerFvMesh/multiMixerFvMesh.C
dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C
dynamicPolyRefinementFvMesh/refinementSelection/refinementSelection/refinementSelection.C
dynamicPolyRefinementFvMesh/refinementSelection/fieldBoundsRefinement/fieldBoundsRefinement.C
LIB = $(FOAM_LIBBIN)/libtopoChangerFvMesh

View file

@ -54,9 +54,9 @@ void Foam::dynamicPolyRefinementFvMesh::readDict()
if (refineInterval_ < 1)
{
FatalErrorIn("dynamicPolyRefinementFvMesh::readDict()")
<< "Illegal refineInterval found: " << refineInterval << nl
<< "Illegal refineInterval found: " << refineInterval_ << nl
<< "The refineInterval controls the refinement/unrefinement"
<< " trigerring within a certain time step and should be > 0".
<< " trigerring within a certain time step and should be > 0"
<< exit(FatalError);
}
}
@ -64,9 +64,12 @@ void Foam::dynamicPolyRefinementFvMesh::readDict()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
dynamicPolyRefinementFvMesh::dynamicPolyRefinementFvMesh(const IOobject& io)
Foam::dynamicPolyRefinementFvMesh::dynamicPolyRefinementFvMesh
(
const IOobject& io
)
:
dynamicFvMesh(io),
topoChangerFvMesh(io),
refinementDict_
(
IOdictionary
@ -110,13 +113,13 @@ dynamicPolyRefinementFvMesh::dynamicPolyRefinementFvMesh(const IOobject& io)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
dynamicPolyRefinementFvMesh::~dynamicPolyRefinementFvMesh()
Foam::dynamicPolyRefinementFvMesh::~dynamicPolyRefinementFvMesh()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool dynamicPolyRefinementFvMesh::update()
bool Foam::dynamicPolyRefinementFvMesh::update()
{
// Re-read the data from dictionary for on-the-fly changes
readDict();
@ -127,7 +130,7 @@ bool dynamicPolyRefinementFvMesh::update()
if
(
time().timeIndex() > 0
&& time().timeIndex() % refineInterval == 0
&& time().timeIndex() % refineInterval_ == 0
)
{
// Get reference to polyhedralRefinement polyMeshModifier
@ -179,8 +182,4 @@ bool dynamicPolyRefinementFvMesh::update()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View file

@ -42,6 +42,7 @@ Notes
#define dynamicPolyRefinementFvMesh_H
#include "topoChangerFvMesh.H"
#include "refinementSelection.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -57,13 +57,13 @@ Foam::fieldBoundsRefinement::fieldBoundsRefinement
const dictionary& dict
)
:
refinementSelection_(mesh, dict),
refinementSelection(mesh, dict),
fieldName_(coeffDict().lookup("fieldName")),
lowerBound_(readScalar(coeffDict().lookup("lowerBound"))),
upperBound_(readScalar(coeffDict().lookup("upperBound"))),
cellPointCellSmoothing_
(
coeffDict.lookupOrDefault<Switch>("cellPointCellSmothing", false)
coeffDict().lookupOrDefault<Switch>("cellPointCellSmothing", false)
)
{}
@ -121,18 +121,18 @@ Foam::fieldBoundsRefinement::refinementCellCandidates() const
// Get current cell value
const scalar& cellValue = vfIn[cellI];
if (cellValue > lowerBound && cellValue < upperBound)
if (cellValue > lowerBound_ && cellValue < upperBound_)
{
// Cell value is within the bounds, append cell for potential
// refinement
refinementCandidates.append(cellI];
refinementCandidates.append(cellI);
}
}
// Print out some information
Info<< "Selection algorithm " << typeName() << " selected "
Info<< "Selection algorithm " << type() << " selected "
<< refinementCandidates.size() << " cells as refinement candidates."
<< endl
<< endl;
// Return the list in the Xfer container to prevent copying
return refinementCandidates.xfer();
@ -164,7 +164,7 @@ Foam::fieldBoundsRefinement::unrefinementPointCandidates() const
// Get point value
const scalar pointValue = pFieldIn[pointI];
if (pointValue > upperBound || pointValue < lowerBound)
if (pointValue > upperBound_ || pointValue < lowerBound_)
{
// Point value is outside of bounds, append point for potential
// unrefinement
@ -173,10 +173,10 @@ Foam::fieldBoundsRefinement::unrefinementPointCandidates() const
}
// Print out some information
Info<< "Selection algorithm " << typeName() << " selected "
Info<< "Selection algorithm " << type() << " selected "
<< unrefinementCandidates.size()
<< " split points as unrefinement candidates."
<< endl
<< endl;
// Return the list in the Xfer container to prevent copying
return unrefinementCandidates.xfer();

View file

@ -42,6 +42,7 @@ Author
#define fieldBoundsRefinement_H
#include "refinementSelection.H"
#include "Switch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -53,6 +54,8 @@ namespace Foam
\*---------------------------------------------------------------------------*/
class fieldBoundsRefinement
:
public refinementSelection
{
// Private data
@ -100,10 +103,10 @@ public:
// Selection of refinement/unrefinement candidates
//- Return transferable list of cells to refine
const Xfer<labelList> refinementCellCandidates() const;
virtual Xfer<labelList> refinementCellCandidates() const;
//- Return transferable list of split points to unrefine
const Xfer<labelList> unrefinementPointCandidates() const;
virtual Xfer<labelList> unrefinementPointCandidates() const;
};

View file

@ -155,10 +155,10 @@ public:
// Selection of refinement/unrefinement candidates
//- Return transferable list of refinement cell candidates
const Xfer<labelList> refinementCellCandidates() const = 0;
virtual Xfer<labelList> refinementCellCandidates() const = 0;
//- Return transferable list of unrefinement split point candidates
const Xfer<labelList> unrefinementPointCandidates() const = 0;
virtual Xfer<labelList> unrefinementPointCandidates() const = 0;
};