TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Partitionneur_Sous_Domaine.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
16#ifndef Partitionneur_Sous_Domaine_included
17#define Partitionneur_Sous_Domaine_included
18
19#include <Partitionneur_base.h>
20#include <TRUST_Ref.h>
21
22#include <Domaine_forward.h>
23
24
25/*! @brief Decoupeur permettant de decouper des sous-domaines (se recouvrant potentiellement) crees par Create_domain_from_sub_domain de maniere "conforme" : le sous-domaine est decoupe de maniere
26 *
27 * "conforme" avec le domaine complet.
28 *
29 * Utilisation:
30 * - creer un domaine global, et deux sous-domaines (qui se recouvrent partiellement) pour Domaine1 et Domaine2
31 * - decouper le domaine global et ecrire le fichier de decoupe
32 * - creer Domaine1 et Domaine2 par Create_domain_from_sub_domain
33 * - decouper D1 et D2 par Partitionneur sous_domaine en prenant pour source le decoupage du domaine global.
34 *
35 * Syntaxe:
36 * Decouper dom_N
37 * {
38 * partitionneur sous_domaine
39 * {
40 * fichier decoup/domaine_glob.txt
41 * fichier_ssz sous_domaine_dom_N.file
42 * OU
43 * nom_ssz sous_domaine
44 * }
45 * Nom_Domaines decoup/dom_N
46 * }
47 *
48 *
49 * @sa Partitionneur_Union Create_domain_from_sub_domain
50 */
51class Partitionneur_Sous_Domaine : public Partitionneur_base
52{
53 Declare_instanciable_with_param(Partitionneur_Sous_Domaine);
54
55protected:
56 void validate_params() const override;
57
58public:
59 void associer_domaine(const Domaine& dom) override { };
60 void construire_partition(IntVect& elem_part, int& nb_parts_tot) const override;
61
62protected:
63 // Parametres du partitionneur
64 Nom filename_ = ""; ///! Nom du fichier de decoupe globale
65 Nom filename_ssz_ = ""; ///! Nom du fichier de sous-domaines
66 Nom name_ssz_ = ""; ///! Nom du sous_domaine (declare dans le jdd)
67};
68#endif
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Decoupeur permettant de decouper des sous-domaines (se recouvrant potentiellement) crees par Create_d...
Nom name_ssz_
! Nom du fichier de sous-domaines
Nom filename_ssz_
! Nom du fichier de decoupe globale
void validate_params() const override
Called in the readOn of Objet_U_With_Params, after reading the params.
void construire_partition(IntVect &elem_part, int &nb_parts_tot) const override
Lit le contenu du fichier "filename_" et stocke le resultat dans elem_part.
void associer_domaine(const Domaine &dom) override