Commit 9c8e4c5b authored by Andrew Heather's avatar Andrew Heather

INT: Integration updates

parent bb5ac123
......@@ -12,16 +12,6 @@ ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
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) \
......
......@@ -6,20 +6,20 @@
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
This file is part of OpenFOAM.
cfMesh 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 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.
cfMesh is distributed in the hope that it will be useful, but WITHOUT
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
Generates cartesian mesh
......@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
//- 2d cartesian mesher cannot be run in parallel
// 2d cartesian mesher cannot be run in parallel
argList::noParallel();
cartesian2DMeshGenerator cmg(runTime);
......@@ -53,8 +53,9 @@ int main(int argc, char *argv[])
cmg.writeMesh();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
......@@ -12,17 +12,6 @@ ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
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 \
......
......@@ -6,20 +6,20 @@
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
This file is part of OpenFOAM.
cfMesh 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 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.
cfMesh is distributed in the hope that it will be useful, but WITHOUT
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
Generates cartesian mesh
......@@ -50,8 +50,9 @@ int main(int argc, char *argv[])
cmg.writeMesh();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
......@@ -12,17 +12,6 @@ ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
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 \
......
......@@ -6,26 +6,26 @@
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
This file is part of OpenFOAM.
cfMesh 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 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.
cfMesh is distributed in the hope that it will be useful, but WITHOUT
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
Generates polyhedral mesh
pMesh
Description
- takes a triangulated surface and generates a body-fitted polyhedral mesh
Takes a triangulated surface and generates a body-fitted polyhedral mesh
\*---------------------------------------------------------------------------*/
......@@ -36,14 +36,12 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
//- polyhedral mesher cannot be run in parallel yet
// Polyhedral mesher cannot be run in parallel yet
argList::noParallel();
voronoiMeshGenerator pmg(runTime);
......@@ -53,8 +51,9 @@ int main(int argc, char *argv[])
pmg.writeMesh();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
......@@ -12,17 +12,6 @@ ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
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 \
......
......@@ -6,26 +6,26 @@
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
This file is part of OpenFOAM.
cfMesh 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 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.
cfMesh is distributed in the hope that it will be useful, but WITHOUT
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
Generates tetrahedral mesh
tetMesh
Description
- takes a triangulated surface and generates a tetrahedral mesh
Takes a triangulated surface and generates a tetrahedral mesh
\*---------------------------------------------------------------------------*/
......@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
//- tetrahedral mesher cannot be run in parallel yet
// tetrahedral mesher cannot be run in parallel yet
argList::noParallel();
tetMeshGenerator tmg(runTime);
......@@ -53,8 +53,9 @@ int main(int argc, char *argv[])
tmg.writeMesh();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
......@@ -14,16 +14,6 @@ ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT)))
endif
endif
ifeq ($(WM_PROJECT), foam)
VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2)
ifeq ($(VER), 1)
CFMESH_MACROS = -DExtendSpecific -std=c++11
LIBS = -lmeshTools -ledgeMesh
else
CFMESH_MACROS =
endif
endif
EXE_INC = \
$(OMP_FLAGS) $(CFMESH_MACROS) \
-I$(LIB_SRC)/triSurface/lnInclude \
......
......@@ -6,22 +6,20 @@
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
This file is part of OpenFOAM.
cfMesh 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 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.
cfMesh is distributed in the hope that it will be useful, but WITHOUT
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
......@@ -57,28 +55,28 @@ Description
namespace Foam
{
// * * * * * * * * * * * * Private member functions * * * * * * * * * * * * //
void cartesian2DMeshGenerator::createCartesianMesh()
{
//- create polyMesh from octree boxes
// create polyMesh from octree boxes
cartesianMeshExtractor cme(*octreePtr_, meshDict_, mesh_);
if( meshDict_.found("decomposePolyhedraIntoTetsAndPyrs") )
if (meshDict_.found("decomposePolyhedraIntoTetsAndPyrs"))
{
if( readBool(meshDict_.lookup("decomposePolyhedraIntoTetsAndPyrs")) )
if (readBool(meshDict_.lookup("decomposePolyhedraIntoTetsAndPyrs")))
cme.decomposeSplitHexes();
}
cme.createMesh();
}
void cartesian2DMeshGenerator::surfacePreparation()
{
//- removes unnecessary cells and morph the boundary
//- such that there is only one boundary face per cell
//- It also checks topology of cells after morphing is performed
// removes unnecessary cells and morph the boundary
// such that there is only one boundary face per cell
// It also checks topology of cells after morphing is performed
bool changed;
do
......@@ -86,47 +84,51 @@ void cartesian2DMeshGenerator::surfacePreparation()
changed = false;
checkIrregularSurfaceConnections checkConnections(mesh_);
if( checkConnections.checkAndFixIrregularConnections() )
if (checkConnections.checkAndFixIrregularConnections())
changed = true;
if( checkNonMappableCellConnections(mesh_).removeCells() )
if (checkNonMappableCellConnections(mesh_).removeCells())
changed = true;
if( checkCellConnectionsOverFaces(mesh_).checkCellGroups() )
if (checkCellConnectionsOverFaces(mesh_).checkCellGroups())
changed = true;
} while( changed );
} while (changed);
checkBoundaryFacesSharingTwoEdges(mesh_).improveTopology();
}
void cartesian2DMeshGenerator::mapMeshToSurface()
{
//- calculate mesh surface
// calculate mesh surface
meshSurfaceEngine* msePtr = new meshSurfaceEngine(mesh_);
//- pre-map mesh surface
// pre-map mesh surface
meshSurfaceMapper2D mapper(*msePtr, *octreePtr_);
mapper.adjustZCoordinates();