From 3b62d032e65f14410743594d4402557478a00aaa Mon Sep 17 00:00:00 2001 From: benoit128 Date: Wed, 17 Jul 2024 08:18:56 +0200 Subject: [PATCH 1/2] docs: update developers doc --- docs/developers/Git/GitShortcuts.md | 6 ++--- docs/developers/Git/cloning-cassiopee.md | 12 ++++++++-- docs/developers/guide4devs.md | 28 +++++++++++++----------- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/docs/developers/Git/GitShortcuts.md b/docs/developers/Git/GitShortcuts.md index a446f027c..f5f17da40 100644 --- a/docs/developers/Git/GitShortcuts.md +++ b/docs/developers/Git/GitShortcuts.md @@ -1,4 +1,4 @@ -# -- Useful git shortcuts -- +# Useful git shortcuts ## Detailed & compact display of git log with graph ```shell @@ -34,8 +34,8 @@ e.g. 1) gitgrep var2 2) gitgrep var 2 Converter ```shell -#first argument: variable names -#second argument: local path to directory +# first argument: variable names +# second argument: local path to directory gitgrep () { if [ "$#" -lt 2 ] then diff --git a/docs/developers/Git/cloning-cassiopee.md b/docs/developers/Git/cloning-cassiopee.md index ddb194cb3..c732e7b6c 100644 --- a/docs/developers/Git/cloning-cassiopee.md +++ b/docs/developers/Git/cloning-cassiopee.md @@ -1,4 +1,4 @@ -# Cloning Cassiopee on Linux +# Cloning Cassiopee ## Add an SSH key to your Github account @@ -28,7 +28,15 @@ git config --global user.name git config --global user.email ``` -5. Clone Cassiopee +## Cloning/forking Cassiopee + +If you consider developping and propose pull request, please fork the repository: on the github page, click on "Fork" and "Create new fork". +Then: +```sh +git clone git@github.com:/Cassiopee.git +``` +else, tou can directly clone the main repository: + ```sh git clone git@github.com:onera/Cassiopee.git ``` diff --git a/docs/developers/guide4devs.md b/docs/developers/guide4devs.md index 31c0b6847..8e0f374b8 100644 --- a/docs/developers/guide4devs.md +++ b/docs/developers/guide4devs.md @@ -1,8 +1,8 @@ -For developers : -================ +For developers: +=============== -Editor : --------- +Editor: +------- - indent with spaces (2 or 4 depending on file complexity). Dont use tabs. - use utf8/lf encoding - respect typo for commas: t1, t2, a3. @@ -17,14 +17,16 @@ Python Functions: - internal functions ends with __ - function must have a copyRef counter part that calls in place function - no IO in function (must work on input t and return t or a copy of t) +- try to unify argument names with existing functions +- complexifying an existing function, adding argument or modifying argument sense must be discussed - check that function performs correctly on FlowSolutionNodes, FlowSolution#Centers, ZoneBC and ZoneGridConnectivity - if the function is fully operational, write doc - always pass full global validCassiopee before commit -Tests : -------- +Tests: +------ - no snake in test file name. - first line of test shoud be # - functionName (pyTree) - - seq tests finishes by _t1, _t2. @@ -32,12 +34,12 @@ Tests : - in tests, dont use input files, create the test case in the script. - a test must run in less than 10 seconds (ideally 1 sec). -OpenMP : --------- +OpenMP: +------- - when a computationaly intensive loops exist, if the treatment is independant, you must use omp for parallelisation. For example : -~~~ +```c #pragma omp parallel { E_Int localInt; @@ -50,17 +52,17 @@ omp for parallelisation. For example : /* ... */ } } -~~~ +``` - the pragma omp parallel creates threads and as a slight cost. - the pragma omp for only split the for loop into equal pieces -- for more complex creation, you can access the thread id like this : +- for more complex creation, you can access the thread id like this: -~~~ +```c #pragma omp parallel { E_Int ithread = __CURRENT_THREAD__; E_Int numThreads = __NUMTHREADS__; /* ... */ } -~~~ +``` \ No newline at end of file From ec8da34979186e40d6c48931e2d4277e7b6c2e13 Mon Sep 17 00:00:00 2001 From: imadhammani Date: Thu, 18 Jul 2024 12:17:15 +0200 Subject: [PATCH 2/2] XCore: AdaptMesh OK without MPI --- .../XCore/XCore/AdaptMesh/AdaptMesh_Adapt.cpp | 8 ++-- .../XCore/XCore/AdaptMesh/AdaptMesh_Init.cpp | 8 +++- .../XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp | 4 +- Cassiopee/XCore/XCore/AdaptMesh/Karray.h | 2 +- Cassiopee/XCore/XCore/AdaptMesh/Mesh.h | 18 +++++--- Cassiopee/XCore/XCore/AdaptMesh/MeshComm.cpp | 24 +--------- .../XCore/XCore/AdaptMesh/MeshConformize.cpp | 2 + .../XCore/AdaptMesh/MeshConnectivity.cpp | 13 +++--- Cassiopee/XCore/XCore/AdaptMesh/MeshInit.cpp | 8 ++-- .../XCore/XCore/AdaptMesh/MeshOrient.cpp | 2 +- .../XCore/XCore/AdaptMesh/MeshSmooth.cpp | 4 +- Cassiopee/XCore/XCore/AdaptMesh/Mpi.h | 24 ++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Pyra.h | 2 +- Cassiopee/XCore/XCore/AdaptMesh/Tetra.h | 2 +- Cassiopee/XCore/XCore/AdaptMesh/Tri.h | 3 +- .../XCore/XCore/intersectMesh/meshRefine.cpp | 2 +- .../removeIntersectingKPlanes.cpp | 2 +- Cassiopee/XCore/srcs.py | 45 +++++++++---------- 18 files changed, 93 insertions(+), 80 deletions(-) create mode 100644 Cassiopee/XCore/XCore/AdaptMesh/Mpi.h diff --git a/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Adapt.cpp b/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Adapt.cpp index 1ecaa25fd..3684f4232 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Adapt.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Adapt.cpp @@ -45,12 +45,14 @@ void cache_prerefinement_data(Mesh *M) static void print_postrefinement_data(Mesh *M) { - Int gnc = 0; + Int gnc = M->nc; MPI_Allreduce(&M->nc, &gnc, 1, XMPI_INT, MPI_SUM, MPI_COMM_WORLD); if (M->pid == 0) { printf(" Total cells after refinement: " SF_D_ "\n", gnc); } + if (M->npc == 1) return; + Float balanced = gnc / (Float) M->npc; Float my_imbalance = fabs((M->nc - balanced) / (Float)balanced * 100.0); Float max_imbalance; @@ -120,12 +122,8 @@ PyObject *K_XCORE::AdaptMesh_Adapt(PyObject *self, PyObject *args) if (M->pid == 0) puts(" Conformizing face edges..."); Mesh_conformize_face_edge(M); - - //if (M->pid == 0) puts(" Exporting CGNS array..."); - //PyObject *karray = Mesh_export_karray(M); if (M->pid == 0) puts(" Done."); return Py_None; - //return karray; } diff --git a/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Init.cpp b/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Init.cpp index 6d095801d..b1ac4add1 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Init.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_Init.cpp @@ -103,13 +103,17 @@ PyObject *K_XCORE::AdaptMesh_Init(PyObject *self, PyObject *args) M->bps[i].gid = PyLong_AsLong(PyList_GetItem(PATCH, 1)); +#if PY_VERSION_HEX >= 0x03000000 const char *bcname = PyUnicode_AsUTF8(PyList_GetItem(PATCH, 2)); + const char *bctype = PyUnicode_AsUTF8(PyList_GetItem(PATCH, 3)); +#else + const char *bcname = PyString_AsString(PyList_GetItem(PATCH, 2)); + const char *bctype = PyString_AsString(PyList_GetItem(PATCH, 3)); +#endif M->bps[i].name = (char *)XMALLOC(strlen(bcname)+1); strcpy(M->bps[i].name, bcname); - const char *bctype = PyUnicode_AsUTF8(PyList_GetItem(PATCH, 3)); - M->bps[i].type = (char *)XMALLOC(strlen(bctype)+1); strcpy(M->bps[i].type, bctype); diff --git a/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp b/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp index 6e9947428..6a5d900ec 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp @@ -34,6 +34,8 @@ PyObject *K_XCORE::AdaptMesh_LoadBalance(PyObject *self, PyObject *args) Mesh *M = (Mesh *)PyCapsule_GetPointer(MESH, "AdaptMesh"); + if (M->npc == 1) return Py_None; + // Make global cell-cell connectivity Mesh_make_cell_cells(M); @@ -45,7 +47,7 @@ PyObject *K_XCORE::AdaptMesh_LoadBalance(PyObject *self, PyObject *args) return NULL; } - if (M->pid == 0) puts("OK LoadBalance"); + if (M->pid == 0) puts("OK LoadBalance."); return Py_None; } diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Karray.h b/Cassiopee/XCore/XCore/AdaptMesh/Karray.h index 84f454efb..5e5b0e2af 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Karray.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Karray.h @@ -19,7 +19,7 @@ #pragma once #include "xcore.h" -#include "../common/common.h" +#include "common/common.h" struct Karray { // Reference to the python array diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Mesh.h b/Cassiopee/XCore/XCore/AdaptMesh/Mesh.h index 3eab9c8ca..0f4845ad1 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Mesh.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Mesh.h @@ -18,12 +18,12 @@ */ #pragma once -#include +#include "Mpi.h" #include #include #include "xcore.h" -#include "../common/common.h" +#include "common/common.h" #define HEXA 0 #define TETRA 1 @@ -152,9 +152,9 @@ struct Mesh { /* Parallel */ - Int pid; - Int npc; - Int nrq; + int pid; + int npc; + int nrq; MPI_Request *reqs; Int *l2gc; @@ -331,11 +331,15 @@ PyObject *Mesh_export_karray(Mesh *M, int conformize); /* Parallel */ -void Mesh_comm_waitall(Mesh *M); +inline +void Mesh_comm_waitall(Mesh *M) +{ + MPI_Waitall(M->nrq, M->reqs, MPI_STATUSES_IGNORE); + M->nrq = 0; +} Int Mesh_load_balance(Mesh *M); - /* Adaptation */ Int Mesh_smooth_cref(Mesh *M); diff --git a/Cassiopee/XCore/XCore/AdaptMesh/MeshComm.cpp b/Cassiopee/XCore/XCore/AdaptMesh/MeshComm.cpp index 615a5c370..225ed338d 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/MeshComm.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/MeshComm.cpp @@ -20,8 +20,8 @@ #include #include "Mesh.h" +#include "common/mem.h" #include "scotch/ptscotch.h" -#include "../common/mem.h" #define TOL 1e-12 @@ -94,20 +94,6 @@ Int *compute_cell_weights(Mesh *M) cwgts[i] = ((weights[i]/min_weight - 1)*range_scale) + 1; } - /* - for (Int i = 0; i < M->nc; i++) { - Int cval = M->cref[i]; - - cwgts[i] = 1; - if (cval > 0) cwgts[i] += gnc; - - //if (cval == 0) cwgts[i] = 1; - //else cwgts[i] = 8 + 8*20; - - //cwgts[i] = 1 + ((1 << (3*cval)) - 1); - } - */ - return cwgts; } @@ -1546,10 +1532,4 @@ Int Mesh_load_balance(Mesh *M) MPI_Allreduce(&M->nf, &gnf, 1, XMPI_INT, MPI_SUM, MPI_COMM_WORLD); return gret; -} - -void Mesh_comm_waitall(Mesh *M) -{ - MPI_Waitall(M->nrq, M->reqs, MPI_STATUSES_IGNORE); - M->nrq = 0; -} +} \ No newline at end of file diff --git a/Cassiopee/XCore/XCore/AdaptMesh/MeshConformize.cpp b/Cassiopee/XCore/XCore/AdaptMesh/MeshConformize.cpp index 30cf3bbf2..7dcbaebd3 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/MeshConformize.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/MeshConformize.cpp @@ -70,6 +70,8 @@ void Mesh_conformize_face_edge(Mesh *M) } } + if (M->npc == 1) return; + // Exchange franges at the interface for (Int i = 0; i < M->npp; i++) { diff --git a/Cassiopee/XCore/XCore/AdaptMesh/MeshConnectivity.cpp b/Cassiopee/XCore/XCore/AdaptMesh/MeshConnectivity.cpp index 288fdc2b4..5ec308bd1 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/MeshConnectivity.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/MeshConnectivity.cpp @@ -168,12 +168,13 @@ void Mesh_make_edge_connectivity(Mesh *M) } } - void Mesh_update_global_cell_ids(Mesh *M) { + if (M->npc == 1) return; + Int new_cells = M->nc - M->nc_old; - Int first_new_cell = 0; + Int first_new_cell = new_cells; MPI_Scan(&new_cells, &first_new_cell, 1, XMPI_INT, MPI_SUM, MPI_COMM_WORLD); Int gnc_old = 0; @@ -196,8 +197,6 @@ void Mesh_update_global_cell_ids(Mesh *M) M->g2lc[gcid] = lcid; } } - - //MPI_Barrier(MPI_COMM_WORLD); } void Mesh_update_ppatches(Mesh *M) @@ -365,6 +364,8 @@ void Mesh_update_bpatches(Mesh *M) void Mesh_update_global_face_ids(Mesh *M) { + if (M->npc == 1) return; + M->l2gf = (Int *)XRESIZE(M->l2gf, M->nf * sizeof(Int)); for (Int i = M->nf_old; i < M->nf; i++) M->l2gf[i] = -1; @@ -377,10 +378,10 @@ void Mesh_update_global_face_ids(Mesh *M) Int ndup = M->nf - nfree; - Int gnfree; + Int gnfree = nfree; MPI_Allreduce(&nfree, &gnfree, 1, XMPI_INT, MPI_SUM, MPI_COMM_WORLD); - Int gndup; + Int gndup = ndup; MPI_Allreduce(&ndup, &gndup, 1, XMPI_INT, MPI_SUM, MPI_COMM_WORLD); gndup /= 2; diff --git a/Cassiopee/XCore/XCore/AdaptMesh/MeshInit.cpp b/Cassiopee/XCore/XCore/AdaptMesh/MeshInit.cpp index 526e143d8..ef1dd4bde 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/MeshInit.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/MeshInit.cpp @@ -68,10 +68,10 @@ Mesh::Mesh() nf_old = 0; /* Parallel */ - int pid_; int npc_; - MPI_Comm_rank(MPI_COMM_WORLD, &pid_); - MPI_Comm_size(MPI_COMM_WORLD, &npc_); - pid = E_Int(pid_); npc = E_Int(npc_); + pid = 0; + npc = 1; + MPI_Comm_rank(MPI_COMM_WORLD, &pid); + MPI_Comm_size(MPI_COMM_WORLD, &npc); nrq = 0; reqs = (MPI_Request *)XMALLOC(2 * npc * sizeof(MPI_Request)); diff --git a/Cassiopee/XCore/XCore/AdaptMesh/MeshOrient.cpp b/Cassiopee/XCore/XCore/AdaptMesh/MeshOrient.cpp index a3b3bcb10..2b1afe5df 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/MeshOrient.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/MeshOrient.cpp @@ -21,7 +21,7 @@ #include #include "Mesh.h" -#include "../common/mem.h" +#include "common/mem.h" #include "Edge.h" #define INTERNAL 0 diff --git a/Cassiopee/XCore/XCore/AdaptMesh/MeshSmooth.cpp b/Cassiopee/XCore/XCore/AdaptMesh/MeshSmooth.cpp index 761a75785..e09efb83b 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/MeshSmooth.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/MeshSmooth.cpp @@ -19,7 +19,7 @@ #include #include "Mesh.h" -#include "../common/mem.h" +#include "common/mem.h" inline Int Mesh_get_cnei(Mesh *M, Int cid, Int fid) @@ -125,7 +125,7 @@ Int Mesh_smooth_cref(Mesh *M) } } - Int gstop; + Int gstop = 0; MPI_Allreduce(&lstop, &gstop, 1, XMPI_INT, MPI_SUM, MPI_COMM_WORLD); if (gstop == 0) break; diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Mpi.h b/Cassiopee/XCore/XCore/AdaptMesh/Mpi.h new file mode 100644 index 000000000..9dfc0bb72 --- /dev/null +++ b/Cassiopee/XCore/XCore/AdaptMesh/Mpi.h @@ -0,0 +1,24 @@ +#pragma once + +#ifdef _MPI + +#include + +#else + +#define MPI_Comm_rank(a, b) +#define MPI_Comm_size(a, b) + +#define MPI_Request char + +#define MPI_Isend(a, b, c, d, e, f, g) +#define MPI_Irecv(a, b, c, d, e, f, g) +#define MPI_Waitall(a) + +#define MPI_Barrier(a) +#define MPI_Allreduce(a, b, c, d, e, f) +#define MPI_Waitall(a, b, c) + +#define MPI_Scan(a, b, c, d, e, f) + +#endif \ No newline at end of file diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h b/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h index e672790ac..c614f899c 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h @@ -1,6 +1,6 @@ #pragma once -#include "../common/common.h" +#include "common/common.h" extern const Int normalIn_Py[5]; diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h b/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h index 9e3d5be08..20ecae52a 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h @@ -1,6 +1,6 @@ #pragma once -#include "../common/common.h" +#include "common/common.h" extern const Int normalIn_T[4]; diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Tri.h b/Cassiopee/XCore/XCore/AdaptMesh/Tri.h index 8848883e9..165f986e7 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Tri.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Tri.h @@ -1,7 +1,6 @@ #pragma once -#include "../common/common.h" - +#include "common/common.h" #include "Mesh.h" void refine_tri(Int tri, Mesh *M); diff --git a/Cassiopee/XCore/XCore/intersectMesh/meshRefine.cpp b/Cassiopee/XCore/XCore/intersectMesh/meshRefine.cpp index 76b4e0c78..d29c12b13 100644 --- a/Cassiopee/XCore/XCore/intersectMesh/meshRefine.cpp +++ b/Cassiopee/XCore/XCore/intersectMesh/meshRefine.cpp @@ -19,7 +19,7 @@ #include #include "mesh.h" -#include "../common/common.h" +#include "common/common.h" int meshes_mutual_refinement(IMesh &M, IMesh &S) { diff --git a/Cassiopee/XCore/XCore/intersectMesh/removeIntersectingKPlanes.cpp b/Cassiopee/XCore/XCore/intersectMesh/removeIntersectingKPlanes.cpp index 80762f89b..c7e1d87bb 100644 --- a/Cassiopee/XCore/XCore/intersectMesh/removeIntersectingKPlanes.cpp +++ b/Cassiopee/XCore/XCore/intersectMesh/removeIntersectingKPlanes.cpp @@ -19,7 +19,7 @@ #include #include "xcore.h" -#include "../common/common.h" +#include "common/common.h" #include "karray.h" #include "mesh.h" #include "ray.h" diff --git a/Cassiopee/XCore/srcs.py b/Cassiopee/XCore/srcs.py index 8e6a06db7..279fdc1a2 100644 --- a/Cassiopee/XCore/srcs.py +++ b/Cassiopee/XCore/srcs.py @@ -45,36 +45,27 @@ 'XCore/intersectMesh/triangle.cpp', 'XCore/intersectMesh/point.cpp', 'XCore/intersectMesh/ray.cpp', - 'XCore/intersectMesh/karray.cpp' - ] -if mpi: # source that requires mpi - cpp_srcs += [ - 'XCore/SplitElement/splitter.cpp', - 'XCore/exchangeFields.cpp', - 'XCore/chunk2partNGon.cpp', - 'XCore/chunk2partElt.cpp', + 'XCore/intersectMesh/karray.cpp', + 'XCore/AdaptMesh/AdaptMesh_Init.cpp', - 'XCore/AdaptMesh/AdaptMesh_Adapt.cpp', - 'XCore/AdaptMesh/AdaptMesh_AssignRefData.cpp', - 'XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp', 'XCore/AdaptMesh/AdaptMesh_ExtractMesh.cpp', + 'XCore/AdaptMesh/AdaptMesh_AssignRefData.cpp', + 'XCore/AdaptMesh/AdaptMesh_Adapt.cpp', - 'XCore/AdaptMesh/MeshClean.cpp', 'XCore/AdaptMesh/MeshInit.cpp', 'XCore/AdaptMesh/MeshOrient.cpp', - 'XCore/AdaptMesh/MeshIO.cpp', + 'XCore/AdaptMesh/MeshClean.cpp', 'XCore/AdaptMesh/MeshTopo.cpp', + 'XCore/AdaptMesh/MeshIO.cpp', + 'XCore/AdaptMesh/MeshSmooth.cpp', + 'XCore/AdaptMesh/MeshConnectivity.cpp', 'XCore/AdaptMesh/MeshConformize.cpp', - 'XCore/AdaptMesh/MeshSmooth.cpp', - 'XCore/AdaptMesh/MeshComm.cpp', 'XCore/AdaptMesh/MeshRefine.cpp', 'XCore/AdaptMesh/MeshIso.cpp', 'XCore/AdaptMesh/MeshDir.cpp', - - 'XCore/AdaptMesh/Karray.cpp', - + 'XCore/AdaptMesh/H27.cpp', 'XCore/AdaptMesh/H18.cpp', 'XCore/AdaptMesh/Tetra.cpp', @@ -86,7 +77,19 @@ 'XCore/AdaptMesh/Tri.cpp', - 'XCore/AdaptMesh/Edge.cpp' + 'XCore/AdaptMesh/Edge.cpp', + + 'XCore/AdaptMesh/Karray.cpp' + ] +if mpi: # source that requires mpi + cpp_srcs += [ + 'XCore/SplitElement/splitter.cpp', + 'XCore/exchangeFields.cpp', + 'XCore/chunk2partNGon.cpp', + 'XCore/chunk2partElt.cpp', + + 'XCore/AdaptMesh/AdaptMesh_LoadBalance.cpp', + 'XCore/AdaptMesh/MeshComm.cpp', ] else: cpp_srcs += [ @@ -94,9 +97,5 @@ 'XCore/exchangeFields_stub.cpp', 'XCore/chunk2partNGon_stub.cpp', 'XCore/chunk2partElt_stub.cpp', - 'XCore/AdaptMesh/stubs/AdaptMesh_Adapt_stub.cpp', - 'XCore/AdaptMesh/stubs/AdaptMesh_Init_stub.cpp', - 'XCore/AdaptMesh/stubs/AdaptMesh_ExtractMesh_stub.cpp', - 'XCore/AdaptMesh/stubs/AdaptMesh_AssignRefData_stub.cpp', 'XCore/AdaptMesh/stubs/AdaptMesh_LoadBalance_stub.cpp' ]