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 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
/*****************************************************************************/
/* XDMF */
/* eXtensible Data Model and Format */
/* */
/* Id : XdmfExodusWriter.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 XDMFEXODUSWRITER_HPP_
#define XDMFEXODUSWRITER_HPP_
#ifdef __cplusplus
// Forward Declarations
class XdmfGridCollection;
class XdmfUnstructuredGrid;
// Includes
#include <string>
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
* @brief Writes an Xdmf structure in memory to an ExodusII file on
* disk.
*/
class XDMFUTILS_EXPORT XdmfExodusWriter {
public:
/**
* Create a new XdmfExodusReader.
*
* @return constructed XdmfExodusReader.
*/
static shared_ptr<XdmfExodusWriter> New();
virtual ~XdmfExodusWriter();
/**
* Write an XdmfUnstructuredGrid to an ExodusII file.
*
* @param filePath of the ExodusII file to write.
* @param grid an XdmfUnstructuredGrid to write to ExodusII file
* format.
*/
void write(const std::string & filePath,
const shared_ptr<XdmfUnstructuredGrid> grid) const;
/**
* Write an XdmfGridCollection to an ExodusII file.
*
* @param filePath of the ExodusII file to write.
* @param grid an XdmfGridCollection to write to ExodusII file
* format.
*/
void write(const std::string & filePath,
const shared_ptr<XdmfGridCollection> grid) const;
protected:
XdmfExodusWriter();
private:
XdmfExodusWriter(const XdmfExodusWriter &); // Not implemented.
void operator=(const XdmfExodusWriter &); // Not implemented.
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
// C wrappers go here
struct XDMFEXODUSWRITER; // Simply as a typedef to ensure correct typing
typedef struct XDMFEXODUSWRITER XDMFEXODUSWRITER;
XDMFUTILS_EXPORT XDMFEXODUSWRITER * XdmfExodusWriterNew();
XDMFUTILS_EXPORT void XdmfExodusWriterWriteGrid(XDMFEXODUSWRITER * writer,
char * filePath,
XDMFUNSTRUCTUREDGRID * grid,
int * status);
XDMFUTILS_EXPORT void XdmfExodusWriterWriteGridCollection(XDMFEXODUSWRITER * writer,
char * filePath,
XDMFGRIDCOLLECTION * grid,
int * status);
XDMFUTILS_EXPORT void XdmfExodusWriterFree(XDMFEXODUSWRITER * writer);
#ifdef __cplusplus
}
#endif
#endif /* XDMFEXODUSWRITER_HPP_ */
|