fvOptions: Reorganized and updated to simplify use in sub-models and maintenance

fvOptions are transferred to the database on construction using
fv::options::New which returns a reference.  The same function can be
use for construction and lookup so that fvOptions are now entirely
demand-driven.

The abstract base-classes for fvOptions now reside in the finiteVolume
library simplifying compilation and linkage.  The concrete
implementations of fvOptions are still in the single monolithic
fvOptions library but in the future this will be separated into smaller
libraries based on application area which may be linked at run-time in
the same manner as functionObjects.
This commit is contained in:
Henry Weller
2015-12-02 11:49:52 +00:00
parent ac2a275a75
commit 736621b945
143 changed files with 141 additions and 192 deletions

View File

@ -5,7 +5,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \

View File

@ -41,7 +41,7 @@ Description
#include "turbulenceModel.H"
#include "CompressibleTurbulenceModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "gaussLaplacianScheme.H"
#include "uncorrectedSnGrad.H"

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -11,7 +11,6 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \

View File

@ -42,7 +42,7 @@ Description
#include "immiscibleIncompressibleTwoPhaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "localEulerDdtScheme.H"

View File

@ -46,7 +46,7 @@ Description
#include "immiscibleIncompressibleTwoPhaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "localEulerDdtScheme.H"

View File

@ -11,7 +11,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \

View File

@ -36,7 +36,7 @@ Description
#include "immiscibleIncompressibleThreePhaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "localEulerDdtScheme.H"

View File

@ -8,7 +8,6 @@ EXE_INC = \
-IphaseChangeTwoPhaseMixtures/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude\
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \

View File

@ -11,7 +11,6 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude\
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \

View File

@ -49,7 +49,7 @@ Description
#include "phaseChangeTwoPhaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"

View File

@ -47,7 +47,7 @@ Description
#include "phaseChangeTwoPhaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -11,7 +11,6 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -37,7 +37,7 @@ Description
#include "multiphaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"

View File

@ -36,7 +36,7 @@ Description
#include "multiphaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"

View File

@ -5,7 +5,6 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -9,7 +9,6 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -42,7 +42,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"

View File

@ -38,7 +38,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -45,7 +45,7 @@ SourceFiles
#include "PtrListDictionary.H"
#include "IOMRFZoneList.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "volFields.H"
#include "surfaceFields.H"
@ -177,7 +177,7 @@ protected:
IOMRFZoneList MRF_;
//- Optional FV-options
mutable fv::IOoptionList fvOptions_;
mutable fv::options fvOptions_;
//- Blending methods
blendingMethodTable blendingMethods_;
@ -320,7 +320,7 @@ public:
inline const IOMRFZoneList& MRF() const;
//- Optional FV-options
inline fv::IOoptionList& fvOptions() const;
inline fv::options& fvOptions() const;
//- Access a sub model between a phase pair
template <class modelType>

View File

@ -82,7 +82,7 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const
}
inline Foam::fv::IOoptionList& Foam::phaseSystem::fvOptions() const
inline Foam::fv::options& Foam::phaseSystem::fvOptions() const
{
return fvOptions_;
}

View File

@ -9,7 +9,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -50,4 +50,4 @@ setRefCell
mesh.setFluxRequired(p_rgh.name());
const IOMRFZoneList& MRF = fluid.MRF();
fv::IOoptionList& fvOptions = fluid.fvOptions();
fv::options& fvOptions = fluid.fvOptions();

View File

@ -9,5 +9,4 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

View File

@ -12,7 +12,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -10,7 +10,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -74,4 +74,4 @@ setRefCell
mesh.setFluxRequired(p_rgh.name());
const IOMRFZoneList& MRF = fluid.MRF();
fv::IOoptionList& fvOptions = fluid.fvOptions();
fv::options& fvOptions = fluid.fvOptions();

View File

@ -10,5 +10,4 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

View File

@ -11,7 +11,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -31,7 +31,7 @@ License
#include "fvcDdt.H"
#include "fvcDiv.H"
#include "fvcAverage.H"
#include "fvOptionList.H"
#include "fvOptions.H"
#include "mathematicalConstants.H"
#include "fundamentalConstants.H"
#include "addToRunTimeSelectionTable.H"
@ -155,12 +155,7 @@ void Foam::diameterModels::IATE::correct()
R -= sources_[j].R();
}
// const_cast needed because the operators and functions of fvOptions
// are currently non-const.
fv::optionList& fvOptions = const_cast<fv::optionList&>
(
phase_.mesh().lookupObject<fv::optionList>("fvOptions")
);
fv::options& fvOptions(fv::options::New(phase_.mesh()));
// Construct the interfacial curvature equation
fvScalarMatrix kappaiEqn

View File

@ -10,7 +10,6 @@ EXE_INC = \
-IinterfacialModels/lnInclude \
-ItwoPhaseSystem/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -8,5 +8,4 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

View File

@ -34,7 +34,7 @@ Description
#include "twoPhaseSystem.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "fixedValueFvsPatchFields.H"

View File

@ -8,7 +8,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -32,7 +32,7 @@ License
#include "fvcDdt.H"
#include "fvcDiv.H"
#include "fvcAverage.H"
#include "fvOptionList.H"
#include "fvOptions.H"
#include "mathematicalConstants.H"
#include "fundamentalConstants.H"
#include "addToRunTimeSelectionTable.H"
@ -156,12 +156,7 @@ void Foam::diameterModels::IATE::correct()
R -= sources_[j].R();
}
// const_cast needed because the operators and functions of fvOptions
// are currently non-const.
fv::optionList& fvOptions = const_cast<fv::optionList&>
(
phase_.U().mesh().lookupObject<fv::optionList>("fvOptions")
);
fv::options& fvOptions(fv::options::New(phase_.mesh()));
// Construct the interfacial curvature equation
fvScalarMatrix kappaiEqn