mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: extrudeToRegionMesh : make it work again
- constrain multiple normals per point - introduce special cyclic type nonuniformTransformCyclic inbetween zones
This commit is contained in:
9
applications/utilities/mesh/generation/extrudeToRegionMesh/Allwmake
Executable file
9
applications/utilities/mesh/generation/extrudeToRegionMesh/Allwmake
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake libso nonuniformTransformCyclic
|
||||||
|
wmake
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -1,14 +1,12 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-InonuniformTransformCyclic/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
/* -I$(LIB_SRC)/surfMesh/lnInclude */ \
|
|
||||||
/* -I$(LIB_SRC)/lagrangian/basic/lnInclude */ \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
-lnonuniformTransformCyclic \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
/* -lsurfMesh */ \
|
|
||||||
/* -llagrangian */ \
|
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh
|
-ldynamicMesh
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,8 @@ Description
|
|||||||
- if extruding boundary faces:
|
- if extruding boundary faces:
|
||||||
- convert boundary faces to directMappedWall patches
|
- convert boundary faces to directMappedWall patches
|
||||||
- extrude edges of faceZone as a <zone>_sidePatch
|
- extrude edges of faceZone as a <zone>_sidePatch
|
||||||
- extrude edges inbetween different faceZones as a cyclic <zoneA>_<zoneB>
|
- extrude edges inbetween different faceZones as a
|
||||||
|
(nonuniformTransform)cyclic <zoneA>_<zoneB>
|
||||||
- extrudes into master direction (i.e. away from the owner cell
|
- extrudes into master direction (i.e. away from the owner cell
|
||||||
if flipMap is false)
|
if flipMap is false)
|
||||||
- not parallel
|
- not parallel
|
||||||
@ -129,8 +130,9 @@ Usage
|
|||||||
#include "createShellMesh.H"
|
#include "createShellMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "cyclicPolyPatch.H"
|
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
#include "cyclicPolyPatch.H"
|
||||||
|
#include "nonuniformTransformCyclicPolyPatch.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -596,7 +598,7 @@ void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//XXXXXXXXX
|
// Find a patch face that is not extruded. Return -1 if not found.
|
||||||
label findUncoveredPatchFace
|
label findUncoveredPatchFace
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
@ -611,20 +613,19 @@ label findUncoveredPatchFace
|
|||||||
extrudeFaceSet.insert(extrudeMeshFaces[i]);
|
extrudeFaceSet.insert(extrudeMeshFaces[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
label patchI = -1;
|
|
||||||
|
|
||||||
const labelList& eFaces = mesh.edgeFaces()[meshEdgeI];
|
const labelList& eFaces = mesh.edgeFaces()[meshEdgeI];
|
||||||
forAll(eFaces, i)
|
forAll(eFaces, i)
|
||||||
{
|
{
|
||||||
label faceI = eFaces[i];
|
label faceI = eFaces[i];
|
||||||
if (!mesh.isInternalFace(faceI) && !extrudeFaceSet.found(faceI))
|
if (!mesh.isInternalFace(faceI) && !extrudeFaceSet.found(faceI))
|
||||||
{
|
{
|
||||||
patchI = mesh.boundaryMesh().whichPatch(faceI);
|
return faceI;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return patchI;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Count the number of faces in patches that need to be created
|
// Count the number of faces in patches that need to be created
|
||||||
void countExtrudePatches
|
void countExtrudePatches
|
||||||
(
|
(
|
||||||
@ -662,14 +663,14 @@ void countExtrudePatches
|
|||||||
// so choose any uncovered one. If none found put face in
|
// so choose any uncovered one. If none found put face in
|
||||||
// undetermined zone 'side' patch
|
// undetermined zone 'side' patch
|
||||||
|
|
||||||
label patchI = findUncoveredPatchFace
|
label faceI = findUncoveredPatchFace
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
UIndirectList<label>(extrudeMeshFaces, eFaces),
|
UIndirectList<label>(extrudeMeshFaces, eFaces),
|
||||||
extrudeMeshEdges[edgeI]
|
extrudeMeshEdges[edgeI]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (patchI == -1)
|
if (faceI == -1)
|
||||||
{
|
{
|
||||||
// Determine the min zone of all connected zones.
|
// Determine the min zone of all connected zones.
|
||||||
label minZone = zoneID[eFaces[0]];
|
label minZone = zoneID[eFaces[0]];
|
||||||
@ -686,6 +687,9 @@ void countExtrudePatches
|
|||||||
Pstream::listCombineGather(zoneZonePatch, plusEqOp<label>());
|
Pstream::listCombineGather(zoneZonePatch, plusEqOp<label>());
|
||||||
Pstream::listCombineScatter(zoneZonePatch);
|
Pstream::listCombineScatter(zoneZonePatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Lexical ordering for vectors.
|
||||||
bool lessThan(const point& x, const point& y)
|
bool lessThan(const point& x, const point& y)
|
||||||
{
|
{
|
||||||
for (direction dir = 0; dir < point::nComponents; dir++)
|
for (direction dir = 0; dir < point::nComponents; dir++)
|
||||||
@ -696,86 +700,137 @@ bool lessThan(const point& x, const point& y)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
class minEqVectorListOp
|
|
||||||
|
// Combine vectors
|
||||||
|
class minEqVectorOp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void operator()(List<vector>& x, const List<vector>& y) const
|
void operator()(vector& x, const vector& y) const
|
||||||
{
|
{
|
||||||
if (y.size())
|
if (y != vector::zero)
|
||||||
{
|
{
|
||||||
if (x.size())
|
if (x == vector::zero)
|
||||||
{
|
{
|
||||||
forAll(x, i)
|
x = y;
|
||||||
{
|
|
||||||
if (lessThan(y[i], x[i]))
|
|
||||||
{
|
|
||||||
x[i] = y[i];
|
|
||||||
}
|
}
|
||||||
}
|
else if (lessThan(y, x))
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
x = y;
|
x = y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Constrain&sync normals on points that are on coupled patches.
|
|
||||||
|
|
||||||
|
// Constrain&sync normals on points that are on coupled patches to make sure
|
||||||
|
// the face extruded from the edge has a valid normal with its coupled
|
||||||
|
// equivalent.
|
||||||
|
// Note that only points on cyclic edges need to be constrained and not
|
||||||
|
// all points touching cyclics since only edges become faces.
|
||||||
void constrainCoupledNormals
|
void constrainCoupledNormals
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const primitiveFacePatch& extrudePatch,
|
const primitiveFacePatch& extrudePatch,
|
||||||
const labelList& regionToPoint,
|
const labelList& meshEdges,
|
||||||
|
const faceList& pointRegions, // per face, per index the region
|
||||||
|
|
||||||
vectorField& regionNormals
|
vectorField& regionNormals
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Invert regionToPoint to create pointToRegions.
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
labelListList pointToRegions
|
|
||||||
|
// Mark edges that are on boundary of extrusion.
|
||||||
|
Map<label> meshToExtrudEdge
|
||||||
(
|
(
|
||||||
invertOneToMany
|
2*(extrudePatch.nEdges()-extrudePatch.nInternalEdges())
|
||||||
(
|
|
||||||
extrudePatch.nPoints(),
|
|
||||||
regionToPoint
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
// Sort acc. to region so (hopefully) coupled points will do the same.
|
for
|
||||||
forAll(pointToRegions, pointI)
|
(
|
||||||
|
label extrudeEdgeI = extrudePatch.nInternalEdges();
|
||||||
|
extrudeEdgeI < extrudePatch.nEdges();
|
||||||
|
extrudeEdgeI++
|
||||||
|
)
|
||||||
{
|
{
|
||||||
sort(pointToRegions[pointI]);
|
meshToExtrudEdge.insert(meshEdges[extrudeEdgeI], extrudeEdgeI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
// For owner: normal at first point of edge when walking through faces
|
||||||
|
// in order.
|
||||||
// Constrain displacement on cyclic patches
|
vectorField edgeNormals0(mesh.nEdges(), vector::zero);
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
vectorField edgeNormals1(mesh.nEdges(), vector::zero);
|
||||||
// Note: bit contentious to always do this on cyclic - should user use
|
|
||||||
// different patch type, e.g. 'cyclicSlip' instead?
|
|
||||||
|
|
||||||
|
// Loop through all edges of patch. If they are to be extruded mark the
|
||||||
|
// point normals in order.
|
||||||
forAll(patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchI];
|
const polyPatch& pp = patches[patchI];
|
||||||
|
|
||||||
if (isA<cyclicPolyPatch>(pp))
|
if (isA<cyclicPolyPatch>(pp))
|
||||||
{
|
{
|
||||||
forAll(pp.meshPoints(), pointI)
|
bool isOwner = refCast<const cyclicPolyPatch>(pp).owner();
|
||||||
|
|
||||||
|
forAll(pp.faceEdges(), faceI)
|
||||||
{
|
{
|
||||||
Map<label>::const_iterator fnd =
|
const labelList& fEdges = pp.faceEdges()[faceI];
|
||||||
extrudePatch.meshPointMap().find
|
forAll(fEdges, fp)
|
||||||
|
{
|
||||||
|
label meshEdgeI = pp.meshEdges()[fEdges[fp]];
|
||||||
|
if (meshToExtrudEdge.found(meshEdgeI))
|
||||||
|
{
|
||||||
|
// Edge corresponds to a extrusion edge. Store extrusion
|
||||||
|
// normals on edge so we can syncTools it.
|
||||||
|
|
||||||
|
//const edge& ppE = pp.edges()[fEdges[fp]];
|
||||||
|
//Pout<< "ppedge:" << pp.localPoints()[ppE[0]]
|
||||||
|
// << pp.localPoints()[ppE[1]]
|
||||||
|
// << endl;
|
||||||
|
|
||||||
|
const face& f = pp.localFaces()[faceI];
|
||||||
|
label fp0 = fp;
|
||||||
|
label fp1 = f.fcIndex(fp0);
|
||||||
|
label mp0 = pp[faceI][fp0];
|
||||||
|
label mp1 = pp[faceI][fp1];
|
||||||
|
|
||||||
|
// Find corresponding face and indices.
|
||||||
|
vector regionN0;
|
||||||
|
vector regionN1;
|
||||||
|
{
|
||||||
|
label exEdgeI = meshToExtrudEdge[meshEdgeI];
|
||||||
|
const labelList& eFaces =
|
||||||
|
extrudePatch.edgeFaces()[exEdgeI];
|
||||||
|
// Use 0th face.
|
||||||
|
label exFaceI = eFaces[0];
|
||||||
|
const face& exF = extrudePatch[exFaceI];
|
||||||
|
const face& exRegions = pointRegions[exFaceI];
|
||||||
|
// Find points
|
||||||
|
label r0 = exRegions[findIndex(exF, mp0)];
|
||||||
|
regionN0 = regionNormals[r0];
|
||||||
|
label r1 = exRegions[findIndex(exF, mp1)];
|
||||||
|
regionN1 = regionNormals[r1];
|
||||||
|
}
|
||||||
|
|
||||||
|
vector& nA =
|
||||||
(
|
(
|
||||||
pp.meshPoints()[pointI]
|
isOwner
|
||||||
|
? edgeNormals0[meshEdgeI]
|
||||||
|
: edgeNormals1[meshEdgeI]
|
||||||
);
|
);
|
||||||
if (fnd != extrudePatch.meshPointMap().end())
|
|
||||||
{
|
nA = regionN0;
|
||||||
// fnd() is a point on this cyclic.
|
const vector& cyc0 = pp.pointNormals()[f[fp0]];
|
||||||
const vector& cycNormal = pp.pointNormals()[pointI];
|
nA -= (nA&cyc0)*cyc0;
|
||||||
const labelList& pRegions = pointToRegions[fnd()];
|
|
||||||
forAll(pRegions, i)
|
vector& nB =
|
||||||
{
|
(
|
||||||
// Remove cyclic normal component.
|
isOwner
|
||||||
vector& regionNormal = regionNormals[pRegions[i]];
|
? edgeNormals1[meshEdgeI]
|
||||||
regionNormal -= (regionNormal&cycNormal)*cycNormal;
|
: edgeNormals0[meshEdgeI]
|
||||||
|
);
|
||||||
|
|
||||||
|
nB = regionN1;
|
||||||
|
const vector& cyc1 = pp.pointNormals()[f[fp1]];
|
||||||
|
nB -= (nB&cyc1)*cyc1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -786,45 +841,82 @@ void constrainCoupledNormals
|
|||||||
// Synchronise regionNormals
|
// Synchronise regionNormals
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Re-work regionNormals into multiple normals per point
|
|
||||||
List<List<vector> > pointNormals(mesh.nPoints());
|
|
||||||
forAll(pointToRegions, pointI)
|
|
||||||
{
|
|
||||||
const labelList& pRegions = pointToRegions[pointI];
|
|
||||||
|
|
||||||
label meshPointI = extrudePatch.meshPoints()[pointI];
|
|
||||||
List<vector>& pNormals = pointNormals[meshPointI];
|
|
||||||
pNormals.setSize(pRegions.size());
|
|
||||||
forAll(pRegions, i)
|
|
||||||
{
|
|
||||||
pNormals[i] = regionNormals[pRegions[i]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Synchronise
|
// Synchronise
|
||||||
syncTools::syncPointList
|
syncTools::syncEdgeList
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
pointNormals,
|
edgeNormals0,
|
||||||
minEqVectorListOp(),
|
minEqVectorOp(),
|
||||||
List<vector>(), // nullValue
|
vector::zero // nullValue
|
||||||
false // applySeparation
|
);
|
||||||
|
syncTools::syncEdgeList
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
edgeNormals1,
|
||||||
|
minEqVectorOp(),
|
||||||
|
vector::zero // nullValue
|
||||||
);
|
);
|
||||||
|
|
||||||
// Re-work back into regionNormals
|
|
||||||
forAll(pointToRegions, pointI)
|
|
||||||
{
|
|
||||||
const labelList& pRegions = pointToRegions[pointI];
|
|
||||||
|
|
||||||
label meshPointI = extrudePatch.meshPoints()[pointI];
|
// Re-work back into regionNormals
|
||||||
const List<vector>& pNormals = pointNormals[meshPointI];
|
forAll(patches, patchI)
|
||||||
forAll(pRegions, i)
|
|
||||||
{
|
{
|
||||||
regionNormals[pRegions[i]] = pNormals[i];
|
const polyPatch& pp = patches[patchI];
|
||||||
|
|
||||||
|
if (isA<cyclicPolyPatch>(pp))
|
||||||
|
{
|
||||||
|
bool isOwner = refCast<const cyclicPolyPatch>(pp).owner();
|
||||||
|
|
||||||
|
forAll(pp.faceEdges(), faceI)
|
||||||
|
{
|
||||||
|
const labelList& fEdges = pp.faceEdges()[faceI];
|
||||||
|
forAll(fEdges, fp)
|
||||||
|
{
|
||||||
|
label meshEdgeI = pp.meshEdges()[fEdges[fp]];
|
||||||
|
if (meshToExtrudEdge.found(meshEdgeI))
|
||||||
|
{
|
||||||
|
const face& f = pp.localFaces()[faceI];
|
||||||
|
label fp0 = fp;
|
||||||
|
label fp1 = f.fcIndex(fp0);
|
||||||
|
label mp0 = pp[faceI][fp0];
|
||||||
|
label mp1 = pp[faceI][fp1];
|
||||||
|
|
||||||
|
|
||||||
|
const vector& nA =
|
||||||
|
(
|
||||||
|
isOwner
|
||||||
|
? edgeNormals0[meshEdgeI]
|
||||||
|
: edgeNormals1[meshEdgeI]
|
||||||
|
);
|
||||||
|
|
||||||
|
const vector& nB =
|
||||||
|
(
|
||||||
|
isOwner
|
||||||
|
? edgeNormals1[meshEdgeI]
|
||||||
|
: edgeNormals0[meshEdgeI]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Find corresponding face and indices.
|
||||||
|
{
|
||||||
|
label exEdgeI = meshToExtrudEdge[meshEdgeI];
|
||||||
|
const labelList& eFaces =
|
||||||
|
extrudePatch.edgeFaces()[exEdgeI];
|
||||||
|
// Use 0th face.
|
||||||
|
label exFaceI = eFaces[0];
|
||||||
|
const face& exF = extrudePatch[exFaceI];
|
||||||
|
const face& exRegions = pointRegions[exFaceI];
|
||||||
|
// Find points
|
||||||
|
label r0 = exRegions[findIndex(exF, mp0)];
|
||||||
|
regionNormals[r0] = nA;
|
||||||
|
label r1 = exRegions[findIndex(exF, mp1)];
|
||||||
|
regionNormals[r1] = nB;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//XXXXXXXXX
|
|
||||||
|
|
||||||
|
|
||||||
tmp<pointField> calcOffset
|
tmp<pointField> calcOffset
|
||||||
@ -1106,7 +1198,10 @@ int main(int argc, char *argv[])
|
|||||||
// - zoneXXX_sides
|
// - zoneXXX_sides
|
||||||
// - zoneXXX_zoneYYY
|
// - zoneXXX_zoneYYY
|
||||||
labelList zoneSidePatch(faceZones.size(), 0);
|
labelList zoneSidePatch(faceZones.size(), 0);
|
||||||
labelList zoneZonePatch(faceZones.size()*faceZones.size(), 0);
|
// Patch to use for minZone
|
||||||
|
labelList zoneZonePatch_min(faceZones.size()*faceZones.size(), 0);
|
||||||
|
// Patch to use for maxZone
|
||||||
|
labelList zoneZonePatch_max(faceZones.size()*faceZones.size(), 0);
|
||||||
|
|
||||||
countExtrudePatches
|
countExtrudePatches
|
||||||
(
|
(
|
||||||
@ -1117,8 +1212,8 @@ int main(int argc, char *argv[])
|
|||||||
extrudeMeshFaces,
|
extrudeMeshFaces,
|
||||||
extrudeMeshEdges,
|
extrudeMeshEdges,
|
||||||
|
|
||||||
zoneSidePatch,
|
zoneSidePatch, // reuse for counting
|
||||||
zoneZonePatch
|
zoneZonePatch_min // reuse for counting
|
||||||
);
|
);
|
||||||
|
|
||||||
// Now check which patches to add.
|
// Now check which patches to add.
|
||||||
@ -1162,31 +1257,48 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
label nInter = 0;
|
label nInter = 0;
|
||||||
forAll(zoneZonePatch, minZone)
|
forAll(zoneZonePatch_min, minZone)
|
||||||
{
|
{
|
||||||
for (label maxZone = minZone; maxZone < faceZones.size(); maxZone++)
|
for (label maxZone = minZone; maxZone < faceZones.size(); maxZone++)
|
||||||
{
|
{
|
||||||
label index = minZone*faceZones.size()+maxZone;
|
label index = minZone*faceZones.size()+maxZone;
|
||||||
|
|
||||||
if (zoneZonePatch[index] > 0)
|
if (zoneZonePatch_min[index] > 0)
|
||||||
{
|
{
|
||||||
word patchName =
|
word minToMax =
|
||||||
faceZones[minZone].name()
|
faceZones[minZone].name()
|
||||||
+ "_"
|
+ "_to_"
|
||||||
+ faceZones[maxZone].name();
|
+ faceZones[maxZone].name();
|
||||||
|
word maxToMin =
|
||||||
zoneZonePatch[index] = addPatch<cyclicPolyPatch>
|
faceZones[maxZone].name()
|
||||||
|
+ "_to_"
|
||||||
|
+ faceZones[minZone].name();
|
||||||
|
{
|
||||||
|
transformDict.set("neighbourPatch", maxToMin);
|
||||||
|
zoneZonePatch_min[index] =
|
||||||
|
addPatch<nonuniformTransformCyclicPolyPatch>
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
patchName,
|
minToMax,
|
||||||
transformDict
|
transformDict
|
||||||
);
|
);
|
||||||
|
Info<< zoneZonePatch_min[index] << '\t' << minToMax << nl;
|
||||||
Info<< zoneZonePatch[index]
|
|
||||||
<< '\t' << patchName << nl;
|
|
||||||
|
|
||||||
nInter++;
|
nInter++;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
transformDict.set("neighbourPatch", minToMax);
|
||||||
|
zoneZonePatch_max[index] =
|
||||||
|
addPatch<nonuniformTransformCyclicPolyPatch>
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
maxToMin,
|
||||||
|
transformDict
|
||||||
|
);
|
||||||
|
Info<< zoneZonePatch_max[index] << '\t' << maxToMin << nl;
|
||||||
|
nInter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Info<< "Added " << nInter << " inter-zone patches." << nl
|
Info<< "Added " << nInter << " inter-zone patches." << nl
|
||||||
@ -1220,24 +1332,36 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
label minZone = min(zone0,zone1);
|
label minZone = min(zone0,zone1);
|
||||||
label maxZone = max(zone0,zone1);
|
label maxZone = max(zone0,zone1);
|
||||||
label patchI = zoneZonePatch[minZone*faceZones.size()+maxZone];
|
label index = minZone*faceZones.size()+maxZone;
|
||||||
|
|
||||||
ePatches.setSize(eFaces.size());
|
ePatches.setSize(eFaces.size());
|
||||||
ePatches = patchI;
|
|
||||||
|
if (zone0 == minZone)
|
||||||
|
{
|
||||||
|
ePatches[0] = zoneZonePatch_min[index];
|
||||||
|
ePatches[1] = zoneZonePatch_max[index];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ePatches[0] = zoneZonePatch_max[index];
|
||||||
|
ePatches[1] = zoneZonePatch_min[index];
|
||||||
|
}
|
||||||
|
|
||||||
nonManifoldEdge[edgeI] = 1;
|
nonManifoldEdge[edgeI] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
label patchI = findUncoveredPatchFace
|
label faceI = findUncoveredPatchFace
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
UIndirectList<label>(extrudeMeshFaces, eFaces),
|
UIndirectList<label>(extrudeMeshFaces, eFaces),
|
||||||
extrudeMeshEdges[edgeI]
|
extrudeMeshEdges[edgeI]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (patchI != -1)
|
if (faceI != -1)
|
||||||
{
|
{
|
||||||
|
label patchI = mesh.boundaryMesh().whichPatch(faceI);
|
||||||
ePatches.setSize(eFaces.size(), patchI);
|
ePatches.setSize(eFaces.size(), patchI);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1294,12 +1418,12 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
extrudePatch,
|
extrudePatch,
|
||||||
regionPoints,
|
extrudeMeshEdges,
|
||||||
|
pointRegions,
|
||||||
|
|
||||||
regionNormals
|
regionNormals
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// For debugging: dump hedgehog plot of normals
|
// For debugging: dump hedgehog plot of normals
|
||||||
{
|
{
|
||||||
OFstream str(runTime.path()/"regionNormals.obj");
|
OFstream str(runTime.path()/"regionNormals.obj");
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C
|
||||||
|
pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C
|
||||||
|
polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C
|
||||||
|
pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C
|
||||||
|
fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C
|
||||||
|
fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libnonuniformTransformCyclic
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
|
LIB_LIBS = \
|
||||||
|
-lfiniteVolume
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvPatchField<Type>::nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvPatchField<Type>(p, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvPatchField<Type>::nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvPatchField<Type>& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvPatchField<Type>(ptf, p, iF, mapper)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvPatchField<Type>::nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvPatchField<Type>(p, iF, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvPatchField<Type>::nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvPatchField<Type>& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvPatchField<Type>(ptf)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvPatchField<Type>::nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvPatchField<Type>(ptf, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,140 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nonuniformTransformCyclicFvPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Foam::nonuniformTransformCyclicFvPatchField
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nonuniformTransformCyclicFvPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvPatchField_H
|
||||||
|
#define nonuniformTransformCyclicFvPatchField_H
|
||||||
|
|
||||||
|
#include "cyclicFvPatchField.H"
|
||||||
|
#include "nonuniformTransformCyclicFvPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nonuniformTransformCyclicFvPatch Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class nonuniformTransformCyclicFvPatchField
|
||||||
|
:
|
||||||
|
public cyclicFvPatchField<Type>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName(nonuniformTransformCyclicFvPatch::typeName_());
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given nonuniformTransformCyclicFvPatchField onto a new patch
|
||||||
|
nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvPatchField<Type>&,
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvPatchField<Type>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual tmp<fvPatchField<Type> > clone() const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchField<Type> >
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicFvPatchField<Type>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
nonuniformTransformCyclicFvPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual tmp<fvPatchField<Type> > clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchField<Type> >
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicFvPatchField<Type>(*this, iF)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "nonuniformTransformCyclicFvPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchFields(nonuniformTransformCyclic);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvPatchFields_H
|
||||||
|
#define nonuniformTransformCyclicFvPatchFields_H
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(nonuniformTransformCyclic)
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvPatchFieldsFwd_H
|
||||||
|
#define nonuniformTransformCyclicFvPatchFieldsFwd_H
|
||||||
|
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type> class nonuniformTransformCyclicFvPatchField;
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(nonuniformTransformCyclic)
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvPatch.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(nonuniformTransformCyclicFvPatch, 0);
|
||||||
|
addToRunTimeSelectionTable(fvPatch, nonuniformTransformCyclicFvPatch, polyPatch);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nonuniformTransformCyclicFvPatch
|
||||||
|
|
||||||
|
Description
|
||||||
|
Cyclic-plane patch.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nonuniformTransformCyclicFvPatch.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvPatch_H
|
||||||
|
#define nonuniformTransformCyclicFvPatch_H
|
||||||
|
|
||||||
|
#include "cyclicFvPatch.H"
|
||||||
|
#include "nonuniformTransformCyclicPolyPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nonuniformTransformCyclicFvPatch Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class nonuniformTransformCyclicFvPatch
|
||||||
|
:
|
||||||
|
public cyclicFvPatch
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName(nonuniformTransformCyclicPolyPatch::typeName_());
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from polyPatch
|
||||||
|
nonuniformTransformCyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
|
||||||
|
:
|
||||||
|
cyclicFvPatch(patch, bm)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvsPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvsPatchField<Type>::nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, surfaceMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvsPatchField<Type>(p, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvsPatchField<Type>::nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvsPatchField<Type>& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, surfaceMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvsPatchField<Type>(ptf, p, iF, mapper)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvsPatchField<Type>::nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, surfaceMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvsPatchField<Type>(p, iF, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvsPatchField<Type>::nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvsPatchField<Type>& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvsPatchField<Type>(ptf)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicFvsPatchField<Type>::nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvsPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, surfaceMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicFvsPatchField<Type>(ptf, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,138 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nonuniformTransformCyclicFvsPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Foam::nonuniformTransformCyclicFvsPatchField
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nonuniformTransformCyclicFvsPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvsPatchField_H
|
||||||
|
#define nonuniformTransformCyclicFvsPatchField_H
|
||||||
|
|
||||||
|
#include "cyclicFvsPatchField.H"
|
||||||
|
#include "nonuniformTransformCyclicFvPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nonuniformTransformCyclicFvsPatch Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class nonuniformTransformCyclicFvsPatchField
|
||||||
|
:
|
||||||
|
public cyclicFvsPatchField<Type>
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName(nonuniformTransformCyclicFvPatch::typeName_());
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, surfaceMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, surfaceMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given nonuniformTransformCyclicFvsPatchField onto a new patch
|
||||||
|
nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvsPatchField<Type>&,
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, surfaceMesh>&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvsPatchField<Type>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual tmp<fvsPatchField<Type> > clone() const
|
||||||
|
{
|
||||||
|
return tmp<fvsPatchField<Type> >
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicFvsPatchField<Type>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
nonuniformTransformCyclicFvsPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicFvsPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, surfaceMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual tmp<fvsPatchField<Type> > clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, surfaceMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<fvsPatchField<Type> >
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicFvsPatchField<Type>(*this, iF)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "nonuniformTransformCyclicFvsPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvsPatchFields.H"
|
||||||
|
#include "fvsPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeFvsPatchFields(nonuniformTransformCyclic);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvsPatchFields_H
|
||||||
|
#define nonuniformTransformCyclicFvsPatchFields_H
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicFvsPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeFvsPatchTypeFieldTypedefs(nonuniformTransformCyclic)
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicFvsPatchFieldsFwd_H
|
||||||
|
#define nonuniformTransformCyclicFvsPatchFieldsFwd_H
|
||||||
|
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type> class nonuniformTransformCyclicFvsPatchField;
|
||||||
|
|
||||||
|
makeFvsPatchTypeFieldTypedefs(nonuniformTransformCyclic)
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicPointPatchField.H"
|
||||||
|
#include "transformField.H"
|
||||||
|
#include "symmTransformField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicPointPatchField<Type>::nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch& p,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(p, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicPointPatchField<Type>::nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch& p,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(p, iF, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicPointPatchField<Type>::nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPointPatchField<Type>& ptf,
|
||||||
|
const pointPatch& p,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF,
|
||||||
|
const pointPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(ptf, p, iF, mapper)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
nonuniformTransformCyclicPointPatchField<Type>::nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPointPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(ptf, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void nonuniformTransformCyclicPointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
|
{
|
||||||
|
const vectorField& nHat = this->patch().pointNormals();
|
||||||
|
|
||||||
|
tmp<Field<Type> > tvalues =
|
||||||
|
(
|
||||||
|
(
|
||||||
|
this->patchInternalField()
|
||||||
|
+ transform(I - 2.0*sqr(nHat), this->patchInternalField())
|
||||||
|
)/2.0
|
||||||
|
);
|
||||||
|
|
||||||
|
// Get internal field to insert values into
|
||||||
|
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
||||||
|
|
||||||
|
setInInternalField(iF, tvalues());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nonuniformTransformCyclicPointPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Cyclic + slip constraints
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nonuniformTransformCyclicPointPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicPointPatchField_H
|
||||||
|
#define nonuniformTransformCyclicPointPatchField_H
|
||||||
|
|
||||||
|
#include "cyclicPointPatchField.H"
|
||||||
|
#include "nonuniformTransformCyclicPointPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nonuniformTransformCyclicPointPatchField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class nonuniformTransformCyclicPointPatchField
|
||||||
|
:
|
||||||
|
public cyclicPointPatchField<Type>
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName(nonuniformTransformCyclicPointPatch::typeName_());
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch&,
|
||||||
|
const DimensionedField<Type, pointMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch&,
|
||||||
|
const DimensionedField<Type, pointMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given patchField<Type> onto a new patch
|
||||||
|
nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPointPatchField<Type>&,
|
||||||
|
const pointPatch&,
|
||||||
|
const DimensionedField<Type, pointMesh>&,
|
||||||
|
const pointPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual autoPtr<pointPatchField<Type> > clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<pointPatchField<Type> >
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicPointPatchField<Type>
|
||||||
|
(
|
||||||
|
*this
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
nonuniformTransformCyclicPointPatchField
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPointPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, pointMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual autoPtr<pointPatchField<Type> > clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, pointMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return autoPtr<pointPatchField<Type> >
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicPointPatchField<Type>
|
||||||
|
(
|
||||||
|
*this, iF
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
|
//- Evaluate the patch field
|
||||||
|
virtual void evaluate
|
||||||
|
(
|
||||||
|
const Pstream::commsTypes commsType=Pstream::blocking
|
||||||
|
);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "nonuniformTransformCyclicPointPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicPointPatchFields.H"
|
||||||
|
#include "pointPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePointPatchFields(nonuniformTransformCyclic);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicPointPatchFields_H
|
||||||
|
#define nonuniformTransformCyclicPointPatchFields_H
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicPointPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePointPatchFieldTypedefs(nonuniformTransformCyclic);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicPointPatch.H"
|
||||||
|
#include "pointConstraint.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(nonuniformTransformCyclicPointPatch, 0);
|
||||||
|
|
||||||
|
// Add the patch constructor functions to the hash tables
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
facePointPatch,
|
||||||
|
nonuniformTransformCyclicPointPatch,
|
||||||
|
polyPatch
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const vectorField& nonuniformTransformCyclicPointPatch::pointNormals() const
|
||||||
|
{
|
||||||
|
// Use underlying patch normals
|
||||||
|
return refCast<const facePointPatch>
|
||||||
|
(
|
||||||
|
*this
|
||||||
|
).facePointPatch::pointNormals();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void nonuniformTransformCyclicPointPatch::applyConstraint
|
||||||
|
(
|
||||||
|
const label pointi,
|
||||||
|
pointConstraint& pc
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
pc.applyConstraint(pointNormals()[pointi]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nonuniformTransformCyclicPointPatch
|
||||||
|
|
||||||
|
Description
|
||||||
|
Cyclic patch with slip constraint
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nonuniformTransformCyclicPointPatch.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicPointPatch_H
|
||||||
|
#define nonuniformTransformCyclicPointPatch_H
|
||||||
|
|
||||||
|
#include "cyclicPointPatch.H"
|
||||||
|
#include "nonuniformTransformCyclicPolyPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nonuniformTransformCyclicPointPatch Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class nonuniformTransformCyclicPointPatch
|
||||||
|
:
|
||||||
|
public cyclicPointPatch
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName(nonuniformTransformCyclicPolyPatch::typeName_());
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
nonuniformTransformCyclicPointPatch
|
||||||
|
(
|
||||||
|
const polyPatch& patch,
|
||||||
|
const pointBoundaryMesh& bm
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatch(patch, bm)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~nonuniformTransformCyclicPointPatch()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return point unit normals.
|
||||||
|
virtual const vectorField& pointNormals() const;
|
||||||
|
|
||||||
|
//- Accumulate the effect of constraint direction of this patch
|
||||||
|
virtual void applyConstraint
|
||||||
|
(
|
||||||
|
const label pointi,
|
||||||
|
pointConstraint&
|
||||||
|
) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nonuniformTransformCyclicPolyPatch.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(nonuniformTransformCyclicPolyPatch, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable(polyPatch, nonuniformTransformCyclicPolyPatch, word);
|
||||||
|
addToRunTimeSelectionTable(polyPatch, nonuniformTransformCyclicPolyPatch, dictionary);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nonuniformTransformCyclicPolyPatch
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transform boundary used in extruded regions. Allows non-uniform transforms.
|
||||||
|
Wip.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nonuniformTransformCyclicPolyPatch.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nonuniformTransformCyclicPolyPatch_H
|
||||||
|
#define nonuniformTransformCyclicPolyPatch_H
|
||||||
|
|
||||||
|
#include "cyclicPolyPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nonuniformTransformCyclicPolyPatch Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class nonuniformTransformCyclicPolyPatch
|
||||||
|
:
|
||||||
|
public cyclicPolyPatch
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("nonuniformTransformCyclic");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
nonuniformTransformCyclicPolyPatch
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const label size,
|
||||||
|
const label start,
|
||||||
|
const label index,
|
||||||
|
const polyBoundaryMesh& bm
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPolyPatch(name, size, start, index, bm)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
nonuniformTransformCyclicPolyPatch
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const dictionary& dict,
|
||||||
|
const label index,
|
||||||
|
const polyBoundaryMesh& bm
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPolyPatch(name, dict, index, bm)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct as copy, resetting the boundary mesh
|
||||||
|
nonuniformTransformCyclicPolyPatch
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPolyPatch& pp,
|
||||||
|
const polyBoundaryMesh& bm
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPolyPatch(pp, bm)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct given the original patch and resetting the
|
||||||
|
// face list and boundary mesh information
|
||||||
|
nonuniformTransformCyclicPolyPatch
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPolyPatch& pp,
|
||||||
|
const polyBoundaryMesh& bm,
|
||||||
|
const label index,
|
||||||
|
const label newSize,
|
||||||
|
const label newStart,
|
||||||
|
const word& neighbPatchName
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPolyPatch(pp, bm, index, newSize, newStart, neighbPatchName)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct given the original patch and a map
|
||||||
|
nonuniformTransformCyclicPolyPatch
|
||||||
|
(
|
||||||
|
const nonuniformTransformCyclicPolyPatch& pp,
|
||||||
|
const polyBoundaryMesh& bm,
|
||||||
|
const label index,
|
||||||
|
const unallocLabelList& mapAddressing,
|
||||||
|
const label newStart
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPolyPatch(pp, bm, index, mapAddressing, newStart)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct and return a clone, resetting the boundary mesh
|
||||||
|
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||||
|
{
|
||||||
|
return autoPtr<polyPatch>
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicPolyPatch(*this, bm)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct and return a clone, resetting the face list
|
||||||
|
// and boundary mesh
|
||||||
|
virtual autoPtr<polyPatch> clone
|
||||||
|
(
|
||||||
|
const polyBoundaryMesh& bm,
|
||||||
|
const label index,
|
||||||
|
const label newSize,
|
||||||
|
const label newStart
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return autoPtr<polyPatch>
|
||||||
|
(
|
||||||
|
new nonuniformTransformCyclicPolyPatch
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
bm,
|
||||||
|
index,
|
||||||
|
newSize,
|
||||||
|
newStart,
|
||||||
|
neighbPatchName()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~nonuniformTransformCyclicPolyPatch()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user