mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -13,23 +13,6 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
// Add overset specific interpolations
|
||||
{
|
||||
dictionary oversetDict;
|
||||
oversetDict.add("T", true);
|
||||
|
||||
const_cast<dictionary&>
|
||||
(
|
||||
mesh.schemesDict()
|
||||
).add
|
||||
(
|
||||
"oversetInterpolationRequired",
|
||||
oversetDict,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
|
||||
@ -121,21 +121,14 @@ mesh.setFluxRequired(Phi.name());
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
// Add overset specific interpolations
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
dictionary oversetDict;
|
||||
oversetDict.add("Phi", true);
|
||||
oversetDict.add("U", true);
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("interpolatedCells");
|
||||
|
||||
const_cast<dictionary&>
|
||||
(
|
||||
mesh.schemesDict()
|
||||
).add
|
||||
(
|
||||
"oversetInterpolationRequired",
|
||||
oversetDict,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
|
||||
@ -25,12 +25,11 @@ Application
|
||||
|
||||
Description
|
||||
Some tests for complex numbers
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "complex.H"
|
||||
#include "complexVector.H"
|
||||
#include "Field.H"
|
||||
#include "complexFields.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -52,15 +51,26 @@ int main(int argc, char *argv[])
|
||||
<< "complex(scalar) : " << complex(3.14519) << nl
|
||||
<< nl;
|
||||
|
||||
std::complex<scalar> c1(10, -3);
|
||||
Info<< "std::complex : " << c1 << nl;
|
||||
Info<< "sin: " << std::sin(c1) << nl;
|
||||
|
||||
|
||||
Info<< "complexVector::zero : " << complexVector::zero << nl
|
||||
<< "complexVector::one : " << complexVector::one << nl
|
||||
<< nl;
|
||||
|
||||
// Comparison
|
||||
|
||||
for (complex c : { complex{1, 0}, complex{1, 2}} )
|
||||
for (complex c : { complex{1, 0}, complex{1, 2}} )
|
||||
{
|
||||
Info<< nl;
|
||||
print1(c);
|
||||
|
||||
Info<< "sin: " << sin(c) << nl;
|
||||
Info<< "pow(3): " << pow(c, 3) << nl;
|
||||
Info<< "pow3: " << pow3(c) << nl;
|
||||
Info<< "log: " << log(c) << nl;
|
||||
Info<< "pow025: " << pow025(c) << nl;
|
||||
|
||||
// TDB: allow implicit construct from scalar?
|
||||
//
|
||||
// if (c == 1.0)
|
||||
@ -69,22 +79,46 @@ int main(int argc, char *argv[])
|
||||
// }
|
||||
}
|
||||
|
||||
Field<complex> fld1(3, complex(2.0, 1.0));
|
||||
complexField fld1(3, complex(2.0, 1.0));
|
||||
complexField fld2(fld1);
|
||||
|
||||
for (complex& c : fld2)
|
||||
{
|
||||
c = ~c;
|
||||
}
|
||||
|
||||
Info<< "Field " << flatOutput(fld1) << nl;
|
||||
Info<< "Conjugate: " << flatOutput(fld2) << nl;
|
||||
|
||||
// Some arbitrary change
|
||||
for (complex& c : fld2)
|
||||
{
|
||||
c.Im() *= 5;
|
||||
}
|
||||
|
||||
|
||||
Info<< "sum = " << sum(fld1) << nl;
|
||||
// Not yet Info<< "min = " << min(fld1) << nl;
|
||||
|
||||
fld1 *= 10;
|
||||
Info<< "Multiply: " << flatOutput(fld1) << nl;
|
||||
Info<< "scalar multiply: " << flatOutput(fld1) << nl;
|
||||
|
||||
for (complex& c : fld1)
|
||||
{
|
||||
c = ~c;
|
||||
}
|
||||
fld1 /= 10;
|
||||
Info<< "scalar divide: " << flatOutput(fld1) << nl;
|
||||
|
||||
Info<< "sin: " << sin(fld1) << nl;
|
||||
|
||||
Info<< "operator + : " << (fld1 + fld2) << nl;
|
||||
|
||||
// Some operators are still incomplete
|
||||
|
||||
// Info<< "operator * : " << (fld1 * fld2) << nl;
|
||||
// Info<< "operator / : " << (fld1 / fld2) << nl;
|
||||
Info<< "operator / : " << (fld1 / 2) << nl;
|
||||
// Info<< "operator / : " << (fld1 / fld2) << nl;
|
||||
Info<< "sqrt : " << sqrt(fld1) << nl;
|
||||
// Info<< "pow(2) : " << pow(fld1, 2) << nl;
|
||||
|
||||
Info<< "Conjugate: " << flatOutput(fld1) << nl;
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
return 0;
|
||||
|
||||
@ -217,6 +217,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
#include "addRegionOption.H"
|
||||
argList::addOption("dict", "file", "Use alternative extrudeMeshDict");
|
||||
#include "setRootCase.H"
|
||||
#include "createTimeExtruded.H"
|
||||
|
||||
@ -236,15 +237,19 @@ int main(int argc, char *argv[])
|
||||
<< runTimeExtruded.timeName() << nl << endl;
|
||||
}
|
||||
|
||||
|
||||
IOdictionary dict
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOobject
|
||||
IOobject::selectIO
|
||||
(
|
||||
"extrudeMeshDict",
|
||||
runTimeExtruded.system(),
|
||||
runTimeExtruded,
|
||||
IOobject::MUST_READ_IF_MODIFIED
|
||||
IOobject
|
||||
(
|
||||
"extrudeMeshDict",
|
||||
runTimeExtruded.system(),
|
||||
runTimeExtruded,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
args.opt<fileName>("dict", "")
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -1691,19 +1691,41 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
const bool mergePatchFaces
|
||||
(
|
||||
meshDict.lookupOrDefault("mergePatchFaces", true)
|
||||
);
|
||||
|
||||
if (!mergePatchFaces)
|
||||
// How to treat co-planar faces
|
||||
meshRefinement::FaceMergeType mergeType =
|
||||
meshRefinement::FaceMergeType::GEOMETRIC;
|
||||
{
|
||||
Info<< "Not merging patch-faces of cell to preserve"
|
||||
<< " (split)hex cell shape."
|
||||
<< nl << endl;
|
||||
const bool mergePatchFaces
|
||||
(
|
||||
meshDict.lookupOrDefault("mergePatchFaces", true)
|
||||
);
|
||||
|
||||
if (!mergePatchFaces)
|
||||
{
|
||||
Info<< "Not merging patch-faces of cell to preserve"
|
||||
<< " (split)hex cell shape."
|
||||
<< nl << endl;
|
||||
mergeType = meshRefinement::FaceMergeType::NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool mergeAcrossPatches
|
||||
(
|
||||
meshDict.lookupOrDefault("mergeAcrossPatches", false)
|
||||
);
|
||||
|
||||
if (mergeAcrossPatches)
|
||||
{
|
||||
Info<< "Merging co-planar patch-faces of cells"
|
||||
<< ", regardless of patch assignment"
|
||||
<< nl << endl;
|
||||
mergeType = meshRefinement::FaceMergeType::IGNOREPATCH;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (wantRefine)
|
||||
{
|
||||
cpuTime timer;
|
||||
@ -1732,7 +1754,7 @@ int main(int argc, char *argv[])
|
||||
refineParams,
|
||||
snapParams,
|
||||
refineParams.handleSnapProblems(),
|
||||
mergePatchFaces, // merge co-planar faces
|
||||
mergeType,
|
||||
motionDict
|
||||
);
|
||||
|
||||
@ -1784,7 +1806,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
snapDict,
|
||||
motionDict,
|
||||
mergePatchFaces,
|
||||
mergeType,
|
||||
curvature,
|
||||
planarAngle,
|
||||
snapParams
|
||||
@ -1851,7 +1873,7 @@ int main(int argc, char *argv[])
|
||||
layerDict,
|
||||
motionDict,
|
||||
layerParams,
|
||||
mergePatchFaces,
|
||||
mergeType,
|
||||
preBalance,
|
||||
decomposer,
|
||||
distributor
|
||||
|
||||
@ -55,7 +55,7 @@ Description
|
||||
#include "faceSet.H"
|
||||
#include "pointSet.H"
|
||||
#include "processorMeshes.H"
|
||||
#include "hexRef8.H"
|
||||
#include "hexRef8Data.H"
|
||||
|
||||
#ifdef HAVE_ZOLTAN
|
||||
#include "zoltanRenumber.H"
|
||||
@ -1327,8 +1327,24 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Remove old procAddressing files
|
||||
processorMeshes::removeFiles(mesh);
|
||||
// Remove refinement data
|
||||
hexRef8::removeFiles(mesh);
|
||||
|
||||
// Update refinement data
|
||||
hexRef8Data refData
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dummy",
|
||||
mesh.facesInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
refData.updateMesh(map());
|
||||
refData.write();
|
||||
|
||||
// Update sets
|
||||
topoSet::updateMesh(mesh.facesInstance(), map(), cellSets);
|
||||
topoSet::updateMesh(mesh.facesInstance(), map(), faceSets);
|
||||
|
||||
Reference in New Issue
Block a user