81 const std::string& full_fname = full_file_name.
getString();
82 std::size_t relative_path = full_fname.find_last_of(
"/");
83 std::string path = relative_path != std::string::npos ? full_fname.substr(0, relative_path + 1) :
"";
84 std::string fname = relative_path != std::string::npos ? full_fname.substr(relative_path + 1) : full_fname;
85 std::size_t with_ext = fname.find(
".");
86 std::string basename = with_ext != std::string::npos ? fname.substr(0, with_ext) : fname;
87 std::string extension = with_ext != std::string::npos ? fname.substr(with_ext) :
"";
90 new_pb.filename = path + basename + nodeIndex + extension;
91 new_pb.configFilename_ = path + basename +
"_config" + extension;
92 pbs_.push_back(new_pb);
101 void begin_bloc(
const std::string& line, std::string& text)
103 add_line(line, text);
107 void end_bloc() { indent_ -= 2; }
109 void add_line(
const std::string& line, std::string& text)
112 for(
int i=0; i<indent_; i++)
123 void write_checkpoint_restart_file(
bool save,
const std::string& yaml_fname);
124 void declare_metadata(
bool save, std::string& text);
125 void declare_data(
bool save, std::string& text);
126 void write_time_scheme(
bool save,
const std::string& fname, std::string& text);
127 void write_config_file(
bool save,
int pb_i, std::string& text);
128 void write_partition(
bool save,
int pb_i, std::string& text);
133 void write_data_for_checkpoint(
int pb_i,
bool is_parallel, std::string& text);
134 void write_file_initialization(
int pb_i, std::string& text);
135 void write_fields_types_for_checkpoint(
int pb_i, std::string& text);
136 void write_config_file_initialization(
int pb_i, std::string& text);
137 void write_format_for_checkpoint(
const std::string& fname, std::string& text);
142 void write_data_for_restart(
int pb_i, std::string& text);
143 void write_fields_types_for_restart(
int pb_i, std::string& text);
148 void declare_scalar(
const std::string& name,
const std::string& type, std::string& text);
149 void declare_array(
const std::string& name,
const std::string& type,
const std::string& size, std::string& text);
150 void declare_dtab(
const std::string& dname,
const std::string& name,
const std::string& type,
int nb_dim, std::string& text);
151 void declare_TRUST_dataset(
const std::string& dname,
const std::string& name,
const std::string& type,
int nb_dim,
bool is_parallel, std::string& text);
152 void write_impl_dataset(
const std::string& dname,
const std::string& fname, std::string& text);
153 void write_impl_dataset(
const std::string& dname,
const std::string& fname,
const std::vector<std::string>& attribute, std::string& text);
154 void write_TRUST_dataset(
const std::string& dname,
const std::string& name,
int nb_dim,
const std::string& cond,
bool is_parallel,
const std::vector<std::string>& attribute, std::string& text);
155 void write_TRUST_dataset_selection(
const std::string& name,
int nb_dim,
bool is_parallel, std::string& text);
156 void write_dataset_selection(
const std::vector<std::string>& sizes,
const std::vector<std::string>& offsets,std::string& text);
157 void write_attributes(
const std::vector<std::string>& attributes, std::string& text);
164 OBS_PTR(Probleme_base) pb;
165 std::vector<YAML_data> data;
166 std::string filename;
167 std::string configFilename_;
175 std::vector<Pb2Save> pbs_;