XdmfDomain.cpp 17.5 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
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfDomain.cpp                                                      */
/*                                                                           */
/*  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
23 24

#include "XdmfDomain.hpp"
25
#include "XdmfCurvilinearGrid.hpp"
Kenneth Leiter's avatar
Kenneth Leiter committed
26
#include "XdmfGraph.hpp"
27
#include "XdmfGridCollection.hpp"
28 29 30
#include "XdmfRectilinearGrid.hpp"
#include "XdmfRegularGrid.hpp"
#include "XdmfUnstructuredGrid.hpp"
Kenneth Leiter's avatar
Kenneth Leiter committed
31

32 33 34 35 36 37
#ifdef XDMF_BUILD_DSM
  #include "XdmfDSMBuffer.hpp"
  #include "XdmfDSMDriver.hpp"
  #include "XdmfDSMDescription.hpp"
#endif

38 39 40 41 42 43 44 45
XDMF_CHILDREN_IMPLEMENTATION(XdmfDomain,
                             XdmfGridCollection,
                             GridCollection,
                             Name)
XDMF_CHILDREN_IMPLEMENTATION(XdmfDomain,
                             XdmfCurvilinearGrid,
                             CurvilinearGrid,
                             Name)
Kenneth Leiter's avatar
Kenneth Leiter committed
46 47 48 49
XDMF_CHILDREN_IMPLEMENTATION(XdmfDomain,
                             XdmfGraph,
                             Graph,
                             Name)
50 51 52 53 54 55 56 57 58 59 60 61
XDMF_CHILDREN_IMPLEMENTATION(XdmfDomain,
                             XdmfRectilinearGrid,
                             RectilinearGrid,
                             Name)
XDMF_CHILDREN_IMPLEMENTATION(XdmfDomain,
                             XdmfRegularGrid,
                             RegularGrid,
                             Name)
XDMF_CHILDREN_IMPLEMENTATION(XdmfDomain,
                             XdmfUnstructuredGrid,
                             UnstructuredGrid,
                             Name)
62

63
shared_ptr<XdmfDomain>
64
XdmfDomain::New()
65
{
66
  shared_ptr<XdmfDomain> p(new XdmfDomain());
67
  return p;
68 69
}

Kenneth Leiter's avatar
Kenneth Leiter committed
70 71 72 73
XdmfDomain::XdmfDomain()
{
}

74 75 76 77 78 79 80 81 82 83 84
XdmfDomain::XdmfDomain(XdmfDomain & refDomain) :
  XdmfItem(refDomain),
  mGridCollections(refDomain.mGridCollections),
  mGraphs(refDomain.mGraphs),
  mCurvilinearGrids(refDomain.mCurvilinearGrids),
  mRectilinearGrids(refDomain.mRectilinearGrids),
  mRegularGrids(refDomain.mRegularGrids),
  mUnstructuredGrids(refDomain.mUnstructuredGrids)
{
}

Kenneth Leiter's avatar
Kenneth Leiter committed
85 86 87 88
XdmfDomain::~XdmfDomain()
{
}

89
const std::string XdmfDomain::ItemTag = "Domain";
90

91 92
std::map<std::string, std::string>
XdmfDomain::getItemProperties() const
93
{
94 95
  std::map<std::string, std::string> domainProperties;
  return domainProperties;
96 97
}

98 99
std::string
XdmfDomain::getItemTag() const
100
{
101
  return ItemTag;
102 103
}

104 105
void
XdmfDomain::populateItem(const std::map<std::string, std::string> & itemProperties,
106
                         const std::vector<shared_ptr<XdmfItem> > & childItems,
107
                         const XdmfCoreReader * const reader)
108
{
109
  XdmfItem::populateItem(itemProperties, childItems, reader);
Kenneth Leiter's avatar
Kenneth Leiter committed
110
  for(std::vector<shared_ptr<XdmfItem> >::const_iterator iter =
111 112 113
        childItems.begin();
      iter != childItems.end();
      ++iter) {
114 115
    if(shared_ptr<XdmfGridCollection> gridCollection =
       shared_dynamic_cast<XdmfGridCollection>(*iter)) {
116 117
      this->insert(gridCollection);
    }
118 119
    else if(shared_ptr<XdmfCurvilinearGrid> grid =
            shared_dynamic_cast<XdmfCurvilinearGrid>(*iter)) {
120 121
      this->insert(grid);
    }
Kenneth Leiter's avatar
Kenneth Leiter committed
122 123 124 125
    else if(shared_ptr<XdmfGraph> graph =
            shared_dynamic_cast<XdmfGraph>(*iter)) {
      this->insert(graph);
    }
126 127
    else if(shared_ptr<XdmfRectilinearGrid> grid =
            shared_dynamic_cast<XdmfRectilinearGrid>(*iter)) {
128 129
      this->insert(grid);
    }
130 131
    else if(shared_ptr<XdmfRegularGrid> grid =
            shared_dynamic_cast<XdmfRegularGrid>(*iter)) {
132 133
      this->insert(grid);
    }
134 135
    else if(shared_ptr<XdmfUnstructuredGrid> grid =
            shared_dynamic_cast<XdmfUnstructuredGrid>(*iter)) {
136 137 138
      this->insert(grid);
    }
  }
139 140
}

141
void
142
XdmfDomain::traverse(const shared_ptr<XdmfBaseVisitor> visitor)
143
{
144 145 146 147 148 149 150 151 152 153 154 155 156 157
#ifdef XDMF_BUILD_DSM
  // Traverse Data Descriptions before anything
  XdmfDSMBuffer * dsmBuffer = (XdmfDSMBuffer *)xdmf_dsm_get_manager();

  if (dsmBuffer)
  {
    shared_ptr<XdmfDSMDescription> dsmDescription;
    dsmDescription = XdmfDSMDescription::New();
    dsmDescription->setPortDescription(dsmBuffer->GetComm()->GetDsmPortName());

    dsmDescription->accept(visitor);
  }
#endif

158
  XdmfItem::traverse(visitor);
159 160 161
  for (unsigned int i = 0; i < mGridCollections.size(); ++i)
  {
    mGridCollections[i]->accept(visitor);
162
  }
163 164 165
  for (unsigned int i = 0; i < mCurvilinearGrids.size(); ++i)
  {
    mCurvilinearGrids[i]->accept(visitor);
166
  }
167 168 169
  for (unsigned int i = 0; i < mGraphs.size(); ++i)
  {
    mGraphs[i]->accept(visitor);
Kenneth Leiter's avatar
Kenneth Leiter committed
170
  }
171 172 173
  for (unsigned int i = 0; i < mRectilinearGrids.size(); ++i)
  {
    mRectilinearGrids[i]->accept(visitor);
174
  }
175 176 177
  for (unsigned int i = 0; i < mRegularGrids.size(); ++i)
  {
    mRegularGrids[i]->accept(visitor);
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
  for (unsigned int i = 0; i < mUnstructuredGrids.size(); ++i)
  {
    mUnstructuredGrids[i]->accept(visitor);
  }
}

// C Wrappers

XDMFDOMAIN * XdmfDomainNew()
{
  try
  {
    shared_ptr<XdmfDomain> generatedDomain = XdmfDomain::New();
    return (XDMFDOMAIN *)((void *)((XdmfItem *)(new XdmfDomain(*generatedDomain.get()))));
  }
  catch (...)
  {
    shared_ptr<XdmfDomain> generatedDomain = XdmfDomain::New();
    return (XDMFDOMAIN *)((void *)((XdmfItem *)(new XdmfDomain(*generatedDomain.get()))));
  }
}

XDMFGRIDCOLLECTION * XdmfDomainGetGridCollection(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFGRIDCOLLECTION *)((void *)((XdmfItem *)(domainPointer->getGridCollection(index).get())));
}

XDMFGRIDCOLLECTION * XdmfDomainGetGridCollectionByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFGRIDCOLLECTION *)((void *)((XdmfItem *)(domainPointer->getGridCollection(Name).get())));
}

unsigned int XdmfDomainGetNumberGridCollections(XDMFDOMAIN * domain)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return domainPointer->getNumberGridCollections();
}

void XdmfDomainInsertGridCollection(XDMFDOMAIN * domain, XDMFGRIDCOLLECTION * GridCollection, int passControl)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  if (passControl) {
    domainPointer->insert(shared_ptr<XdmfGridCollection>((XdmfGridCollection *)GridCollection));
  }
  else {
    domainPointer->insert(shared_ptr<XdmfGridCollection>((XdmfGridCollection *)GridCollection, XdmfNullDeleter()));
231
  }
232
}
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483

void XdmfDomainRemoveGridCollection(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeGridCollection(index);
}

void XdmfDomainRemoveGridCollectionByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeGridCollection(Name);
}

XDMFGRAPH * XdmfDomainGetGraph(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFGRAPH *)((void *)(domainPointer->getGraph(index).get()));
}

XDMFGRAPH * XdmfDomainGetGraphByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFGRAPH *)((void *)(domainPointer->getGraph(Name).get()));
}

unsigned int XdmfDomainGetNumberGraphs(XDMFDOMAIN * domain)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return domainPointer->getNumberGraphs();
}

void XdmfDomainInsertGraph(XDMFDOMAIN * domain, XDMFGRAPH * Graph, int passControl)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  if (passControl) {
    domainPointer->insert(shared_ptr<XdmfGraph>((XdmfGraph *)Graph));
  }
  else {
    domainPointer->insert(shared_ptr<XdmfGraph>((XdmfGraph *)Graph, XdmfNullDeleter()));
  }
}

void XdmfDomainRemoveGraph(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeGraph(index);
}

void XdmfDomainRemoveGraphByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeGraph(Name);
}

XDMFCURVILINEARGRID * XdmfDomainGetCurvilinearGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFCURVILINEARGRID *)((void *)((XdmfItem *)(domainPointer->getCurvilinearGrid(index).get())));
}

XDMFCURVILINEARGRID * XdmfDomainGetCurvilinearGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFCURVILINEARGRID *)((void *)((XdmfItem *)(domainPointer->getCurvilinearGrid(Name).get())));
}

unsigned int XdmfDomainGetNumberCurvilinearGrids(XDMFDOMAIN * domain)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return domainPointer->getNumberCurvilinearGrids();
}

void XdmfDomainInsertCurvilinearGrid(XDMFDOMAIN * domain, XDMFCURVILINEARGRID * CurvilinearGrid, int passControl)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  if (passControl) {
    domainPointer->insert(shared_ptr<XdmfCurvilinearGrid>((XdmfCurvilinearGrid *)CurvilinearGrid));
  }
  else {
    domainPointer->insert(shared_ptr<XdmfCurvilinearGrid>((XdmfCurvilinearGrid *)CurvilinearGrid, XdmfNullDeleter()));
  }
}

void XdmfDomainRemoveCurvilinearGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeCurvilinearGrid(index);
}

void XdmfDomainRemoveCurvilinearGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeCurvilinearGrid(Name);
}

XDMFRECTILINEARGRID * XdmfDomainGetRectilinearGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFRECTILINEARGRID *)((void *)((XdmfItem *)(domainPointer->getRectilinearGrid(index).get())));
}

XDMFRECTILINEARGRID * XdmfDomainGetRectilinearGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFRECTILINEARGRID *)((void *)((XdmfItem *)(domainPointer->getRectilinearGrid(Name).get())));
}

unsigned int XdmfDomainGetNumberRectilinearGrids(XDMFDOMAIN * domain)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return domainPointer->getNumberRectilinearGrids();
}

void XdmfDomainInsertRectilinearGrid(XDMFDOMAIN * domain, XDMFRECTILINEARGRID * RectilinearGrid, int passControl)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  if (passControl) {
    domainPointer->insert(shared_ptr<XdmfRectilinearGrid>((XdmfRectilinearGrid *)RectilinearGrid));
  }
  else {
    domainPointer->insert(shared_ptr<XdmfRectilinearGrid>((XdmfRectilinearGrid *)RectilinearGrid, XdmfNullDeleter()));
  }
}

void XdmfDomainRemoveRectilinearGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeRectilinearGrid(index);
}

void XdmfDomainRemoveRectilinearGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeRectilinearGrid(Name);
}

XDMFREGULARGRID * XdmfDomainGetRegularGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFREGULARGRID *)((void *)((XdmfItem *)(domainPointer->getRegularGrid(index).get())));
}

XDMFREGULARGRID * XdmfDomainGetRegularGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFREGULARGRID *)((void *)((XdmfItem *)(domainPointer->getRegularGrid(Name).get())));
}

unsigned int XdmfDomainGetNumberRegularGrids(XDMFDOMAIN * domain)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return domainPointer->getNumberRegularGrids();
}

void XdmfDomainInsertRegularGrid(XDMFDOMAIN * domain, XDMFREGULARGRID * RegularGrid, int passControl)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  if (passControl) {
    domainPointer->insert(shared_ptr<XdmfRegularGrid>((XdmfRegularGrid *)RegularGrid));
  }
  else {
    domainPointer->insert(shared_ptr<XdmfRegularGrid>((XdmfRegularGrid *)RegularGrid, XdmfNullDeleter()));
  }
}

void XdmfDomainRemoveRegularGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeRegularGrid(index);
}

void XdmfDomainRemoveRegularGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeRegularGrid(Name);
}

XDMFUNSTRUCTUREDGRID * XdmfDomainGetUnstructuredGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFUNSTRUCTUREDGRID *)((void *)((XdmfItem *)(domainPointer->getUnstructuredGrid(index).get())));
}

XDMFUNSTRUCTUREDGRID * XdmfDomainGetUnstructuredGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return (XDMFUNSTRUCTUREDGRID *)((void *)((XdmfItem *)(domainPointer->getUnstructuredGrid(Name).get())));
}

unsigned int XdmfDomainGetNumberUnstructuredGrids(XDMFDOMAIN * domain)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  return domainPointer->getNumberUnstructuredGrids();
}

void XdmfDomainInsertUnstructuredGrid(XDMFDOMAIN * domain, XDMFUNSTRUCTUREDGRID * UnstructuredGrid, int passControl)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  if (passControl) {
    domainPointer->insert(shared_ptr<XdmfUnstructuredGrid>((XdmfUnstructuredGrid *)UnstructuredGrid));
  }
  else {
    domainPointer->insert(shared_ptr<XdmfUnstructuredGrid>((XdmfUnstructuredGrid *)UnstructuredGrid, XdmfNullDeleter()));
  }
}

void XdmfDomainRemoveUnstructuredGrid(XDMFDOMAIN * domain, unsigned int index)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeUnstructuredGrid(index);
}

void XdmfDomainRemoveUnstructuredGridByName(XDMFDOMAIN * domain, char * Name)
{
  XdmfItem * classedPointer = (XdmfItem *)domain;
  XdmfDomain * domainPointer = dynamic_cast<XdmfDomain *>(classedPointer);
  domainPointer->removeUnstructuredGrid(Name);
}

XDMF_ITEM_C_CHILD_WRAPPER(XdmfDomain, XDMFDOMAIN)