TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Domain_Graph.h
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15#ifndef Domain_Graph_included
16#define Domain_Graph_included
17
18#include <metis.h> // to have idx_t, the entity index of METIS (32 or 64b depending on how METIS/PETSc was compiled)
19
20#ifndef MPI_
21
22#ifdef idx_t
23#error Type idx_t is alreay defined without MPI, and hence without PETSc - this Should not happen
24#endif
25
26#define idx_t trustIdType
27#endif
28
29/*! @brief Build the graph of the domain that the METIS/PARMETIS/PTSCOTCH libraries need.
30 *
31 */
33{
34public:
35
37
38 template <typename _SIZE_>
40 bool use_weights );
41
42 template <typename _SIZE_>
44 bool use_weights,
45 Static_Int_Lists_32_64<_SIZE_>& graph_elements_perio);
46
47 //
48 // All members are public to facilitate access from Partitionneur_* classes (rather than friend-ing everything):
49 //
50
51 idx_t nvtxs; /* The number of vertices */
52 idx_t nedges; /* The total number of edges */
54 ArrOfIdx_ xadj; /* CRS storage scheme */
58 ArrOfIdx_ vtxdist; // for parmetis: distribution of the initial graph on the procs
59 ArrOfIdx_ edgegsttab; // for ptscotch: local numbering of vertices
60};
61
62#endif
Build the graph of the domain that the METIS/PARMETIS/PTSCOTCH libraries need.
ArrOfIdx_ vwgts
ArrOfIdx_ edgegsttab
void construire_graph_elem_elem(const Domaine_32_64< _SIZE_ > &dom, bool use_weights, Static_Int_Lists_32_64< _SIZE_ > &graph_elements_perio)
void construire_graph_from_segment(const Domaine_32_64< _SIZE_ > &dom, bool use_weights)
ArrOfIdx_ ewgts
ArrOfIdx_ adjncy
ArrOfIdx_ vtxdist
TRUSTArray< idx_t, idx_t > ArrOfIdx_
ArrOfIdx_ xadj
classe Domaine_32_64 un Domaine est un maillage compose d'un ensemble d'elements geometriques de meme...
Definition Domaine.h:62
Cette classe permet de stocker des listes d'entiers accessibles en temps constant.
Represents a an array of int/int64/double/... values.
Definition TRUSTArray.h:81