Commit d55c9766 authored by mattijs's avatar mattijs
Browse files

directMapped extension for inter-region

parent 74213da9
......@@ -57,6 +57,7 @@ Description
#include "EdgeMap.H"
#include "syncTools.H"
#include "ReadFields.H"
#include "directMappedWallPolyPatch.H"
using namespace Foam;
......@@ -1022,13 +1023,13 @@ EdgeMap<label> addRegionPatches
(
mesh,
regionNames[e[0]] + "_to_" + regionNames[e[1]],
polyPatch::typeName
directMappedWallPolyPatch::typeName
);
addPatch
(
mesh,
regionNames[e[1]] + "_to_" + regionNames[e[0]],
polyPatch::typeName
directMappedWallPolyPatch::typeName
);
Info<< "For interface between region " << e[0]
......@@ -1100,7 +1101,6 @@ EdgeMap<label> addRegionPatches
//}
//XXXXXXXXX
// Find region that covers most of cell zone
label findCorrespondingRegion
(
......@@ -1152,7 +1152,6 @@ label findCorrespondingRegion
return regionI;
}
//XXXXXXXXX
//// Checks if cellZone has corresponding cellRegion.
......
......@@ -446,15 +446,16 @@ void Foam::directMappedPatchBase::calcMapping() const
forAll(magOffset, sampleI)
{
if (mag(magOffset[sampleI]-avgOffset) > 0.001*avgOffset)
if (mag(magOffset[sampleI]-avgOffset) > max(SMALL, 0.001*avgOffset))
{
WarningIn("directMappedPatchBase::calcMapping() const")
<< "The actual cell centres picked up using offset "
<< "The actual cell/face centres picked up using offset "
<< offset_ << " are not" << endl
<< " on a single plane."
<< " This might give numerical problems." << endl
<< " At patchface " << patchFc[sampleI]
<< " the sampled cell " << sampleLocations[sampleI] << endl
<< " the sampled cell/face " << sampleLocations[sampleI]
<< endl
<< " is not on a plane " << avgOffset
<< " offset from the patch." << endl
<< " You might want to shift your plane offset."
......
......@@ -77,11 +77,7 @@ Foam::directMappedPolyPatch::directMappedPolyPatch
)
:
polyPatch(pp, bm),
directMappedPatchBase
(
*this,
static_cast<const directMappedPatchBase&>(*this)
)
directMappedPatchBase(*this, pp)
{}
......@@ -95,11 +91,7 @@ Foam::directMappedPolyPatch::directMappedPolyPatch
)
:
polyPatch(pp, bm, index, newSize, newStart),
directMappedPatchBase
(
*this,
static_cast<const directMappedPatchBase&>(*this)
)
directMappedPatchBase(*this, pp)
{}
......
......@@ -86,7 +86,7 @@ protected:
public:
//- Runtime type information
TypeName("directMappedPatch");
TypeName("directMapped");
// Constructors
......
......@@ -82,11 +82,7 @@ Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
)
:
wallPolyPatch(pp, bm),
directMappedPatchBase
(
*this,
static_cast<const directMappedPatchBase&>(*this)
)
directMappedPatchBase(*this, pp)
{}
......@@ -100,11 +96,7 @@ Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
)
:
wallPolyPatch(pp, bm, index, newSize, newStart),
directMappedPatchBase
(
*this,
static_cast<const directMappedPatchBase&>(*this)
)
directMappedPatchBase(*this, pp)
{}
......
......@@ -86,7 +86,7 @@ protected:
public:
//- Runtime type information
TypeName("directMappedPatch");
TypeName("directMappedWall");
// Constructors
......
......@@ -20,7 +20,7 @@ FoamFile
(
inlet
{
type directMappedPatch;
type directMapped;
nFaces 30;
startFace 27238;
sampleMode nearestCell;
......
Supports Markdown
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