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
IF( NEKTAR_USE_CCM )
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}")
MARK_AS_ADVANCED(CCMIO_LIBRARY)
ADD_DEFINITIONS(-DNEKTAR_USE_CCM)
......
......@@ -60,7 +60,10 @@ ADD_UTILITIES_EXECUTABLE(MeshConvert util ${MeshConvertSources} ${MeshConvertHea
IF (NEKTAR_USE_CCM)
TARGET_LINK_LIBRARIES(MeshConvert ccmio adf)
SET_TARGET_PROPERTIES(MeshConvert PROPERTIES
IMPORTED_LOCATION ${CCMIO_LIBRARY_PATH}/libccmio.a)
INCLUDE_DIRECTORIES(MeshConvert ${CCMIO_INCLUDE_DIR})
LINK_DIRECTORIES(${CCMIO_LIBRARY_PATH})
ENDIF (NEKTAR_USE_CCM)
IF (NEKTAR_USE_VTK)
......
......@@ -120,13 +120,14 @@ namespace Nektar
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);
vector< vector<int> > BndElementFaces;
vector<string> Facelabels;
ReadBoundaryFaces(BndElementFaces, FaceNodes,ElementFaces,
Facelabels);
ReadBoundaryFaces(BndElementFaces, FaceNodes,
ElementFaces, Facelabels);
// 3D Zone
// Reset node ordering so that all prism faces have
......@@ -718,6 +719,22 @@ namespace Nektar
}
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");
returnval = Array<OneD, int>(5);
}
......@@ -991,7 +1008,7 @@ namespace Nektar
}
cnt += nv+1;
}
FacesNodes[mapData[i]] = Fnodes;
FacesNodes[mapData[i]-1] = Fnodes;
}
......@@ -1005,8 +1022,17 @@ namespace Nektar
ElementFaces = Array<OneD, vector<int> >(nelmt);
for(int i = 0; i < nf; ++i)
{
ElementFaces[faceCells[2*i] -1].push_back(mapData[i]); // left element
ElementFaces[faceCells[2*i+1]-1].push_back(mapData[i]); // right element
// left 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
}
cnt += nv+1;
}
FacesNodes[mapData[i]] = Fnodes;
FacesNodes[mapData[i]-1] = Fnodes;
}
vector<int> BndFaces;
for(int i = 0; i < nf; ++i)
{
ElementFaces[faceCells[i] -1].push_back(mapData[i]);
BndFaces.push_back(mapData[i]);
if(faceCells[i])
{
ElementFaces[faceCells[i]-1].push_back(mapData[i]-1);
}
BndFaces.push_back(mapData[i]-1);
}
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