TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Interprete_geometrique_base.h
1/****************************************************************************
2* Copyright (c) 2024, 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 Interprete_geometrique_base_included
17#define Interprete_geometrique_base_included
18
19#include <TRUST_List.h>
20#include <Interprete.h>
21#include <TRUST_Ref.h>
22#include <Domaine.h>
23#ifdef MICROSOFT
24// needed for Visual Studio
25#include <Octree.h>
26#endif
27
28#include <Domaine_forward.h>
29
30/*! @brief Class Interprete_geometrique_base.
31 *
32 * @sa Abstract class from which geometric interpreters that modify one or more domains must derive. A reference is made to each domain. The invalidation of the octree after modification
33 * of the domain (by interpreter_(is)) is factored into the interpreter() method. Abstract methods: int nombre_d_operateurs() const
34 */
35template <typename _SIZE_>
37{
38 Declare_base_32_64(Interprete_geometrique_base_32_64);
39
40public :
41 using int_t = _SIZE_;
43
44 Entree& interpreter(Entree& is) override;
45 void associer_domaine(Nom& nom_dom);
48 inline Domaine_t& domaine(int i=0) { return domains_(i).valeur(); }
49 inline const Domaine_t& domaine(int i=0) const { return domains_(i).valeur(); }
50 inline LIST(OBS_PTR(Domaine_t))& domaines() { return domains_; }
51 void mettre_a_jour_sous_domaine(Domaine_t& domaine, int_t& elem, int_t num_premier_elem, int_t nb_elem) const;
52
53protected :
54 virtual Entree& interpreter_(Entree& is)=0;
55
56 LIST(OBS_PTR(Domaine_t)) domains_; // List of reference to domains
57};
58
59using Interprete_geometrique_base = Interprete_geometrique_base_32_64<int>;
60using Interprete_geometrique_base_64 = Interprete_geometrique_base_32_64<trustIdType>;
61
62#endif
63
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
Definition Domaine.h:62
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Class Interprete_geometrique_base.
void mettre_a_jour_sous_domaine(Domaine_t &domaine, int_t &elem, int_t num_premier_elem, int_t nb_elem) const
Adds the new elements into the sub-domains.
virtual Entree & interpreter_(Entree &is)=0
const Domaine_t & domaine(int i=0) const
LIST(OBS_PTR(Domaine_t)) domains_
Base class for "interpreter" objects.
Definition Interprete.h:38
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31