TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
ALE_CheckpointManager.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 ALE_CheckpointManager_included
16#define ALE_CheckpointManager_included
17
18#include <Sortie.h>
19#include <Entree.h>
20#include <TRUSTTab.h>
21#include <Noms.h>
22#include <YAML_data.h>
23#include <Champ_Inc_base.h>
24#include <vector>
25#include <string>
26
27class Probleme_base;
28class Domaine_ALE;
29
31{
32public:
33
35
36 int save (Sortie& os, const Probleme_base& pb, const Domaine_ALE& dom) const;
37
38 int restore(Entree& is, Probleme_base& pb, Domaine_ALE& dom);
39
40
41 std::vector<YAML_data> data_a_sauvegarder(const Probleme_base& pb,
42 const Domaine_ALE& dom) const;
43
44 Nom generate_field_tag(const Champ_Inc_base& champ, const Probleme_base& pb) const;
45
46 YAML_data make_yaml(const std::string& suffix, int nb_dim, const Probleme_base& pb) const;
47
48 void create_field(OWN_PTR(Champ_Inc_base)& champ, const std::string& name,
49 int nbComp, const Motcle& directive,
50 const Probleme_base& pb, Domaine_ALE& dom) const;
51
52private:
53
54 int write_pdi(const DoubleTab& d, const Nom& pdi_name) const;
55
56 void read_pdi(OWN_PTR(Champ_Inc_base)& champ, const std::string& suffix,
57 const Probleme_base& pb) const;
58};
59
60#endif /* ALE_CheckpointManager_included */
Nom generate_field_tag(const Champ_Inc_base &champ, const Probleme_base &pb) const
ALE_CheckpointManager()=default
int restore(Entree &is, Probleme_base &pb, Domaine_ALE &dom)
YAML_data make_yaml(const std::string &suffix, int nb_dim, const Probleme_base &pb) const
void create_field(OWN_PTR(Champ_Inc_base)&champ, const std::string &name, int nbComp, const Motcle &directive, const Probleme_base &pb, Domaine_ALE &dom) const
std::vector< YAML_data > data_a_sauvegarder(const Probleme_base &pb, const Domaine_ALE &dom) const
int save(Sortie &os, const Probleme_base &pb, const Domaine_ALE &dom) const
Class Champ_Inc_base.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
class Probleme_base It is a Probleme_U that is not a coupling.
Base class for output streams.
Definition Sortie.h:52
YAML_data class: collection of all needed information for data to save/restore in order to write the ...
Definition YAML_data.h:26