Compare commits
46 Commits
demand-dri
...
maintenanc
| Author | SHA1 | Date | |
|---|---|---|---|
| aa02bf904e | |||
| cd79ac6fd5 | |||
| 5619d509c5 | |||
| a52aa33069 | |||
| dd8598ecde | |||
| 964dcb5b53 | |||
| 3166fc0b73 | |||
| 89e7775f90 | |||
| 40c713c48c | |||
| 9cfdb2cc40 | |||
| b9eedb35d1 | |||
| 9c076da13a | |||
| 7782a66e88 | |||
| 4b2a4ed9ec | |||
| a031c194b8 | |||
| e5d2c89f9a | |||
| 641cb490b4 | |||
| f51edbf79e | |||
| 3357b86ab5 | |||
| e9d156ce54 | |||
| dba1bc24ca | |||
| 3c13e7eebf | |||
| 91dd591ff6 | |||
| ecef4c1473 | |||
| 15e7967fb7 | |||
| 5db18df6bc | |||
| cab600d567 | |||
| 868045b2e1 | |||
| ef652062ec | |||
| 5782af39f5 | |||
| fd49e4dd24 | |||
| 8831dfc58b | |||
| 3e29b9c3aa | |||
| cf2630dd1a | |||
| 86e593b58e | |||
| c332b2cbc8 | |||
| bd48ca4920 | |||
| be740dcb06 | |||
| 186ab01b31 | |||
| ef1324a1b0 | |||
| 108d14967a | |||
| 41e93f735f | |||
| 7670bd0e13 | |||
| 5ff5b0afc4 | |||
| 68e7c21d2f | |||
| fa026a13a1 |
9
META-INFO/.gitignore
vendored
Normal file
9
META-INFO/.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# Do not track build information
|
||||
build-info
|
||||
|
||||
# Do not track time-stamp
|
||||
time-stamp
|
||||
|
||||
# Do not track any manifest files
|
||||
Manifest.txt
|
||||
manifest.txt
|
||||
5
META-INFO/README.md
Normal file
5
META-INFO/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# META-INFO
|
||||
|
||||
Meta-information is for OpenFOAM internal use only.
|
||||
|
||||
(Backport from 1812)
|
||||
2
META-INFO/api-info
Normal file
2
META-INFO/api-info
Normal file
@ -0,0 +1,2 @@
|
||||
api=1806
|
||||
patch=200131
|
||||
@ -12,7 +12,7 @@ PtrList<volScalarField> p_rghFluid(fluidRegions.size());
|
||||
PtrList<radiation::radiationModel> radiation(fluidRegions.size());
|
||||
|
||||
List<scalar> initialMassFluid(fluidRegions.size());
|
||||
List<label> pRefCellFluid(fluidRegions.size(), 0);
|
||||
List<label> pRefCellFluid(fluidRegions.size(), -1);
|
||||
List<scalar> pRefValueFluid(fluidRegions.size(), 0.0);
|
||||
List<bool> frozenFlowFluid(fluidRegions.size(), false);
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ Foam::radiation::localDensityAbsorptionEmission::aCont(const label bandI) const
|
||||
forAll(alphaNames_, i)
|
||||
{
|
||||
dimensionedScalar aPhase("a", dimless/dimLength, aCoeff_[i]);
|
||||
a += max(alpha(alphaNames_[i]), 0.0)*aPhase;
|
||||
a += max(alpha(alphaNames_[i]), scalar(0))*aPhase;
|
||||
}
|
||||
|
||||
return ta;
|
||||
@ -140,7 +140,7 @@ Foam::radiation::localDensityAbsorptionEmission::eCont(const label bandI) const
|
||||
forAll(alphaNames_, i)
|
||||
{
|
||||
dimensionedScalar ePhase("e", dimless/dimLength, eCoeff_[i]);
|
||||
e += max(alpha(alphaNames_[i]), 0.0)*ePhase;
|
||||
e += max(alpha(alphaNames_[i]), scalar(0))*ePhase;
|
||||
}
|
||||
|
||||
return te;
|
||||
@ -179,7 +179,7 @@ Foam::radiation::localDensityAbsorptionEmission::ECont(const label bandI) const
|
||||
ECoeff_[i]
|
||||
);
|
||||
|
||||
E += max(alpha(alphaNames_[i]), 0.0)*EPhase;
|
||||
E += max(alpha(alphaNames_[i]), scalar(0))*EPhase;
|
||||
}
|
||||
|
||||
return tE;
|
||||
|
||||
@ -22,11 +22,11 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::phasePair description for mass transfer between a pair of
|
||||
phases. The direction of the mass transfer is from the phase
|
||||
'from' to the phasse 'to'.
|
||||
Foam::phasePair
|
||||
|
||||
Description
|
||||
Description for mass transfer between a pair of phases. The direction of
|
||||
the mass transfer is from the phase 'from' to the phasse 'to'.
|
||||
|
||||
SourceFiles
|
||||
phasePair.C
|
||||
|
||||
@ -2,31 +2,32 @@
|
||||
if (pimple.nCorrPIMPLE() > 1)
|
||||
{
|
||||
// If nOuterCorrectors > 1 then for all but the first loop the advection
|
||||
// of alpha is done using an average, 0.5*phi+0.5*phiNew where phi is
|
||||
// the flux at the beginning of the time step and phiNew is the flux
|
||||
// estimate at the end of the time step from the previous outer
|
||||
// of alpha is done using an average, 0.5*phi+0.5*phiNew where phi is
|
||||
// the flux at the beginning of the time step and phiNew is the flux
|
||||
// estimate at the end of the time step from the previous outer
|
||||
// iteration. Similarly we use 0.5*U + 0.5*UNew in later iterations.
|
||||
if (pimple.firstIter())
|
||||
{
|
||||
// To recalculate the alpha1 update in subsequent iterations, we
|
||||
// must store its current value before overwriting with the new
|
||||
// To recalculate the alpha1 update in subsequent iterations, we
|
||||
// must store its current value before overwriting with the new
|
||||
// value
|
||||
alpha1.prevIter();
|
||||
alpha1.storePrevIter();
|
||||
// Storing initial phi and U for use in later outer iterations.
|
||||
phi.storePrevIter();
|
||||
U.storePrevIter();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Resetting alpha1 to value before advection in first PIMPLE
|
||||
// Resetting alpha1 to value before advection in first PIMPLE
|
||||
// iteration.
|
||||
alpha1 = alpha1.prevIter();
|
||||
|
||||
// Setting U and phi with which to advect interface.
|
||||
U = 0.5*U.prevIter() + 0.5*U;
|
||||
phi = 0.5*phi.prevIter() + 0.5*phi;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Updating alpha1
|
||||
advector.advect();
|
||||
#include "rhofs.H"
|
||||
|
||||
@ -171,7 +171,7 @@ int main(int argc, char *argv[])
|
||||
<< "(non-const)\n";
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Failed (expected) " << err << nl << endl;
|
||||
}
|
||||
@ -193,7 +193,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "[20] is false, as expected for const-access\n";
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Failed (expected) " << err << nl << endl;
|
||||
}
|
||||
@ -263,7 +263,7 @@ int main(int argc, char *argv[])
|
||||
list1[16] = 5;
|
||||
list1[36] = list1.max_value;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Failed (expected) " << err << nl << endl;
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ int main(int argc, char *argv[])
|
||||
Info<<"Random position(10,5): "
|
||||
<< Random().position<label>(10, 5) << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
|
||||
@ -56,11 +56,11 @@ void doTest(const dictionary& dict)
|
||||
cs2.writeDict(Info, true);
|
||||
Info<< nl;
|
||||
}
|
||||
catch (Foam::IOerror& err)
|
||||
catch (const Foam::IOerror& err)
|
||||
{
|
||||
Info<< "Caught FatalIOError " << err << nl << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ void test(const Type& polynomialEqn, const scalar tol)
|
||||
case roots::real:
|
||||
v[i] = polynomialEqn.value(r[i]);
|
||||
e[i] = polynomialEqn.error(r[i]);
|
||||
ok = ok && mag(v[i]) < tol*mag(e[i]);
|
||||
ok = ok && mag(v[i]) <= tol*mag(e[i]);
|
||||
break;
|
||||
case roots::posInf:
|
||||
v[i] = + inf;
|
||||
@ -79,8 +79,10 @@ void test(const Type& polynomialEqn, const scalar tol)
|
||||
|
||||
int main()
|
||||
{
|
||||
const int nTests = 1000000;
|
||||
for (int t = 0; t < nTests; ++ t)
|
||||
const scalar tol = 5;
|
||||
|
||||
const label nTests = 1000000;
|
||||
for (label t = 0; t < nTests; ++ t)
|
||||
{
|
||||
test
|
||||
(
|
||||
@ -91,11 +93,26 @@ int main()
|
||||
randomScalar(1e-50, 1e+50),
|
||||
randomScalar(1e-50, 1e+50)
|
||||
),
|
||||
100
|
||||
tol
|
||||
);
|
||||
}
|
||||
Info << nTests << " random cubics tested" << endl;
|
||||
|
||||
Info << nTests << " cubics tested" << endl;
|
||||
const label coeffMin = -9, coeffMax = 10, nCoeff = coeffMax - coeffMin;
|
||||
for (label a = coeffMin; a < coeffMax; ++ a)
|
||||
{
|
||||
for (label b = coeffMin; b < coeffMax; ++ b)
|
||||
{
|
||||
for (label c = coeffMin; c < coeffMax; ++ c)
|
||||
{
|
||||
for (label d = coeffMin; d < coeffMax; ++ d)
|
||||
{
|
||||
test(cubicEqn(a, b, c, d), tol);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Info<< nCoeff*nCoeff*nCoeff*nCoeff << " integer cubics tested" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
19
applications/test/dictionary/testDictAPI
Normal file
19
applications/test/dictionary/testDictAPI
Normal file
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object testDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
_FOAM_API $FOAM_API;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
||||
<< "Error 2"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
catch (Foam::error& fErr)
|
||||
catch (const Foam::error& fErr)
|
||||
{
|
||||
Serr<< "Caught Foam error " << fErr << nl << endl;
|
||||
}
|
||||
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
<< "Error# 3"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
catch (Foam::error& fErr)
|
||||
catch (const Foam::error& fErr)
|
||||
{
|
||||
Serr<< "Caught Foam error " << fErr << nl << endl;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
||||
labelledTri l1{ 1, 2, 3, 10, 24 };
|
||||
Info<< "labelled:" << l1 << nl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Caught FatalError " << err << nl << endl;
|
||||
|
||||
@ -670,9 +670,27 @@ int main(int argc, char *argv[])
|
||||
<< " controlDict => " << findEtcFile("controlDict") << nl
|
||||
<< " badName => " << findEtcFile("badName") << endl;
|
||||
|
||||
Info<< "This should emit a fatal error:" << endl;
|
||||
Info<< " badName(die) => " << findEtcFile("badName", true) << nl
|
||||
<< endl;
|
||||
{
|
||||
|
||||
Info<< nl << "Expect a FatalError for findEtcFile() with a bad name:"
|
||||
<< nl;
|
||||
|
||||
const bool throwingError = FatalError.throwExceptions();
|
||||
|
||||
try
|
||||
{
|
||||
Info<< " badName(die) => " << flush
|
||||
<< findEtcFile("<very-badName>", true) << nl
|
||||
<< endl;
|
||||
}
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< nl << "findEtcFile() Caught FatalError "
|
||||
<< err << nl << endl;
|
||||
}
|
||||
FatalError.throwExceptions(throwingError);
|
||||
}
|
||||
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
return 0;
|
||||
|
||||
@ -75,7 +75,7 @@ unsigned testParsing
|
||||
{
|
||||
val = function (str);
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
parsed = false;
|
||||
errMsg = err.message();
|
||||
|
||||
@ -127,7 +127,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
Info<< endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
continue;
|
||||
@ -164,7 +164,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "pass - null pointer is no expression" << endl;
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
@ -181,7 +181,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "no match" << endl;
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
@ -198,7 +198,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "no match" << endl;
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
@ -215,7 +215,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "no match" << endl;
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "pass - no match on empty expression" << endl;
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
@ -249,7 +249,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "pass - no match on empty expression" << endl;
|
||||
}
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< "Caught FatalError " << err << nl << endl;
|
||||
}
|
||||
|
||||
@ -141,6 +141,13 @@ public:
|
||||
typedef indexedVertex<Gt,Vb2> Other;
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
indexedVertex(const indexedVertex&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
inline indexedVertex();
|
||||
|
||||
@ -539,7 +539,7 @@ bool doCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Foam::IOerror& fIOErr)
|
||||
catch (const Foam::IOerror& fIOErr)
|
||||
{
|
||||
ok = false;
|
||||
|
||||
@ -550,7 +550,7 @@ bool doCommand
|
||||
Pout<< topoSetSource::usage(sourceType).c_str();
|
||||
}
|
||||
}
|
||||
catch (Foam::error& fErr)
|
||||
catch (const Foam::error& fErr)
|
||||
{
|
||||
ok = false;
|
||||
|
||||
|
||||
@ -57,11 +57,23 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
word utilityName = argv[1];
|
||||
Foam::autoPtr<Foam::helpType> utility
|
||||
(
|
||||
helpType::New(utilityName)
|
||||
);
|
||||
word utilityName(argv[1]);
|
||||
autoPtr<helpType> utility;
|
||||
|
||||
const bool throwing = FatalError.throwExceptions();
|
||||
try
|
||||
{
|
||||
utility.reset(helpType::New(utilityName));
|
||||
}
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
utility.clear();
|
||||
|
||||
FatalError
|
||||
<< err.message().c_str() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
FatalError.throwExceptions(throwing);
|
||||
|
||||
utility().init();
|
||||
|
||||
|
||||
@ -867,7 +867,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
aMeshPtr.reset(new faMesh(meshRef.baseMesh()));
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
aMeshPtr.clear();
|
||||
}
|
||||
|
||||
@ -318,6 +318,9 @@ Foam::vtkPVFoam::vtkPVFoam
|
||||
fullCasePath = cwd();
|
||||
}
|
||||
|
||||
// OPENFOAM API
|
||||
setEnv("FOAM_API", std::to_string(OPENFOAM), true);
|
||||
|
||||
// The name of the executable, unless already present in the environment
|
||||
setEnv("FOAM_EXECUTABLE", "paraview", false);
|
||||
|
||||
|
||||
@ -288,12 +288,12 @@ void Foam::vtkPVFoam::convertVolFields
|
||||
// Convert
|
||||
convertVolField(patchInterpList, fld);
|
||||
}
|
||||
catch (Foam::IOerror& ioErr)
|
||||
catch (const Foam::IOerror& ioErr)
|
||||
{
|
||||
ioErr.write(Warning, false);
|
||||
Info << nl << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
// Bit of trickery to get the original message
|
||||
err.write(Warning, false);
|
||||
@ -370,12 +370,12 @@ void Foam::vtkPVFoam::convertDimFields
|
||||
|
||||
convertVolField(patchInterpList, volFld);
|
||||
}
|
||||
catch (Foam::IOerror& ioErr)
|
||||
catch (const Foam::IOerror& ioErr)
|
||||
{
|
||||
ioErr.write(Warning, false);
|
||||
Info << nl << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
// Bit of trickery to get the original message
|
||||
err.write(Warning, false);
|
||||
@ -498,12 +498,12 @@ void Foam::vtkPVFoam::convertAreaFields
|
||||
dataset->GetCellData()->AddArray(cdata);
|
||||
}
|
||||
}
|
||||
catch (Foam::IOerror& ioErr)
|
||||
catch (const Foam::IOerror& ioErr)
|
||||
{
|
||||
ioErr.write(Warning, false);
|
||||
Info << nl << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
// Bit of trickery to get the original message
|
||||
err.write(Warning, false);
|
||||
@ -642,12 +642,12 @@ void Foam::vtkPVFoam::convertPointFields
|
||||
dataset->GetPointData()->AddArray(pdata);
|
||||
}
|
||||
}
|
||||
catch (Foam::IOerror& ioErr)
|
||||
catch (const Foam::IOerror& ioErr)
|
||||
{
|
||||
ioErr.write(Warning, false);
|
||||
Info << nl << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
// Bit of trickery to get the original message
|
||||
err.write(Warning, false);
|
||||
@ -843,12 +843,12 @@ void Foam::vtkPVFoam::convertLagrangianFields
|
||||
vtkmesh->GetCellData()->AddArray(data);
|
||||
vtkmesh->GetPointData()->AddArray(data);
|
||||
}
|
||||
catch (Foam::IOerror& ioErr)
|
||||
catch (const Foam::IOerror& ioErr)
|
||||
{
|
||||
ioErr.write(Warning, false);
|
||||
Info << nl << endl;
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
// Bit of trickery to get the original message
|
||||
err.write(Warning, false);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -206,6 +206,9 @@ Foam::vtkPVblockMesh::vtkPVblockMesh
|
||||
fullCasePath = cwd();
|
||||
}
|
||||
|
||||
// OPENFOAM API
|
||||
setEnv("FOAM_API", std::to_string(OPENFOAM), true);
|
||||
|
||||
// The name of the executable, unless already present in the environment
|
||||
setEnv("FOAM_EXECUTABLE", "paraview", false);
|
||||
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # (for error catching)
|
||||
. $WM_PROJECT_DIR/wmake/scripts/have_fftw
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if have_fftw
|
||||
then
|
||||
wmake
|
||||
wmake $targetType
|
||||
else
|
||||
echo "==> skip noise utility (no FFTW)"
|
||||
fi
|
||||
|
||||
@ -219,9 +219,9 @@ int main(int argc, char *argv[])
|
||||
// Report to output (avoid overwriting values from simulation)
|
||||
profiling::print(Info);
|
||||
}
|
||||
catch (Foam::IOerror& err)
|
||||
catch (const Foam::IOerror& err)
|
||||
{
|
||||
Warning<< err << endl;
|
||||
Warning << err << endl;
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # (for error catching)
|
||||
. $WM_PROJECT_DIR/wmake/scripts/have_fftw
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if have_fftw
|
||||
then
|
||||
wmake
|
||||
wmake $targetType
|
||||
else
|
||||
echo "==> skip boxTurb utility (no FFTW)"
|
||||
fi
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # (for error catching)
|
||||
. $WM_PROJECT_DIR/wmake/scripts/have_cgal
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -14,6 +15,6 @@ else
|
||||
export COMP_FLAGS="-DNO_CGAL"
|
||||
fi
|
||||
|
||||
wmake
|
||||
wmake $targetType
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -25,6 +28,7 @@ Typedefs
|
||||
CGAL3DKernel
|
||||
|
||||
Description
|
||||
A typedef for selecting inexact (faster) or exact (slower) 3D model.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -36,13 +40,13 @@ Description
|
||||
#ifdef CGAL_INEXACT
|
||||
|
||||
// Fast kernel using a double as the storage type
|
||||
#include "CGAL/Exact_predicates_inexact_constructions_kernel.h"
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
|
||||
#else
|
||||
|
||||
// Very robust but expensive kernel
|
||||
#include "CGAL/Exact_predicates_exact_constructions_kernel.h"
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
|
||||
|
||||
#endif
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,6 +65,7 @@ struct IndexedFace
|
||||
Foam::label index;
|
||||
Foam::label region;
|
||||
};
|
||||
|
||||
struct My_items
|
||||
:
|
||||
public CGAL::Polyhedron_items_3
|
||||
|
||||
@ -20,4 +20,5 @@ EXE_INC = \
|
||||
LIB_LIBS = \
|
||||
-L$(CGAL_ARCH_PATH)/lib \
|
||||
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
||||
-lsurfMesh \
|
||||
-lmeshTools
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -25,14 +28,50 @@ License
|
||||
|
||||
#include "PolyhedronReader.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
template<class HDS>
|
||||
void Foam::PolyhedronReader::Build_triangle<HDS>::operator()(HDS& hds)
|
||||
{
|
||||
// Postcondition: hds is a valid polyhedral surface.
|
||||
CGAL::Polyhedron_incremental_builder_3<HDS> B(hds, true);
|
||||
|
||||
B.begin_surface(s_.nPoints(), s_.size());
|
||||
|
||||
typedef typename HDS::Vertex Vertex;
|
||||
typedef typename Vertex::Point Point;
|
||||
|
||||
for (const auto& pt : s_.points())
|
||||
{
|
||||
B.add_vertex(Point(pt.x(), pt.y(), pt.z()));
|
||||
}
|
||||
|
||||
for (const auto& f : s_)
|
||||
{
|
||||
B.begin_facet();
|
||||
|
||||
for (const label verti : f)
|
||||
{
|
||||
B.add_vertex_to_facet(verti);
|
||||
}
|
||||
|
||||
B.end_facet();
|
||||
}
|
||||
|
||||
B.end_surface();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::PolyhedronReader::PolyhedronReader(const triSurface& s, Polyhedron& p)
|
||||
{
|
||||
Build_triangle<HalfedgeDS> triangle(s);
|
||||
p.delegate(triangle);
|
||||
|
||||
// Populate index and region
|
||||
Foam::label nTris = 0;
|
||||
|
||||
for
|
||||
(
|
||||
Facet_iterator fi = p.facets_begin();
|
||||
@ -40,8 +79,10 @@ Foam::PolyhedronReader::PolyhedronReader(const triSurface& s, Polyhedron& p)
|
||||
++fi
|
||||
)
|
||||
{
|
||||
fi->index = nTris++;
|
||||
fi->region = s[fi->index].region();
|
||||
fi->index = nTris;
|
||||
fi->region = s[nTris].region();
|
||||
|
||||
++nTris;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,28 +61,21 @@ class PolyhedronReader
|
||||
|
||||
public:
|
||||
|
||||
Build_triangle(const triSurface& s);
|
||||
Build_triangle(const triSurface& s)
|
||||
:
|
||||
s_(s)
|
||||
{}
|
||||
|
||||
void operator()(HDS& hds);
|
||||
};
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
PolyhedronReader(const PolyhedronReader&) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const PolyhedronReader&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Populate polyhedron from surface
|
||||
PolyhedronReader(const triSurface& s, Polyhedron& p);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -90,12 +85,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "PolyhedronReaderTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PolyhedronReader.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class HDS>
|
||||
Foam::PolyhedronReader::Build_triangle<HDS>::Build_triangle
|
||||
(
|
||||
const triSurface& s
|
||||
)
|
||||
:
|
||||
s_(s)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
template<class HDS>
|
||||
void Foam::PolyhedronReader::Build_triangle<HDS>::operator()(HDS& hds)
|
||||
{
|
||||
// Postcondition: hds is a valid polyhedral surface.
|
||||
CGAL::Polyhedron_incremental_builder_3<HDS> B(hds, true);
|
||||
|
||||
B.begin_surface(s_.nPoints(), s_.size());
|
||||
|
||||
typedef typename HDS::Vertex Vertex;
|
||||
typedef typename Vertex::Point Point;
|
||||
|
||||
const Foam::pointField& pts = s_.points();
|
||||
forAll(pts, i)
|
||||
{
|
||||
const Foam::point& pt = pts[i];
|
||||
B.add_vertex(Point(pt.x(), pt.y(), pt.z()));
|
||||
}
|
||||
forAll(s_, i)
|
||||
{
|
||||
const Foam::labelledTri& t = s_[i];
|
||||
B.begin_facet();
|
||||
B.add_vertex_to_facet(t[0]);
|
||||
B.add_vertex_to_facet(t[1]);
|
||||
B.add_vertex_to_facet(t[2]);
|
||||
B.end_facet();
|
||||
}
|
||||
B.end_surface();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -99,8 +102,10 @@ typedef CGAL::AABB_face_graph_triangle_primitive
|
||||
typedef CGAL::AABB_traits<K, Primitive> Traits;
|
||||
typedef CGAL::AABB_tree<Traits> Tree;
|
||||
|
||||
typedef boost::optional<Tree::Intersection_and_primitive_id<Segment>::Type>
|
||||
Segment_intersection;
|
||||
typedef boost::optional
|
||||
<
|
||||
Tree::Intersection_and_primitive_id<Segment>::Type
|
||||
> Segment_intersection;
|
||||
|
||||
#endif // NO_CGAL
|
||||
|
||||
@ -632,17 +637,14 @@ labelPair edgeIntersectionsCGAL
|
||||
segments.clear();
|
||||
tree.all_intersections(segment_query, std::back_inserter(segments));
|
||||
|
||||
for
|
||||
(
|
||||
std::vector<Segment_intersection>::const_iterator iter =
|
||||
segments.begin(),
|
||||
end = segments.end();
|
||||
iter != end;
|
||||
++iter
|
||||
)
|
||||
|
||||
for (const Segment_intersection& intersect : segments)
|
||||
{
|
||||
// Get intersection object
|
||||
if (const Point* ptPtr = boost::get<Point>(&((*iter)->first)))
|
||||
if
|
||||
(
|
||||
const Point* ptPtr = boost::get<Point>(&(intersect->first))
|
||||
)
|
||||
{
|
||||
point pt
|
||||
(
|
||||
@ -651,7 +653,12 @@ labelPair edgeIntersectionsCGAL
|
||||
CGAL::to_double(ptPtr->z())
|
||||
);
|
||||
|
||||
Polyhedron::Face_handle f = (*iter)->second;
|
||||
#if defined (CGAL_VERSION_NR) && (CGAL_VERSION_NR < 1041400000)
|
||||
Polyhedron::Face_handle f = (intersect->second);
|
||||
#else
|
||||
// 4.14 and later
|
||||
Polyhedron::Face_handle f = (intersect->second).first;
|
||||
#endif
|
||||
|
||||
intersections[edgeI].append
|
||||
(
|
||||
@ -664,18 +671,24 @@ labelPair edgeIntersectionsCGAL
|
||||
);
|
||||
// Intersection on edge interior
|
||||
classifications[edgeI].append(-1);
|
||||
nPoints++;
|
||||
++nPoints;
|
||||
}
|
||||
else if
|
||||
(
|
||||
const Segment* sPtr = boost::get<Segment>(&((*iter)->first))
|
||||
const Segment* sPtr = boost::get<Segment>(&(intersect->first))
|
||||
)
|
||||
{
|
||||
#if defined (CGAL_VERSION_NR) && (CGAL_VERSION_NR < 1041400000)
|
||||
Polyhedron::Face_handle f = (intersect->second);
|
||||
#else
|
||||
// 4.14 and later
|
||||
Polyhedron::Face_handle f = (intersect->second).first;
|
||||
#endif
|
||||
|
||||
//std::cout
|
||||
// << "intersection object is a segment:" << sPtr->source()
|
||||
// << " " << sPtr->target() << std::endl;
|
||||
|
||||
Polyhedron::Face_handle f = (*iter)->second;
|
||||
//std::cout<< "triangle:" << f->index
|
||||
// << " region:" << f->region << std::endl;
|
||||
|
||||
@ -705,7 +718,7 @@ labelPair edgeIntersectionsCGAL
|
||||
);
|
||||
// Intersection aligned with face. Tbd: enums
|
||||
classifications[edgeI].append(2);
|
||||
nSegments++;
|
||||
++nSegments;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1244,7 +1257,7 @@ autoPtr<extendedFeatureEdgeMesh> createEdgeMesh
|
||||
label nFeatEds = inter.cutEdges().size();
|
||||
|
||||
DynamicList<vector> normals(2*nFeatEds);
|
||||
vectorField edgeDirections(nFeatEds, vector::zero);
|
||||
vectorField edgeDirections(nFeatEds, Zero);
|
||||
DynamicList<extendedFeatureEdgeMesh::sideVolumeType> normalVolumeTypes
|
||||
(
|
||||
2*nFeatEds
|
||||
|
||||
@ -3,9 +3,11 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2008-2011, 2017-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@ -63,6 +65,8 @@ options:
|
||||
-config Add config directory prefix for shell type:
|
||||
with -csh* for a config.csh/ prefix
|
||||
with -sh* for a config.sh/ prefix
|
||||
-show-api Print api value from wmake/rules, or meta-info and exit
|
||||
-show-patch Print patch value from meta-info and exit
|
||||
-quiet (-q) Suppress all normal output
|
||||
-silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output
|
||||
-help Print the usage
|
||||
@ -184,6 +188,62 @@ setVersion()
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# The API locations. See wmake/wmakeBuildInfo
|
||||
rulesFile="$projectDir/wmake/rules/General/general"
|
||||
metaInfoDir="$projectDir/META-INFO"
|
||||
|
||||
# Get api from rules/General/general
|
||||
#
|
||||
# Failure modes:
|
||||
# - No api information (can't find file etc).
|
||||
# -> Fatal for building, but could be OK for a stripped down version
|
||||
#
|
||||
# Fallback. Get from api-info
|
||||
#
|
||||
getApi()
|
||||
{
|
||||
local value
|
||||
|
||||
value="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' $rulesFile 2>/dev/null)"
|
||||
if [ -z "$value" ] && [ -f "$metaInfoDir/api-info" ]
|
||||
then
|
||||
# Fallback. Get from api-info
|
||||
value="$(sed -ne 's@^ *api *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
|
||||
fi
|
||||
|
||||
if [ -n "$value" ]
|
||||
then
|
||||
echo "$value"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Get patch from meta-info / api-info
|
||||
#
|
||||
# Failure modes:
|
||||
# - No patch information (can't find file etc).
|
||||
#
|
||||
getPatchLevel()
|
||||
{
|
||||
local value
|
||||
|
||||
# Fallback. Get from api-info
|
||||
value="$(sed -ne 's@^ *patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
|
||||
|
||||
if [ -n "$value" ]
|
||||
then
|
||||
echo "$value"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
optMode=ugo # Default mode is always 'ugo'
|
||||
unset shellOutput verboseOutput
|
||||
unset optAll optConfig optList optVersion
|
||||
@ -195,6 +255,16 @@ do
|
||||
-h | -help*)
|
||||
printHelp
|
||||
;;
|
||||
-show-api)
|
||||
# Show API and exit
|
||||
getApi
|
||||
exit $?
|
||||
;;
|
||||
-show-patch)
|
||||
# Show patch level and exit
|
||||
getPatchLevel
|
||||
exit $?
|
||||
;;
|
||||
-a | -all)
|
||||
optAll=true
|
||||
unset shellOutput verboseOutput
|
||||
|
||||
@ -241,7 +241,7 @@ getAllQueries()
|
||||
#-- Add ones from database, present in log file
|
||||
# Note: just like awk, line selected with regular expression,
|
||||
# column with string.
|
||||
local dbQueries=$(getDbQueryList $db)
|
||||
local dbQueries="$(getDbQueryList $db)"
|
||||
|
||||
for var in $dbQueries
|
||||
do
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -36,7 +36,8 @@ usage: ${0##*/}
|
||||
-boost-path DIR specify 'BOOST_ARCH_PATH'
|
||||
-cgal ver specify 'cgal_version'
|
||||
-cgal-path DIR specify 'CGAL_ARCH_PATH'
|
||||
-clang VER specify 'clang_version' for ThirdParty Clang
|
||||
-clang VER specify 'default_clang_version' for ThirdParty Clang
|
||||
-gcc VER specify 'default_gcc_version' for ThirdParty Gcc
|
||||
-cmake VER specify 'cmake_version'
|
||||
-fftw VER specify 'fffw_version'
|
||||
-fftw-path DIR specify 'FFTW_ARCH_PATH'
|
||||
@ -325,9 +326,17 @@ do
|
||||
;;
|
||||
|
||||
-clang)
|
||||
# Replace clang_version=...
|
||||
# Replace default_clang_version=...
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
replace etc/config.sh/compiler clang_version "$2"
|
||||
replace etc/config.sh/compiler default_clang_version "$2"
|
||||
adjusted=true
|
||||
shift
|
||||
;;
|
||||
|
||||
-gcc)
|
||||
# Replace default_gcc_version=...
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
replace etc/config.sh/compiler default_gcc_version "$2"
|
||||
adjusted=true
|
||||
shift
|
||||
;;
|
||||
@ -466,19 +475,19 @@ do
|
||||
|
||||
gmp-[4-9]* | gmp-system)
|
||||
# gcc-related package
|
||||
replace etc/config.sh/compiler gmp_version "$1"
|
||||
replace etc/config.sh/compiler default_gmp_version "$1"
|
||||
adjusted=true
|
||||
;;
|
||||
|
||||
mpfr-[2-9]* | mpfr-system)
|
||||
# gcc-related package
|
||||
replace etc/config.sh/compiler mpfr_version "$1"
|
||||
replace etc/config.sh/compiler default_mpfr_version "$1"
|
||||
adjusted=true
|
||||
;;
|
||||
|
||||
mpc-[0-9]* | mpc-system)
|
||||
# gcc-related package
|
||||
replace etc/config.sh/compiler mpc_version "$1"
|
||||
replace etc/config.sh/compiler default_mpc_version "$1"
|
||||
adjusted=true
|
||||
;;
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ else
|
||||
|
||||
fileName="$className$Type"
|
||||
|
||||
echo "$Script: Creating new interface file $fileName"
|
||||
echo "$Script: Creating new code file $fileName"
|
||||
if [ -e "$fileName" ]
|
||||
then
|
||||
echo " Error: file exists"
|
||||
|
||||
@ -2,12 +2,14 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/config.csh/compiler
|
||||
@ -20,77 +22,117 @@
|
||||
|
||||
switch ("$WM_COMPILER_TYPE")
|
||||
case ThirdParty:
|
||||
# Default versions of GMP, MPFR, MPC - override as necessary
|
||||
set gmp_version=gmp-system
|
||||
set mpfr_version=mpfr-system
|
||||
set mpc_version=mpc-system
|
||||
# Default versions (CLANG, GCC, GMP, MPFR, MPC) - override as necessary
|
||||
|
||||
set default_clang_version=llvm-3.7.1
|
||||
set default_gcc_version=gcc-4.8.5
|
||||
|
||||
set default_gmp_version=gmp-system
|
||||
set default_mpfr_version=mpfr-system
|
||||
set default_mpc_version=mpc-system
|
||||
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc:
|
||||
case Gcc48:
|
||||
set gcc_version="$default_gcc_version"
|
||||
breaksw
|
||||
case Gcc48*:
|
||||
set gcc_version=gcc-4.8.5
|
||||
breaksw
|
||||
case Gcc49:
|
||||
case Gcc49*:
|
||||
set gcc_version=gcc-4.9.4
|
||||
breaksw
|
||||
case Gcc51:
|
||||
case Gcc51*:
|
||||
set gcc_version=gcc-5.1.0
|
||||
breaksw
|
||||
case Gcc52:
|
||||
case Gcc52*:
|
||||
set gcc_version=gcc-5.2.0
|
||||
breaksw
|
||||
case Gcc53:
|
||||
case Gcc53*:
|
||||
set gcc_version=gcc-5.3.0
|
||||
breaksw
|
||||
case Gcc54:
|
||||
case Gcc54*:
|
||||
set gcc_version=gcc-5.4.0
|
||||
breaksw
|
||||
case Gcc55:
|
||||
case Gcc55*:
|
||||
set gcc_version=gcc-5.5.0
|
||||
breaksw
|
||||
case Gcc61:
|
||||
case Gcc61*:
|
||||
set gcc_version=gcc-6.1.0
|
||||
breaksw
|
||||
case Gcc62:
|
||||
case Gcc62*:
|
||||
set gcc_version=gcc-6.2.0
|
||||
breaksw
|
||||
case Gcc63:
|
||||
case Gcc63*:
|
||||
set gcc_version=gcc-6.3.0
|
||||
breaksw
|
||||
case Gcc64:
|
||||
case Gcc64*:
|
||||
set gcc_version=gcc-6.4.0
|
||||
breaksw
|
||||
case Gcc71:
|
||||
case Gcc65*:
|
||||
set gcc_version=gcc-6.5.0
|
||||
breaksw
|
||||
case Gcc71*:
|
||||
set gcc_version=gcc-7.1.0
|
||||
breaksw
|
||||
case Gcc72:
|
||||
case Gcc72*:
|
||||
set gcc_version=gcc-7.2.0
|
||||
breaksw
|
||||
case Gcc73:
|
||||
case Gcc73*:
|
||||
set gcc_version=gcc-7.3.0
|
||||
breaksw
|
||||
case Gcc81:
|
||||
case Gcc74*:
|
||||
set gcc_version=gcc-7.4.0
|
||||
breaksw
|
||||
case Gcc81*:
|
||||
set gcc_version=gcc-8.1.0
|
||||
breaksw
|
||||
case Gcc82*:
|
||||
set gcc_version=gcc-8.2.0
|
||||
breaksw
|
||||
case Gcc83*:
|
||||
set gcc_version=gcc-8.3.0
|
||||
breaksw
|
||||
case Gcc91*:
|
||||
set gcc_version=gcc-9.1.0
|
||||
breaksw
|
||||
case Gcc92*:
|
||||
set gcc_version=gcc-9.2.0
|
||||
breaksw
|
||||
|
||||
case Clang:
|
||||
case Clang37:
|
||||
set clang_version="$default_clang_version"
|
||||
breaksw
|
||||
case Clang37*:
|
||||
set clang_version=llvm-3.7.1
|
||||
breaksw
|
||||
case Clang38:
|
||||
case Clang38*:
|
||||
set clang_version=llvm-3.8.1
|
||||
breaksw
|
||||
case Clang39:
|
||||
case Clang39*:
|
||||
set clang_version=llvm-3.9.1
|
||||
breaksw
|
||||
case Clang40:
|
||||
case Clang40*:
|
||||
set clang_version=llvm-4.0.1
|
||||
breaksw
|
||||
case Clang50:
|
||||
set clang_version=llvm-5.0.1
|
||||
case Clang50*:
|
||||
set clang_version=llvm-5.0.2
|
||||
breaksw
|
||||
case Clang60:
|
||||
set clang_version=llvm-6.0.0
|
||||
case Clang60*:
|
||||
set clang_version=llvm-6.0.1
|
||||
breaksw
|
||||
case Clang70*:
|
||||
set clang_version=llvm-7.0.1
|
||||
breaksw
|
||||
case Clang71*:
|
||||
set clang_version=llvm-7.1.0
|
||||
breaksw
|
||||
case Clang80*:
|
||||
set clang_version=llvm-8.0.1
|
||||
breaksw
|
||||
case Clang90*:
|
||||
set clang_version=llvm-9.0.0
|
||||
breaksw
|
||||
|
||||
default:
|
||||
/bin/cat << UNKNOWN_COMPILER
|
||||
===============================================================================
|
||||
@ -102,7 +144,13 @@ Please check your settings
|
||||
UNKNOWN_COMPILER
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
# Per-compiler overrides in "compiler-$WM_COMPILER" files
|
||||
_foamEtc -config "compiler-$WM_COMPILER"
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
unset default_gcc_version default_clang_version
|
||||
unset default_gmp_version default_mpfr_version default_mpc_version
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -6,15 +6,17 @@
|
||||
# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.csh/example/compiler
|
||||
# - sourced by OpenFOAM-*/etc/config.csh/settings
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||
# Older example of fine tuning compiler settings for OpenFOAM
|
||||
#
|
||||
# The preferred mechanism is now with a "compiler-$WM_COMPILER" file
|
||||
# in one of the etc/ directories.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -23,7 +25,7 @@ eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh -config -mode=o compiler`
|
||||
|
||||
# Modify/override compiler settings
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc70:
|
||||
case Gcc70*:
|
||||
set gcc_version=gcc-7.0.0
|
||||
set gmp_version=gmp-6.1.2
|
||||
set mpfr_version=mpfr-3.1.5
|
||||
|
||||
28
etc/config.csh/example/compiler-Gcc92
Normal file
28
etc/config.csh/example/compiler-Gcc92
Normal file
@ -0,0 +1,28 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.csh/example/compiler-Gcc92
|
||||
# - sourced by OpenFOAM-*/etc/config.csh/compiler
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning compiler settings with a hook
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Modify/override compiler settings
|
||||
set gcc_version=gcc-9.2.0
|
||||
set gmp_version=gmp-6.2.0
|
||||
set mpfr_version=mpfr-4.0.2
|
||||
set mpc_version=mpc-1.1.0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -71,6 +71,7 @@ unsetenv WM_THIRD_PARTY_DIR
|
||||
#------------------------------------------------------------------------------
|
||||
# Unset FOAM_* environment variables
|
||||
|
||||
unsetenv FOAM_API
|
||||
unsetenv FOAM_APPBIN
|
||||
unsetenv FOAM_APP
|
||||
unsetenv FOAM_CODE_TEMPLATES
|
||||
|
||||
@ -2,12 +2,14 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/config.sh/compiler
|
||||
@ -20,75 +22,56 @@
|
||||
|
||||
case "$WM_COMPILER_TYPE" in
|
||||
ThirdParty)
|
||||
# Default versions of GMP, MPFR, MPC - override as necessary
|
||||
gmp_version=gmp-system
|
||||
mpfr_version=mpfr-system
|
||||
mpc_version=mpc-system
|
||||
# Default versions (CLANG, GCC, GMP, MPFR, MPC) - override as necessary
|
||||
|
||||
default_clang_version=llvm-3.7.1
|
||||
default_gcc_version=gcc-4.8.5
|
||||
|
||||
default_gmp_version=gmp-system
|
||||
default_mpfr_version=mpfr-system
|
||||
default_mpc_version=mpc-system
|
||||
|
||||
gmp_version="$default_gmp_version"
|
||||
mpfr_version="$default_mpfr_version"
|
||||
mpc_version="$default_mpc_version"
|
||||
|
||||
case "$WM_COMPILER" in
|
||||
Gcc | Gcc48)
|
||||
gcc_version=gcc-4.8.5
|
||||
;;
|
||||
Gcc49)
|
||||
gcc_version=gcc-4.9.4
|
||||
;;
|
||||
Gcc51)
|
||||
gcc_version=gcc-5.1.0
|
||||
;;
|
||||
Gcc52)
|
||||
gcc_version=gcc-5.2.0
|
||||
;;
|
||||
Gcc53)
|
||||
gcc_version=gcc-5.3.0
|
||||
;;
|
||||
Gcc54)
|
||||
gcc_version=gcc-5.4.0
|
||||
;;
|
||||
Gcc55)
|
||||
gcc_version=gcc-5.5.0
|
||||
;;
|
||||
Gcc61)
|
||||
gcc_version=gcc-6.1.0
|
||||
;;
|
||||
Gcc62)
|
||||
gcc_version=gcc-6.2.0
|
||||
;;
|
||||
Gcc63)
|
||||
gcc_version=gcc-6.3.0
|
||||
;;
|
||||
Gcc64)
|
||||
gcc_version=gcc-6.4.0
|
||||
;;
|
||||
Gcc71)
|
||||
gcc_version=gcc-7.1.0
|
||||
;;
|
||||
Gcc72)
|
||||
gcc_version=gcc-7.2.0
|
||||
;;
|
||||
Gcc73)
|
||||
gcc_version=gcc-7.3.0
|
||||
;;
|
||||
Gcc81)
|
||||
gcc_version=gcc-8.1.0
|
||||
;;
|
||||
Clang | Clang37)
|
||||
clang_version=llvm-3.7.1
|
||||
;;
|
||||
Clang38)
|
||||
clang_version=llvm-3.8.1
|
||||
;;
|
||||
Clang39)
|
||||
clang_version=llvm-3.9.1
|
||||
;;
|
||||
Clang40)
|
||||
clang_version=llvm-4.0.1
|
||||
;;
|
||||
Clang50)
|
||||
clang_version=llvm-5.0.1
|
||||
;;
|
||||
Clang60)
|
||||
clang_version=llvm-6.0.0
|
||||
;;
|
||||
Gcc) gcc_version="$default_gcc_version" ;;
|
||||
Gcc48*) gcc_version=gcc-4.8.5 ;;
|
||||
Gcc49*) gcc_version=gcc-4.9.4 ;;
|
||||
Gcc51*) gcc_version=gcc-5.1.0 ;;
|
||||
Gcc52*) gcc_version=gcc-5.2.0 ;;
|
||||
Gcc53*) gcc_version=gcc-5.3.0 ;;
|
||||
Gcc54*) gcc_version=gcc-5.4.0 ;;
|
||||
Gcc55*) gcc_version=gcc-5.5.0 ;;
|
||||
Gcc61*) gcc_version=gcc-6.1.0 ;;
|
||||
Gcc62*) gcc_version=gcc-6.2.0 ;;
|
||||
Gcc63*) gcc_version=gcc-6.3.0 ;;
|
||||
Gcc64*) gcc_version=gcc-6.4.0 ;;
|
||||
Gcc65*) gcc_version=gcc-6.5.0 ;;
|
||||
Gcc71*) gcc_version=gcc-7.1.0 ;;
|
||||
Gcc72*) gcc_version=gcc-7.2.0 ;;
|
||||
Gcc73*) gcc_version=gcc-7.3.0 ;;
|
||||
Gcc74*) gcc_version=gcc-7.4.0 ;;
|
||||
Gcc75*) gcc_version=gcc-7.5.0 ;;
|
||||
Gcc81*) gcc_version=gcc-8.1.0 ;;
|
||||
Gcc82*) gcc_version=gcc-8.2.0 ;;
|
||||
Gcc83*) gcc_version=gcc-8.3.0 ;;
|
||||
Gcc91*) gcc_version=gcc-9.1.0 ;;
|
||||
Gcc92*) gcc_version=gcc-9.2.0 ;;
|
||||
|
||||
Clang) clang_version="$default_clang_version" ;;
|
||||
Clang37*) clang_version=llvm-3.7.1 ;;
|
||||
Clang38*) clang_version=llvm-3.8.1 ;;
|
||||
Clang39*) clang_version=llvm-3.9.1 ;;
|
||||
Clang40*) clang_version=llvm-4.0.1 ;;
|
||||
Clang50*) clang_version=llvm-5.0.2 ;;
|
||||
Clang60*) clang_version=llvm-6.0.1 ;;
|
||||
Clang70*) clang_version=llvm-7.0.1 ;;
|
||||
Clang71*) clang_version=llvm-7.1.0 ;;
|
||||
Clang80*) clang_version=llvm-8.0.1 ;;
|
||||
Clang90*) clang_version=llvm-9.0.0 ;;
|
||||
|
||||
*)
|
||||
/bin/cat << UNKNOWN_COMPILER 1>&2
|
||||
===============================================================================
|
||||
@ -100,7 +83,13 @@ Please check your settings
|
||||
UNKNOWN_COMPILER
|
||||
;;
|
||||
esac
|
||||
|
||||
# Per-compiler overrides in "compiler-$WM_COMPILER" files
|
||||
_foamEtc -config "compiler-$WM_COMPILER"
|
||||
;;
|
||||
esac
|
||||
|
||||
unset default_gcc_version default_clang_version
|
||||
unset default_gmp_version default_mpfr_version default_mpc_version
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -6,15 +6,17 @@
|
||||
# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.sh/example/compiler
|
||||
# - sourced by OpenFOAM-*/etc/config.sh/settings
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning compiler versions and settings for OpenFOAM
|
||||
# Older example of fine tuning compiler settings for OpenFOAM.
|
||||
#
|
||||
# The preferred mechanism is now with a "compiler-$WM_COMPILER" file
|
||||
# in one of the etc/ directories.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -23,18 +25,12 @@ eval $($WM_PROJECT_DIR/bin/foamEtcFile -sh -config -mode=o compiler)
|
||||
|
||||
# Modify/override compiler settings
|
||||
case "$WM_COMPILER" in
|
||||
Gcc70)
|
||||
Gcc70*)
|
||||
gcc_version=gcc-7.0.0
|
||||
gmp_version=gmp-6.1.2
|
||||
mpfr_version=mpfr-3.1.5
|
||||
mpc_version=mpc-1.0.3
|
||||
;;
|
||||
Gcc48u)
|
||||
# Example of using the system GCC 4.8 in Ubuntu 15.10. Keep in mind you
|
||||
# will also need to create the respective directory in "wmake/rules"
|
||||
export WM_CC='gcc-4.8'
|
||||
export WM_CXX='g++-4.8'
|
||||
;;
|
||||
esac
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
28
etc/config.sh/example/compiler-Gcc92
Normal file
28
etc/config.sh/example/compiler-Gcc92
Normal file
@ -0,0 +1,28 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.sh/example/compiler-Gcc92
|
||||
# - sourced by OpenFOAM-*/etc/config.sh/compiler
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning compiler settings with a hook
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Modify/override compiler settings
|
||||
gcc_version=gcc-9.2.0
|
||||
gmp_version=gmp-6.2.0
|
||||
mpfr_version=mpfr-4.0.2
|
||||
mpc_version=mpc-1.1.0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -62,6 +62,7 @@ unset WM_THIRD_PARTY_DIR
|
||||
#------------------------------------------------------------------------------
|
||||
# Unset FOAM_* environment variables
|
||||
|
||||
unset FOAM_API
|
||||
unset FOAM_APPBIN
|
||||
unset FOAM_APP
|
||||
unset FOAM_CODE_TEMPLATES
|
||||
|
||||
@ -1267,7 +1267,7 @@ bool Foam::ping
|
||||
}
|
||||
|
||||
// Fill sockaddr_in structure with dest address and port
|
||||
memset(reinterpret_cast<char *>(&destAddr), '\0', sizeof(destAddr));
|
||||
std::memset(reinterpret_cast<char *>(&destAddr), '\0', sizeof(destAddr));
|
||||
destAddr.sin_family = AF_INET;
|
||||
destAddr.sin_port = htons(ushort(destPort));
|
||||
destAddr.sin_addr.s_addr = addr;
|
||||
|
||||
@ -155,7 +155,7 @@ public:
|
||||
// \code
|
||||
// (numElem / elem_per_block)
|
||||
// + (numElem % elem_per_block) ? 1 : 0
|
||||
// \code
|
||||
// \endcode
|
||||
// But avoiding the modulus operation
|
||||
static constexpr label num_blocks(label numElem)
|
||||
{
|
||||
@ -435,6 +435,12 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
reference(const reference&) = default;
|
||||
|
||||
//- Move construct
|
||||
reference(reference&&) = default;
|
||||
|
||||
//- Value assignment
|
||||
inline void operator=(const reference& other);
|
||||
|
||||
@ -471,7 +477,6 @@ public:
|
||||
Ostream& os,
|
||||
const PackedList<Width>& list
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -159,9 +159,6 @@ Foam::bitSet& Foam::bitSet::orEq(const bitSet& other, const bool strict)
|
||||
<< "Perform |= on dissimilar sized bitSets: "
|
||||
<< size() << " vs. " << other.size() << nl;
|
||||
}
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
label minpos = -1; // Min trim point
|
||||
|
||||
|
||||
@ -400,6 +400,12 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
reference(const reference&) = default;
|
||||
|
||||
//- Move construct
|
||||
reference(reference&&) = default;
|
||||
|
||||
//- Flip the bit at the position, no range-checking
|
||||
inline void flip();
|
||||
|
||||
|
||||
@ -816,8 +816,11 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null (end iterator)
|
||||
inline const_iterator() = default;
|
||||
//- Default construct (end iterator)
|
||||
const_iterator() = default;
|
||||
|
||||
//- Copy construct
|
||||
const_iterator(const const_iterator&) = default;
|
||||
|
||||
//- Copy construct from similar access type
|
||||
inline explicit const_iterator(const Iterator<true>& iter)
|
||||
|
||||
@ -230,6 +230,9 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
iterator(const iterator&) = default;
|
||||
|
||||
//- Construct for a node on a list
|
||||
inline iterator(DLListBase* list, link* item);
|
||||
|
||||
|
||||
@ -206,6 +206,9 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
iterator(const iterator&) = default;
|
||||
|
||||
//- Construct for a node on the list
|
||||
inline iterator(SLListBase* list, link* item);
|
||||
|
||||
|
||||
@ -135,21 +135,26 @@ Foam::List<T>::List(const UList<T>& a)
|
||||
:
|
||||
UList<T>(nullptr, a.size_)
|
||||
{
|
||||
if (this->size_)
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
alloc();
|
||||
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -163,21 +168,26 @@ Foam::List<T>::List(const List<T>& a)
|
||||
:
|
||||
UList<T>(nullptr, a.size_)
|
||||
{
|
||||
if (this->size_)
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
alloc();
|
||||
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -197,22 +207,29 @@ Foam::List<T>::List(List<T>& a, bool reuse)
|
||||
this->v_ = a.v_;
|
||||
a.v_ = nullptr;
|
||||
a.size_ = 0;
|
||||
return;
|
||||
}
|
||||
else if (this->size_)
|
||||
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
alloc();
|
||||
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -380,7 +397,7 @@ void Foam::List<T>::setSize(const label newSize)
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(nv, this->v_, overlap*sizeof(T));
|
||||
std::memcpy(nv, this->v_, overlap*sizeof(T));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -462,19 +479,24 @@ void Foam::List<T>::operator=(const UList<T>& a)
|
||||
{
|
||||
reAlloc(a.size_);
|
||||
|
||||
if (this->size_)
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -548,7 +570,7 @@ void Foam::List<T>::operator=(const BiIndirectList<T>& lst)
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
|
||||
for (label i=0; i<len; ++i)
|
||||
for (label i=0; i < len; ++i)
|
||||
{
|
||||
vp[i] = lst[i];
|
||||
}
|
||||
|
||||
@ -64,6 +64,12 @@ public:
|
||||
inline static const SubList<T>& null();
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
SubList(const SubList&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from UList and sub-list size
|
||||
|
||||
@ -114,6 +114,12 @@ public:
|
||||
//- Copy construct from the values list and the addressing array
|
||||
inline UIndirectList(const UList<T>& values, const labelUList& addr);
|
||||
|
||||
//- Copy construct (shallow copy of values and addressing arrays)
|
||||
UIndirectList(const UIndirectList<T>& list)
|
||||
:
|
||||
UIndirectList<T>(list.values_, list.addressing_)
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -138,7 +138,10 @@ void Foam::UList<T>::deepCopy(const UList<T>& list)
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, list.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), list.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
@ -214,6 +214,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
UList(const UList<T>&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
|
||||
@ -339,12 +339,6 @@ Foam::IOobject::IOobject
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOobject::~IOobject()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::objectRegistry& Foam::IOobject::db() const
|
||||
|
||||
@ -220,6 +220,15 @@ public:
|
||||
static inline word groupName(StringType name, const word& group);
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
IOobject(const IOobject&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOobject() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from name, instance, registry, io options
|
||||
@ -289,10 +298,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOobject();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// General access
|
||||
|
||||
@ -189,10 +189,9 @@ Foam::IOobjectList::IOobjectList
|
||||
// Use object with local scope and current instance (no searching)
|
||||
ok = objectPtr->typeHeaderOk<IOList<label>>(false, false);
|
||||
}
|
||||
catch (Foam::IOerror& err)
|
||||
catch (const Foam::IOerror& err)
|
||||
{
|
||||
Warning
|
||||
<< err << nl << endl;
|
||||
Warning << err << nl << endl;
|
||||
}
|
||||
|
||||
FatalIOError.throwExceptions(throwingIOerr);
|
||||
|
||||
@ -75,12 +75,6 @@ Foam::baseIOdictionary::baseIOdictionary
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::baseIOdictionary::~baseIOdictionary()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Members Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::word& Foam::baseIOdictionary::name() const
|
||||
|
||||
@ -66,6 +66,18 @@ public:
|
||||
TypeName("dictionary");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
baseIOdictionary(const baseIOdictionary&) = default;
|
||||
|
||||
//- Move construct
|
||||
baseIOdictionary(baseIOdictionary&&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~baseIOdictionary() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given an IOobject
|
||||
@ -78,11 +90,7 @@ public:
|
||||
baseIOdictionary(const IOobject&, Istream&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~baseIOdictionary();
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
//- Return complete path + object name if the file exists
|
||||
// either in the case/processor or case otherwise null
|
||||
|
||||
@ -170,7 +170,7 @@ void Foam::IFstream::rewind()
|
||||
{
|
||||
gzPtr = dynamic_cast<igzstream*>(allocatedPtr_);
|
||||
}
|
||||
catch (std::bad_cast&)
|
||||
catch (const std::bad_cast&)
|
||||
{
|
||||
gzPtr = nullptr;
|
||||
}
|
||||
|
||||
@ -137,6 +137,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
IOstream(const IOstream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOstream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct with specified stream option
|
||||
@ -162,10 +171,6 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOstream() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
@ -70,6 +70,15 @@ class Istream
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Istream(const Istream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~Istream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and set stream status
|
||||
@ -85,11 +94,7 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Istream() = default;
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
// Read functions
|
||||
|
||||
|
||||
@ -72,6 +72,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Ostream(const Ostream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ostream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and set stream status
|
||||
@ -87,11 +96,7 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ostream() = default;
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
// Write functions
|
||||
|
||||
|
||||
@ -59,14 +59,17 @@ class OSstream
|
||||
std::ostream& os_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
OSstream(const OSstream&) = default;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const OSstream&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct as wrapper around std::ostream and set stream status
|
||||
|
||||
@ -301,4 +301,32 @@ void Foam::ITstream::rewind()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::ITstream::operator=(const ITstream& is)
|
||||
{
|
||||
Istream::operator=(is);
|
||||
tokenList::operator=(is);
|
||||
name_ = is.name_;
|
||||
|
||||
rewind();
|
||||
}
|
||||
|
||||
|
||||
void Foam::ITstream::operator=(const tokenList& toks)
|
||||
{
|
||||
tokenList::operator=(toks);
|
||||
|
||||
rewind();
|
||||
}
|
||||
|
||||
|
||||
void Foam::ITstream::operator=(tokenList&& toks)
|
||||
{
|
||||
tokenList::operator=(std::move(toks));
|
||||
|
||||
rewind();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -270,10 +270,22 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Print
|
||||
// Output
|
||||
|
||||
//- Print description of stream to Ostream
|
||||
void print(Ostream& os) const;
|
||||
//- Print stream description to Ostream
|
||||
void print(Ostream& os) const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Copy assignment, with rewind()
|
||||
void operator=(const ITstream& is);
|
||||
|
||||
//- Copy assignment of tokens, with rewind()
|
||||
void operator=(const tokenList& toks);
|
||||
|
||||
//- Move assignment of tokens, with rewind()
|
||||
void operator=(tokenList&& toks);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -168,7 +168,7 @@ Foam::label Foam::primitiveEntry::startLineNumber() const
|
||||
|
||||
if (tokens.size())
|
||||
{
|
||||
tokens.first().lineNumber();
|
||||
return tokens.first().lineNumber();
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
@ -52,7 +52,7 @@ Foam::IOerror::IOerror(const dictionary& errDict)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOerror::~IOerror() throw()
|
||||
Foam::IOerror::~IOerror() noexcept
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ Foam::error::error(const error& err)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::error::~error() throw()
|
||||
Foam::error::~error() noexcept
|
||||
{
|
||||
delete messageStreamPtr_;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~error() throw();
|
||||
virtual ~error() noexcept;
|
||||
|
||||
|
||||
// Static Member Functions
|
||||
@ -248,7 +248,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOerror() throw();
|
||||
virtual ~IOerror() noexcept;
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
field and derived quantities. Alternatively, the same actions can be
|
||||
executed after the simulation using the \c -postProcess command-line option.
|
||||
|
||||
\subsection secFunctionObjects Using function objects
|
||||
\section secFunctionObjects Using function objects
|
||||
|
||||
FunctionObjects are selected by additional entries in the
|
||||
$FOAM_CASE/system/controlDict dictionary. Each object is listed in the \c
|
||||
|
||||
@ -820,12 +820,12 @@ bool Foam::functionObjectList::read()
|
||||
foPtr = functionObject::New(key, time_, dict);
|
||||
}
|
||||
}
|
||||
catch (Foam::IOerror& ioErr)
|
||||
catch (const Foam::IOerror& ioErr)
|
||||
{
|
||||
Info<< ioErr << nl << endl;
|
||||
::exit(1);
|
||||
}
|
||||
catch (Foam::error& err)
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
// Bit of trickery to get the original message
|
||||
err.write(Warning, false);
|
||||
|
||||
@ -149,7 +149,7 @@ if (argList::postProcess(argc, argv))
|
||||
// Report to output (avoid overwriting values from simulation)
|
||||
profiling::print(Info);
|
||||
}
|
||||
catch (IOerror& err)
|
||||
catch (const IOerror& err)
|
||||
{
|
||||
Warning<< err << endl;
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ inline To& dynamicCast(From& r)
|
||||
{
|
||||
return dynamic_cast<To&>(r);
|
||||
}
|
||||
catch (std::bad_cast&)
|
||||
catch (const std::bad_cast&)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Attempt to cast type " << typeid(r).name()
|
||||
@ -109,7 +109,7 @@ inline To& refCast(From& r)
|
||||
{
|
||||
return dynamic_cast<To&>(r);
|
||||
}
|
||||
catch (std::bad_cast&)
|
||||
catch (const std::bad_cast&)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Attempt to cast type " << r.type()
|
||||
|
||||
@ -63,6 +63,12 @@ public:
|
||||
TypeName("value");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
valuePointPatchField(const valuePointPatchField&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
|
||||
@ -660,6 +660,9 @@ void Foam::argList::getRootCase()
|
||||
// The name of the executable, unless already present in the environment
|
||||
setEnv("FOAM_EXECUTABLE", executable_, false);
|
||||
|
||||
// OPENFOAM API
|
||||
setEnv("FOAM_API", std::to_string(OPENFOAM), true);
|
||||
|
||||
// Set the case and case-name as an environment variable
|
||||
if (rootPath_.isAbsolute())
|
||||
{
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,6 +57,8 @@ Description
|
||||
may be present for some solvers or utilities.
|
||||
|
||||
Environment variables set by argList or by Time:
|
||||
- \par FOAM_API
|
||||
The value of the OPENFOAM compiler define
|
||||
- \par FOAM_CASE
|
||||
The path of the global case.
|
||||
It is the same for serial and parallel jobs.
|
||||
|
||||
@ -29,9 +29,9 @@ Description
|
||||
|
||||
In parallel it will assume ranks are sorted according to hostname
|
||||
and the lowest rank per hostname will be the IO rank. The output directories
|
||||
will get a unique name processors<N>_<low>-<high> where N is the overall
|
||||
number of processors and low and high is the range of ranks contained
|
||||
in the files. Each of these subsets uses its own communicator.
|
||||
will get a unique name processors\<N\>_\<low\>-\<high\> where N is the
|
||||
overall number of processors and low and high is the range of ranks
|
||||
contained in the files. Each of these subsets uses its own communicator.
|
||||
|
||||
Instead of using the hostnames the IO ranks can be assigned using the
|
||||
FOAM_IORANKS environment variable (also when running non-parallel), e.g.
|
||||
|
||||
@ -28,8 +28,9 @@ Description
|
||||
fileOperations that performs all file operations on the master processor.
|
||||
Requires the calls to be parallel synchronised!
|
||||
|
||||
Limitations: - no /processor in filename
|
||||
- no /uniform/ in the filename
|
||||
Limitations
|
||||
- no /processor in filename
|
||||
- no /uniform/ in the filename
|
||||
|
||||
The main logic is in ::filePath which returns a
|
||||
- same path on all processors. This can either be a global file
|
||||
@ -40,12 +41,12 @@ Description
|
||||
- different path on all processors (processor0/0/p)
|
||||
|
||||
system/controlDict:
|
||||
filePath worldmaster: <globalRoot>/system/controlDict
|
||||
filePath worldmaster: \<globalRoot\>/system/controlDict
|
||||
localmaster: ,,
|
||||
slave : ,,
|
||||
|
||||
processor0/uniform/time
|
||||
filePath worldmaster: <globalRoot>/processorXXX/uniform/time
|
||||
filePath worldmaster: \<globalRoot\>/processorXXX/uniform/time
|
||||
localmaster: ,,
|
||||
slave : ,,
|
||||
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,7 +56,7 @@ void Foam::interpolation2DTable<Type>::readTable()
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable()
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::normalBounding::WARN),
|
||||
fileName_("fileNameIsUndefined"),
|
||||
reader_(nullptr)
|
||||
@ -68,7 +71,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
|
||||
const fileName& fName
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(values),
|
||||
List<value_type>(values),
|
||||
bounding_(bounding),
|
||||
fileName_(fName),
|
||||
reader_(nullptr)
|
||||
@ -78,7 +81,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::normalBounding::WARN),
|
||||
fileName_(fName),
|
||||
reader_(new openFoamTableReader<Type>(dictionary()))
|
||||
@ -90,7 +93,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName)
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||
List<value_type>(),
|
||||
bounding_
|
||||
(
|
||||
bounds::normalBoundingNames.lookupOrFailsafe
|
||||
@ -110,13 +113,13 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict)
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable
|
||||
(
|
||||
const interpolation2DTable& interpTable
|
||||
const interpolation2DTable& tbl
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(interpTable),
|
||||
bounding_(interpTable.bounding_),
|
||||
fileName_(interpTable.fileName_),
|
||||
reader_(interpTable.reader_) // note: steals reader. Used in write().
|
||||
List<value_type>(tbl),
|
||||
bounding_(tbl.bounding_),
|
||||
fileName_(tbl.fileName_),
|
||||
reader_(tbl.reader_.clone())
|
||||
{}
|
||||
|
||||
|
||||
@ -308,6 +311,24 @@ Foam::label Foam::interpolation2DTable<Type>::Xi
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::interpolation2DTable<Type>::operator=
|
||||
(
|
||||
const interpolation2DTable<Type>& rhs
|
||||
)
|
||||
{
|
||||
if (this == &rhs)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static_cast<List<value_type>&>(*this) = rhs;
|
||||
bounding_ = rhs.bounding_;
|
||||
fileName_ = rhs.fileName_;
|
||||
reader_.reset(rhs.reader_.clone());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Type Foam::interpolation2DTable<Type>::operator()
|
||||
(
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,17 +58,7 @@ class interpolation2DTable
|
||||
:
|
||||
public List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>
|
||||
{
|
||||
public:
|
||||
|
||||
// Public data types
|
||||
|
||||
//- Convenience typedef
|
||||
typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
// Private Data
|
||||
|
||||
//- Handling for out-of-bound values
|
||||
bounds::normalBounding bounding_;
|
||||
@ -101,6 +94,15 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
// Public Data Types
|
||||
|
||||
//- The element data type
|
||||
typedef Tuple2<scalar, List<Tuple2<scalar, Type>>> value_type;
|
||||
|
||||
//- Convenience typedef
|
||||
typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
@ -120,8 +122,8 @@ public:
|
||||
//- Construct by reading file name and outOfBounds from dictionary
|
||||
interpolation2DTable(const dictionary& dict);
|
||||
|
||||
//- Construct copy
|
||||
interpolation2DTable(const interpolation2DTable& interpTable);
|
||||
//- Copy construct
|
||||
interpolation2DTable(const interpolation2DTable& tbl);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -139,6 +141,9 @@ public:
|
||||
//- Return an element of constant List<Tuple2<scalar, Type>>
|
||||
const List<Tuple2<scalar, Type>>& operator[](const label) const;
|
||||
|
||||
//- Copy assignment
|
||||
void operator=(const interpolation2DTable<Type>& rhs);
|
||||
|
||||
//- Return an interpolated value
|
||||
Type operator()(const scalar valueX, const scalar valueY) const;
|
||||
};
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,7 +60,7 @@ void Foam::interpolationTable<Type>::readTable()
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable()
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::repeatableBounding::WARN),
|
||||
fileName_("fileNameIsUndefined"),
|
||||
reader_(nullptr)
|
||||
@ -72,7 +75,7 @@ Foam::interpolationTable<Type>::interpolationTable
|
||||
const fileName& fName
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(values),
|
||||
List<value_type>(values),
|
||||
bounding_(bounding),
|
||||
fileName_(fName),
|
||||
reader_(nullptr)
|
||||
@ -82,7 +85,7 @@ Foam::interpolationTable<Type>::interpolationTable
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::repeatableBounding::WARN),
|
||||
fileName_(fName),
|
||||
reader_(new openFoamTableReader<Type>(dictionary()))
|
||||
@ -94,7 +97,7 @@ Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(),
|
||||
List<value_type>(),
|
||||
bounding_
|
||||
(
|
||||
bounds::repeatableBoundingNames.lookupOrFailsafe
|
||||
@ -114,17 +117,16 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable
|
||||
(
|
||||
const interpolationTable& interpTable
|
||||
const interpolationTable& tbl
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(interpTable),
|
||||
bounding_(interpTable.bounding_),
|
||||
fileName_(interpTable.fileName_),
|
||||
reader_(interpTable.reader_) // note: steals reader. Used in write().
|
||||
List<value_type>(tbl),
|
||||
bounding_(tbl.bounding_),
|
||||
fileName_(tbl.fileName_),
|
||||
reader_(tbl.reader_.clone())
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
@ -315,6 +317,24 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::interpolationTable<Type>::operator=
|
||||
(
|
||||
const interpolationTable<Type>& rhs
|
||||
)
|
||||
{
|
||||
if (this == &rhs)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static_cast<List<value_type>&>(*this) = rhs;
|
||||
bounding_ = rhs.bounding_;
|
||||
fileName_ = rhs.fileName_;
|
||||
reader_.reset(rhs.reader_.clone());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
const Foam::Tuple2<Foam::scalar, Type>&
|
||||
Foam::interpolationTable<Type>::operator[](const label i) const
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -102,6 +104,15 @@ class interpolationTable
|
||||
|
||||
public:
|
||||
|
||||
// Public Data Types
|
||||
|
||||
//- The element data type
|
||||
typedef Tuple2<scalar, Type> value_type;
|
||||
|
||||
//- The mapped data type
|
||||
typedef Type mapped_type;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
@ -123,8 +134,8 @@ public:
|
||||
// This is a specialised constructor used by patchFields
|
||||
interpolationTable(const dictionary& dict);
|
||||
|
||||
//- Construct copy
|
||||
interpolationTable(const interpolationTable& interpTable);
|
||||
//- Copy construct
|
||||
interpolationTable(const interpolationTable& tbl);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -143,6 +154,9 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Copy assignment
|
||||
void operator=(const interpolationTable<Type>& rhs);
|
||||
|
||||
//- Return an element of constant Tuple2<scalar, Type>
|
||||
const Tuple2<scalar, Type>& operator[](const label) const;
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ void Foam::processorLduInterface::send
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
reinterpret_cast<const char*>(f.begin()),
|
||||
reinterpret_cast<const char*>(f.cdata()),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -62,20 +62,23 @@ void Foam::processorLduInterface::send
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
receiveBuf_.begin(),
|
||||
receiveBuf_.data(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
);
|
||||
|
||||
resizeBuf(sendBuf_, nBytes);
|
||||
memcpy(sendBuf_.begin(), f.begin(), nBytes);
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(sendBuf_.data()), f.cdata(), nBytes
|
||||
);
|
||||
|
||||
OPstream::write
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
sendBuf_.begin(),
|
||||
sendBuf_.cdata(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -107,7 +110,7 @@ void Foam::processorLduInterface::receive
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
reinterpret_cast<char*>(f.begin()),
|
||||
reinterpret_cast<char*>(f.data()),
|
||||
f.byteSize(),
|
||||
tag(),
|
||||
comm()
|
||||
@ -115,7 +118,10 @@ void Foam::processorLduInterface::receive
|
||||
}
|
||||
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||
{
|
||||
memcpy(f.begin(), receiveBuf_.begin(), f.byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(f.data()), receiveBuf_.cdata(), f.byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -154,10 +160,10 @@ void Foam::processorLduInterface::compressedSend
|
||||
label nFloats = nm1 + nlast;
|
||||
label nBytes = nFloats*sizeof(float);
|
||||
|
||||
const scalar *sArray = reinterpret_cast<const scalar*>(f.begin());
|
||||
const scalar *sArray = reinterpret_cast<const scalar*>(f.cdata());
|
||||
const scalar *slast = &sArray[nm1];
|
||||
resizeBuf(sendBuf_, nBytes);
|
||||
float *fArray = reinterpret_cast<float*>(sendBuf_.begin());
|
||||
float *fArray = reinterpret_cast<float*>(sendBuf_.data());
|
||||
|
||||
for (label i=0; i<nm1; i++)
|
||||
{
|
||||
@ -176,7 +182,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
sendBuf_.begin(),
|
||||
sendBuf_.cdata(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -190,7 +196,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
receiveBuf_.begin(),
|
||||
receiveBuf_.data(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -200,7 +206,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
sendBuf_.begin(),
|
||||
sendBuf_.cdata(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -246,7 +252,7 @@ void Foam::processorLduInterface::compressedReceive
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
receiveBuf_.begin(),
|
||||
receiveBuf_.data(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -260,9 +266,9 @@ void Foam::processorLduInterface::compressedReceive
|
||||
}
|
||||
|
||||
const float *fArray =
|
||||
reinterpret_cast<const float*>(receiveBuf_.begin());
|
||||
reinterpret_cast<const float*>(receiveBuf_.cdata());
|
||||
f.last() = reinterpret_cast<const Type&>(fArray[nm1]);
|
||||
scalar *sArray = reinterpret_cast<scalar*>(f.begin());
|
||||
scalar *sArray = reinterpret_cast<scalar*>(f.data());
|
||||
const scalar *slast = &sArray[nm1];
|
||||
|
||||
for (label i=0; i<nm1; i++)
|
||||
|
||||
@ -72,12 +72,6 @@ Foam::patchIdentifier::patchIdentifier
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::patchIdentifier::~patchIdentifier()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::patchIdentifier::inGroup(const word& name) const
|
||||
|
||||
@ -73,6 +73,18 @@ class patchIdentifier
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
patchIdentifier(const patchIdentifier&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
patchIdentifier& operator=(const patchIdentifier&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~patchIdentifier() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
@ -100,10 +112,6 @@ public:
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~patchIdentifier();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the patch name
|
||||
|
||||
@ -80,6 +80,15 @@ public:
|
||||
static const word emptyType;
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
surfZoneIdentifier(const surfZoneIdentifier&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
surfZoneIdentifier& operator=(const surfZoneIdentifier&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -330,6 +330,25 @@ Foam::tmp<Foam::vectorField> Foam::polyPatch::faceCellCentres() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::polyPatch::areaFraction() const
|
||||
{
|
||||
tmp<scalarField> tfraction(new scalarField(size()));
|
||||
scalarField& fraction = tfraction.ref();
|
||||
|
||||
const vectorField::subField faceAreas = this->faceAreas();
|
||||
const pointField& points = this->points();
|
||||
|
||||
forAll(*this, facei)
|
||||
{
|
||||
const face& curFace = this->operator[](facei);
|
||||
fraction[facei] =
|
||||
mag(faceAreas[facei])/(curFace.mag(points) + ROOTVSMALL);
|
||||
}
|
||||
|
||||
return tfraction;
|
||||
}
|
||||
|
||||
|
||||
const Foam::labelUList& Foam::polyPatch::faceCells() const
|
||||
{
|
||||
if (!faceCellsPtr_)
|
||||
|
||||
@ -372,6 +372,10 @@ public:
|
||||
//- Return face cell centres
|
||||
tmp<vectorField> faceCellCentres() const;
|
||||
|
||||
//- Return the area fraction as the ratio of the stored face area
|
||||
//- and the area given by the face points
|
||||
tmp<scalarField> areaFraction() const;
|
||||
|
||||
|
||||
// Addressing into mesh
|
||||
|
||||
|
||||
@ -231,6 +231,7 @@ public:
|
||||
//
|
||||
// if (nOrig == zones.size()) { existing... } else { new... }
|
||||
// \endcode
|
||||
// \param zoneName the name of the zone
|
||||
// \param verbose report if an existing zone was selected or
|
||||
// a new zone was created.
|
||||
// \return non-const reference to the existing or new zone
|
||||
|
||||
@ -68,7 +68,7 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst)
|
||||
template<class T>
|
||||
inline Foam::Pair<T>::Pair(const T& f, const T& s, const bool doSort)
|
||||
{
|
||||
if (doSort && f < s)
|
||||
if (doSort && s < f)
|
||||
{
|
||||
first() = s;
|
||||
second() = f;
|
||||
@ -88,7 +88,6 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst, const bool doSort)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::Pair<T>::Pair(Istream& is)
|
||||
:
|
||||
|
||||
@ -77,10 +77,19 @@ public:
|
||||
enum components { XX, XY, XZ, YY, YZ, ZZ };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline SymmTensor();
|
||||
//- Default construct
|
||||
SymmTensor() = default;
|
||||
|
||||
//- Copy construct
|
||||
SymmTensor(const SymmTensor&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
SymmTensor& operator=(const SymmTensor&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline SymmTensor(const Foam::zero);
|
||||
|
||||
@ -28,11 +28,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor<Cmpt>::SymmTensor()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor<Cmpt>::SymmTensor(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -77,10 +77,19 @@ public:
|
||||
enum components { XX, XY, YY };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline SymmTensor2D();
|
||||
//- Default construct
|
||||
SymmTensor2D() = default;
|
||||
|
||||
//- Copy construct
|
||||
SymmTensor2D(const SymmTensor2D&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
SymmTensor2D& operator=(const SymmTensor2D&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline SymmTensor2D(const Foam::zero);
|
||||
|
||||
@ -28,11 +28,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D(const Foam::zero)
|
||||
:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user