STYLE: Refactoring use of meshState in {fv|faMesh}
{fv|fa}Mesh classes inherited the [old] data class (renamed meshState) - meshState removed from inheritance list and added as data members
This commit is contained in:
parent
da20ff2666
commit
79cd147de0
@ -1,6 +1,6 @@
|
|||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::add("finalIteration", true);
|
mesh.data().add("finalIteration", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frozenFlow)
|
if (frozenFlow)
|
||||||
@ -35,5 +35,5 @@ else
|
|||||||
|
|
||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::remove("finalIteration");
|
mesh.data().remove("finalIteration");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::add("finalIteration", true);
|
mesh.data().add("finalIteration", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -35,5 +35,5 @@ if (finalIter)
|
|||||||
|
|
||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::remove("finalIteration");
|
mesh.data().remove("finalIteration");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::add("finalIteration", true);
|
mesh.data().add("finalIteration", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frozenFlow)
|
if (frozenFlow)
|
||||||
@ -36,5 +36,5 @@ else
|
|||||||
|
|
||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::remove("finalIteration");
|
mesh.data().remove("finalIteration");
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::add("finalIteration", true);
|
mesh.data().add("finalIteration", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
hEqn.solve(mesh.solver(h.select(finalIter)));
|
hEqn.solve(mesh.solver(h.select(finalIter)));
|
||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
if (finalIter)
|
if (finalIter)
|
||||||
{
|
{
|
||||||
mesh.data::remove("finalIteration");
|
mesh.data().remove("finalIteration");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ License
|
|||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "localIOdictionary.H"
|
#include "localIOdictionary.H"
|
||||||
#include "data.H"
|
#include "meshState.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -1155,7 +1155,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::relax()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
this->mesh().data::template getOrDefault<bool>
|
this->mesh().data().template getOrDefault<bool>
|
||||||
(
|
(
|
||||||
"finalIteration",
|
"finalIteration",
|
||||||
false
|
false
|
||||||
|
@ -173,6 +173,7 @@ Foam::polyMesh::polyMesh(const IOobject& io, const bool doInit)
|
|||||||
:
|
:
|
||||||
objectRegistry(io),
|
objectRegistry(io),
|
||||||
primitiveMesh(),
|
primitiveMesh(),
|
||||||
|
data_(static_cast<const objectRegistry&>(*this)),
|
||||||
points_
|
points_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -380,6 +381,7 @@ Foam::polyMesh::polyMesh
|
|||||||
:
|
:
|
||||||
objectRegistry(io),
|
objectRegistry(io),
|
||||||
primitiveMesh(),
|
primitiveMesh(),
|
||||||
|
data_(static_cast<const objectRegistry&>(*this)),
|
||||||
points_
|
points_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -533,6 +535,7 @@ Foam::polyMesh::polyMesh
|
|||||||
:
|
:
|
||||||
objectRegistry(io),
|
objectRegistry(io),
|
||||||
primitiveMesh(),
|
primitiveMesh(),
|
||||||
|
data_(static_cast<const objectRegistry&>(*this)),
|
||||||
points_
|
points_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
@ -58,6 +58,7 @@ SourceFiles
|
|||||||
#include "pointZoneMesh.H"
|
#include "pointZoneMesh.H"
|
||||||
#include "faceZoneMesh.H"
|
#include "faceZoneMesh.H"
|
||||||
#include "cellZoneMesh.H"
|
#include "cellZoneMesh.H"
|
||||||
|
#include "meshState.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -117,6 +118,9 @@ private:
|
|||||||
|
|
||||||
// Primitive mesh data
|
// Primitive mesh data
|
||||||
|
|
||||||
|
//- Mesh data
|
||||||
|
meshState data_;
|
||||||
|
|
||||||
//- Points
|
//- Points
|
||||||
pointIOField points_;
|
pointIOField points_;
|
||||||
|
|
||||||
@ -304,6 +308,7 @@ private:
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Public Typedefs
|
// Public Typedefs
|
||||||
@ -429,6 +434,12 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
|
//- Return a reference to the mesh data
|
||||||
|
virtual meshState& data() noexcept {return data_;}
|
||||||
|
|
||||||
|
//- Return a const reference to the mesh data
|
||||||
|
virtual const meshState& data() const noexcept {return data_;}
|
||||||
|
|
||||||
//- Return raw points
|
//- Return raw points
|
||||||
virtual const pointField& points() const;
|
virtual const pointField& points() const;
|
||||||
|
|
||||||
|
@ -452,6 +452,7 @@ Foam::polyMesh::polyMesh
|
|||||||
:
|
:
|
||||||
objectRegistry(io),
|
objectRegistry(io),
|
||||||
primitiveMesh(),
|
primitiveMesh(),
|
||||||
|
data_(static_cast<const objectRegistry&>(*this)),
|
||||||
points_
|
points_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -733,6 +734,7 @@ Foam::polyMesh::polyMesh
|
|||||||
:
|
:
|
||||||
objectRegistry(io),
|
objectRegistry(io),
|
||||||
primitiveMesh(),
|
primitiveMesh(),
|
||||||
|
data_(static_cast<const objectRegistry&>(*this)),
|
||||||
points_
|
points_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
@ -162,7 +162,7 @@ Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve
|
|||||||
|
|
||||||
psi.correctBoundaryConditions();
|
psi.correctBoundaryConditions();
|
||||||
|
|
||||||
psi.mesh().setSolverPerformance(psi.name(), solverPerfVec);
|
psi.mesh().data().setSolverPerformance(psi.name(), solverPerfVec);
|
||||||
|
|
||||||
return solverPerfVec;
|
return solverPerfVec;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ Foam::solverPerformance Foam::faMatrix<Foam::scalar>::solve
|
|||||||
|
|
||||||
psi.correctBoundaryConditions();
|
psi.correctBoundaryConditions();
|
||||||
|
|
||||||
psi.mesh().setSolverPerformance(psi.name(), solverPerf);
|
psi.mesh().data().setSolverPerformance(psi.name(), solverPerf);
|
||||||
|
|
||||||
return solverPerf;
|
return solverPerf;
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,6 @@ Foam::faMesh::faMesh
|
|||||||
faSchemes(mesh()),
|
faSchemes(mesh()),
|
||||||
edgeInterpolation(*this),
|
edgeInterpolation(*this),
|
||||||
faSolution(mesh()),
|
faSolution(mesh()),
|
||||||
data(faMesh::thisDb()), // Always NO_READ, NO_WRITE
|
|
||||||
faceLabels_
|
faceLabels_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -468,7 +467,6 @@ Foam::faMesh::faMesh
|
|||||||
faSchemes(mesh(), io.readOpt()),
|
faSchemes(mesh(), io.readOpt()),
|
||||||
edgeInterpolation(*this),
|
edgeInterpolation(*this),
|
||||||
faSolution(mesh(), io.readOpt()),
|
faSolution(mesh(), io.readOpt()),
|
||||||
data(faMesh::thisDb()), // Always NO_READ, NO_WRITE
|
|
||||||
faceLabels_
|
faceLabels_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -551,11 +549,6 @@ Foam::faMesh::faMesh
|
|||||||
mesh(),
|
mesh(),
|
||||||
static_cast<const faSolution&>(baseMesh)
|
static_cast<const faSolution&>(baseMesh)
|
||||||
),
|
),
|
||||||
data
|
|
||||||
(
|
|
||||||
faMesh::thisDb(),
|
|
||||||
static_cast<const data&>(baseMesh)
|
|
||||||
),
|
|
||||||
faceLabels_
|
faceLabels_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
@ -73,7 +73,6 @@ Author
|
|||||||
#include "faGlobalMeshData.H"
|
#include "faGlobalMeshData.H"
|
||||||
#include "faSchemes.H"
|
#include "faSchemes.H"
|
||||||
#include "faSolution.H"
|
#include "faSolution.H"
|
||||||
#include "data.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -96,8 +95,7 @@ class faMesh
|
|||||||
public lduMesh,
|
public lduMesh,
|
||||||
public faSchemes,
|
public faSchemes,
|
||||||
public edgeInterpolation, // may need input from faSchemes
|
public edgeInterpolation, // may need input from faSchemes
|
||||||
public faSolution,
|
public faSolution
|
||||||
public data
|
|
||||||
{
|
{
|
||||||
// Private (internal) classes/structures
|
// Private (internal) classes/structures
|
||||||
|
|
||||||
@ -647,6 +645,10 @@ public:
|
|||||||
//- Return the current instance directory for faces
|
//- Return the current instance directory for faces
|
||||||
const fileName& facesInstance() const;
|
const fileName& facesInstance() const;
|
||||||
|
|
||||||
|
const meshState& data() const noexcept { return mesh().data(); }
|
||||||
|
|
||||||
|
meshState& data() noexcept { return const_cast<polyMesh&>(mesh()).data(); }
|
||||||
|
|
||||||
|
|
||||||
// Parallel
|
// Parallel
|
||||||
|
|
||||||
|
@ -112,7 +112,8 @@ bool Foam::loopControl::checkConverged() const
|
|||||||
if (!meshPtr) continue;
|
if (!meshPtr) continue;
|
||||||
const fvMesh& regionMesh = *meshPtr;
|
const fvMesh& regionMesh = *meshPtr;
|
||||||
|
|
||||||
const dictionary& solverDict = regionMesh.solverPerformanceDict();
|
const dictionary& solverDict =
|
||||||
|
regionMesh.data().solverPerformanceDict();
|
||||||
for (const entry& dataDictEntry : solverDict)
|
for (const entry& dataDictEntry : solverDict)
|
||||||
{
|
{
|
||||||
const word& variableName = dataDictEntry.keyword();
|
const word& variableName = dataDictEntry.keyword();
|
||||||
|
@ -72,7 +72,7 @@ bool Foam::pimpleControl::criteriaSatisfied()
|
|||||||
bool achieved = true;
|
bool achieved = true;
|
||||||
bool checked = false; // safety that some checks were indeed performed
|
bool checked = false; // safety that some checks were indeed performed
|
||||||
|
|
||||||
const dictionary& solverDict = mesh_.solverPerformanceDict();
|
const dictionary& solverDict = mesh_.data().solverPerformanceDict();
|
||||||
for (const entry& solverPerfDictEntry : solverDict)
|
for (const entry& solverPerfDictEntry : solverDict)
|
||||||
{
|
{
|
||||||
const word& fieldName = solverPerfDictEntry.keyword();
|
const word& fieldName = solverPerfDictEntry.keyword();
|
||||||
@ -219,7 +219,7 @@ bool Foam::pimpleControl::loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
corr_ = 0;
|
corr_ = 0;
|
||||||
mesh_.data::remove("finalIteration");
|
mesh_.data().remove("finalIteration");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ bool Foam::pimpleControl::loop()
|
|||||||
Info<< algorithmName_ << ": converged in " << corr_ - 1
|
Info<< algorithmName_ << ": converged in " << corr_ - 1
|
||||||
<< " iterations" << endl;
|
<< " iterations" << endl;
|
||||||
|
|
||||||
mesh_.data::remove("finalIteration");
|
mesh_.data().remove("finalIteration");
|
||||||
corr_ = 0;
|
corr_ = 0;
|
||||||
converged_ = false;
|
converged_ = false;
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ bool Foam::pimpleControl::loop()
|
|||||||
Info<< algorithmName_ << ": iteration " << corr_ << endl;
|
Info<< algorithmName_ << ": iteration " << corr_ << endl;
|
||||||
storePrevIterFields();
|
storePrevIterFields();
|
||||||
|
|
||||||
mesh_.data::add("finalIteration", true);
|
mesh_.data().add("finalIteration", true);
|
||||||
converged_ = true;
|
converged_ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,7 +250,7 @@ bool Foam::pimpleControl::loop()
|
|||||||
{
|
{
|
||||||
if (finalIter())
|
if (finalIter())
|
||||||
{
|
{
|
||||||
mesh_.data::add("finalIteration", true);
|
mesh_.data().add("finalIteration", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (corr_ <= nCorrPIMPLE_)
|
if (corr_ <= nCorrPIMPLE_)
|
||||||
|
@ -56,7 +56,7 @@ bool Foam::simpleControl::criteriaSatisfied()
|
|||||||
bool achieved = true;
|
bool achieved = true;
|
||||||
bool checked = false; // safety that some checks were indeed performed
|
bool checked = false; // safety that some checks were indeed performed
|
||||||
|
|
||||||
const dictionary& solverDict = mesh_.solverPerformanceDict();
|
const dictionary& solverDict = mesh_.data().solverPerformanceDict();
|
||||||
for (const entry& solverPerfDictEntry : solverDict)
|
for (const entry& solverPerfDictEntry : solverDict)
|
||||||
{
|
{
|
||||||
const word& fieldName = solverPerfDictEntry.keyword();
|
const word& fieldName = solverPerfDictEntry.keyword();
|
||||||
|
@ -193,12 +193,12 @@ void Foam::solutionControl::setFirstIterFlag
|
|||||||
if (force || (check && corr_ <= 1 && corrNonOrtho_ == 0))
|
if (force || (check && corr_ <= 1 && corrNonOrtho_ == 0))
|
||||||
{
|
{
|
||||||
DebugInfo<< "solutionControl: set firstIteration flag" << endl;
|
DebugInfo<< "solutionControl: set firstIteration flag" << endl;
|
||||||
mesh_.data::set("firstIteration", true);
|
mesh_.data().set("firstIteration", true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugInfo<< "solutionControl: remove firstIteration flag" << endl;
|
DebugInfo<< "solutionControl: remove firstIteration flag" << endl;
|
||||||
mesh_.data::remove("firstIteration");
|
mesh_.data().remove("firstIteration");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ bool Foam::functionObjects::solverFieldSelection::updateSelection()
|
|||||||
|
|
||||||
const fvMesh& mesh = static_cast<const fvMesh&>(obr_);
|
const fvMesh& mesh = static_cast<const fvMesh&>(obr_);
|
||||||
|
|
||||||
const dictionary& solverDict = mesh.solverPerformanceDict();
|
const dictionary& solverDict = mesh.data().solverPerformanceDict();
|
||||||
|
|
||||||
const wordList solvedFieldNames(solverDict.sortedToc());
|
const wordList solvedFieldNames(solverDict.sortedToc());
|
||||||
|
|
||||||
|
@ -1257,7 +1257,7 @@ void Foam::fvMatrix<Type>::relax()
|
|||||||
{
|
{
|
||||||
word name = psi_.select
|
word name = psi_.select
|
||||||
(
|
(
|
||||||
psi_.mesh().data::template getOrDefault<bool>
|
psi_.mesh().data().template getOrDefault<bool>
|
||||||
("finalIteration", false)
|
("finalIteration", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1534,7 +1534,7 @@ const Foam::dictionary& Foam::fvMatrix<Type>::solverDict() const
|
|||||||
(
|
(
|
||||||
psi_.select
|
psi_.select
|
||||||
(
|
(
|
||||||
psi_.mesh().data::template getOrDefault<bool>
|
psi_.mesh().data().template getOrDefault<bool>
|
||||||
("finalIteration", false)
|
("finalIteration", false)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -241,7 +241,7 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solveSegregated
|
|||||||
|
|
||||||
psi.correctBoundaryConditions();
|
psi.correctBoundaryConditions();
|
||||||
|
|
||||||
psi.mesh().setSolverPerformance(psi.name(), solverPerfVec);
|
psi.mesh().data().setSolverPerformance(psi.name(), solverPerfVec);
|
||||||
|
|
||||||
return solverPerfVec;
|
return solverPerfVec;
|
||||||
}
|
}
|
||||||
@ -308,7 +308,7 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solveCoupled
|
|||||||
|
|
||||||
psi.correctBoundaryConditions();
|
psi.correctBoundaryConditions();
|
||||||
|
|
||||||
psi.mesh().setSolverPerformance(psi.name(), solverPerf);
|
psi.mesh().data().setSolverPerformance(psi.name(), solverPerf);
|
||||||
|
|
||||||
return solverPerf;
|
return solverPerf;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
|
|||||||
|
|
||||||
psi.correctBoundaryConditions();
|
psi.correctBoundaryConditions();
|
||||||
|
|
||||||
psi.mesh().setSolverPerformance(psi.name(), solverPerf);
|
psi.mesh().data().setSolverPerformance(psi.name(), solverPerf);
|
||||||
|
|
||||||
return solverPerf;
|
return solverPerf;
|
||||||
}
|
}
|
||||||
@ -317,7 +317,11 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::solveSegregated
|
|||||||
);
|
);
|
||||||
|
|
||||||
localPsi.correctBoundaryConditions();
|
localPsi.correctBoundaryConditions();
|
||||||
localPsi.mesh().setSolverPerformance(localPsi.name(), solverPerf);
|
localPsi.mesh().data().setSolverPerformance
|
||||||
|
(
|
||||||
|
localPsi.name(),
|
||||||
|
solverPerf
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return solverPerf;
|
return solverPerf;
|
||||||
|
@ -246,7 +246,6 @@ Foam::fvMesh::fvMesh(const IOobject& io, const bool doInit)
|
|||||||
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
||||||
surfaceInterpolation(*this),
|
surfaceInterpolation(*this),
|
||||||
fvSolution(static_cast<const objectRegistry&>(*this)),
|
fvSolution(static_cast<const objectRegistry&>(*this)),
|
||||||
data(static_cast<const objectRegistry&>(*this)),
|
|
||||||
boundary_(*this, boundaryMesh()),
|
boundary_(*this, boundaryMesh()),
|
||||||
lduPtr_(nullptr),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
@ -384,7 +383,6 @@ Foam::fvMesh::fvMesh
|
|||||||
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
||||||
surfaceInterpolation(*this),
|
surfaceInterpolation(*this),
|
||||||
fvSolution(static_cast<const objectRegistry&>(*this)),
|
fvSolution(static_cast<const objectRegistry&>(*this)),
|
||||||
data(static_cast<const objectRegistry&>(*this)),
|
|
||||||
boundary_(*this),
|
boundary_(*this),
|
||||||
lduPtr_(nullptr),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
@ -421,7 +419,6 @@ Foam::fvMesh::fvMesh
|
|||||||
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
||||||
surfaceInterpolation(*this),
|
surfaceInterpolation(*this),
|
||||||
fvSolution(static_cast<const objectRegistry&>(*this)),
|
fvSolution(static_cast<const objectRegistry&>(*this)),
|
||||||
data(static_cast<const objectRegistry&>(*this)),
|
|
||||||
boundary_(*this),
|
boundary_(*this),
|
||||||
lduPtr_(nullptr),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
@ -496,11 +493,6 @@ Foam::fvMesh::fvMesh
|
|||||||
static_cast<const objectRegistry&>(*this),
|
static_cast<const objectRegistry&>(*this),
|
||||||
static_cast<const fvSolution&>(baseMesh)
|
static_cast<const fvSolution&>(baseMesh)
|
||||||
),
|
),
|
||||||
data
|
|
||||||
(
|
|
||||||
static_cast<const objectRegistry&>(*this),
|
|
||||||
static_cast<const data&>(baseMesh)
|
|
||||||
),
|
|
||||||
boundary_(*this),
|
boundary_(*this),
|
||||||
lduPtr_(nullptr),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
@ -514,6 +506,9 @@ Foam::fvMesh::fvMesh
|
|||||||
phiPtr_(nullptr)
|
phiPtr_(nullptr)
|
||||||
{
|
{
|
||||||
DebugInFunction << "Constructing fvMesh as copy and primitives" << endl;
|
DebugInFunction << "Constructing fvMesh as copy and primitives" << endl;
|
||||||
|
|
||||||
|
// Reset mesh data
|
||||||
|
data().reset(baseMesh.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -546,11 +541,6 @@ Foam::fvMesh::fvMesh
|
|||||||
static_cast<const objectRegistry&>(*this),
|
static_cast<const objectRegistry&>(*this),
|
||||||
static_cast<const fvSolution&>(baseMesh)
|
static_cast<const fvSolution&>(baseMesh)
|
||||||
),
|
),
|
||||||
data
|
|
||||||
(
|
|
||||||
static_cast<const objectRegistry&>(*this),
|
|
||||||
static_cast<const data&>(baseMesh)
|
|
||||||
),
|
|
||||||
boundary_(*this),
|
boundary_(*this),
|
||||||
lduPtr_(nullptr),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
@ -564,6 +554,9 @@ Foam::fvMesh::fvMesh
|
|||||||
phiPtr_(nullptr)
|
phiPtr_(nullptr)
|
||||||
{
|
{
|
||||||
DebugInFunction << "Constructing fvMesh as copy and primitives" << endl;
|
DebugInFunction << "Constructing fvMesh as copy and primitives" << endl;
|
||||||
|
|
||||||
|
// Reset mesh data
|
||||||
|
data().reset(baseMesh.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ SourceFiles
|
|||||||
#include "surfaceInterpolation.H"
|
#include "surfaceInterpolation.H"
|
||||||
#include "fvSchemes.H"
|
#include "fvSchemes.H"
|
||||||
#include "fvSolution.H"
|
#include "fvSolution.H"
|
||||||
#include "data.H"
|
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "surfaceFieldsFwd.H"
|
#include "surfaceFieldsFwd.H"
|
||||||
#include "pointFieldsFwd.H"
|
#include "pointFieldsFwd.H"
|
||||||
@ -87,8 +86,7 @@ class fvMesh
|
|||||||
public lduMesh,
|
public lduMesh,
|
||||||
public fvSchemes,
|
public fvSchemes,
|
||||||
public surfaceInterpolation, // needs input from fvSchemes
|
public surfaceInterpolation, // needs input from fvSchemes
|
||||||
public fvSolution,
|
public fvSolution
|
||||||
public data
|
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ equationInitialResidualCondition::apply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
const dictionary& solverDict = mesh.solverPerformanceDict();
|
const dictionary& solverDict = mesh.data().solverPerformanceDict();
|
||||||
|
|
||||||
const auto& selection = fieldSelection_.selection();
|
const auto& selection = fieldSelection_.selection();
|
||||||
List<scalar> result(selection.size(), -VGREAT);
|
List<scalar> result(selection.size(), -VGREAT);
|
||||||
|
@ -97,7 +97,7 @@ bool Foam::functionObjects::runTimeControls::equationMaxIterCondition::apply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
const dictionary& solverDict = mesh.solverPerformanceDict();
|
const dictionary& solverDict = mesh.data().solverPerformanceDict();
|
||||||
|
|
||||||
List<label> result(fieldNames_.size(), -1);
|
List<label> result(fieldNames_.size(), -1);
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ void Foam::functionObjects::solverInfo::initialiseResidualField
|
|||||||
|
|
||||||
if (foundObject<volFieldType>(fieldName))
|
if (foundObject<volFieldType>(fieldName))
|
||||||
{
|
{
|
||||||
const Foam::dictionary& solverDict = mesh_.solverPerformanceDict();
|
const Foam::dictionary& solverDict =
|
||||||
|
mesh_.data().solverPerformanceDict();
|
||||||
|
|
||||||
if (solverDict.found(fieldName))
|
if (solverDict.found(fieldName))
|
||||||
{
|
{
|
||||||
@ -113,7 +114,8 @@ void Foam::functionObjects::solverInfo::updateSolverInfo(const word& fieldName)
|
|||||||
|
|
||||||
if (foundObject<volFieldType>(fieldName))
|
if (foundObject<volFieldType>(fieldName))
|
||||||
{
|
{
|
||||||
const Foam::dictionary& solverDict = mesh_.solverPerformanceDict();
|
const Foam::dictionary& solverDict =
|
||||||
|
mesh_.data().solverPerformanceDict();
|
||||||
|
|
||||||
if (solverDict.found(fieldName))
|
if (solverDict.found(fieldName))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user