XdmfDomain.hpp 36.7 KB
Newer Older
Kenneth Leiter's avatar
Kenneth Leiter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfDomain.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.                                                 */
/*                                                                           */
/*****************************************************************************/

Kenneth Leiter's avatar
Kenneth Leiter committed
24 25 26
#ifndef XDMFDOMAIN_HPP_
#define XDMFDOMAIN_HPP_

27
// C Compatible Includes
28
#include "Xdmf.hpp"
29
#include "XdmfItem.hpp"
30 31 32 33 34 35 36 37 38 39
#include "XdmfCurvilinearGrid.hpp"
#include "XdmfGraph.hpp"
#include "XdmfRectilinearGrid.hpp"
#include "XdmfRegularGrid.hpp"
#include "XdmfUnstructuredGrid.hpp"

#ifdef __cplusplus

// Forward Declarations
class XdmfGridCollection;
Kenneth Leiter's avatar
Kenneth Leiter committed
40

41
/**
42
 * @brief The root XdmfItem that holds XdmfGrids.
43
 *
44 45 46
 * XdmfDomain is the top XdmfItem in an Xdmf structure.  It can store
 * a number of grids and provides methods to insert, retrieve, and
 * remove these grids.
47
 */
48
class XDMF_EXPORT XdmfDomain : public virtual XdmfItem {
Kenneth Leiter's avatar
Kenneth Leiter committed
49

50
public:
Kenneth Leiter's avatar
Kenneth Leiter committed
51

52 53 54
  /**
   * Create a new XdmfDomain.
   *
55 56 57 58
   * Example of use:
   *
   * C++
   *
59
   * @dontinclude ExampleXdmfDomain.cpp
60 61
   * @skipline //#initialization
   * @until //#initialization
62 63 64
   *
   * Python
   *
65
   * @dontinclude XdmfExampleDomain.py
66 67
   * @skipline #//initialization
   * @until #//initialization
68
   *
69
   * @return    Constructed XdmfDomain.
70
   */
71
  static shared_ptr<XdmfDomain> New();
72

73
  virtual ~XdmfDomain();
74

75 76 77 78 79 80 81
  LOKI_DEFINE_VISITABLE(XdmfDomain, XdmfItem)
  XDMF_CHILDREN(XdmfDomain, XdmfGridCollection, GridCollection, Name)
  XDMF_CHILDREN(XdmfDomain, XdmfGraph, Graph, Name)
  XDMF_CHILDREN(XdmfDomain, XdmfCurvilinearGrid, CurvilinearGrid, Name)
  XDMF_CHILDREN(XdmfDomain, XdmfRectilinearGrid, RectilinearGrid, Name)
  XDMF_CHILDREN(XdmfDomain, XdmfRegularGrid, RegularGrid, Name)
  XDMF_CHILDREN(XdmfDomain, XdmfUnstructuredGrid, UnstructuredGrid, Name)
82
  static const std::string ItemTag;
Kenneth Leiter's avatar
Kenneth Leiter committed
83

84
  std::map<std::string, std::string> getItemProperties() const;
85

86
  virtual std::string getItemTag() const;
87

88
  using XdmfItem::insert;
Kenneth Leiter's avatar
Kenneth Leiter committed
89

90
  virtual void traverse(const shared_ptr<XdmfBaseVisitor> visitor);
Kenneth Leiter's avatar
Kenneth Leiter committed
91

92 93
  XdmfDomain(XdmfDomain &);

94
protected:
Kenneth Leiter's avatar
Kenneth Leiter committed
95

96 97 98
  XdmfDomain();
  virtual void
  populateItem(const std::map<std::string, std::string> & itemProperties,
99
               const std::vector<shared_ptr<XdmfItem> > & childItems,
100
               const XdmfCoreReader * const reader);
Kenneth Leiter's avatar
Kenneth Leiter committed
101

102
private:
103 104 105

  XdmfDomain(const XdmfDomain &);  // Not implemented.
  void operator=(const XdmfDomain &);  // Not implemented.
Kenneth Leiter's avatar
Kenneth Leiter committed
106 107 108

};

