MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <cstdlib>
#include "moab/PartitionerBase.hpp"
#include "zoltan_cpp.h"
#include <ctime>
#include <vector>
Go to the source code of this file.
Classes | |
class | ZoltanPartitioner |
Namespaces | |
namespace | moab |
Class representing axis-aligned bounding box. | |
Functions | |
int | mbGetNumberOfAssignedObjects (void *userDefinedData, int *err) |
void | mbGetObjectList (void *userDefinedData, int numGlobalIds, int numLids, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int wgt_dim, float *obj_wgts, int *err) |
int | mbGetObjectSize (void *userDefinedData, int *err) |
void | mbGetObject (void *userDefinedData, int numGlobalIds, int numLids, int numObjs, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int numDim, double *pts, int *err) |
void | mbGetNumberOfEdges (void *userDefinedData, int numGlobalIds, int numLids, int numObjs, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int *numEdges, int *err) |
void | mbGetEdgeList (void *userDefinedData, int numGlobalIds, int numLids, int numObjs, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int *numEdges, ZOLTAN_ID_PTR nborGlobalIds, int *nborProcs, int wgt_dim, float *edge_wgts, int *err) |
void | mbGetPart (void *userDefinedData, int numGlobalIds, int numLids, int numObjs, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int *part, int *err) |
void | mbShowError (int val, const char *s, int me) |
void | mbPrintGlobalResult (const char *s, int begin, int import, int exp, int change) |
void mbGetEdgeList | ( | void * | userDefinedData, |
int | numGlobalIds, | ||
int | numLids, | ||
int | numObjs, | ||
ZOLTAN_ID_PTR | gids, | ||
ZOLTAN_ID_PTR | lids, | ||
int * | numEdges, | ||
ZOLTAN_ID_PTR | nborGlobalIds, | ||
int * | nborProcs, | ||
int | wgt_dim, | ||
float * | edge_wgts, | ||
int * | err | ||
) |
Definition at line 2204 of file ZoltanPartitioner.cpp.
References EdgeWeights, NborGlobalId, NborProcs, NumEdges, and NumPoints.
Referenced by ZoltanPartitioner::balance_mesh(), ZoltanPartitioner::partition_mesh_and_geometry(), ZoltanPartitioner::partition_owned_cells(), and ZoltanPartitioner::repartition().
{ int i, id, idSum, j; int next = 0; for( i = 0; i < numObjs; i++ ) { id = lids[i]; if( ( id < 0 ) || ( id >= NumPoints ) ) { *err = 1; return; } idSum = 0; for( j = 0; j < id; j++ ) idSum += NumEdges[j]; for( j = 0; j < NumEdges[id]; j++ ) { nborGlobalIds[next] = NborGlobalId[idSum]; nborProcs[next] = NborProcs[idSum]; if( wgt_dim > 0 ) edge_wgts[next] = EdgeWeights[idSum]; next++; idSum++; } } }
int mbGetNumberOfAssignedObjects | ( | void * | userDefinedData, |
int * | err | ||
) |
MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.
Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Zoltan: class to get a mesh from MOAB and write a Zoltan partition set for that mesh back into MOAB and to a file
Definition at line 2110 of file ZoltanPartitioner.cpp.
References NumPoints.
Referenced by ZoltanPartitioner::balance_mesh(), ZoltanPartitioner::partition_mesh_and_geometry(), ZoltanPartitioner::partition_owned_cells(), and ZoltanPartitioner::repartition().
{ *err = 0; return NumPoints; }
void mbGetNumberOfEdges | ( | void * | userDefinedData, |
int | numGlobalIds, | ||
int | numLids, | ||
int | numObjs, | ||
ZOLTAN_ID_PTR | gids, | ||
ZOLTAN_ID_PTR | lids, | ||
int * | numEdges, | ||
int * | err | ||
) |
Definition at line 2178 of file ZoltanPartitioner.cpp.
References NumEdges, and NumPoints.
Referenced by ZoltanPartitioner::balance_mesh(), ZoltanPartitioner::partition_mesh_and_geometry(), ZoltanPartitioner::partition_owned_cells(), and ZoltanPartitioner::repartition().
void mbGetObject | ( | void * | userDefinedData, |
int | numGlobalIds, | ||
int | numLids, | ||
int | numObjs, | ||
ZOLTAN_ID_PTR | gids, | ||
ZOLTAN_ID_PTR | lids, | ||
int | numDim, | ||
double * | pts, | ||
int * | err | ||
) |
Definition at line 2141 of file ZoltanPartitioner.cpp.
References NumPoints, and Points.
Referenced by ZoltanPartitioner::balance_mesh(), ZoltanPartitioner::partition_mesh_and_geometry(), ZoltanPartitioner::partition_owned_cells(), and ZoltanPartitioner::repartition().
void mbGetObjectList | ( | void * | userDefinedData, |
int | numGlobalIds, | ||
int | numLids, | ||
ZOLTAN_ID_PTR | gids, | ||
ZOLTAN_ID_PTR | lids, | ||
int | wgt_dim, | ||
float * | obj_wgts, | ||
int * | err | ||
) |
Definition at line 2116 of file ZoltanPartitioner.cpp.
References GlobalIds, NumPoints, and ObjWeights.
Referenced by ZoltanPartitioner::balance_mesh(), ZoltanPartitioner::partition_mesh_and_geometry(), ZoltanPartitioner::partition_owned_cells(), and ZoltanPartitioner::repartition().
{ for( int i = 0; i < NumPoints; i++ ) { gids[i] = GlobalIds[i]; lids[i] = i; if( wgt_dim > 0 ) obj_wgts[i] = ObjWeights[i]; } *err = 0; }
int mbGetObjectSize | ( | void * | userDefinedData, |
int * | err | ||
) |
Definition at line 2135 of file ZoltanPartitioner.cpp.
Referenced by ZoltanPartitioner::balance_mesh(), ZoltanPartitioner::partition_mesh_and_geometry(), ZoltanPartitioner::partition_owned_cells(), and ZoltanPartitioner::repartition().
{
*err = 0;
return 3;
}
void mbGetPart | ( | void * | userDefinedData, |
int | numGlobalIds, | ||
int | numLids, | ||
int | numObjs, | ||
ZOLTAN_ID_PTR | gids, | ||
ZOLTAN_ID_PTR | lids, | ||
int * | part, | ||
int * | err | ||
) |
Definition at line 2246 of file ZoltanPartitioner.cpp.
References NumPoints, and Parts.
Referenced by ZoltanPartitioner::partition_mesh_and_geometry().
void mbPrintGlobalResult | ( | const char * | s, |
int | begin, | ||
int | import, | ||
int | exp, | ||
int | change | ||
) |
void mbShowError | ( | int | val, |
const char * | s, | ||
int | me | ||
) |