1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
/*****************************************************************************/
/* XDMF */
/* eXtensible Data Model and Format */
/* */
/* Id : XdmfExodusReader.hpp */
/* */
/* Author: */
/* Kenneth Leiter */
/* kenneth.leiter@arl.army.mil */
/* US Army Research Laboratory */
/* Aberdeen Proving Ground, MD */
/* */
/* Copyright @ 2011 US Army Research Laboratory */
/* All Rights Reserved */
/* See Copyright.txt for details */
/* */
/* This software is distributed WITHOUT ANY WARRANTY; without */
/* even the implied warranty of MERCHANTABILITY or FITNESS */
/* FOR A PARTICULAR PURPOSE. See the above copyright notice */
/* for more information. */
/* */
/*****************************************************************************/
#ifndef XDMFEXODUSREADER_HPP_
#define XDMFEXODUSREADER_HPP_
#ifdef __cplusplus
// Forward Declarations
class XdmfHeavyDataWriter;
class XdmfUnstructuredGrid;
// Includes
#include <string>
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
* @brief Reads an ExodusII file from disk into an Xdmf structure in
* memory.
*/
class XDMFUTILS_EXPORT XdmfExodusReader {
public:
/**
* Create a new XdmfExodusReader.
*
* @return constructed XdmfExodusReader.
*/
static shared_ptr<XdmfExodusReader> New();
virtual ~XdmfExodusReader();
/**
* Read the contents of an ExodusII file from disk into an Xdmf
* structure in memory.
*
* @param fileName containing the path of the exodus file to read.
* @param heavyDataWriter an XdmfHeavyDataWriter to write the mesh to. If no
* heavyDataWriter is specified, all mesh data will remain in memory.
*
* @return an unstructured grid containing the mesh stored in the ExodusII
* file.
*/
shared_ptr<XdmfUnstructuredGrid>
read(const std::string & fileName,
const shared_ptr<XdmfHeavyDataWriter> heavyDataWriter = shared_ptr<XdmfHeavyDataWriter>()) const;
protected:
XdmfExodusReader();
private:
XdmfExodusReader(const XdmfExodusReader &); // Not implemented.
void operator=(const XdmfExodusReader &); // Not implemented.
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
// C wrappers go here
struct XDMFEXODUSREADER; // Simply as a typedef to ensure correct typing
typedef struct XDMFEXODUSREADER XDMFEXODUSREADER;
XDMFUTILS_EXPORT XDMFEXODUSREADER * XdmfExodusReaderNew();
XDMFUTILS_EXPORT XDMFUNSTRUCTUREDGRID * XdmfExodusReaderRead(XDMFEXODUSREADER * reader, char * fileName, XDMFHEAVYDATAWRITER * heavyDataWriter);
XDMFUTILS_EXPORT void XdmfExodusReaderFree(XDMFEXODUSREADER * reader);
#ifdef __cplusplus
}
#endif
#endif /* XDMFEXODUSREADER_HPP_ */
|