109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
#endif

#ifdef __cplusplus
extern "C" {
#endif

// C wrappers go here

struct XDMFDOMAIN; // Simply as a typedef to ensure correct typing
typedef struct XDMFDOMAIN XDMFDOMAIN;

#ifndef XDMFGRIDCOLLECTIONCDEFINE
#define XDMFGRIDCOLLECTIONCDEFINE
struct XDMFGRIDCOLLECTION; // Simply as a typedef to ensure correct typing
typedef struct XDMFGRIDCOLLECTION XDMFGRIDCOLLECTION;
#endif

XDMF_EXPORT XDMFDOMAIN * XdmfDomainNew();

XDMF_EXPORT XDMFGRIDCOLLECTION * XdmfDomainGetGridCollection(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT XDMFGRIDCOLLECTION * XdmfDomainGetGridCollectionByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT unsigned int XdmfDomainGetNumberGridCollections(XDMFDOMAIN * domain);

XDMF_EXPORT void XdmfDomainInsertGridCollection(XDMFDOMAIN * domain, XDMFGRIDCOLLECTION * GridCollection, int passControl);

XDMF_EXPORT void XdmfDomainRemoveGridCollection(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT void XdmfDomainRemoveGridCollectionByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT XDMFGRAPH * XdmfDomainGetGraph(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT XDMFGRAPH * XdmfDomainGetGraphByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT unsigned int XdmfDomainGetNumberGraphs(XDMFDOMAIN * domain);

XDMF_EXPORT void XdmfDomainInsertGraph(XDMFDOMAIN * domain, XDMFGRAPH * graph, int passControl);

XDMF_EXPORT void XdmfDomainRemoveGraph(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT void XdmfDomainRemoveGraphByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT XDMFCURVILINEARGRID * XdmfDomainGetCurvilinearGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT XDMFCURVILINEARGRID * XdmfDomainGetCurvilinearGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT unsigned int XdmfDomainGetNumberCurvilinearGrids(XDMFDOMAIN * domain);

XDMF_EXPORT void XdmfDomainInsertCurvilinearGrid(XDMFDOMAIN * domain, XDMFCURVILINEARGRID * CurvilinearGrid, int passControl);

XDMF_EXPORT void XdmfDomainRemoveCurvilinearGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT void XdmfDomainRemoveCurvilinearGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT XDMFRECTILINEARGRID * XdmfDomainGetRectilinearGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT XDMFRECTILINEARGRID * XdmfDomainGetRectilinearGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT unsigned int XdmfDomainGetNumberRectilinearGrids(XDMFDOMAIN * domain);

XDMF_EXPORT void XdmfDomainInsertRectilinearGrid(XDMFDOMAIN * domain, XDMFRECTILINEARGRID * RectilinearGrid, int passControl);

XDMF_EXPORT void XdmfDomainRemoveRectilinearGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT void XdmfDomainRemoveRectilinearGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT XDMFREGULARGRID * XdmfDomainGetRegularGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT XDMFREGULARGRID * XdmfDomainGetRegularGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT unsigned int XdmfDomainGetNumberRegularGrids(XDMFDOMAIN * domain);

XDMF_EXPORT void XdmfDomainInsertRegularGrid(XDMFDOMAIN * domain, XDMFREGULARGRID * RegularGrid, int passControl);

XDMF_EXPORT void XdmfDomainRemoveRegularGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT void XdmfDomainRemoveRegularGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT XDMFUNSTRUCTUREDGRID * XdmfDomainGetUnstructuredGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT XDMFUNSTRUCTUREDGRID * XdmfDomainGetUnstructuredGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_EXPORT unsigned int XdmfDomainGetNumberUnstructuredGrids(XDMFDOMAIN * domain);

XDMF_EXPORT void XdmfDomainInsertUnstructuredGrid(XDMFDOMAIN * domain, XDMFUNSTRUCTUREDGRID * UnstructuredGrid, int passControl);

XDMF_EXPORT void XdmfDomainRemoveUnstructuredGrid(XDMFDOMAIN * domain, unsigned int index);

XDMF_EXPORT void XdmfDomainRemoveUnstructuredGridByName(XDMFDOMAIN * domain, char * Name);

XDMF_ITEM_C_CHILD_DECLARE(XdmfDomain, XDMFDOMAIN, XDMF)

#define XDMF_DOMAIN_C_CHILD_DECLARE(ClassName, CClassName, Level)                                                                     \
                                                                                                                                      \
Level##_EXPORT XDMFGRIDCOLLECTION * ClassName##GetGridCollection(CClassName * domain, unsigned int index);                            \
Level##_EXPORT XDMFGRIDCOLLECTION * ClassName##GetGridCollectionByName(CClassName * domain, char * Name);                             \
Level##_EXPORT unsigned int ClassName##GetNumberGridCollections(CClassName * domain);                                                 \
Level##_EXPORT void ClassName##InsertGridCollection(CClassName * domain, XDMFGRIDCOLLECTION * GridCollection, int passControl);       \
Level##_EXPORT void ClassName##RemoveGridCollection(CClassName * domain, unsigned int index);                                         \
Level##_EXPORT void ClassName##RemoveGridCollectionByName(CClassName * domain, char * Name);                                          \
Level##_EXPORT XDMFGRAPH * ClassName##GetGraph(CClassName * domain, unsigned int index);                                              \
Level##_EXPORT XDMFGRAPH * ClassName##GetGraphByName(CClassName * domain, char * Name);                                               \
Level##_EXPORT unsigned int ClassName##GetNumberGraphs(CClassName * domain);                                                          \
Level##_EXPORT void ClassName##InsertGraph(CClassName * domain, XDMFGRAPH * Graph, int passControl);                                  \
Level##_EXPORT void ClassName##RemoveGraph(CClassName * domain, unsigned int index);                                                  \
Level##_EXPORT void ClassName##RemoveGraphByName(CClassName * domain, char * Name);                                                   \
Level##_EXPORT XDMFCURVILINEARGRID * ClassName##GetCurvilinearGrid(CClassName * domain, unsigned int index);                          \
Level##_EXPORT XDMFCURVILINEARGRID * ClassName##GetCurvilinearGridByName(CClassName * domain, char * Name);                           \
Level##_EXPORT unsigned int ClassName##GetNumberCurvilinearGrids(CClassName * domain);                                                \
Level##_EXPORT void ClassName##InsertCurvilinearGrid(CClassName * domain, XDMFCURVILINEARGRID * CurvilinearGrid, int passControl);    \
Level##_EXPORT void ClassName##RemoveCurvilinearGrid(CClassName * domain, unsigned int index);                                        \
Level##_EXPORT void ClassName##RemoveCurvilinearGridByName(CClassName * domain, char * Name);                                         \
Level##_EXPORT XDMFRECTILINEARGRID * ClassName##GetRectilinearGrid(CClassName * domain, unsigned int index);                          \
Level##_EXPORT XDMFRECTILINEARGRID * ClassName##GetRectilinearGridByName(CClassName * domain, char * Name);                           \
Level##_EXPORT unsigned int ClassName##GetNumberRectilinearGrids(CClassName * domain);                                                \
Level##_EXPORT void ClassName##InsertRectilinearGrid(CClassName * domain, XDMFRECTILINEARGRID * RectilinearGrid, int passControl);    \
Level##_EXPORT void ClassName##RemoveRectilinearGrid(CClassName * domain, unsigned int index);                                        \
Level##_EXPORT void ClassName##RemoveRectilinearGridByName(CClassName * domain, char * Name);                                         \
Level##_EXPORT XDMFREGULARGRID * ClassName##GetRegularGrid(CClassName * domain, unsigned int index);                                  \
Level##_EXPORT XDMFREGULARGRID * ClassName##GetRegularGridByName(CClassName * domain, char * Name);                                   \
Level##_EXPORT unsigned int ClassName##GetNumberRegularGrids(CClassName * domain);                                                    \
Level##_EXPORT void ClassName##InsertRegularGrid(CClassName * domain, XDMFREGULARGRID * RegularGrid, int passControl);                \
Level##_EXPORT void ClassName##RemoveRegularGrid(CClassName * domain, unsigned int index);                                            \
Level##_EXPORT void ClassName##RemoveRegularGridByName(CClassName * domain, char * Name);                                             \
Level##_EXPORT XDMFUNSTRUCTUREDGRID * ClassName##GetUnstructuredGrid(CClassName * domain, unsigned int index);                        \
Level##_EXPORT XDMFUNSTRUCTUREDGRID * ClassName##GetUnstructuredGridByName(CClassName * domain, char * Name);                         \
Level##_EXPORT unsigned int ClassName##GetNumberUnstructuredGrids(CClassName * domain);                                               \
Level##_EXPORT void ClassName##InsertUnstructuredGrid(CClassName * domain, XDMFUNSTRUCTUREDGRID * UnstructuredGrid, int passControl); \
Level##_EXPORT void ClassName##RemoveUnstructuredGrid(CClassName * domain, unsigned int index);                                       \
Level##_EXPORT void ClassName##RemoveUnstructuredGridByName(CClassName * domain, char * Name);


#define XDMF_DOMAIN_C_CHILD_WRAPPER(ClassName, CClassName)                                                                            \
                                                                                                                                      \
XDMFGRIDCOLLECTION * ClassName##GetGridCollection(CClassName * domain, unsigned int index)                                            \
{                                                                                                                                     \
246
  return XdmfDomainGetGridCollection((XDMFDOMAIN *)((void *)domain), index);                                                          \
247 248 249 250
}                                                                                                                                     \
                                                                                                                                      \
XDMFGRIDCOLLECTION * ClassName##GetGridCollectionByName(CClassName * domain, char * Name)                                             \
{                                                                                                                                     \
251
  return XdmfDomainGetGridCollectionByName((XDMFDOMAIN *)((void *)domain), Name);                                                     \
252 253 254 255
}                                                                                                                                     \
                                                                                                                                      \
unsigned int ClassName##GetNumberGridCollections(CClassName * domain)                                                                 \
{                                                                                                                                     \
256
  return XdmfDomainGetNumberGridCollections((XDMFDOMAIN *)((void *)domain));                                                          \
257 258 259 260
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##InsertGridCollection(CClassName * domain, XDMFGRIDCOLLECTION * GridCollection, int passControl)                       \
{                                                                                                                                     \
261
  XdmfDomainInsertGridCollection((XDMFDOMAIN *)((void *)domain), GridCollection, passControl);                                        \
262 263 264 265
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveGridCollection(CClassName * domain, unsigned int index)                                                         \
{                                                                                                                                     \
266
  XdmfDomainRemoveGridCollection((XDMFDOMAIN *)((void *)domain), index);                                                              \
267 268 269 270
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveGridCollectionByName(CClassName * domain, char * Name)                                                          \
{                                                                                                                                     \
271
  XdmfDomainRemoveGridCollectionByName((XDMFDOMAIN *)((void *)domain), Name);                                                         \
272 273 274 275
}                                                                                                                                     \
                                                                                                                                      \
XDMFGRAPH * ClassName##GetGraph(CClassName * domain, unsigned int index)                                                              \
{                                                                                                                                     \
276
  return XdmfDomainGetGraph((XDMFDOMAIN *)((void *)domain), index);                                                                   \
277 278 279 280
}                                                                                                                                     \
                                                                                                                                      \
XDMFGRAPH * ClassName##GetGraphByName(CClassName * domain, char * Name)                                                               \
{                                                                                                                                     \
281
  return XdmfDomainGetGraphByName((XDMFDOMAIN *)((void *)domain), Name);                                                              \
282 283 284 285
}                                                                                                                                     \
                                                                                                                                      \
unsigned int ClassName##GetNumberGraphs(CClassName * domain)                                                                          \
{                                                                                                                                     \
286
  return XdmfDomainGetNumberGraphs((XDMFDOMAIN *)((void *)domain));                                                                   \
287 288 289 290
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##InsertGraph(CClassName * domain, XDMFGRAPH * Graph, int passControl)                                                  \
{                                                                                                                                     \
291
  XdmfDomainInsertGraph((XDMFDOMAIN *)((void *)domain), Graph, passControl);                                                          \
292 293 294 295
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveGraph(CClassName * domain, unsigned int index)                                                                  \
{                                                                                                                                     \
296
  XdmfDomainRemoveGraph((XDMFDOMAIN *)((void *)domain), index);                                                                       \
297 298 299 300
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveGraphByName(CClassName * domain, char * Name)                                                                   \
{                                                                                                                                     \
301
  XdmfDomainRemoveGraphByName((XDMFDOMAIN *)((void *)domain), Name);                                                                  \
302 303 304 305
}                                                                                                                                     \
                                                                                                                                      \
XDMFCURVILINEARGRID * ClassName##GetCurvilinearGrid(CClassName * domain, unsigned int index)                                          \
{                                                                                                                                     \
306
  return XdmfDomainGetCurvilinearGrid((XDMFDOMAIN *)((void *)domain), index);                                                         \
307 308 309 310
}                                                                                                                                     \
                                                                                                                                      \
XDMFCURVILINEARGRID * ClassName##GetCurvilinearGridByName(CClassName * domain, char * Name)                                           \
{                                                                                                                                     \
311
  return XdmfDomainGetCurvilinearGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                    \
312 313 314 315
}                                                                                                                                     \
                                                                                                                                      \
unsigned int ClassName##GetNumberCurvilinearGrids(CClassName * domain)                                                                \
{                                                                                                                                     \
316
  return XdmfDomainGetNumberCurvilinearGrids((XDMFDOMAIN *)((void *)domain));                                                         \
317 318 319 320
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##InsertCurvilinearGrid(CClassName * domain, XDMFCURVILINEARGRID * CurvilinearGrid, int passControl)                    \
{                                                                                                                                     \
321
  XdmfDomainInsertCurvilinearGrid((XDMFDOMAIN *)((void *)domain), CurvilinearGrid, passControl);                                      \
322 323 324 325
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveCurvilinearGrid(CClassName * domain, unsigned int index)                                                        \
{                                                                                                                                     \
326
  XdmfDomainRemoveCurvilinearGrid((XDMFDOMAIN *)((void *)domain), index);                                                             \
327 328 329 330
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveCurvilinearGridByName(CClassName * domain, char * Name)                                                         \
{                                                                                                                                     \
331
  XdmfDomainRemoveCurvilinearGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                        \
332 333 334 335
}                                                                                                                                     \
                                                                                                                                      \
XDMFRECTILINEARGRID * ClassName##GetRectilinearGrid(CClassName * domain, unsigned int index)                                          \
{                                                                                                                                     \
336
  return XdmfDomainGetRectilinearGrid((XDMFDOMAIN *)((void *)domain), index);                                                         \
337 338 339 340
}                                                                                                                                     \
                                                                                                                                      \
XDMFRECTILINEARGRID * ClassName##GetRectilinearGridByName(CClassName * domain, char * Name)                                           \
{                                                                                                                                     \
341
  return XdmfDomainGetRectilinearGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                    \
342 343 344 345
}                                                                                                                                     \
                                                                                                                                      \
unsigned int ClassName##GetNumberRectilinearGrids(CClassName * domain)                                                                \
{                                                                                                                                     \
346
  return XdmfDomainGetNumberRectilinearGrids((XDMFDOMAIN *)((void *)domain));                                                         \
347 348 349 350
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##InsertRectilinearGrid(CClassName * domain, XDMFRECTILINEARGRID * RectilinearGrid, int passControl)                    \
{                                                                                                                                     \
351
  XdmfDomainInsertRectilinearGrid((XDMFDOMAIN *)((void *)domain), RectilinearGrid, passControl);                                      \
352 353 354 355
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveRectilinearGrid(CClassName * domain, unsigned int index)                                                        \
{                                                                                                                                     \
356
  XdmfDomainRemoveRectilinearGrid((XDMFDOMAIN *)((void *)domain), index);                                                             \
357 358 359 360
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveRectilinearGridByName(CClassName * domain, char * Name)                                                         \
{                                                                                                                                     \
361
  XdmfDomainRemoveRectilinearGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                        \
362 363 364 365
}                                                                                                                                     \
                                                                                                                                      \
XDMFREGULARGRID * ClassName##GetRegularGrid(CClassName * domain, unsigned int index)                                                  \
{                                                                                                                                     \
366
  return XdmfDomainGetRegularGrid((XDMFDOMAIN *)((void *)domain), index);                                                             \
367 368 369 370
}                                                                                                                                     \
                                                                                                                                      \
XDMFREGULARGRID * ClassName##GetRegularGridByName(CClassName * domain, char * Name)                                                   \
{                                                                                                                                     \
371
  return XdmfDomainGetRegularGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                        \
372 373 374 375
}                                                                                                                                     \
                                                                                                                                      \
unsigned int ClassName##GetNumberRegularGrids(CClassName * domain)                                                                    \
{                                                                                                                                     \
376
  return XdmfDomainGetNumberRegularGrids((XDMFDOMAIN *)((void *)domain));                                                             \
377 378 379 380
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##InsertRegularGrid(CClassName * domain, XDMFREGULARGRID * RegularGrid, int passControl)                                \
{                                                                                                                                     \
381
  XdmfDomainInsertRegularGrid((XDMFDOMAIN *)((void *)domain), RegularGrid, passControl);                                              \
382 383 384 385
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveRegularGrid(CClassName * domain, unsigned int index)                                                            \
{                                                                                                                                     \
386
  XdmfDomainRemoveRegularGrid((XDMFDOMAIN *)((void *)domain), index);                                                                 \
387 388 389 390
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveRegularGridByName(CClassName * domain, char * Name)                                                             \
{                                                                                                                                     \
391
  XdmfDomainRemoveRegularGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                            \
392 393 394 395
}                                                                                                                                     \
                                                                                                                                      \
XDMFUNSTRUCTUREDGRID * ClassName##GetUnstructuredGrid(CClassName * domain, unsigned int index)                                        \
{                                                                                                                                     \
396
  return XdmfDomainGetUnstructuredGrid((XDMFDOMAIN *)((void *)domain), index);                                                        \
397 398 399 400
}                                                                                                                                     \
                                                                                                                                      \
XDMFUNSTRUCTUREDGRID * ClassName##GetUnstructuredGridByName(CClassName * domain, char * Name)                                         \
{                                                                                                                                     \
401
  return XdmfDomainGetUnstructuredGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                   \
402 403 404 405
}                                                                                                                                     \
                                                                                                                                      \
unsigned int ClassName##GetNumberUnstructuredGrids(CClassName * domain)                                                               \
{                                                                                                                                     \
406
  return XdmfDomainGetNumberUnstructuredGrids((XDMFDOMAIN *)((void *)domain));                                                        \
407 408 409 410
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##InsertUnstructuredGrid(CClassName * domain, XDMFUNSTRUCTUREDGRID * UnstructuredGrid, int passControl)                 \
{                                                                                                                                     \
411
  XdmfDomainInsertUnstructuredGrid((XDMFDOMAIN *)((void *)domain), UnstructuredGrid, passControl);                                    \
412 413 414 415
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveUnstructuredGrid(CClassName * domain, unsigned int index)                                                       \
{                                                                                                                                     \
416
  XdmfDomainRemoveUnstructuredGrid((XDMFDOMAIN *)((void *)domain), index);                                                            \
417 418 419 420
}                                                                                                                                     \
                                                                                                                                      \
void ClassName##RemoveUnstructuredGridByName(CClassName * domain, char * Name)                                                        \
{                                                                                                                                     \
421
  XdmfDomainRemoveUnstructuredGridByName((XDMFDOMAIN *)((void *)domain), Name);                                                       \
422 423 424 425 426 427
}

#ifdef __cplusplus
}
#endif

Kenneth Leiter's avatar
Kenneth Leiter committed
428
#endif /* XDMFDOMAIN_HPP_ */