Compare commits
5 Commits
temp-probe
...
wip-primit
| Author | SHA1 | Date | |
|---|---|---|---|
| a94db7170d | |||
| 1c458cbf7c | |||
| 5a75946f1a | |||
| 709472a7bb | |||
| af14230255 |
@ -49,7 +49,7 @@
|
||||
|
||||
<!--
|
||||
Providing details of your set-up can help us identify any issues, e.g.
|
||||
OpenFOAM version : v2306|v2212|v2206|v2112|v2106 etc
|
||||
OpenFOAM version : v2212|v2206|v2112|v2106|v2012 etc
|
||||
Operating system : ubuntu|openSUSE|centos etc
|
||||
Hardware info : any info that may help?
|
||||
Compiler : gcc|intel|clang etc
|
||||
|
||||
10
Allwmake
10
Allwmake
@ -96,12 +96,10 @@ echo " ${WM_PROJECT_DIR##*/}"
|
||||
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler"
|
||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||
echo
|
||||
|
||||
# The api/patch information
|
||||
sed -e 's/^/ /; s/=/ = /' ./META-INFO/api-info 2>/dev/null || true
|
||||
|
||||
echo " bin = $(_foamCountDirEntries "$FOAM_APPBIN") entries"
|
||||
echo " lib = $(_foamCountDirEntries "$FOAM_LIBBIN") entries"
|
||||
echo " api = $(etc/openfoam -show-api 2>/dev/null)"
|
||||
echo " patch = $(etc/openfoam -show-patch 2>/dev/null)"
|
||||
echo " bin = $(_foamCountDirEntries "$FOAM_APPBIN") entries"
|
||||
echo " lib = $(_foamCountDirEntries "$FOAM_LIBBIN") entries"
|
||||
echo
|
||||
echo ========================================
|
||||
|
||||
|
||||
@ -5,22 +5,17 @@ It is likely incomplete...
|
||||
|
||||
## Contributors (alphabetical by surname)
|
||||
|
||||
- Horacio Aguerre
|
||||
- Yu Ankun
|
||||
- Tetsuo Aoyagi
|
||||
- Akira Azami
|
||||
- William Bainbridge
|
||||
- Gabriel Barajas
|
||||
- Kutalmis Bercin
|
||||
- Julius Bergmann
|
||||
- Ivor Clifford
|
||||
- Greg Collecutt
|
||||
- Jonathan Cranford
|
||||
- Santiago Marquez Damian
|
||||
- Sergio Ferraris
|
||||
- Matej Forman
|
||||
- Marian Fuchs
|
||||
- Gabriel Gerlero
|
||||
- Pawan Ghildiyal
|
||||
- Chris Greenshields
|
||||
- Bernhard Gschaider
|
||||
@ -55,11 +50,8 @@ It is likely incomplete...
|
||||
- Gavin Tabor
|
||||
- Zeljko Tukovic
|
||||
- Eugene De Villiers
|
||||
- Louis Vittoz
|
||||
- Vuko Vukcevic
|
||||
- Yi Wang
|
||||
- Norbert Weber
|
||||
- Volker Weissmann
|
||||
- Henry Weller
|
||||
- Niklas Wikstrom
|
||||
- Guanyang Xue
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
api=2306
|
||||
patch=0
|
||||
api=2301
|
||||
patch=230110
|
||||
|
||||
14
README.md
14
README.md
@ -40,9 +40,9 @@ Violations of the Trademark are monitored, and will be duly prosecuted.
|
||||
|
||||
If OpenFOAM has already been compiled on your system, simply source
|
||||
the appropriate `etc/bashrc` or `etc/cshrc` file and get started.
|
||||
For example, for the OpenFOAM-v2306 version:
|
||||
For example, for the OpenFOAM-v2212 version:
|
||||
```
|
||||
source /installation/path/OpenFOAM-v2306/etc/bashrc
|
||||
source /installation/path/OpenFOAM-v2212/etc/bashrc
|
||||
```
|
||||
|
||||
## Compiling OpenFOAM
|
||||
@ -127,8 +127,8 @@ These 3rd-party sources are normally located in a directory parallel
|
||||
to the OpenFOAM directory. For example,
|
||||
```
|
||||
/path/parent
|
||||
|-- OpenFOAM-v2306
|
||||
\-- ThirdParty-v2306
|
||||
|-- OpenFOAM-v2212
|
||||
\-- ThirdParty-v2212
|
||||
```
|
||||
There are, however, many cases where this simple convention is inadequate:
|
||||
|
||||
@ -136,7 +136,7 @@ There are, however, many cases where this simple convention is inadequate:
|
||||
operating system or cluster installation provides it)
|
||||
|
||||
* When we have changed the OpenFOAM directory name to some arbitrary
|
||||
directory name, e.g. openfoam-sandbox2306, etc..
|
||||
directory name, e.g. openfoam-sandbox2212, etc..
|
||||
|
||||
* When we would like any additional 3rd party software to be located
|
||||
inside of the OpenFOAM directory to ensure that the installation is
|
||||
@ -156,9 +156,9 @@ when locating the ThirdParty directory with the following precedence:
|
||||
2. PREFIX/ThirdParty-VERSION
|
||||
* this corresponds to the traditional approach
|
||||
3. PREFIX/ThirdParty-vAPI
|
||||
* allows for an updated value of VERSION, *eg*, `v2306-myCustom`,
|
||||
* allows for an updated value of VERSION, *eg*, `v2212-myCustom`,
|
||||
without requiring a renamed ThirdParty. The API value would still
|
||||
be `2306` and the original `ThirdParty-v2306/` would be found.
|
||||
be `2212` and the original `ThirdParty-v2212/` would be found.
|
||||
4. PREFIX/ThirdParty-API
|
||||
* same as the previous example, but using an unadorned API value.
|
||||
5. PREFIX/ThirdParty-common
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020,2023 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -132,11 +132,6 @@ void PDRkEpsilon::correct()
|
||||
|
||||
// Update epsilon and G at the wall
|
||||
epsilon_.boundaryFieldRef().updateCoeffs();
|
||||
// Push new cell values to
|
||||
// coupled neighbours. Note that we want to avoid the re-updateCoeffs
|
||||
// of the wallFunctions so make sure to bypass the evaluate on
|
||||
// those patches and only do the coupled ones.
|
||||
epsilon_.boundaryFieldRef().evaluateCoupled<coupledFvPatch>();
|
||||
|
||||
// Add the blockage generation term so that it is included consistently
|
||||
// in both the k and epsilon equations
|
||||
|
||||
@ -109,7 +109,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(Nv.dimensions(), Zero)
|
||||
|
||||
@ -223,7 +223,7 @@ if (ign.ignited())
|
||||
volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1)));
|
||||
volScalarField G(R*(XiEq - scalar(1.001))/XiEq);
|
||||
|
||||
//R *= (Gstar + 2*mag(devSymm(fvc::grad(U))))/Gstar;
|
||||
//R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar;
|
||||
|
||||
// Solve for the flame wrinkling
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -12,7 +12,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("Ydefault", dimless, 1)
|
||||
@ -29,7 +29,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("p", dimPressure, p0)
|
||||
@ -46,7 +46,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("T", dimTemperature, T0)
|
||||
|
||||
@ -103,10 +103,16 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (!this->readValueEntry(dict))
|
||||
if (dict.found("value"))
|
||||
{
|
||||
// Fallback: set to the internal field
|
||||
fvPatchField<scalar>::patchInternalField(*this);
|
||||
fvPatchField<scalar>::operator=
|
||||
(
|
||||
scalarField("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
fvPatchField<scalar>::operator=(patchInternalField());
|
||||
}
|
||||
|
||||
refValue() = *this;
|
||||
|
||||
@ -105,15 +105,18 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (this->readValueEntry(dict))
|
||||
if (dict.found("value"))
|
||||
{
|
||||
const auto* hasRefValue = dict.findEntry("refValue", keyType::LITERAL);
|
||||
const auto* hasFrac = dict.findEntry("valueFraction", keyType::LITERAL);
|
||||
fvPatchField<vector>::operator=
|
||||
(
|
||||
vectorField("value", dict, p.size())
|
||||
);
|
||||
|
||||
if (hasRefValue && hasFrac)
|
||||
if (dict.found("refValue") && dict.found("valueFraction"))
|
||||
{
|
||||
this->refValue().assign(*hasRefValue, p.size());
|
||||
this->valueFraction().assign(*hasFrac, p.size());
|
||||
this->refValue() = vectorField("refValue", dict, p.size());
|
||||
this->valueFraction() =
|
||||
scalarField("valueFraction", dict, p.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -29,7 +29,7 @@ if (mesh.changing())
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
// Set BCs of pcorr to fixed-value for patches at which p is fixed
|
||||
|
||||
@ -87,13 +87,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
fam::ddt(h, Us)
|
||||
+ fam::div(phi2s, Us)
|
||||
+ fam::Sp
|
||||
(
|
||||
0.0125
|
||||
*frictionFactor.internalField()
|
||||
*mag(Us.internalField()),
|
||||
Us
|
||||
)
|
||||
+ fam::Sp(0.0125*frictionFactor*mag(Us), Us)
|
||||
==
|
||||
Gs*h
|
||||
- fam::Sp(Sd, Us)
|
||||
|
||||
@ -47,7 +47,6 @@ forAll(Us, faceI)
|
||||
Us[faceI].z() =
|
||||
Uinf.value()*0.25*R[faceI].x()*R[faceI].z()/sqr(mag(R[faceI]));
|
||||
}
|
||||
Us.boundaryFieldRef().evaluateCoupled<coupledFaPatch>();
|
||||
|
||||
Us -= aMesh.faceAreaNormals()*(aMesh.faceAreaNormals() & Us);
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ if (mesh.changing())
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
// Set BCs of pcorr to fixed-value for patches at which p is fixed
|
||||
|
||||
@ -108,7 +108,7 @@ forAll(fluidRegions, i)
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
dimensionedScalar(word::null, dimLength, Zero)
|
||||
dimensionedScalar("hRef", dimLength, Zero) // uses name
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C
|
||||
solid/solidRegionDiffNo.C
|
||||
../solid/solidRegionDiffNo.C
|
||||
chtMultiRegionTwoPhaseEulerFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/chtMultiRegionTwoPhaseEulerFoam
|
||||
|
||||
@ -243,12 +243,14 @@ turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
|
||||
this->readValueEntry(dict, IOobjectOption::MUST_READ);
|
||||
|
||||
if (this->readMixedEntries(dict))
|
||||
if (dict.found("refValue"))
|
||||
{
|
||||
// Full restart
|
||||
refValue() = scalarField("refValue", dict, p.size());
|
||||
refGrad() = scalarField("refGradient", dict, p.size());
|
||||
valueFraction() = scalarField("valueFraction", dict, p.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -221,7 +221,7 @@ forAll(fluidRegions, i)
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
dimensionedScalar(word::null, dimLength, Zero)
|
||||
dimensionedScalar("hRef", dimLength, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,11 +13,11 @@ forAll(cumulativeContErrIO, i)
|
||||
"cumulativeContErr",
|
||||
runTime.timeName(),
|
||||
"uniform",
|
||||
mesh.thisDb(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
dimensionedScalar(word::null, dimless, Zero)
|
||||
dimensionedScalar(dimless, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1 +0,0 @@
|
||||
../../solid/solidRegionDiffNo.C
|
||||
@ -112,7 +112,7 @@ forAll(fluidRegions, i)
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
dimensionedScalar(word::null, dimLength, Zero)
|
||||
dimensionedScalar("hRef", dimLength, Zero) // uses name
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,11 +13,11 @@ forAll(cumulativeContErrIO, i)
|
||||
"cumulativeContErr",
|
||||
runTime.timeName(),
|
||||
"uniform",
|
||||
mesh.thisDb(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
dimensionedScalar(word::null, dimless, Zero)
|
||||
dimensionedScalar(dimless, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
),
|
||||
solidRegions[i],
|
||||
dimensionedSymmTensor(tkappaByCp().dimensions(), Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ if (!thermo.isotropic())
|
||||
),
|
||||
mesh,
|
||||
dimensionedSymmTensor(tkappaByCp().dimensions(), Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
)
|
||||
);
|
||||
volSymmTensorField& aniAlpha = *taniAlpha;
|
||||
|
||||
@ -44,7 +44,7 @@ IOobject turbulencePropertiesHeader
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
);
|
||||
|
||||
if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(false))
|
||||
|
||||
@ -24,7 +24,7 @@ if (mesh.changing())
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
// Set BCs of pcorr to fixed-value for patches at which p is fixed
|
||||
|
||||
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector(cloudSU.dimensions()/dimVolume, Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
);
|
||||
|
||||
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
|
||||
|
||||
@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector(cloudSU.dimensions()/dimVolume, Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
);
|
||||
|
||||
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
|
||||
|
||||
@ -9,7 +9,7 @@ IOobject io
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
);
|
||||
|
||||
if (io.typeHeaderOk<IOdictionary>())
|
||||
@ -32,4 +32,4 @@ if (io.typeHeaderOk<IOdictionary>())
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector(cloudSU.dimensions()/dimVolume, Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
);
|
||||
|
||||
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
|
||||
|
||||
@ -64,7 +64,8 @@ volScalarField mu
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
mixture.mu()
|
||||
mixture.mu(),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
|
||||
@ -138,7 +139,7 @@ volScalarField alphac
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimless, Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
alphac.oldTime();
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
|
||||
@ -140,7 +140,7 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimless, Zero),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
curTimeIndex_(-1)
|
||||
{
|
||||
|
||||
@ -84,7 +84,7 @@ Foam::surfaceTensionModels::liquidProperties::sigma() const
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimSigma
|
||||
|
||||
@ -105,7 +105,8 @@ incompressibleTwoPhaseInteractingMixture
|
||||
U_.db()
|
||||
),
|
||||
U_.mesh(),
|
||||
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
|
||||
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
)
|
||||
{
|
||||
correct();
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::wordList Foam::relativeVelocityModel::UdmPatchFieldTypes() const
|
||||
wordList UdmTypes
|
||||
(
|
||||
U.boundaryField().size(),
|
||||
fvPatchFieldBase::calculatedType()
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
forAll(U.boundaryField(), i)
|
||||
|
||||
@ -724,7 +724,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::laserDTRM::Rp() const
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimPower/dimVolume/pow4(dimTemperature), Zero)
|
||||
|
||||
@ -97,7 +97,7 @@ Foam::radiation::localDensityAbsorptionEmission::aCont(const label bandI) const
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(inv(dimLength), Zero)
|
||||
@ -130,7 +130,7 @@ Foam::radiation::localDensityAbsorptionEmission::eCont(const label bandI) const
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(inv(dimLength), Zero)
|
||||
@ -163,7 +163,7 @@ Foam::radiation::localDensityAbsorptionEmission::ECont(const label bandI) const
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
|
||||
@ -46,7 +46,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimless,
|
||||
|
||||
@ -119,7 +119,8 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture
|
||||
U.db()
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero)
|
||||
dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
nuModel1_
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p_rgh.boundaryField().size(),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p_rgh.boundaryField().size(); i++)
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::phaseChangeTwoPhaseMixture::New
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
mesh
|
||||
),
|
||||
fluid.dragCoeff(phase, dragCoeffs())/phase.rho(),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
dragCoeffi.correctBoundaryConditions();
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ tractionDisplacementFvPatchVectorField
|
||||
traction_(p.size(), Zero),
|
||||
pressure_(p.size(), Zero)
|
||||
{
|
||||
extrapolateInternal();
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ tractionDisplacementFvPatchVectorField
|
||||
traction_("traction", dict, p.size()),
|
||||
pressure_("pressure", dict, p.size())
|
||||
{
|
||||
extrapolateInternal();
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ tractionDisplacementCorrectionFvPatchVectorField
|
||||
traction_(p.size(), Zero),
|
||||
pressure_(p.size(), Zero)
|
||||
{
|
||||
extrapolateInternal();
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ tractionDisplacementCorrectionFvPatchVectorField
|
||||
traction_("traction", dict, p.size()),
|
||||
pressure_("pressure", dict, p.size())
|
||||
{
|
||||
extrapolateInternal();
|
||||
fvPatchVectorField::operator=(patchInternalField());
|
||||
gradient() = Zero;
|
||||
}
|
||||
|
||||
|
||||
@ -27,14 +27,6 @@ License
|
||||
|
||||
#include "dummyLib.H"
|
||||
#include <iostream>
|
||||
|
||||
// Include MPI without any C++ bindings
|
||||
#ifndef MPICH_SKIP_MPICXX
|
||||
#define MPICH_SKIP_MPICXX
|
||||
#endif
|
||||
#ifndef OMPI_SKIP_MPICXX
|
||||
#define OMPI_SKIP_MPICXX
|
||||
#endif
|
||||
#include <mpi.h>
|
||||
|
||||
// * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * * //
|
||||
|
||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
size
|
||||
);
|
||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
),
|
||||
size
|
||||
);
|
||||
@ -157,7 +157,7 @@ int main(int argc, char *argv[])
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -112,20 +112,13 @@ int main(int argc, char *argv[])
|
||||
argList::addBoolOption("iter");
|
||||
argList::addBoolOption("swap");
|
||||
argList::addBoolOption("default", "reinstate default tests");
|
||||
argList::addBoolOption("no-wait", "test with skipping request waits");
|
||||
argList::addNote("runs default tests or specified ones only");
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
const bool optNowaiting = args.found("no-wait");
|
||||
|
||||
// Run default tests, unless only specific tests are requested
|
||||
const bool defaultTests =
|
||||
(
|
||||
args.found("default")
|
||||
|| args.options().empty()
|
||||
|| (optNowaiting && args.options().size())
|
||||
);
|
||||
args.found("default") || args.options().empty();
|
||||
|
||||
|
||||
typedef FixedList<scalar,2> scalar2Type;
|
||||
@ -314,53 +307,27 @@ int main(int argc, char *argv[])
|
||||
List<FixedList<label, 2>> list6{{0, 1}, {2, 3}};
|
||||
Info<< "list6: " << list6 << nl;
|
||||
|
||||
if (UPstream::parRun())
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
// Fixed buffer would also work, but want to test using UList
|
||||
List<labelPair> buffer;
|
||||
|
||||
DynamicList<UPstream::Request> requests;
|
||||
|
||||
const label numProcs = UPstream::nProcs();
|
||||
const label startOfRequests = UPstream::nRequests();
|
||||
|
||||
|
||||
// NOTE: also test a mix of local and global requests...
|
||||
UPstream::Request singleRequest;
|
||||
|
||||
if (UPstream::master())
|
||||
if (Pstream::master())
|
||||
{
|
||||
// Use local requests here
|
||||
requests.reserve(numProcs);
|
||||
|
||||
buffer.resize(numProcs);
|
||||
buffer.resize(UPstream::nProcs());
|
||||
buffer[0] = labelPair(0, UPstream::myProcNo());
|
||||
|
||||
for (const int proci : UPstream::subProcs())
|
||||
for (const int proci : Pstream::subProcs())
|
||||
{
|
||||
UIPstream::read
|
||||
(
|
||||
requests.emplace_back(),
|
||||
UPstream::commsTypes::nonBlocking,
|
||||
proci,
|
||||
buffer.slice(proci, 1)
|
||||
);
|
||||
}
|
||||
|
||||
if (requests.size() > 1)
|
||||
{
|
||||
// Or just wait for as a single request...
|
||||
singleRequest = requests.back();
|
||||
requests.pop_back();
|
||||
}
|
||||
|
||||
if (requests.size() > 2)
|
||||
{
|
||||
// Peel off a few from local -> global
|
||||
// the order will not matter (is MPI_Waitall)
|
||||
|
||||
UPstream::addRequest(requests.back()); requests.pop_back();
|
||||
UPstream::addRequest(requests.back()); requests.pop_back();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -369,34 +336,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
Perr<< "Sending to master: " << buffer << endl;
|
||||
|
||||
// Capture the request and transfer to the global list
|
||||
// (for testing)
|
||||
|
||||
UOPstream::write
|
||||
(
|
||||
singleRequest,
|
||||
UPstream::commsTypes::nonBlocking,
|
||||
UPstream::masterNo(),
|
||||
buffer.slice(0, 1) // OK
|
||||
/// buffer // Also OK
|
||||
);
|
||||
|
||||
// if (singleRequest.good())
|
||||
{
|
||||
UPstream::addRequest(singleRequest);
|
||||
}
|
||||
}
|
||||
|
||||
Pout<< "Pending requests [" << numProcs << " procs] global="
|
||||
<< (UPstream::nRequests() - startOfRequests)
|
||||
<< " local=" << requests.size()
|
||||
<< " single=" << singleRequest.good() << nl;
|
||||
|
||||
if (!optNowaiting)
|
||||
{
|
||||
UPstream::waitRequests(startOfRequests);
|
||||
}
|
||||
UPstream::waitRequests(requests);
|
||||
UPstream::waitRequest(singleRequest);
|
||||
UPstream::waitRequests(startOfRequests);
|
||||
|
||||
Info<< "Gathered: " << buffer << endl;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -46,39 +46,35 @@ using namespace Foam;
|
||||
template<class Type>
|
||||
void doWrite(const IOobject& io, const label sz)
|
||||
{
|
||||
const bool writeOnProc = (sz > 0);
|
||||
|
||||
IOField<Type> fld(io, sz);
|
||||
forAll(fld, i)
|
||||
{
|
||||
fld[i] = i + 1000.25 + (0.25 * i);
|
||||
}
|
||||
Pout<< "writing:" << fld << endl;
|
||||
fld.write(writeOnProc);
|
||||
fld.write(sz > 0);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
void doWrite<bool>(const IOobject& io, const label sz)
|
||||
{
|
||||
const bool writeOnProc = (sz > 0);
|
||||
|
||||
IOField<bool> fld(io, sz);
|
||||
forAll(fld, i)
|
||||
{
|
||||
fld[i] = i % 2;
|
||||
}
|
||||
Pout<< "writing:" << fld << endl;
|
||||
fld.write(writeOnProc);
|
||||
fld.write(sz > 0);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void doRead(const IOobject& io, const label sz)
|
||||
{
|
||||
const bool readOnProc = (sz > 0);
|
||||
Pout<< " readOnProc:" << readOnProc << endl;
|
||||
IOField<Type> fld(io, readOnProc);
|
||||
bool valid = (sz > 0);
|
||||
Pout<< " valid:" << valid << endl;
|
||||
IOField<Type> fld(io, valid);
|
||||
Pout<< " wanted:" << sz << " actually read:" << fld.size() << endl;
|
||||
|
||||
if (fld.size() != sz)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -92,8 +92,8 @@ int main(int argc, char *argv[])
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector(Zero)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -325,22 +325,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
list1.set(i, new Scalar(1.3*i));
|
||||
}
|
||||
{
|
||||
auto ptr = autoPtr<Scalar>::New(10);
|
||||
|
||||
Info<< "add: " << Foam::name(ptr.get());
|
||||
list1.set(0, ptr);
|
||||
|
||||
Info<< "ptrlist: " << Foam::name(list1.get(0)) << nl;
|
||||
Info<< "now: " << Foam::name(ptr.get()) << nl;
|
||||
|
||||
ptr = autoPtr<Scalar>::New(20);
|
||||
|
||||
list1.append(ptr);
|
||||
// Delete method: list1.push_back(ptr);
|
||||
// list1.push_back(std::move(ptr));
|
||||
}
|
||||
|
||||
|
||||
PtrList<Scalar> list2(15);
|
||||
Info<< "Emplace set " << list2.size() << " values" << nl;
|
||||
|
||||
@ -370,7 +370,7 @@ void test_global_funcs(Type)
|
||||
Type(126)
|
||||
)
|
||||
);
|
||||
cmp(" Square of Frobenius norm = ", magSqr(sT), scalar(205));
|
||||
cmp(" Square of Frobenius norm = ", magSqr(sT), Type(205));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -325,7 +325,7 @@ void test_global_funcs(Type)
|
||||
Type(13)
|
||||
)
|
||||
);
|
||||
cmp(" Square of Frobenius norm = ", magSqr(sT), scalar(17.999999999999996));
|
||||
cmp(" Square of Frobenius norm = ", magSqr(sT), Type(17.999999999999996));
|
||||
cmp
|
||||
(
|
||||
" Outer-product of a Vector2D with itself = ",
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -124,9 +124,6 @@ int main(int argc, char *argv[])
|
||||
argList::addDryRunOption("Just for testing");
|
||||
argList::addVerboseOption("Increase verbosity");
|
||||
|
||||
// Check -verbose before initialisation
|
||||
UPstream::debug = argList::verbose(argc, argv);
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
Pout<< "command-line ("
|
||||
|
||||
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
treeBoundBox bb(zero_one{});
|
||||
treeBoundBox bb(cube(0, 1));
|
||||
treeBoundBox sub(cube(0.1, 0.8));
|
||||
|
||||
Info<< nl
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
Test-broadcastCopy.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-broadcastCopy
|
||||
@ -1,2 +0,0 @@
|
||||
/* EXE_INC = */
|
||||
/* EXE_LIBS = */
|
||||
@ -1,97 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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/>.
|
||||
|
||||
Description
|
||||
Test file/directory broadcasting
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "OSspecific.H"
|
||||
#include "fileOperation.H"
|
||||
#include "Pstream.H"
|
||||
#include "Switch.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noBanner();
|
||||
argList::noFunctionObjects();
|
||||
argList::noCheckProcessorDirectories();
|
||||
|
||||
argList::addNote("Test broadcast file via MPI");
|
||||
|
||||
argList::addArgument("srcFile");
|
||||
argList::addBoolOption("even", "Broadcast to even directories only");
|
||||
argList::addBoolOption("relative", "Copy relative to output dir");
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
const auto srcFile = args.get<fileName>(1);
|
||||
|
||||
// const auto dstFile = args.get<fileName>(2);
|
||||
fileName dstFile("proc" + Foam::name(UPstream::myProcNo()));
|
||||
|
||||
|
||||
const bool writeOnProc =
|
||||
(
|
||||
!args.found("even") || 0 == (UPstream::myProcNo() % 2)
|
||||
);
|
||||
|
||||
if (args.found("relative"))
|
||||
{
|
||||
// if (writeOnProc)
|
||||
// {
|
||||
// Foam::mkDir(dstFile);
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
dstFile /= srcFile + ".copy";
|
||||
}
|
||||
|
||||
Pout<< "writing: " << writeOnProc << " : " << dstFile << endl;
|
||||
|
||||
const auto& fp = fileHandler();
|
||||
|
||||
fp.broadcastCopy
|
||||
(
|
||||
UPstream::worldComm,
|
||||
writeOnProc,
|
||||
srcFile,
|
||||
dstFile
|
||||
);
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -103,7 +103,7 @@ int main(int argc, char *argv[])
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -34,9 +34,6 @@ Description
|
||||
#include "complex.H"
|
||||
#include "complexFields.H"
|
||||
#include "scalarField.H"
|
||||
#include "diagTensor.H"
|
||||
#include "symmTensor.H"
|
||||
#include "symmTensor2D.H"
|
||||
#include "ListOps.H"
|
||||
#include "ops.H"
|
||||
|
||||
@ -167,72 +164,6 @@ int main(int argc, char *argv[])
|
||||
<< " => " << imags << nl;
|
||||
}
|
||||
|
||||
{
|
||||
SymmTensor<complex> st1(SymmTensor<complex>::uniform({3, 4}));
|
||||
|
||||
Info<< "symmTensor: " << st1 << nl
|
||||
<< " tr: " << tr(st1) << nl
|
||||
<< " diagSqr: " << st1.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(st1) << nl
|
||||
<< " mag: " << mag(st1) << nl;
|
||||
|
||||
SymmTensor<scalar> st2(SymmTensor<scalar>::uniform(5));
|
||||
|
||||
Info<< "symmTensor: " << st2 << nl
|
||||
<< " tr: " << tr(st2) << nl
|
||||
<< " diagSqr: " << st2.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(st2) << nl
|
||||
<< " mag: " << mag(st2) << nl;
|
||||
|
||||
st2 = Zero;
|
||||
|
||||
DiagTensor<complex> dt1(SphericalTensor<complex>({3, 4}));
|
||||
|
||||
Info<< "diagTensor: " << dt1 << nl
|
||||
<< " tr: " << tr(dt1) << nl
|
||||
<< " diagSqr: " << dt1.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(dt1) << nl
|
||||
<< " mag: " << mag(dt1) << nl;
|
||||
|
||||
|
||||
// A bit ugly...
|
||||
st1 = SphericalTensor<complex>({3, 4});
|
||||
|
||||
Info<< "symmTensor: " << st1 << nl
|
||||
<< " tr: " << tr(st1) << nl
|
||||
<< " diagSqr: " << st1.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(st1) << nl
|
||||
<< " mag: " << mag(st1) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
SymmTensor2D<complex> st1(SymmTensor2D<complex>::uniform({3, 4}));
|
||||
|
||||
Info<< "symmTensor: " << st1 << nl
|
||||
<< " tr: " << tr(st1) << nl
|
||||
<< " diagSqr: " << st1.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(st1) << nl
|
||||
<< " mag: " << mag(st1) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
Tensor<complex> st1(Tensor<complex>::uniform({3, 4}));
|
||||
|
||||
Info<< "tensor: " << st1 << nl
|
||||
<< " tr: " << tr(st1) << nl
|
||||
<< " diagSqr: " << st1.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(st1) << nl
|
||||
<< " mag: " << mag(st1) << endl;
|
||||
|
||||
Tensor<scalar> st2(Tensor<scalar>::uniform(5));
|
||||
|
||||
Info<< "Tensor: " << st2 << nl
|
||||
<< " tr: " << tr(st2) << nl
|
||||
<< " diagSqr: " << st2.diagSqr() << nl
|
||||
<< " magSqr: " << magSqr(st2) << nl
|
||||
<< " mag: " << mag(st2) << endl;
|
||||
}
|
||||
|
||||
complexField fld1(3, complex(2.0, 1.0));
|
||||
complexField fld2(fld1);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -67,7 +67,7 @@ int main(int argc, char *argv[])
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -41,6 +41,7 @@ Description
|
||||
#include "mapPolyMesh.H"
|
||||
#include "polyTopoChange.H"
|
||||
#include "fvCFD.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "Random.H"
|
||||
|
||||
using namespace Foam;
|
||||
@ -92,7 +93,7 @@ int main(int argc, char *argv[])
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("one", dimless, 1.0),
|
||||
fvPatchFieldBase::zeroGradientType()
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
Info<< "Writing one field "
|
||||
<< one.name() << " in " << runTime.timeName() << endl;
|
||||
@ -130,7 +131,8 @@ int main(int argc, char *argv[])
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("one", dimless, 1.0)
|
||||
dimensionedScalar("one", dimless, 1.0),
|
||||
calculatedFvsPatchScalarField::typeName
|
||||
);
|
||||
Info<< "Writing surface one field "
|
||||
<< surfaceOne.name() << " in " << runTime.timeName() << endl;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user