// ============================================================================ // == == // == AMDiS - Adaptive multidimensional simulations == // == == // == http://www.amdis-fem.org == // == == // ============================================================================ // // Software License for AMDiS // // Copyright (c) 2010 Dresden University of Technology // All rights reserved. // Authors: Simon Vey, Thomas Witkowski et al. // // This file is part of AMDiS // // See also license.opensource.txt in the distribution. /** \file ZoltanPartitioner.h */ #ifndef AMDIS_ZOLTAN_PARTITIONER_H #define AMDIS_ZOLTAN_PARTITIONER_H #include #include #include "AMDiS_fwd.h" #include "parallel/MeshPartitioner.h" namespace AMDiS { using namespace std; class ZoltanPartitioner : public MeshPartitioner { public: ZoltanPartitioner(MPI::Intracomm *comm); ~ZoltanPartitioner() {} /// \ref MeshPartitioner::partition bool partition(map &elemWeights, PartitionMode mode = INITIAL); /// \ref MeshPartitioner::getPartitionMap void getPartitionMap(map &partitionMap); protected: Zoltan zoltan; }; class ZoltanFunctions { public: static int getNumObj(void *data, int *ierr); static void getObjectList(void *data, int sizeGid, int sizeLid, ZOLTAN_ID_PTR globalId, ZOLTAN_ID_PTR localId, int wgt_dim, float *obj_wgts, int *ierr); static int getNumGeom(void *data, int *ierr); static void getGeomMulti(void *data, int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int num_dim, double *geom_vec, int *ierr); }; } #endif