Commit 19bfbd15 authored by Mark Olesen's avatar Mark Olesen
Browse files

Merge remote branch 'OpenCFD/master' into olesenm

parents 5dd19019 a22305e0
......@@ -189,8 +189,8 @@ Foam::createShellMesh::createShellMesh
void Foam::createShellMesh::setRefinement
(
const pointField& thickness,
const labelList& extrudeMasterPatchID,
const labelList& extrudeSlavePatchID,
const labelList& topPatchID,
const labelList& bottomPatchID,
const labelListList& extrudeEdgePatches,
polyTopoChange& meshMod
)
......@@ -205,14 +205,14 @@ void Foam::createShellMesh::setRefinement
if
(
extrudeMasterPatchID.size() != patch_.size()
&& extrudeSlavePatchID.size() != patch_.size()
topPatchID.size() != patch_.size()
&& bottomPatchID.size() != patch_.size()
)
{
FatalErrorIn("createShellMesh::setRefinement(..)")
<< "nFaces:" << patch_.size()
<< " extrudeMasterPatchID:" << extrudeMasterPatchID.size()
<< " extrudeSlavePatchID:" << extrudeSlavePatchID.size()
<< " topPatchID:" << topPatchID.size()
<< " bottomPatchID:" << bottomPatchID.size()
<< exit(FatalError);
}
......@@ -302,11 +302,9 @@ void Foam::createShellMesh::setRefinement
}
// Add face on patch' master side
//labelList masterFaces(patch_.localFaces().size());
// Add face on bottom side
forAll(patch_.localFaces(), faceI)
{
//masterFaces[faceI] =
meshMod.addFace
(
patch_.localFaces()[faceI].reverseFace(),// vertices
......@@ -316,14 +314,14 @@ void Foam::createShellMesh::setRefinement
-1, // masterEdgeID
faceToFaceMap.size(), // masterFaceID : current faceI
true, // flipFaceFlux
extrudeMasterPatchID[faceI],// patchID
bottomPatchID[faceI],// patchID
-1, // zoneID
false // zoneFlip
);
faceToFaceMap.append(faceI+1); // points to unflipped original face
faceToFaceMap.append(-faceI-1); // points to flipped original face
faceToEdgeMap.append(-1);
//Pout<< "Added master face "
//Pout<< "Added bottom face "
// << patch_.localFaces()[faceI].reverseFace()
// << " own " << addedCells[faceI]
// << " at " << patch_.faceCentres()[faceI]
......@@ -331,8 +329,7 @@ void Foam::createShellMesh::setRefinement
}
// Add face on patch' slave side
//labelList slaveFaces(patch_.localFaces().size());
// Add face on top
forAll(patch_.localFaces(), faceI)
{
// Get face in original ordering
......@@ -346,7 +343,6 @@ void Foam::createShellMesh::setRefinement
newF[fp] = addedPoints[region];
}
//slaveFaces[faceI] =
meshMod.addFace
(
newF, // vertices
......@@ -356,14 +352,14 @@ void Foam::createShellMesh::setRefinement
-1, // masterEdgeID
faceToFaceMap.size(), // masterFaceID : current faceI
false, // flipFaceFlux
extrudeSlavePatchID[faceI], // patchID
topPatchID[faceI], // patchID
-1, // zoneID
false // zoneFlip
);
faceToFaceMap.append(-faceI-1);
faceToFaceMap.append(faceI+1); // unflipped
faceToEdgeMap.append(-1);
//Pout<< "Added slave face " << newF
//Pout<< "Added top face " << newF
// << " own " << addedCells[faceI]
// << " at " << patch_.faceCentres()[faceI]
// << endl;
......
......@@ -31,6 +31,10 @@ Description
SourceFiles
createShellMesh.C
Extrudes into thickness direction.
- bottom faces originate from reversed original faces (have turning index)
- top faces originate from original faces (no turning index)
\*---------------------------------------------------------------------------*/
#ifndef createShellMesh_H
......@@ -59,9 +63,6 @@ class createShellMesh
//- Reference to patch to extrude
const primitiveFacePatch& patch_;
// //- Non-manifold edges on patch
// const PackedBoolList& nonManifoldEdge_;
//- Per point on face the region
const faceList& pointRegions_;
......@@ -99,7 +100,6 @@ public:
createShellMesh
(
const primitiveFacePatch& patch,
// const PackedBoolList& nonManifoldEdge,
const faceList& pointRegions,
const labelList& regionPoints
);
......@@ -117,10 +117,10 @@ public:
}
//- From region face to patch face. Contains turning index:
// > 0 : face originating from master side
// (owner side for unflipped face)
// < 0 : (bottom) face originating from slave side
// (neighbour side for unflipped face)
// > 0 : face in same orientation as patch face. face will
// be in top patch
// < 0 : face in opposite orientation as patch face. face will
// be in bottom patch
// = 0 : for all side faces
const labelList& faceToFaceMap() const
{
......@@ -155,8 +155,8 @@ public:
void setRefinement
(
const pointField& thickness,
const labelList& extrudeMasterPatchID,
const labelList& extrudeSlavePatchID,
const labelList& topPatchID,
const labelList& bottomPatchID,
const labelListList& extrudeEdgePatches,
polyTopoChange& meshMod
);
......
......@@ -960,7 +960,14 @@ int main(int argc, char *argv[])
# endif
}
if (rawLine.empty() || rawLine[0] == '#')
// Strip off anything after #
string::size_type i = rawLine.find_first_of("#");
if (i != string::npos)
{
rawLine = rawLine(0, i);
}
if (rawLine.empty())
{
continue;
}
......
......@@ -181,7 +181,6 @@ inline unsigned Hash<triFace>::operator()(const triFace& t, unsigned seed) const
//- Hash specialization for hashing triFace - a commutative hash value.
// Hash incrementally.
template<>
inline unsigned Hash<triFace>::operator()(const triFace& t) const
{
......
......@@ -148,11 +148,10 @@ void Foam::displacementLayeredMotionFvMotionSolver::walkStructured
// Current info on points
List<pointEdgeStructuredWalk> allPointInfo(mesh().nPoints());
// Mark points inside cellZone.
// Mark points inside cellZone.
// Note that we use points0, not mesh.points()
// so as not to accumulate errors.
forAll(isZonePoint, pointI)
{
if (isZonePoint[pointI])
......@@ -169,6 +168,7 @@ void Foam::displacementLayeredMotionFvMotionSolver::walkStructured
// Current info on edges
List<pointEdgeStructuredWalk> allEdgeInfo(mesh().nEdges());
// Mark edges inside cellZone
forAll(isZoneEdge, edgeI)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment