Commit 5c05d002 authored by Dave Moxey's avatar Dave Moxey

Reformat lots of things, significantly refactor header includes

parent 7ac084a2
......@@ -96,7 +96,7 @@ MARK_AS_ADVANCED(NEKTAR_BUILD_PACKAGES)
OPTION(NEKTAR_TEST_ALL "Include full set of regression tests to this build." OFF)
# meshing
# Meshing utilities and library
OPTION(NEKTAR_USE_MESH "Build meshing utilities." OFF)
# Build options
......@@ -273,10 +273,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
# Build active components
IF (NEKTAR_BUILD_LIBRARY)
SET(NEKTAR++_LIBRARIES SolverUtils LibUtilities StdRegions SpatialDomains LocalRegions
MultiRegions Collections)
IF(NEKTAR_USE_MESH)
SET(NEKTAR++_LIBRARIES ${NEKTAR++_LIBRARIES} NekMeshUtils)
ENDIF(NEKTAR_USE_MESH)
MultiRegions Collections NekMeshUtils)
INCLUDE_DIRECTORIES(library)
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake)
......
......@@ -7,69 +7,66 @@
########################################################################
IF(NEKTAR_USE_MESH)
SET(BUILD_OCC ON)
SET(BUILD_OCC ON)
OPTION(THIRDPARTY_DOWNLOAD_OCC
"Get OpenCascade from ThirdParty." ${BUILD_OCC})
OPTION(THIRDPARTY_DOWNLOAD_OCC
"Get OpenCascade from ThirdParty." ${BUILD_OCC})
IF (THIRDPARTY_DOWNLOAD_OCC)
IF(WIN32)
MESSAGE(SEND_ERROR "Cannot use OpenCascade with Nektar++ on Windows")
ELSEIF(APPLE)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680osx64.tgz
URL_MD5 626292523b0691304f0fa271989fbc44
STAMP_DIR ${TPBUILD}/stamp
BINARY_DIR ${TPBUILD}/opencascade-6.8
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
IF (THIRDPARTY_DOWNLOAD_OCC)
IF(WIN32)
MESSAGE(SEND_ERROR "Cannot use OpenCascade with Nektar++ on Windows")
ELSEIF(APPLE)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680osx64.tgz
URL_MD5 626292523b0691304f0fa271989fbc44
STAMP_DIR ${TPBUILD}/stamp
BINARY_DIR ${TPBUILD}/opencascade-6.8
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
# Patch OS X libraries to fix install name problems.
EXTERNALPROJECT_ADD_STEP(opencascade-6.8 patch-install-path
COMMAND bash ${CMAKE_SOURCE_DIR}/cmake/scripts/patch-occ.sh ${TPSRC}/opencascade-6.8/i686/lib ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR}
DEPENDEES build
DEPENDERS install)
EXTERNALPROJECT_ADD_STEP(opencascade-6.8 patch-install-path
COMMAND bash ${CMAKE_SOURCE_DIR}/cmake/scripts/patch-occ.sh ${TPSRC}/opencascade-6.8/i686/lib ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR}
DEPENDEES build
DEPENDERS install)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
ELSE()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680lin64.tgz
URL_MD5 d655b6f50998bb9600e081907c247793
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
ELSE()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680lin64.tgz
URL_MD5 d655b6f50998bb9600e081907c247793
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
MESSAGE(STATUS "Link to OCC: ${OCC_LIBS}.so")
ENDIF()
ENDIF (THIRDPARTY_DOWNLOAD_OCC)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
MESSAGE(STATUS "Link to OCC: ${OCC_LIBS}.so")
ENDIF()
ENDIF (THIRDPARTY_DOWNLOAD_OCC)
ENDIF(NEKTAR_USE_MESH)
......@@ -6,59 +6,53 @@
#
########################################################################
IF(NEKTAR_USE_MESH)
SET(BUILD_TRIANGLE ON)
OPTION(THIRDPARTY_BUILD_TRIANGLE
"Build Triangle library from ThirdParty." ${BUILD_TRIANGLE})
IF (THIRDPARTY_BUILD_TRIANGLE)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
triangle-1.6
PREFIX ${TPSRC}
URL http://ae-nektar.ae.ic.ac.uk/~mt4313/triangle.zip
URL_MD5 357cb7107f51f3f89940c47435d4fa49
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/triangle-1.6
BINARY_DIR ${TPBUILD}/triangle-1.6
TMP_DIR ${TPBUILD}/triangle-1.6-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
${TPSRC}/triangle-1.6
)
SET(TRIANGLE_LIBRARY triangle CACHE FILEPATH
"Triangle library" FORCE)
SET(TRIANGLE_INCLUDE_DIR ${TPDIST}/include CACHE FILEPATH
"Triangle include" FORCE)
LINK_DIRECTORIES(${TPDIST}/lib)
IF (WIN32)
MESSAGE(STATUS
SET(BUILD_TRIANGLE ON)
OPTION(THIRDPARTY_BUILD_TRIANGLE
"Build Triangle library from ThirdParty." ${BUILD_TRIANGLE})
IF (THIRDPARTY_BUILD_TRIANGLE)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
triangle-1.6
PREFIX ${TPSRC}
URL http://ae-nektar.ae.ic.ac.uk/~mt4313/triangle.zip
URL_MD5 357cb7107f51f3f89940c47435d4fa49
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/triangle-1.6
BINARY_DIR ${TPBUILD}/triangle-1.6
TMP_DIR ${TPBUILD}/triangle-1.6-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
${TPSRC}/triangle-1.6
)
SET(TRIANGLE_LIBRARY triangle CACHE FILEPATH
"Triangle library" FORCE)
SET(TRIANGLE_INCLUDE_DIR ${TPDIST}/include CACHE FILEPATH
"Triangle include" FORCE)
LINK_DIRECTORIES(${TPDIST}/lib)
IF (WIN32)
MESSAGE(STATUS
"Build Triangle: ${TPDIST}/${LIB_DIR}/${TRIANGLE_LIBRARY}.dll")
ELSE ()
MESSAGE(STATUS
ELSE ()
MESSAGE(STATUS
"Build Triangle: ${TPDIST}/${LIB_DIR}/lib${TRIANGLE_LIBRARY}.a")
ENDIF ()
SET(TRIANGLE_CONFIG_INCLUDE_DIR ${TPINC})
ELSE()
ADD_CUSTOM_TARGET(triangle-1.6 ALL)
MESSAGE(STATUS "Found Triangle: ${TRIANGLE_LIBRARY}")
SET(TRIANGLE_CONFIG_INCLUDE_DIR ${TRIANGLE_INCLUDE_DIR})
ENDIF (THIRDPARTY_BUILD_TRIANGLE)
ENDIF ()
INCLUDE_DIRECTORIES(SYSTEM ${TRIANGLE_INCLUDE_DIR})
SET(TRIANGLE_CONFIG_INCLUDE_DIR ${TPINC})
ELSE()
ADD_CUSTOM_TARGET(triangle-1.6 ALL)
MESSAGE(STATUS "Found Triangle: ${TRIANGLE_LIBRARY}")
SET(TRIANGLE_CONFIG_INCLUDE_DIR ${TRIANGLE_INCLUDE_DIR})
ENDIF (THIRDPARTY_BUILD_TRIANGLE)
INCLUDE_DIRECTORIES(SYSTEM ${TRIANGLE_INCLUDE_DIR})
ENDIF(NEKTAR_USE_MESH)
......@@ -760,7 +760,7 @@ INPUT = @CMAKE_SOURCE_DIR@/docs/doxygen/ \
@CMAKE_SOURCE_DIR@/library/LocalRegions/ \
@CMAKE_SOURCE_DIR@/library/MultiRegions/ \
@CMAKE_SOURCE_DIR@/library/SolverUtils/ \
@CMAKE_SOURCE_DIR@/library/MeshUtils/ \
@CMAKE_SOURCE_DIR@/library/NekMeshUtils/ \
@CMAKE_SOURCE_DIR@/solvers/ \
@CMAKE_SOURCE_DIR@/utilities/
......
SET(LibrarySubDirs LibUtilities LocalRegions Collections
MultiRegions SpatialDomains StdRegions SolverUtils NekMeshUtils)
SET(UnitTestSubDirs UnitTests)
SET(DemoSubDirs Demos)
SET(LibrarySubDirs LibUtilities LocalRegions Collections
MultiRegions SpatialDomains StdRegions SolverUtils NekMeshUtils)
SET(UnitTestSubDirs UnitTests)
SET(DemoSubDirs Demos)
SET(TimingsSubDirs Timings)
SUBDIRS(${LibrarySubDirs} )
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/library)
IF( NEKTAR_BUILD_UNIT_TESTS )
SUBDIRS(${UnitTestSubDirs})
ENDIF( NEKTAR_BUILD_UNIT_TESTS )
IF( NEKTAR_BUILD_DEMOS )
SUBDIRS(${DemoSubDirs})
ENDIF( NEKTAR_BUILD_DEMOS )
IF( NEKTAR_BUILD_TIMINGS )
SUBDIRS(${TimingsSubDirs})
SUBDIRS(${LibrarySubDirs} )
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/library)
IF( NEKTAR_BUILD_UNIT_TESTS )
SUBDIRS(${UnitTestSubDirs})
ENDIF( NEKTAR_BUILD_UNIT_TESTS )
IF( NEKTAR_BUILD_DEMOS )
SUBDIRS(${DemoSubDirs})
ENDIF( NEKTAR_BUILD_DEMOS )
IF( NEKTAR_BUILD_TIMINGS )
SUBDIRS(${TimingsSubDirs})
ENDIF( NEKTAR_BUILD_TIMINGS )
......@@ -54,7 +54,7 @@ namespace Nektar
static const NekDouble kNekIterativeTol = 1e-09;
static const NekDouble kNekSparseNonZeroTol = 1e-16;
//toleranecs for mesh generation and cad handling
// Tolerances for mesh generation and CAD handling
static const NekDouble GeomTol = 1E-2;
static const NekDouble CoinTol = 1E-6;
}
......
......@@ -38,7 +38,7 @@
#include <iostream>
#include <iomanip>
#include <string>
#include <math.h>
#include <cmath>
#ifdef _WIN32
#include <io.h>
......
......@@ -31,11 +31,11 @@
//
////////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_LIB_UTILITIES_BASIC_UTILS_SHAPE_TYPE_H
#define NEKTAR_LIB_UTILITIES_BASIC_UTILS_SHAPE_TYPE_H
#include <algorithm>
#include <vector>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
......
......@@ -55,9 +55,6 @@ namespace Nektar
public:
virtual ~NodalTriFekete()
{
//commented out because this is really annoying and not helpful
//std::cout << "******* ~NodalTriFekete() destructor called!"
// << endl;
}
NodalTriFekete(const PointsKey &key):PointsBaseType(key)
......@@ -95,8 +92,6 @@ namespace Nektar
private:
NodalTriFekete():PointsBaseType(NullPointsKey)
{
std::cout << "******* NodalTriFekete() constructor called!"
<< endl;
}
void CalculatePoints();
......
......@@ -43,70 +43,70 @@ namespace NekMeshUtils
void BLMesh::Mesh()
{
//At this stage the surface mesh is complete and the elements know their
//neigbours through element links in the edges, this includes quads,
// At this stage the surface mesh is complete and the elements know their
// neighbours through element links in the edges, this includes quads.
//here elements are made for the boundary layer they will need to know
//links (maybe facelinks)
//so that the tetmeshing module can extract the surface upon which it needs
// to mesh (top of the bl and the rest of the surface)
// here elements are made for the boundary layer they will need to know
// links (maybe facelinks), so that the tetmeshing module can extract the
// surface upon which it needs to mesh (top of the bl and the rest of the
// surface).
vector<ElementSharedPtr> quad;
vector<ElementSharedPtr> ptri; //triangles to grow prisms onto
vector<ElementSharedPtr> ptri; // triangles to grow prisms onto
for(int i = 0; i < m_mesh->m_element[2].size(); i++)
for (int i = 0; i < m_mesh->m_element[2].size(); i++)
{
bool onblsurf = false;
for(int j = 0; j < m_blsurfs.size(); j++)
for (int j = 0; j < m_blsurfs.size(); j++)
{
if(m_mesh->m_element[2][i]->CADSurfId == m_blsurfs[j])
if (m_mesh->m_element[2][i]->CADSurfId == m_blsurfs[j])
{
onblsurf = true;
break;
}
}
if(m_mesh->m_element[2][i]->GetConf().m_e ==
LibUtilities::eQuadrilateral)
if (m_mesh->m_element[2][i]->GetConf().m_e ==
LibUtilities::eQuadrilateral)
{
quad.push_back(m_mesh->m_element[2][i]);
}
else if(onblsurf)
else if (onblsurf)
{
ptri.push_back(m_mesh->m_element[2][i]);
}
}
map<int, NodeSharedPtr> blpair;
for(int i = 0; i < quad.size(); i++)
for (int i = 0; i < quad.size(); i++)
{
vector<EdgeSharedPtr> e = quad[i]->GetEdgeList();
for(int j = 0; j < e.size(); j++)
for (int j = 0; j < e.size(); j++)
{
//if both or none are on curve skip
if((e[j]->m_n1->GetNumCadCurve() > 0 &&
e[j]->m_n2->GetNumCadCurve() > 0) ||
(!(e[j]->m_n1->GetNumCadCurve() > 0) &&
!(e[j]->m_n2->GetNumCadCurve() > 0)))
// if both or none are on curve skip
if ((e[j]->m_n1->GetNumCadCurve() > 0 &&
e[j]->m_n2->GetNumCadCurve() > 0) ||
(!(e[j]->m_n1->GetNumCadCurve() > 0) &&
!(e[j]->m_n2->GetNumCadCurve() > 0)))
{
continue;
}
if(e[j]->m_n1->GetNumCadCurve() > 0)
if (e[j]->m_n1->GetNumCadCurve() > 0)
{
blpair[e[j]->m_n1->m_id] = e[j]->m_n2;
}
else if(e[j]->m_n2->GetNumCadCurve() > 0)
else if (e[j]->m_n2->GetNumCadCurve() > 0)
{
blpair[e[j]->m_n2->m_id] = e[j]->m_n1;
}
else
{
ASSERTL0(false,"that failed");
ASSERTL0(false, "that failed");
}
}
}
map<int,int> nm;
map<int, int> nm;
nm[0] = 0;
nm[1] = 3;
nm[2] = 4;
......@@ -114,22 +114,24 @@ void BLMesh::Mesh()
nm[4] = 1;
nm[5] = 2;
for(int i = 0; i < ptri.size(); i++)
for (int i = 0; i < ptri.size(); i++)
{
vector<NodeSharedPtr> pn(6); //all prism nodes
vector<NodeSharedPtr> pn(6); // all prism nodes
vector<NodeSharedPtr> n = ptri[i]->GetVertexList();
vector<pair<int, CADSurfSharedPtr> > tmpss = n[0]->GetCADSurfs();
CADSurfSharedPtr tmps;
for(int j = 0; j < tmpss.size(); j++)
for (int j = 0; j < tmpss.size(); j++)
{
if(tmpss[j].first == ptri[i]->CADSurfId)
if (tmpss[j].first == ptri[i]->CADSurfId)
{
tmps = tmpss[j].second;
break;
}
}
if(tmps->IsReversedNormal())
if (tmps->IsReversedNormal())
{
nm[0] = 0;
nm[1] = 3;
......@@ -139,77 +141,81 @@ void BLMesh::Mesh()
nm[5] = 5;
}
for(int j = 0; j < n.size(); j++)
for (int j = 0; j < n.size(); j++)
{
pn[nm[j*2]] = n[j];
pn[nm[j * 2]] = n[j];
map<int, NodeSharedPtr>::iterator it;
it = blpair.find(n[j]->m_id);
if(it != blpair.end())
if (it != blpair.end())
{
pn[nm[j*2+1]] = blpair[n[j]->m_id];
pn[nm[j * 2 + 1]] = blpair[n[j]->m_id];
}
else
{
Array<OneD, NekDouble> AN(3);
vector<pair<int, CADSurfSharedPtr> > surfs = n[j]->GetCADSurfs();
for(int s = 0; s < surfs.size(); s++)
vector<pair<int, CADSurfSharedPtr> > surfs =
n[j]->GetCADSurfs();
for (int s = 0; s < surfs.size(); s++)
{
Array<OneD, NekDouble> N =
surfs[s].second->N(n[j]->GetCADSurfInfo(surfs[s].first));
for(int k = 0; k < 3; k++)
Array<OneD, NekDouble> N = surfs[s].second->N(
n[j]->GetCADSurfInfo(surfs[s].first));
for (int k = 0; k < 3; k++)
{
AN[k] += N[k];
}
}
NekDouble mag = sqrt(AN[0]*AN[0] + AN[1]*AN[1] + AN[2]*AN[2]);
for(int k = 0; k < 3; k++)
NekDouble mag =
sqrt(AN[0] * AN[0] + AN[1] * AN[1] + AN[2] * AN[2]);
for (int k = 0; k < 3; k++)
{
AN[k] /= mag;
}
Array<OneD, NekDouble> loc = n[j]->GetLoc();
Array<OneD, NekDouble> np(3);
for(int k = 0; k < 3; k++) np[k] = loc[k] + AN[k]*m_bl;
NodeSharedPtr nn = boost::shared_ptr<Node>(new Node(
m_mesh->m_numNodes++, np[0], np[1], np[2]));
pn[nm[j*2+1]] = nn;
for (int k = 0; k < 3; k++)
np[k] = loc[k] + AN[k] * m_bl;
NodeSharedPtr nn = boost::shared_ptr<Node>(
new Node(m_mesh->m_numNodes++, np[0], np[1], np[2]));
pn[nm[j * 2 + 1]] = nn;
blpair[n[j]->m_id] = nn;
}
}
ElmtConfig conf(LibUtilities::ePrism,1,false,false);
ElmtConfig conf(LibUtilities::ePrism, 1, false, false);
vector<int> tags;
tags.push_back(1); //all prisms are comp 1
ElementSharedPtr E = GetElementFactory().
CreateInstance(LibUtilities::ePrism, conf, pn, tags);
tags.push_back(1); // all prisms are comp 1
ElementSharedPtr E = GetElementFactory().CreateInstance(
LibUtilities::ePrism, conf, pn, tags);
m_mesh->m_element[3].push_back(E);
//need to give the surface element some information about
//which prism is above it
//so that tetmesh can infer the psudo surface
// need to give the surface element some information about
// which prism is above it
// so that tetmesh can infer the pseudo surface
vector<NodeSharedPtr> faceNodes;
vector<EdgeSharedPtr> edgeList = ptri[i]->GetEdgeList();
FaceSharedPtr F = boost::shared_ptr<Face>(
new Face(n, faceNodes, edgeList,
ptri[i]->GetConf().m_faceCurveType));
FaceSharedPtr F = boost::shared_ptr<Face>(new Face(
n, faceNodes, edgeList, ptri[i]->GetConf().m_faceCurveType));
vector<FaceSharedPtr> f = E->GetFaceList();
for(int j = 0; j < f.size(); j++)
for (int j = 0; j < f.size(); j++)
{
if(f[j]->m_vertexList.size() != 3) //quad
if (f[j]->m_vertexList.size() != 3) // quad
continue;
//only two triangle faces so if its not this one,
//this is the psudo surfaces
if(!(F == f[j]))
// only two triangle faces so if its not this one, this is the
// pseudo surfaces
if (!(F == f[j]))
{
m_surftopriface[ptri[i]->GetId()] = f[j];
}
}
}
}
}
}
......@@ -38,11 +38,8 @@
#include <boost/shared_ptr.hpp>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <LibUtilities/Memory/NekMemoryManager.hpp>
#include <NekMeshUtils/MeshElements/MeshElements.h>
#include <NekMeshUtils/CADSystem/CADSystem.h>
#include <NekMeshUtils/MeshElements/Mesh.h>
namespace Nektar
{
......@@ -57,15 +54,14 @@ public:
/**
*@brief default constructor
*/
BLMesh(MeshSharedPtr m, std::vector<unsigned int> bls,
std::vector<unsigned int> syms, NekDouble b) :
m_mesh(m), m_blsurfs(bls), m_symsurfs(syms), m_bl(b)
{
};
BLMesh(MeshSharedPtr m,
std::vector<unsigned int> bls,
std::vector<unsigned int> syms,
NekDouble b)
: m_mesh(m), m_blsurfs(bls), m_symsurfs(syms), m_bl(b){};
/**
*@brief execute bl meshing
* @brief Execute boundary layer meshing
*/
void Mesh();
......@@ -78,21 +74,19 @@ public:
}
private:
/// mesh object containing surface mesh
/// Mesh object containing surface mesh
MeshSharedPtr m_mesh;
/// list of surfaces onto which boundary layers are placed
/// List of surfaces onto which boundary layers are placed
std::vector<unsigned int> m_blsurfs;
/// list of symetry surfaces
/// List of symmetry surfaces
std::vector<unsigned int> m_symsurfs;
/// thickness of the boundary layer
/// Thickness of the boundary layer
NekDouble m_bl;
/// map from surface element id to opposite face of prism
/// Map from surface element ID to opposite face of prism
std::map<int, FaceSharedPtr> m_surftopriface;
};