87 ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
88 int wgt_dim,
float *obj_wgts,
int *ierr)
111 ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
112 int *numEdges,
int *ierr)
116 if ((sizeGID != 1) || (sizeLID != 1) || (num_obj != mesh.
nCells()))
118 *ierr = ZOLTAN_FATAL;
141 static void get_edge_list(
void *data,
int sizeGID,
int sizeLID,
142 int num_obj, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
144 ZOLTAN_ID_PTR nborGID,
int *nborProc,
145 int wgt_dim,
float *ewgts,
int *ierr)
153 || (num_obj != mesh.
nCells())
157 *ierr = ZOLTAN_FATAL;
161 ZOLTAN_ID_TYPE* nextNbor = nborGID;
162 int* nextProc = nborProc;
163 float* nextWgt = ewgts;
190 if (n != num_edges[i])
192 *ierr = ZOLTAN_FATAL;
215 ZOLTAN_ID_PTR global_ids,
216 ZOLTAN_ID_PTR local_ids,
226 (num_gid_entries != 1)
227 || (num_lid_entries != 1)
228 || (num_obj != mesh.
nCells())
232 *ierr = ZOLTAN_FATAL;
236 double*
p = geom_vec;
243 for (
Foam::label celli = 0; celli < num_obj; celli++)
261 Foam::zoltanRenumber::zoltanRenumber(
const dictionary& renumberDict)
264 coeffsDict_(renumberDict.optionalSubDict(typeName+
"Coeffs"))
277 args[0] =
"zoltanRenumber";
279 int argc = args.
size();
281 for (
label i = 0; i < argc; i++)
283 argv[i] = strdup(args[i].c_str());
287 int rc = Zoltan_Initialize(argc, argv, &ver);
297 struct Zoltan_Struct *zz = Zoltan_Create(MPI_COMM_WORLD);
304 if (!iter().isDict())
306 const word& key = iter().keyword();
307 const word value(iter().stream());
309 Info<< typeName <<
" : setting parameter " << key
310 <<
" to " << value <<
endl;
312 Zoltan_Set_Param(zz, key.c_str(), value.c_str());
337 wantedCells[i] = globalCells.toGlobal(i);
342 int err = Zoltan_Order
351 if (err != ZOLTAN_OK)
358 for (
label i = 0; i < argc; i++)
367 order[i] = oldToNew[i];
Template class for intrusive linked lists.
static int get_mesh_dim(void *data, int *ierr)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const labelList & faceNeighbour() const
Return face neighbour.
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void get_geom_list(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)
label nTotalCells() const
Return total number of cells in decomposed mesh.
const cellList & cells() const
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Macros for easy insertion into run-time selection tables.
Abstract base class for renumbering.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
static void get_edge_list(void *data, int sizeGID, int sizeLID, int num_obj, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID, int *num_edges, ZOLTAN_ID_PTR nborGID, int *nborProc, int wgt_dim, float *ewgts, int *ierr)
static const direction nComponents
Number of components in this vector space.
A class for handling words, derived from string.
virtual const labelList & faceOwner() const
Return face owner.
const globalMeshData & globalData() const
Return parallel info.
const vectorField & cellCentres() const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross product operators.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
static int get_number_of_vertices(void *data, int *ierr)
label nSolutionD() const
Return the number of valid solved-for dimensions in the mesh.
static void get_vertex_list(void *data, int sizeGID, int sizeLID, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID, int wgt_dim, float *obj_wgts, int *ierr)
A cell is defined as a list of faces with extra functionality.
prefixOSstream Pout(cout, "Pout")
Mesh consisting of general polyhedral cells.
Foam::argList args(argc, argv)
static void get_num_edges_list(void *data, int sizeGID, int sizeLID, int num_obj, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID, int *numEdges, int *ierr)