TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
EcritureLectureSpecial.h
1/****************************************************************************
2* Copyright (c) 2023, 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 EcritureLectureSpecial_included
17#define EcritureLectureSpecial_included
18
19#include <TRUSTTabs_forward.h>
20#include <Interprete.h>
21#include <Motcle.h>
22
23/*! @brief @brief class EcritureLetureSpecial Static class that enables a special save and/or read:
24 *
25 * a single binary file containing positions + values,
26 * allowing a restart with a different number of processors.
27 *
28 * @sa If the format is activated (for reading or writing) on one problem, it must be activated on all.
29 */
30
31class Sortie;
32class Entree;
33class Domaine_VF;
34class Champ_base;
35
37{
38 Declare_instanciable(EcritureLectureSpecial);
39public:
40 Entree& interpreter(Entree& fich) override;
41 static void lecture_special(Champ_base& ch, Entree& fich);
42 static void lecture_special(const Domaine_VF& zvf, Entree& fich, DoubleTab& val);
43 static int ecriture_special(const Champ_base& ch, Sortie& fich);
44 static int ecriture_special(const Domaine_VF& zvf, Sortie& fich, const DoubleTab& val);
45
46 static int is_lecture_special();
47 static int is_ecriture_special(int& special,int& a_faire);
48
49 static int Active;
50 static int mode_ecr;
51 static int mode_lec;
52 static Nom Input;
53 static Nom Output;
54 static Nom& get_Output();
55};
56
57#endif
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Domaine_VF
Definition Domaine_VF.h:44
static Nom & get_Output()
Returns the write mode in use (so it can be modified).
static int is_ecriture_special(int &special, int &a_faire)
Indicates whether the special format was requested in active writing by xyz save.
static int is_lecture_special()
Indicates whether the special format was requested in active reading by xyz restart.
Entree & interpreter(Entree &fich) override
static int ecriture_special(const Champ_base &ch, Sortie &fich)
Simple call to EcritureLectureSpecial::ecriture_special (const Domaine_VF& zvf,Sortie& fich,...
static void lecture_special(Champ_base &ch, Entree &fich)
Simple call to EcritureLectureSpecial::lecture_special (const Domaine_VF& zvf,Entree& fich,...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Base class for "interpreter" objects.
Definition Interprete.h:38
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
Base class for output streams.
Definition Sortie.h:52