Skip to content
Snippets Groups Projects
Commit 3cafdccb authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: add dictionary-driven multi-pass stitchMesh facility

- the dictionary-driven variant of stitchMesh allows sequential
  application of 'stitch' operation with requiring intermediate
  writing to disk.

- Without arguments:
  * stitchMesh uses a system/stitchMeshDict or -dict dict

- With arguments:
  * master/slave patches specified on the command-line as in previous
    versions.
parent d4b7fbe9
Branches
Tags
No related merge requests found
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object stitchMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
outerx
{
match partial; // partial | integral | perfect
master outerx;
slave innerx;
}
outery
{
match partial;
master outery;
slave innery;
}
outerz
{
match partial;
master outerz;
slave innerz;
}
// ************************************************************************* //
......@@ -79,7 +79,6 @@ Foam::pointField Foam::perfectInterface::calcFaceCentres
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::perfectInterface::perfectInterface
(
const word& name,
......@@ -97,7 +96,6 @@ Foam::perfectInterface::perfectInterface
{}
// Construct from dictionary
Foam::perfectInterface::perfectInterface
(
const word& name,
......
......@@ -45,6 +45,7 @@ namespace Foam
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::setUpdater::setUpdater
......
......@@ -52,7 +52,7 @@ const Foam::Enum
<
Foam::slidingInterface::typeOfMatch
>
Foam::slidingInterface::typeOfMatchNames_
Foam::slidingInterface::typeOfMatchNames
{
{ typeOfMatch::INTEGRAL, "integral" },
{ typeOfMatch::PARTIAL, "partial" },
......@@ -112,8 +112,6 @@ void Foam::slidingInterface::clearOut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::slidingInterface::slidingInterface
(
const word& name,
......@@ -204,7 +202,6 @@ Foam::slidingInterface::slidingInterface
}
// Construct from components
Foam::slidingInterface::slidingInterface
(
const word& name,
......@@ -244,7 +241,7 @@ Foam::slidingInterface::slidingInterface
dict.lookup("slavePatchName"),
mme.mesh().boundaryMesh()
),
matchType_(typeOfMatchNames_.lookup("typeOfMatch", dict)),
matchType_(typeOfMatchNames.lookup("typeOfMatch", dict)),
coupleDecouple_(dict.lookup("coupleDecouple")),
attached_(dict.lookup("attached")),
projectionAlgo_
......@@ -749,7 +746,7 @@ void Foam::slidingInterface::write(Ostream& os) const
<< cutFaceZoneID_.name() << nl
<< masterPatchID_.name() << nl
<< slavePatchID_.name() << nl
<< typeOfMatchNames_[matchType_] << nl
<< typeOfMatchNames[matchType_] << nl
<< coupleDecouple_ << nl
<< attached_ << endl;
}
......@@ -776,7 +773,7 @@ void Foam::slidingInterface::writeDict(Ostream& os) const
os.writeEntry("cutFaceZoneName", cutFaceZoneID_.name());
os.writeEntry("masterPatchName", masterPatchID_.name());
os.writeEntry("slavePatchName", slavePatchID_.name());
os.writeEntry("typeOfMatch", typeOfMatchNames_[matchType_]);
os.writeEntry("typeOfMatch", typeOfMatchNames[matchType_]);
os.writeEntry("coupleDecouple", coupleDecouple_);
os.writeEntry("projection", intersection::algorithmNames_[projectionAlgo_]);
os.writeEntry("attached", attached_);
......
......@@ -84,8 +84,8 @@ public:
PARTIAL
};
//- Direction names
static const Enum<typeOfMatch> typeOfMatchNames_;
//- Names for the types of matches
static const Enum<typeOfMatch> typeOfMatchNames;
private:
......
......@@ -4,9 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication ./Allmesh
for dir in x y z
do
runApplication -s dir-$dir stitchMesh -partial outer$dir inner$dir
done
# Use stitchMesh with dictionary
# runApplication stitchMesh -intermediate
runApplication stitchMesh -overwrite
runApplication checkMesh
# -----------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
runApplication ./Allmesh
# Use stitchMesh with command arguments (no dictionary)
for dir in x y z
do
runApplication -s dir-$dir stitchMesh -partial outer$dir inner$dir
done
runApplication checkMesh
# -----------------------------------------------------------------------------
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object stitchMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
outerx
{
match partial; // partial | integral | perfect
master outerx;
slave innerx;
}
outery
{
match partial;
master outery;
slave innery;
}
outerz
{
match partial;
master outerz;
slave innerz;
}
// ************************************************************************* //
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment