Commit a09815fa authored by Andrew Heather's avatar Andrew Heather
Browse files

Merge branch 'feature-post-release-cleaning' into 'develop'

Feature post release cleaning

See merge request !122
parents 42bf91f3 6afa62a6
......@@ -34,6 +34,7 @@ License
#include "fvcFlux.H"
#include "fvcMeshPhi.H"
#include "surfaceInterpolate.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
......@@ -43,10 +44,6 @@ namespace Foam
}
const Foam::scalar Foam::multiphaseMixtureThermo::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::multiphaseMixtureThermo::calcAlphas()
......@@ -855,7 +852,7 @@ void Foam::multiphaseMixtureThermo::correctContactAngle
bool matched = (tp.key().first() == alpha1.name());
scalar theta0 = convertToRad*tp().theta0(matched);
const scalar theta0 = degToRad(tp().theta0(matched));
scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta();
......@@ -863,8 +860,8 @@ void Foam::multiphaseMixtureThermo::correctContactAngle
// Calculate the dynamic contact angle if required
if (uTheta > SMALL)
{
scalar thetaA = convertToRad*tp().thetaA(matched);
scalar thetaR = convertToRad*tp().thetaR(matched);
const scalar thetaA = degToRad(tp().thetaA(matched));
const scalar thetaR = degToRad(tp().thetaR(matched));
// Calculated the component of the velocity parallel to the wall
vectorField Uwall
......
......@@ -144,9 +144,6 @@ private:
//- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions
......
......@@ -30,12 +30,7 @@ License
#include "fvcDiv.H"
#include "fvcGrad.H"
#include "fvcSnGrad.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const Foam::scalar Foam::threePhaseInterfaceProperties::convertToRad =
Foam::constant::mathematical::pi/180.0;
#include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......@@ -83,7 +78,7 @@ void Foam::threePhaseInterfaceProperties::correctContactAngle
scalarField theta
(
convertToRad
degToRad()
* (
twoPhaseAlpha2*(180 - a2cap.theta(U[patchi], nHatp))
+ twoPhaseAlpha3*(180 - a3cap.theta(U[patchi], nHatp))
......
......@@ -91,10 +91,6 @@ class threePhaseInterfaceProperties
public:
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Constructors
//- Construct from volume fraction field alpha and IOdictionary
......
......@@ -35,12 +35,7 @@ License
#include "fvcDiv.H"
#include "fvcFlux.H"
#include "fvcAverage.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const Foam::scalar Foam::multiphaseSystem::convertToRad =
Foam::constant::mathematical::pi/180.0;
#include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......@@ -290,7 +285,7 @@ void Foam::multiphaseSystem::correctContactAngle
bool matched = (tp.key().first() == phase1.name());
scalar theta0 = convertToRad*tp().theta0(matched);
const scalar theta0 = degToRad(tp().theta0(matched));
scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta();
......@@ -298,8 +293,8 @@ void Foam::multiphaseSystem::correctContactAngle
// Calculate the dynamic contact angle if required
if (uTheta > SMALL)
{
scalar thetaA = convertToRad*tp().thetaA(matched);
scalar thetaR = convertToRad*tp().thetaR(matched);
const scalar thetaA = degToRad(tp().thetaA(matched));
const scalar thetaR = degToRad(tp().thetaR(matched));
// Calculated the component of the velocity parallel to the wall
vectorField Uwall
......
......@@ -187,9 +187,6 @@ private:
//- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions
......
......@@ -33,12 +33,7 @@ License
#include "fvcSnGrad.H"
#include "fvcDiv.H"
#include "fvcFlux.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const Foam::scalar Foam::multiphaseMixture::convertToRad =
Foam::constant::mathematical::pi/180.0;
#include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......@@ -456,7 +451,7 @@ void Foam::multiphaseMixture::correctContactAngle
bool matched = (tp.key().first() == alpha1.name());
scalar theta0 = convertToRad*tp().theta0(matched);
const scalar theta0 = degToRad(tp().theta0(matched));
scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta();
......@@ -464,8 +459,8 @@ void Foam::multiphaseMixture::correctContactAngle
// Calculate the dynamic contact angle if required
if (uTheta > SMALL)
{
scalar thetaA = convertToRad*tp().thetaA(matched);
scalar thetaR = convertToRad*tp().thetaR(matched);
const scalar thetaA = degToRad(tp().thetaA(matched));
const scalar thetaR = degToRad(tp().thetaR(matched));
// Calculated the component of the velocity parallel to the wall
vectorField Uwall
......
......@@ -154,9 +154,6 @@ private:
//- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions
......
......@@ -40,6 +40,8 @@ License
#include "fvmLaplacian.H"
#include "fvmSup.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
namespace Foam
......@@ -48,9 +50,6 @@ namespace Foam
defineRunTimeSelectionTable(multiphaseSystem, dictionary);
}
const Foam::scalar Foam::multiphaseSystem::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......@@ -399,7 +398,7 @@ void Foam::multiphaseSystem::correctContactAngle
bool matched = (tp.key().first() == phase1.name());
scalar theta0 = convertToRad*tp().theta0(matched);
const scalar theta0 = degToRad(tp().theta0(matched));
scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta();
......@@ -407,8 +406,8 @@ void Foam::multiphaseSystem::correctContactAngle
// Calculate the dynamic contact angle if required
if (uTheta > SMALL)
{
scalar thetaA = convertToRad*tp().thetaA(matched);
scalar thetaR = convertToRad*tp().thetaR(matched);
const scalar thetaA = degToRad(tp().thetaA(matched));
const scalar thetaR = degToRad(tp().thetaR(matched));
// Calculated the component of the velocity parallel to the wall
vectorField Uwall
......
......@@ -65,9 +65,6 @@ class multiphaseSystem
//- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions
......@@ -207,10 +204,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "multiphaseSystemI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -43,26 +43,17 @@ using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<>
const char* Foam::NamedEnum
const Foam::Enum
<
Foam::compressible::
alphatWallBoilingWallFunctionFvPatchScalarField::phaseType,
2
>::names[] =
{
"vapor",
"liquid"
};
const Foam::NamedEnum
<
Foam::compressible::
alphatWallBoilingWallFunctionFvPatchScalarField::phaseType,
2
alphatWallBoilingWallFunctionFvPatchScalarField::phaseType
>
Foam::compressible::
alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_;
alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_
{
{ phaseType::vaporPhase, "vapor" },
{ phaseType::liquidPhase, "liquid" },
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -111,7 +102,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
)
:
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict),
phaseType_(phaseTypeNames_.read(dict.lookup("phaseType"))),
phaseType_(phaseTypeNames_.lookup("phaseType", dict)),
relax_(dict.lookupOrDefault<scalar>("relax", 0.5)),
AbyV_(p.size(), 0),
alphatConv_(p.size(), 0),
......
......@@ -164,7 +164,7 @@ private:
// Private data
//- Heat source type names
static const NamedEnum<phaseType, 2> phaseTypeNames_;
static const Enum<phaseType> phaseTypeNames_;
//- Heat source type
phaseType phaseType_;
......
......@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
std::vector<bool> stlVector(n, true);
labelHashSet emptyHash;
labelHashSet fullHash(1000);
labelHashSet fullHash(1024);
for (label i = 0; i < n; i++)
{
fullHash.insert(i);
......
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
dictionary dict;
dict.add(word("aa" + getEnv("WM_MPLIB") + "cc"), 16);
string s("DDD${aa${WM_MPLIB}cc}EEE");
string s("DDD_${aa${WM_MPLIB}cc}_EEE");
stringOps::inplaceExpand(s, dict, true, false);
Info<< "variable expansion:" << s << endl;
}
......
......@@ -51,7 +51,7 @@ void testMapDistribute()
List<Tuple2<label, List<scalar>>> complexData(100);
forAll(complexData, i)
{
complexData[i].first() = rndGen.integer(0, Pstream::nProcs()-1);
complexData[i].first() = rndGen.position(0, Pstream::nProcs()-1);
complexData[i].second().setSize(3);
complexData[i].second()[0] = 1;
complexData[i].second()[1] = 2;
......
......@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
fileName pointsFile(runTime.constantPath()/"points.tmp");
OFstream pFile(pointsFile);
scalar a(degToRad(0.1));
const scalar a = 0.1_deg;
tensor rotateZ =
tensor
(
......
......@@ -419,7 +419,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
{
// Distribute the points to be +/- 2.5deg from the x-z plane
scalar tanTheta = Foam::tan(degToRad(2.5));
const scalar tanTheta = Foam::tan(2.5_deg);
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
......
......@@ -69,18 +69,12 @@ enum ExtrudeMode
SURFACE
};
namespace Foam
static const Enum<ExtrudeMode> ExtrudeModeNames
{
template<>
const char* NamedEnum<ExtrudeMode, 3>::names[] =
{
"mesh",
"patch",
"surface"
};
}
static const NamedEnum<ExtrudeMode, 3> ExtrudeModeNames;
{ ExtrudeMode::MESH, "mesh" },
{ ExtrudeMode::PATCH, "patch" },
{ ExtrudeMode::SURFACE, "surface" },
};
void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName)
......@@ -305,9 +299,10 @@ int main(int argc, char *argv[])
const Switch flipNormals(dict.lookup("flipNormals"));
// What to extrude
const ExtrudeMode mode = ExtrudeModeNames.read
const ExtrudeMode mode = ExtrudeModeNames.lookup
(
dict.lookup("constructFrom")
"constructFrom",
dict
);
// Any merging of small edges
......
......@@ -60,17 +60,11 @@ enum ExtrudeMode
MESHEDSURFACE
};
namespace Foam
static const Enum<ExtrudeMode> ExtrudeModeNames
{
template<>
const char* NamedEnum<ExtrudeMode, 2>::names[] =
{
"polyMesh2D",
"MeshedSurface"
};
}
static const NamedEnum<ExtrudeMode, 2> ExtrudeModeNames;
{ ExtrudeMode::POLYMESH2D, "polyMesh2D" },
{ ExtrudeMode::MESHEDSURFACE, "MeshedSurface" },
};
//pointField moveInitialPoints
......
......@@ -42,24 +42,20 @@ License
namespace Foam
{
defineTypeNameAndDebug(conformalVoronoiMesh, 0);
template<>
const char* NamedEnum
<
conformalVoronoiMesh::dualMeshPointType,
5
>::names[] =
{
"internal",
"surface",
"featureEdge",
"featurePoint",
"constrained"
};
}
const Foam::NamedEnum<Foam::conformalVoronoiMesh::dualMeshPointType, 5>
Foam::conformalVoronoiMesh::dualMeshPointTypeNames_;
const Foam::Enum
<
Foam::conformalVoronoiMesh::dualMeshPointType
>
Foam::conformalVoronoiMesh::dualMeshPointTypeNames_
{
{ dualMeshPointType::internal, "internal" },
{ dualMeshPointType::surface, "surface" },
{ dualMeshPointType::featureEdge, "featureEdge" },
{ dualMeshPointType::featurePoint, "featurePoint" },
{ dualMeshPointType::constrained, "constrained" },
};
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment