Commit fbad999d authored by Franjo's avatar Franjo

Merge branch 'defect-compilationWithOpenFOAM-4.x' into development

parents 5f501575 e6ac2ba8
ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
ifeq (Int,$(findstring Int,$(WM_LABEL_OPTION)))
CFMESH_MACROS = -DNoSizeType
else
CFMESH_MACROS =
endif
endif
ifeq ($(WM_PROJECT), foam)
VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2)
ifeq ($(VER), 1)
CFMESH_LIBS = -lmeshTools -lfiniteVolume -ledgeMesh
CFMESH_MACROS = -DExtendSpecific
else
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
CFMESH_MACROS =
endif
endif
EXE_INC = \
$(CFMESH_MACROS) \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
......@@ -6,9 +27,6 @@ EXE_INC = \
-I../../meshLibrary/lnInclude
EXE_LIBS = \
-lmeshTools \
-ltriSurface \
-lfiniteVolume \
-ledgeMesh \
$(CFMESH_LIBS) \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary
ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
ifeq (Int,$(findstring Int,$(WM_LABEL_OPTION)))
CFMESH_MACROS = -DNoSizeType
else
CFMESH_MACROS =
endif
endif
ifeq ($(WM_PROJECT), foam)
VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2)
ifeq ($(VER), 1)
CFMESH_LIBS = -lmeshTools -lfiniteVolume -ledgeMesh
CFMESH_MACROS = -DExtendSpecific
else
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
CFMESH_MACROS =
endif
endif
EXE_INC = \
$(CFMESH_MACROS) \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
......@@ -6,9 +27,6 @@ EXE_INC = \
-I../../meshLibrary/lnInclude
EXE_LIBS = \
-lmeshTools \
-ltriSurface \
-lfiniteVolume \
-ledgeMesh \
$(CFMESH_LIBS) \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary
......@@ -30,8 +30,6 @@ Description
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "objectRegistry.H"
#include "Time.H"
#include "cartesianMeshGenerator.H"
using namespace Foam;
......
ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
ifeq (Int,$(findstring Int,$(WM_LABEL_OPTION)))
CFMESH_MACROS = -DNoSizeType
else
CFMESH_MACROS =
endif
endif
ifeq ($(WM_PROJECT), foam)
VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2)
ifeq ($(VER), 1)
CFMESH_LIBS = -lmeshTools -lfiniteVolume -ledgeMesh
CFMESH_MACROS = -DExtendSpecific
else
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
CFMESH_MACROS =
endif
endif
EXE_INC = \
$(CFMESH_MACROS) \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
......@@ -6,9 +27,6 @@ EXE_INC = \
-I../../meshLibrary/lnInclude
EXE_LIBS = \
-lmeshTools \
-ltriSurface \
-lfiniteVolume \
-ledgeMesh \
$(CFMESH_LIBS) \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary
ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
ifeq (Int,$(findstring Int,$(WM_LABEL_OPTION)))
CFMESH_MACROS = -DNoSizeType
else
CFMESH_MACROS =
endif
endif
ifeq ($(WM_PROJECT), foam)
VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2)
ifeq ($(VER), 1)
CFMESH_LIBS = -lmeshTools -lfiniteVolume -ledgeMesh
CFMESH_MACROS = -DExtendSpecific
else
CFMESH_LIBS = -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh
CFMESH_MACROS =
endif
endif
EXE_INC = \
$(CFMESH_MACROS) \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
......@@ -6,9 +27,6 @@ EXE_INC = \
-I../../meshLibrary/lnInclude
EXE_LIBS = \
-lmeshTools \
-ltriSurface \
-lfiniteVolume \
-ledgeMesh \
$(CFMESH_LIBS) \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary
......@@ -4,8 +4,30 @@ else
OMP_FLAGS =
endif
ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
ifeq (Int,$(findstring Int,$(WM_LABEL_OPTION)))
CFMESH_MACROS = -DNoSizeType
LIBS =
else
CFMESH_MACROS =
LIBS =
endif
endif
ifeq ($(WM_PROJECT), foam)
VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2)
ifeq ($(VER), 1)
CFMESH_MACROS = -DExtendSpecific
LIBS = -lmeshTools -ledgeMesh
else
CFMESH_MACROS =
endif
endif
EXE_INC = \
$(OMP_FLAGS) \
$(OMP_FLAGS) $(CFMESH_MACROS) \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = $(LIBS)
......@@ -32,7 +32,6 @@ Description
#include "triSurfacePatchManipulator.H"
#include "triSurfaceCleanupDuplicateTriangles.H"
#include "demandDrivenData.H"
#include "Time.H"
#include "meshOctreeCreator.H"
#include "cartesianMeshExtractor.H"
#include "meshSurfaceEngine.H"
......
......@@ -29,7 +29,6 @@ Description
#include "triSurf.H"
#include "triSurfacePatchManipulator.H"
#include "demandDrivenData.H"
#include "Time.H"
#include "meshOctreeCreator.H"
#include "cartesianMeshExtractor.H"
#include "meshSurfaceEngine.H"
......
......@@ -28,7 +28,6 @@ Description
#include "tetMeshGenerator.H"
#include "triSurf.H"
#include "demandDrivenData.H"
#include "Time.H"
#include "meshOctreeCreator.H"
#include "tetMeshExtractorOctree.H"
#include "meshSurfaceEngine.H"
......
......@@ -35,8 +35,6 @@ SourceFiles
#ifndef boundaryLayers_H
#define boundaryLayers_H
#include "objectRegistry.H"
#include "Time.H"
#include "polyMeshGenModifier.H"
#include "meshSurfaceEngine.H"
#include "meshSurfacePartitioner.H"
......
......@@ -36,8 +36,6 @@ SourceFiles
#ifndef extrudeLayer_H
#define extrudeLayer_H
#include "objectRegistry.H"
#include "Time.H"
#include "polyMeshGenModifier.H"
#include "VRWGraphList.H"
#include "labelPair.H"
......@@ -54,51 +52,51 @@ namespace Foam
class extrudeLayer
{
// Private data
//- Reference to the mesh
polyMeshGen& mesh_;
//- thickness
const scalar thickness_;
const scalar thickness_;
//- number of points in the original mesh
const label nOrigPoints_;
//- number of faces in the original mesh
const label nOrigFaces_;
//- number of cells in the original mesh
const label nOrigCells_;
//- pairs of faces making the extruded front
LongList<labelPair> extrudedFaces_;
//- store the orientation of the extruded front
//- true if the pair has the same orientation and false otherwise
LongList<bool> pairOrientation_;
//- original point label
labelLongList origPointLabel_;
// Private member functions
//- duplicate faces which will be extruded
void createDuplicateFrontFaces(const LongList<labelPair>&);
//- create new vertices and open the mesh
void createNewVertices();
//- move points to make space for the new cells
void movePoints();
//- create layer cells
void createLayerCells();
//- create new faces at parallel boundaries
void createNewFacesParallel();
//- update boundary patches
void updateBoundary();
// Nested classes
//- this class provides addressing data needed for generating
//- cells emerging as a consequence of self-intersecting layers
......@@ -107,18 +105,18 @@ class extrudeLayer
// Private data
//- const reference to mesh faces
const faceListPMG& faces_;
//- const reference to extruded face pairs
const LongList<labelPair>& extrudedFaces_;
//- const reference telling the orientation of each face pair
LongList<bool> pairOrientation_;
//- const reference to the extruded faces at points
const VRWGraph& pointExtruded_;
public:
// Construct from faces, extruded face pairs and
// point-extrudedfaces addressing
addressingCalculator
......@@ -128,41 +126,41 @@ class extrudeLayer
const LongList<bool>& pairOrientation,
const VRWGraph& pointFaces
);
// Destructor
~addressingCalculator();
// Member functions
//- return label of the original face for the given face
inline label origFaceLabel(const label extrudedI) const;
//- return position of point in extruded face
inline label positionInFace
(
const label extrudedI,
const label pointI
) const;
//- return point label in the original face
inline label origPointLabel
(
const label extrudedI,
const label pos
) const;
inline label origPoint
(
const label extrudedI,
const label pointI
) const;
//- find face sharing an edge with the given face
inline label faceSharingEdge
(
const label extrudedI,
const label eI
) const;
//- find faces attached to both points
inline void facesSharingEdge
(
......@@ -171,7 +169,7 @@ class extrudeLayer
DynList<label>&
) const;
};
// Enumerators
enum extrudeLayerTypes_
{
......@@ -179,17 +177,17 @@ class extrudeLayer
FRONTVERTEX = 1,
FRONTVERTEXPROCBND = 2
};
//- Disallow bitwise copy construct
extrudeLayer(const extrudeLayer&);
//- Disallow bitwise assignment
void operator=(const extrudeLayer&);
public:
// Constructors
//- Construct from mesh, extrusion faces, thickness and number of layers
extrudeLayer
(
......@@ -197,10 +195,10 @@ class extrudeLayer
const LongList<labelPair>& extrusionFront,
const scalar thickness = -1.0
);
// Destructor
~extrudeLayer();
// Public member functions
};
......
......@@ -36,8 +36,6 @@ SourceFiles
#ifndef refineBoundaryLayers_H
#define refineBoundaryLayers_H
#include "objectRegistry.H"
#include "Time.H"
#include "polyMeshGenModifier.H"
#include "meshSurfaceEngine.H"
#include "DynList.H"
......
......@@ -36,8 +36,6 @@ SourceFiles
#ifndef triangulateNonPlanarBaseFaces_H
#define triangulateNonPlanarBaseFaces_H
#include "objectRegistry.H"
#include "Time.H"
#include "polyMeshGenModifier.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -35,8 +35,6 @@ SourceFiles
#ifndef checkMeshDict_H
#define checkMeshDict_H
#include "objectRegistry.H"
#include "Time.H"
#include "IOdictionary.H"
#include <map>
......
......@@ -26,8 +26,6 @@ Description
\*---------------------------------------------------------------------------*/
#include "objectRegistry.H"
#include "Time.H"
#include "polyMeshGen.H"
#include "meshSurfaceEngine.H"
#include "OFstream.H"
......
......@@ -50,7 +50,7 @@ void sortEdgesIntoChains::createNodeLabels()
newNodeLabel_.insert(e.end(), nPoints++);
}
edgesAtPoint_.setSize(nPoints, DynList<label>());
edgesAtPoint_.setSize(nPoints);
forAll(bEdges_, eI)
{
const edge& e = bEdges_[eI];
......@@ -69,7 +69,7 @@ void sortEdgesIntoChains::createNodeLabels()
bool sortEdgesIntoChains::findPointsBelongingToTheChain
(
const label currPos,
boolList& chainEdges
DynList<bool>& chainEdges
) const
{
# ifdef DEBUGSort
......@@ -150,7 +150,7 @@ bool sortEdgesIntoChains::findPointsBelongingToTheChain
return true;
}
void sortEdgesIntoChains::shrinkEdges(const boolList& chainEdges)
void sortEdgesIntoChains::shrinkEdges(const DynList<bool>& chainEdges)
{
forAll(chainEdges, eI)
if( chainEdges[eI] )
......@@ -168,14 +168,14 @@ void sortEdgesIntoChains::shrinkEdges(const boolList& chainEdges)
}
}
void sortEdgesIntoChains::createChainFromEdges(const boolList& chainEdges)
void sortEdgesIntoChains::createChainFromEdges(const DynList<bool>& chainEdges)
{
direction i(0);
label i(0);
forAll(chainEdges, eI)
if( chainEdges[eI] )
++i;
labelList chainPoints(i);
DynList<label> chainPoints(i);
i = 0;
forAll(chainEdges, eI)
......@@ -232,7 +232,7 @@ void sortEdgesIntoChains::sortEdges()
if( !openEdges_ )
{
boolList chainEdges(bEdges_.size());
DynList<bool> chainEdges(bEdges_.size());
forAll(edgesAtPoint_, pI)
if( findPointsBelongingToTheChain(pI, chainEdges) )
{
......@@ -257,12 +257,11 @@ sortEdgesIntoChains::sortEdgesIntoChains(const DynList<edge>& bEdges)
}
sortEdgesIntoChains::~sortEdgesIntoChains()
{
}
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
// Member functions
const DynList<labelList>& sortEdgesIntoChains::sortedChains() const
const DynList<DynList<label> >& sortEdgesIntoChains::sortedChains() const
{
return createdChains_;
}
......
......@@ -39,7 +39,6 @@ SourceFiles
#include "labelList.H"
#include "edge.H"
#include "Map.H"
#include "boolList.H"
namespace Foam
{
......@@ -52,43 +51,43 @@ class sortEdgesIntoChains
{
// Members
const DynList<edge>& bEdges_;
bool openEdges_;
Map<label> newNodeLabel_;
List<DynList<label> > edgesAtPoint_;
DynList<labelList> createdChains_;
DynList<DynList<label> > edgesAtPoint_;
DynList<DynList<label> > createdChains_;
// Private member functions
void createNodeLabels();
bool findPointsBelongingToTheChain
(
const label currPos,
boolList& chainEdges
DynList<bool>& chainEdges
) const;
void shrinkEdges(const boolList& chainEdges);
void createChainFromEdges(const boolList& chainEdges);
void shrinkEdges(const DynList<bool>& chainEdges);
void createChainFromEdges(const DynList<bool>& chainEdges);
void sortEdges();
public:
sortEdgesIntoChains
(
const DynList<edge>& bEdges
);
~sortEdgesIntoChains();
// Member functions
//- a list of points which have not yet been resolved
const DynList<labelList>& sortedChains() const;
const DynList<DynList<label> >& sortedChains() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -37,8 +37,11 @@ SourceFiles
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "objectRegistry.H"
# ifdef ExtendSpecific
#include "foamTime.H"
# else
#include "Time.H"
# endif
#include "meshSubset.H"
#include "pointFieldPMG.H"
#include "DynList.H"
......@@ -53,7 +56,7 @@ namespace Foam
class polyMeshGenPoints
{
protected:
// Protected data
//- reference to the Time registry
const Time& runTime_;
......@@ -63,14 +66,14 @@ protected:
//- map of point subsets
std::map<label, meshSubset> pointSubsets_;
// Disallow bitwise assignment
void operator=(const polyMeshGenPoints&);