Commit 513de14a authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Put in check for pyramid identication and offset one map by -1

parent 24b6e334
...@@ -11,7 +11,7 @@ OPTION(NEKTAR_USE_CCM ...@@ -11,7 +11,7 @@ OPTION(NEKTAR_USE_CCM
IF( NEKTAR_USE_CCM ) IF( NEKTAR_USE_CCM )
FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" "adf" PATHS /usr/local/lib ${Nektar++_TP_LIBRARY_DIRS}) FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" "adf" PATHS /usr/local/lib ${Nektar++_TP_LIBRARY_DIRS})
IF (CCMIO_LIBRARY) IF( CCMIO_LIBRARY )
MESSAGE(STATUS "Found Ccmio: ${CCMIO_LIBRARY}") MESSAGE(STATUS "Found Ccmio: ${CCMIO_LIBRARY}")
MARK_AS_ADVANCED(CCMIO_LIBRARY) MARK_AS_ADVANCED(CCMIO_LIBRARY)
ADD_DEFINITIONS(-DNEKTAR_USE_CCM) ADD_DEFINITIONS(-DNEKTAR_USE_CCM)
......
...@@ -60,7 +60,10 @@ ADD_UTILITIES_EXECUTABLE(MeshConvert util ${MeshConvertSources} ${MeshConvertHea ...@@ -60,7 +60,10 @@ ADD_UTILITIES_EXECUTABLE(MeshConvert util ${MeshConvertSources} ${MeshConvertHea
IF (NEKTAR_USE_CCM) IF (NEKTAR_USE_CCM)
TARGET_LINK_LIBRARIES(MeshConvert ccmio adf) TARGET_LINK_LIBRARIES(MeshConvert ccmio adf)
SET_TARGET_PROPERTIES(MeshConvert PROPERTIES
IMPORTED_LOCATION ${CCMIO_LIBRARY_PATH}/libccmio.a)
INCLUDE_DIRECTORIES(MeshConvert ${CCMIO_INCLUDE_DIR}) INCLUDE_DIRECTORIES(MeshConvert ${CCMIO_INCLUDE_DIR})
LINK_DIRECTORIES(${CCMIO_LIBRARY_PATH})
ENDIF (NEKTAR_USE_CCM) ENDIF (NEKTAR_USE_CCM)
IF (NEKTAR_USE_VTK) IF (NEKTAR_USE_VTK)
......
...@@ -120,13 +120,14 @@ namespace Nektar ...@@ -120,13 +120,14 @@ namespace Nektar
Array<OneD, vector< int> > ElementFaces; Array<OneD, vector< int> > ElementFaces;
// Read interior faces and set up first part of Element Faces and FaceNodes // Read interior faces and set up first part of Element
// Faces and FaceNodes
ReadInternalFaces(FaceNodes,ElementFaces); ReadInternalFaces(FaceNodes,ElementFaces);
vector< vector<int> > BndElementFaces; vector< vector<int> > BndElementFaces;
vector<string> Facelabels; vector<string> Facelabels;
ReadBoundaryFaces(BndElementFaces, FaceNodes,ElementFaces, ReadBoundaryFaces(BndElementFaces, FaceNodes,
Facelabels); ElementFaces, Facelabels);
// 3D Zone // 3D Zone
// Reset node ordering so that all prism faces have // Reset node ordering so that all prism faces have
...@@ -718,6 +719,22 @@ namespace Nektar ...@@ -718,6 +719,22 @@ namespace Nektar
} }
else //Pyramid else //Pyramid
{ {
set<int> vertids;
set<int>::iterator it;
// get list of vert ids
cout << "Pyramid found with vertices: " << endl;
for(i =0 ; i < 5; ++i)
{
for(j =0; j < FaceNodes[ElementFaces[i]].size(); ++j)
{
vertids.insert(FaceNodes[ElementFaces[i]][j]);
}
}
for(it = vertids.begin(); it != vertids.end(); ++it)
{
cout << Vnodes[*it] << endl;
}
ASSERTL0(false,"Not yet set up for pyramids"); ASSERTL0(false,"Not yet set up for pyramids");
returnval = Array<OneD, int>(5); returnval = Array<OneD, int>(5);
} }
...@@ -991,10 +1008,10 @@ namespace Nektar ...@@ -991,10 +1008,10 @@ namespace Nektar
} }
cnt += nv+1; cnt += nv+1;
} }
FacesNodes[mapData[i]] = Fnodes; FacesNodes[mapData[i]-1] = Fnodes;
} }
// find number of elements; // find number of elements;
int nelmt = 0; int nelmt = 0;
for(int i = 0; i < faceCells.size();++i) for(int i = 0; i < faceCells.size();++i)
...@@ -1005,8 +1022,17 @@ namespace Nektar ...@@ -1005,8 +1022,17 @@ namespace Nektar
ElementFaces = Array<OneD, vector<int> >(nelmt); ElementFaces = Array<OneD, vector<int> >(nelmt);
for(int i = 0; i < nf; ++i) for(int i = 0; i < nf; ++i)
{ {
ElementFaces[faceCells[2*i] -1].push_back(mapData[i]); // left element // left element
ElementFaces[faceCells[2*i+1]-1].push_back(mapData[i]); // right element if(faceCells[2*i])
{
ElementFaces[faceCells[2*i] -1].push_back(mapData[i]-1);
}
// right element
if(faceCells[2*i+1])
{
ElementFaces[faceCells[2*i+1]-1].push_back(mapData[i]-1);
}
} }
} }
...@@ -1087,15 +1113,18 @@ namespace Nektar ...@@ -1087,15 +1113,18 @@ namespace Nektar
} }
cnt += nv+1; cnt += nv+1;
} }
FacesNodes[mapData[i]] = Fnodes; FacesNodes[mapData[i]-1] = Fnodes;
} }
vector<int> BndFaces; vector<int> BndFaces;
for(int i = 0; i < nf; ++i) for(int i = 0; i < nf; ++i)
{ {
ElementFaces[faceCells[i] -1].push_back(mapData[i]); if(faceCells[i])
BndFaces.push_back(mapData[i]); {
ElementFaces[faceCells[i]-1].push_back(mapData[i]-1);
}
BndFaces.push_back(mapData[i]-1);
} }
BndElementFaces.push_back(BndFaces); BndElementFaces.push_back(BndFaces);
} }
......
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