Commit c05dab5e authored by sergio's avatar sergio
Browse files

Merge branch 'develop-pre-release' of...

Merge branch 'develop-pre-release' of develop.openfoam.com:Development/OpenFOAM-plus into develop-pre-release
parents dcfaeef0 55613079
......@@ -4,6 +4,6 @@
[submodule "avalanche"]
path = modules/avalanche
url = https://develop.openfoam.com/Community/avalanche.git
[submodule "modules/catalyst"]
[submodule "catalyst"]
path = modules/catalyst
url = https://develop.openfoam.com/Community/catalyst.git
......@@ -92,14 +92,14 @@ class compressibleInterPhaseTransportModel
// Private Member Functions
//- Disallow default bitwise copy construct
//- No copy construct
compressibleInterPhaseTransportModel
(
const compressibleInterPhaseTransportModel&
);
) = delete;
//- Disallow default bitwise assignment
void operator=(const compressibleInterPhaseTransportModel&);
//- No copy assignment
void operator=(const compressibleInterPhaseTransportModel&) = delete;
public:
......
......@@ -174,7 +174,21 @@ int main(int argc, char *argv[])
}
}
cout<< nl << "Done." << endl;
// Test uniformity of random
{
List<label> samples(20, Zero);
Random rnd(123456);
for (label i=0; i < 1000*samples.size(); ++i)
{
++samples[rnd.position<label>(0,19)];
}
Info<< nl << "uniform [0,20)" << nl << " "
<< flatOutput(samples) << nl;
}
Info<< nl << "Done." << endl;
return 0;
}
......
......@@ -54,11 +54,14 @@ class ${typeName}Points0MotionSolver
{
// Private Member Functions
//- Disallow default bitwise copy construct
${typeName}Points0MotionSolver(const ${typeName}Points0MotionSolver&);
//- No copy construct
${typeName}Points0MotionSolver
(
const ${typeName}Points0MotionSolver&
) = delete;
//- Disallow default bitwise assignment
void operator=(const ${typeName}Points0MotionSolver&);
//- No copy assignment
void operator=(const ${typeName}Points0MotionSolver&) = delete;
public:
......@@ -88,7 +91,7 @@ public:
//- Solve for motion
virtual void solve()
{};
{}
};
......
Subproject commit 6e6e105844897d4bf780bbc8d14031bc827e4b04
Subproject commit eaa7f6836a1950fe8d40c13952aa85a1062f7f91
Subproject commit 288f05e08f07e693d4222e7b84ea12430947e5bf
......@@ -60,7 +60,8 @@ public:
// Constructors
//- Construct null
CirculatorBase(){};
CirculatorBase()
{}
};
......
......@@ -66,8 +66,7 @@ public:
//- Destructor
virtual ~simpleRegIOobject()
{};
virtual ~simpleRegIOobject() = default;
// Member Functions
......
......@@ -43,43 +43,39 @@ namespace Foam
defineTypeNameAndDebug(fileOperation, 0);
defineRunTimeSelectionTable(fileOperation, word);
template<>
const char* Foam::NamedEnum
<
fileOperation::pathType,
12
>::names[] =
{
"notFound",
"absolute",
"objectPath",
"writeObject",
"uncollatedProc",
"globalProc",
"localProc",
"parentObjectPath",
"findInstance",
"uncollatedProcInstance",
"globalProcInstance",
"localProcInstance"
};
const NamedEnum<fileOperation::pathType, 12> fileOperation::pathTypeNames_;
word fileOperation::defaultFileHandler
(
debug::optimisationSwitches().lookupOrAddDefault
debug::optimisationSwitches().lookupOrAddDefault<word>
(
"fileHandler",
//Foam::fileOperations::uncollatedFileOperation::typeName,
word("uncollated"),
"uncollated",
false,
false
)
);
}
Foam::word Foam::fileOperation::processorsBaseDir = "processors";
const Foam::Enum<Foam::fileOperation::pathType>
Foam::fileOperation::pathTypeNames_
({
{ fileOperation::NOTFOUND, "notFound" },
{ fileOperation::ABSOLUTE, "absolute" },
{ fileOperation::OBJECT, "objectPath" },
{ fileOperation::WRITEOBJECT, "writeObject" },
{ fileOperation::PROCUNCOLLATED, "uncollatedProc" },
{ fileOperation::PROCBASEOBJECT, "globalProc" },
{ fileOperation::PROCOBJECT, "localProc" },
{ fileOperation::PARENTOBJECT, "parentObjectPath" },
{ fileOperation::FINDINSTANCE, "findInstance" },
{ fileOperation::PROCUNCOLLATEDINSTANCE, "uncollatedProcInstance" },
{ fileOperation::PROCBASEINSTANCE, "globalProcInstance" },
{ fileOperation::PROCINSTANCE, "localProcInstance" }
});
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......
......@@ -47,7 +47,7 @@ Description
#include "labelList.H"
#include "Switch.H"
#include "tmpNrc.H"
#include "NamedEnum.H"
#include "Enum.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -93,7 +93,7 @@ public:
PROCBASEINSTANCE, // as PROCBASEOBJECT but with instance
PROCINSTANCE // as PROCOBJECT but with instance
};
static const NamedEnum<pathType, 12> pathTypeNames_;
static const Enum<pathType> pathTypeNames_;
typedef Tuple2<fileName, Tuple2<pathType, label>> dirIndex;
typedef List<dirIndex> dirIndexList;
......
......@@ -51,10 +51,12 @@ public:
const bool forward,
List<T>& fld
) const
{};
{}
template<class T>
void operator()(const coupledPolyPatch& cpp, Field<T>& fld) const
{}
template<class T, template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<T>& map) const
{}
......
......@@ -121,14 +121,16 @@ Foam::scalar Foam::Random::position
template<>
Foam::label Foam::Random::position(const label& start, const label& end)
{
return start + round(scalar01()*(end - start));
// Extend range from [0, N-1] to (-0.5, N-0.5) to ensure that round()
// results in the same number density at the ends.
return start + round(scalar01()*((end - start) + 0.998) - 0.499);
}
template<>
Foam::scalar Foam::Random::globalSample01()
{
scalar value = -GREAT;
scalar value(-GREAT);
if (Pstream::master())
{
......@@ -144,7 +146,7 @@ Foam::scalar Foam::Random::globalSample01()
template<>
Foam::label Foam::Random::globalSample01()
{
label value = labelMin;
label value(labelMin);
if (Pstream::master())
{
......@@ -160,7 +162,7 @@ Foam::label Foam::Random::globalSample01()
template<>
Foam::scalar Foam::Random::globalGaussNormal()
{
scalar value = -GREAT;
scalar value(-GREAT);
if (Pstream::master())
{
......@@ -176,16 +178,16 @@ Foam::scalar Foam::Random::globalGaussNormal()
template<>
Foam::label Foam::Random::globalGaussNormal()
{
scalar value = -GREAT;
label value(labelMin);
if (Pstream::master())
{
value = GaussNormal<scalar>();
value = GaussNormal<label>();
}
Pstream::scatter(value);
return round(value);
return value;
}
......@@ -196,16 +198,16 @@ Foam::scalar Foam::Random::globalPosition
const scalar& end
)
{
scalar value = -GREAT;
scalar value(-GREAT);
if (Pstream::master())
{
value = scalar01()*(end - start);
value = position<scalar>(start, end);
}
Pstream::scatter(value);
return start + value;
return value;
}
......@@ -216,16 +218,16 @@ Foam::label Foam::Random::globalPosition
const label& end
)
{
label value = labelMin;
label value(labelMin);
if (Pstream::master())
{
value = round(scalar01()*(end - start));
value = position<label>(start, end);
}
Pstream::scatter(value);
return start + value;
return value;
}
......
......@@ -84,9 +84,11 @@ class kEpsilonLopesdaCosta
{
// Private Member Functions
// Disallow default bitwise copy construct and assignment
kEpsilonLopesdaCosta(const kEpsilonLopesdaCosta&);
void operator=(const kEpsilonLopesdaCosta&);
//- No copy construct
kEpsilonLopesdaCosta(const kEpsilonLopesdaCosta&) = delete;
//- No copy assignment
void operator=(const kEpsilonLopesdaCosta&) = delete;
protected:
......@@ -175,8 +177,7 @@ public:
//- Destructor
virtual ~kEpsilonLopesdaCosta()
{}
virtual ~kEpsilonLopesdaCosta() = default;
// Member Functions
......
......@@ -146,11 +146,12 @@ class powerLawLopesdaCosta
const vectorField& U
) const;
//- Disallow default bitwise copy construct
powerLawLopesdaCosta(const powerLawLopesdaCosta&);
//- Disallow default bitwise assignment
void operator=(const powerLawLopesdaCosta&);
//- No copy construct
powerLawLopesdaCosta(const powerLawLopesdaCosta&) = delete;
//- No copy assignment
void operator=(const powerLawLopesdaCosta&) = delete;
public:
......
......@@ -56,8 +56,10 @@ class ChemistryCombustion
// Private Member Functions
//- Construct as copy (not implemented)
ChemistryCombustion(const ChemistryCombustion<ReactionThermo>&) =
delete;
ChemistryCombustion
(
const ChemistryCombustion<ReactionThermo>&
) = delete;
//- No copy assignment
void operator=(const ChemistryCombustion<ReactionThermo>&) = delete;
......
......@@ -117,13 +117,11 @@ protected:
virtual const dictionary& codeDict() const;
private:
//- No copy assignment construct
codedPoints0MotionSolver(const codedPoints0MotionSolver&) = delete;
//- Disallow default bitwise copy construct
codedPoints0MotionSolver(const codedPoints0MotionSolver&);
//- Disallow default bitwise assignment
void operator=(const codedPoints0MotionSolver&);
//- No copy assignment
void operator=(const codedPoints0MotionSolver&) = delete;
public:
......
......@@ -111,7 +111,7 @@ public:
//- Destructor
~polyMeshFilterSettings(){};
~polyMeshFilterSettings() = default;
// Member Functions
......
......@@ -81,11 +81,11 @@ class freePiston
// Private Member Functions
//- Disallow default bitwise copy construct
freePiston(const freePiston&);
//- No copy construct
freePiston(const freePiston&) = delete;
//- Disallow default bitwise assignment
void operator=(const freePiston&);
//- No copy assignment
void operator=(const freePiston&) = delete;
public:
......@@ -108,8 +108,7 @@ public:
);
//- Destructor
virtual ~freePiston()
{}
virtual ~freePiston() = default;
// Member Functions
......
......@@ -89,11 +89,11 @@ class PhaseLimitStabilization
// Private Member Functions
//- Disallow default bitwise copy construct
PhaseLimitStabilization(const PhaseLimitStabilization&);
//- No copy construct
PhaseLimitStabilization(const PhaseLimitStabilization&) = delete;
//- Disallow default bitwise assignment
void operator=(const PhaseLimitStabilization&);
//- No copy assignment
void operator=(const PhaseLimitStabilization&) = delete;
public:
......@@ -115,8 +115,7 @@ public:
//- Destructor
virtual ~PhaseLimitStabilization()
{}
virtual ~PhaseLimitStabilization() = default;
// Member Functions
......
Markdown is supported
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