TrioCFD 1.9.9_beta
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 Partitioner allowing the splitting of sub-domains (potentially overlapping) created by Create_domain_from_sub_domain in a "conforming" manner: the sub-domain is split in a way
26 *
27 * that is "conforming" with the full domain.
28 *
29 * Usage:
30 * - create a global domain, and two sub-domains (which partially overlap) for Domaine1 and Domaine2
31 * - split the global domain and write the splitting file
32 * - create Domaine1 and Domaine2 via Create_domain_from_sub_domain
33 * - split D1 and D2 with Partitionneur sous_domaine, using the global domain splitting as the source.
34 *
35 * Syntax:
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 * OR
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 // Partitioner parameters
64 Nom filename_ = ""; ///! Name of the global splitting file
65 Nom filename_ssz_ = ""; ///! Name of the sub-domain file
66 Nom name_ssz_ = ""; ///! Name of the sub-domain (declared in the data file)
67};
68#endif
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Partitioner allowing the splitting of sub-domains (potentially overlapping) created by Create_domain_...
Nom name_ssz_
! Name of the sub-domain file
Nom filename_ssz_
! Name of the global splitting file
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
Reads the content of "filename_" and stores the result in elem_part.
void associer_domaine(const Domaine &dom) override