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