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
|
/*******************************************************************/
/* XDMF */
/* eXtensible Data Model and Format */
/* */
/* Id : $Id: XdmfPartitioner.h,v 1.1 2010-03-24 20:03:48 kwleiter Exp $ */
/* Date : $Date: 2010-03-24 20:03:48 $ */
/* Version : $Revision: 1.1 $ */
/* */
/* Author: */
/* Kenneth Leiter */
/* kenneth.leiter@arl.army.mil */
/* US Army Research Laboratory */
/* Aberdeen Proving Ground, MD */
/* */
/* Copyright @ 2010 US Army Research Laboratory */
/* All Rights Reserved */
/* See Copyright.txt or http://www.arl.hpc.mil/ice 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. */
/* */
/*******************************************************************/
#include "Xdmf.h"
/*!
* @brief XdmfPartitioner partitions an XdmfGrid into a number of XdmfGrids using the metis library. A pointer to an
* XdmfGrid spatial collection is returned containing the partitioned grids.
*/
class XdmfPartitioner
{
public:
/*!
* Constructor.
*/
XdmfPartitioner();
/*!
* Destructor.
*/
~XdmfPartitioner();
/*!
*
* Partitions an XdmfGrid into a number of partitions using the metis library. Currently supported topology types are:
*
* XDMF_TRI, XDMF_TRI_6, XDMF_QUAD, XDMF_QUAD_8, XDMF_TET, XDMF_TET_10, XDMF_HEX, XDMF_HEX_20, XDMF_HEX_24, XDMF_HEX_27
*
* The routine splits the XdmfGrid and also splits all attributes and sets into their proper partitions. An attribute named
* "GlobalNodeId" is added that serves to map child node ids to their global id for the entire spatial collection.
*
* @param grid a XdmfGrid* to partition
* @param numPartitions the number of partitions to split the grid into
* @param parentElement the parent XdmfElement* to insert the created spatial collection of partitioned grids.
*
* @return XdmfGrid* a spatial collection containing partitioned grids.
*/
XdmfGrid * Partition(XdmfGrid * grid, int numPartitions, XdmfElement * parentElement);
};
|