Commit d5dced0e authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Add GLL Spectral Topology Types.

parent 3613b291
......@@ -50,6 +50,8 @@ endif(XDMF_BUILD_TESTING)
if(XDMF_WRAP_PYTHON)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(CMAKE_SWIG_OUTDIR ${CMAKE_BINARY_DIR})
set_source_files_properties(Xdmf.i PROPERTIES CPLUSPLUS ON)
swig_add_module(Xdmf python Xdmf.i)
......
......@@ -149,12 +149,24 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Hexahedron_64()
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Hexahedron_64_GLL()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(64, "Hexahedron_64_GLL", Cubic));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Hexahedron_125()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(125, "Hexahedron_125", Quartic));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Hexahedron_125_GLL()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(125, "Hexahedron_125_GLL", Quartic));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Mixed()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(0, "Mixed", Arbitrary));
......
......@@ -7,32 +7,35 @@
* @brief Property describing the types of elements stored in an XdmfTopology.
*
* XdmfTopologyType is a property used by XdmfTopology to specify the element types stored in the XdmfTopology.
* A specific XdmfTopologyType can be created by calling on of the static methods in the class, i.e.
* A specific XdmfTopologyType can be created by calling on one of the static methods in the class, i.e.
* XdmfTopologyType::Tetrahedron().
*
* Xdmf supports the following topology types:
* NoTopologyType
* Polyvertex
* Polyline
* Polygon
* Triangle
* Quadrilateral
* Tetrahedron
* Wedge
* Hexahedron
* Edge_3
* Triangle_6
* Quadrilateral_8
* Quadrilateral_9
* Tetrahedron_10
* Pyramid_13
* Wedge_15
* Hexahedron_20
* Hexahedron_24
* Hexahedron_27
* Hexahedron_64
* Hexahedron_125
* Mixed
* Polyvertex - Unconnected Points
* Polyline - Line Segments
* Polygon - N Edge Polygon
* Triangle - 3 Edge Polygon
* Quadrilateral - 4 Edge Polygon
* Tetrahedron - 4 Triangular Faces
* Wedge - 4 Triangular Faces, Quadrilateral Base
* Hexahedron - 6 Quadrilateral Faces
* Edge_3 - 3 Node Quadratic Line
* Triangle_6 - 6 Node Quadratic Triangle
* Quadrilateral_8 - 8 Node Quadratic Quadrilateral
* Quadrilateral_9 - 9 Node Bi-Quadratic Quadrilateral
* Tetrahedron_10 - 10 Node Quadratic Tetrahedron
* Pyramid_13 - 13 Node Quadratic Pyramid
* Wedge_15 - 15 Node Quadratic Wedge
* Wedge_18 - 18 Node Bi-Quadratic Wedge
* Hexahedron_20 - 20 Node Quadratic Hexahedron
* Hexahedron_24 - 24 Node Bi-Quadratic Hexahedron
* Hexahedron_27 - 27 Node Tri-Quadratic Hexahedron
* Hexahedron_64 - 64 Node Tri-Cubic Hexahedron
* Hexahedron_64_GLL - 64 Node Spectral Tri-Cubic Hexahedron with Gauss-Lobatto-Legendre points.
* Hexahedron_125 - 125 Node Tri-Quartic Hexahedron
* Hexahedron_125_GLL - 125 Node Spectral Tri-Quartic Hexahedron with Gauss-Lobatto-Legendre points.
* Mixed - Mixture of Unstructured Topologies
* TwoDSMesh
* TwoDRectMesh
* TwoDCoRectMesh
......@@ -75,7 +78,9 @@ public:
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_24();
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_27();
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_64();
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_64_GLL();
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_125();
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_125_GLL();
static boost::shared_ptr<const XdmfTopologyType> Mixed();
static boost::shared_ptr<const XdmfTopologyType> TwoDSMesh();
static boost::shared_ptr<const XdmfTopologyType> TwoDRectMesh();
......
......@@ -67,4 +67,4 @@ file(GLOB XdmfCoreHeaders *.hpp)
install(FILES ${XdmfCoreHeaders} DESTINATION include)
install(TARGETS XdmfCore LIBRARY DESTINATION lib)
set(XdmfCore_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${HDF5_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} CACHE INTERNAL "")
\ No newline at end of file
set(XdmfCore_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${HDF5_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} CACHE INTERNAL "")
......@@ -9,6 +9,7 @@ set(XdmfUtilsSources
set(XdmfUtilsLinkLibraries Xdmf)
if(XDMF_BUILD_EXODUS_IO)
set(XdmfSwigFlags ${XdmfSwigFlags} "-DXDMF_BUILD_EXODUS_IO ")
find_package(Exodus REQUIRED)
if(EXODUS_FOUND)
include_directories(${EXODUS_INCLUDE_DIR} ${NetCDF_INCLUDE_DIR})
......@@ -18,6 +19,7 @@ if(XDMF_BUILD_EXODUS_IO)
endif(XDMF_BUILD_EXODUS_IO)
if(XDMF_BUILD_PARTITIONER)
set(XdmfSwigFlags ${XdmfSwigFlags} "-DXDMF_BUILD_PARTITIONER ")
find_package(Metis REQUIRED)
if(METIS_FOUND)
include_directories(${METIS_INCLUDE_DIR})
......@@ -41,13 +43,16 @@ if(XDMF_BUILD_TESTING)
endif(XDMF_BUILD_TESTING)
if(XDMF_WRAP_PYTHON)
set_source_files_properties(XdmfUtils.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties(XdmfUtils.i PROPERTIES CPLUSPLUS ON SWIG_FLAGS "${XdmfSwigFlags}")
swig_add_module(XdmfUtils python XdmfUtils.i)
swig_link_libraries(XdmfUtils XdmfUtils ${PYTHON_LIBRARIES})
install(FILES ${CMAKE_BINARY_DIR}/XdmfUtils.py DESTINATION lib/python)
install(TARGETS ${SWIG_MODULE_XdmfUtils_REAL_NAME} DESTINATION lib/python)
endif(XDMF_WRAP_PYTHON)
foreach(source ${XdmfUtilsSources})
set(XdmfUtilsHeaders ${XdmfUtilsHeaders} ${source}.hpp)
endforeach(source ${XdmfUtilsSources})
install(FILES ${XdmfUtilsHeaders} DESTINATION include)
install(TARGETS XdmfUtils LIBRARY DESTINATION lib)
install(TARGETS ${XdmfUtilsExecutables} RUNTIME DESTINATION bin)
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18,7 +18,11 @@ class XdmfTopologyType;
*
* Currently supported conversions:
* Hexahedron to Hexahedron_64
* Hexahedron to Hexahedron_64_Spectral
* Hexahedron to Hexahedron_125
* Hexahedron to Hexahedron_125_Spectral
* Hexahedron_64 to Hexahedron
* Hexahedron_125 to Hexahedron
*/
class XdmfTopologyConverter {
......
......@@ -39,21 +39,17 @@ swig -v -c++ -python -o XdmfUtilsPython.cpp XdmfUtils.i
#include <XdmfTopologyType.hpp>
// XdmfUtils Includes
#ifdef XDMF_BUILD_EXODUS_IO
#include <XdmfExodusReader.hpp>
#include <XdmfExodusWriter.hpp>
#endif
#ifdef XDMF_BUILD_PARTITIONER
#include <XdmfPartitioner.hpp>
#endif
#include <XdmfExodusReader.hpp>
#include <XdmfExodusWriter.hpp>
#include <XdmfPartitioner.hpp>
#include <XdmfTopologyConverter.hpp>
%}
%import Xdmf.i
//%pythoncode {
// from Xdmf import *
//}
%pythoncode {
from Xdmf import *
}
// Shared Pointer Templates
#ifdef XDMF_BUILD_EXODUS_IO
......
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