mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
directMapped extension for inter-region
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user