TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_Lata_writer.tpp
1/****************************************************************************
2 * Copyright (c) 2015 - 2016, 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 IJK_LATA_WRITER_H_TPP
16#define IJK_LATA_WRITER_H_TPP
17
18#include <Noms.h>
19#include <LataDB.h>
20#include <EcrFicPartageBin.h>
21#include <errno.h>
22#include <IJK_Striped_Writer.h>
23#include <Parallel_io_parameters.h>
24
25/*! When dumping the IJK coordinates, we do not need 64b, since only the x, y and z steps will be written.
26 * This never exceeds 32b.
27 */
28template<typename _TYPE_, typename _TYPE_ARRAY_>
29void dumplata_add_geometry(const char *filename, const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& f)
30{
32 {
33 const Domaine_IJK& splitting = f.get_domaine();
34 SFichier master_file;
35 Nom prefix = Nom(filename) + Nom(".");
36 SFichier binary_file;
37 binary_file.set_bin(1);
38 binary_file.set_64b(false);
39 ArrOfFloat tmp;
40 int n;
41
42 master_file.set_bin(0);
43 master_file.ouvrir(filename, ios::app);
44 Noms fname(3);
45 const Nom& geomname = splitting.le_nom();
46 if (geomname == "??")
47 {
48 Cerr << "Error in dumplata_header: geometry has no name" << finl;
50 }
51 for (int dir = 0; dir < 3; dir++)
52 {
53 fname[dir] = prefix + geomname + Nom(".coord") + Nom((char)('x'+dir));
54 int i;
55 binary_file.ouvrir(fname[dir]);
56 const ArrOfDouble& coord = splitting.get_node_coordinates(dir);
57 n = coord.size_array();
58 tmp.resize_array(n);
59 for (i = 0; i < n; i++)
60 tmp[i] = (float)coord[i]; // LATA in float ... pfff
61 binary_file.put(tmp.addr(), n, 1);
62 binary_file.close();
63 }
64 master_file << "Geom " << geomname << " type_elem=HEXAEDRE" << finl;
65 master_file << "Champ SOMMETS_IJK_I " << basename(fname[0]) << " geometrie=" << geomname;
66 master_file << " size=" << splitting.get_nb_elem_tot(0)+1 << " composantes=1" << finl;
67 master_file << "Champ SOMMETS_IJK_J " << basename(fname[1]) << " geometrie=" << geomname;
68 master_file << " size=" << splitting.get_nb_elem_tot(1)+1 << " composantes=1" << finl;
69 master_file << "Champ SOMMETS_IJK_K " << basename(fname[2]) << " geometrie=" << geomname;
70 master_file << " size=" << splitting.get_nb_elem_tot(2)+1 << " composantes=1" << finl;
71 master_file.close();
72 }
73}
74
75template<typename _TYPE_, typename _TYPE_ARRAY_>
76void dumplata_header(const char *filename, const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& f)
77{
78 dumplata_header(filename);
79 dumplata_add_geometry(filename, f);
80}
81
82template<typename _TYPE_, typename _TYPE_ARRAY_>
83void dumplata_vector(const char *filename, const char *fieldname,
85 int step)
86{
88 Nom prefix = Nom(filename) + Nom(".") + Nom(step) + Nom(".");
89 Nom fd = prefix + fieldname;
90 IJK_Striped_Writer striped_writer;
91 const Size_t n = striped_writer.write_data_template<float,_TYPE_,_TYPE_ARRAY_>(fd, vx, vy, vz); //ToDo// FLOAT HERE TOO ???
93 {
94 SFichier master_file;
95 master_file.ouvrir(filename, ios::app);
96 const Nom& geomname = vx.get_domaine().le_nom();
97
98 master_file << "Champ " << fieldname << " " << basename(fd) << " geometrie=" << geomname;
99#ifdef INT_is_64_
100 master_file << " file_offset=6";
101#endif
102 master_file << " size=" << n << " localisation=FACES" << " composantes=3" << " nature=vector" << finl;
103 }
105}
106
107template<typename _TYPE_, typename _TYPE_ARRAY_>
108void dumplata_vector_parallele_plan(const char *filename, const char *fieldname,
110 int step)
111{
112 //Process::barrier();
113 Nom prefix = Nom(filename) + Nom(".") + Nom(step) + Nom(".");
114 Nom fd_global = prefix + fieldname;
115 Nom fd = prefix + fieldname + Nom(".") + Nom(Process::me());
116 IJK_Striped_Writer striped_writer;
117 const Size_t n = striped_writer.write_data_parallele_plan_template<float,_TYPE_,_TYPE_ARRAY_>(fd, vx, vy, vz);
119 {
120 SFichier master_file;
121 master_file.ouvrir(filename, ios::app);
122 const Nom& geomname = vx.get_domaine().le_nom();
123
124 master_file << "Champ " << fieldname << " " << basename(fd_global) << " geometrie=" << geomname;
125#ifdef INT_is_64_
126 master_file << " file_offset=6";
127#endif
128 master_file << " size=" << n << " localisation=FACES" << " composantes=3" << " nature=vector" << finl;
129 }
130}
131
132template<typename _TYPE_>
133void dumplata_cellvector(const char *filename, const char *fieldname,
134 const IJK_Field_vector<_TYPE_, 3>& v, int step)
135{
136 dumplata_scalar(filename,Nom(fieldname)+Nom("_X"), v[0], step);
137 dumplata_scalar(filename,Nom(fieldname)+Nom("_Y"), v[1], step);
138 dumplata_scalar(filename,Nom(fieldname)+Nom("_Z"), v[2], step);
139}
140
141template<typename _TYPE_, typename _TYPE_ARRAY_>
142void dumplata_scalar(const char *filename, const char *fieldname,
144{
146 SFichier master_file;
147 Nom prefix = Nom(filename) + Nom(".") + Nom(step) + Nom(".");
148 Nom fd = prefix + fieldname;
149 IJK_Striped_Writer striped_writer;
150 const Size_t n = striped_writer.write_data_template<float,_TYPE_,_TYPE_ARRAY_>(fd, f);
152 {
153 master_file.ouvrir(filename, ios::app);
154 Nom loc;
156 loc = "ELEM";
157 else
158 loc = "SOM";
159 const Nom& geomname = f.get_domaine().le_nom();
160 master_file << "Champ " << fieldname << " " << basename(fd) << " geometrie=" << geomname;
161#ifdef INT_is_64_
162 master_file << " file_offset=6";
163#endif
164 master_file << " size=" << (int)n << " localisation=" << loc << " composantes=1" << finl;
165 }
167}
168
169template<typename _TYPE_, typename _TYPE_ARRAY_>
170void dumplata_scalar_parallele_plan(const char *filename, const char *fieldname,
172{
173 //Process::barrier();
174 SFichier master_file;
175 Nom prefix = Nom(filename) + Nom(".") + Nom(step) + Nom(".");
176 Nom fd_global = prefix + fieldname;
177 Nom fd = prefix + fieldname + Nom(".") + Nom(Process::me());
178 IJK_Striped_Writer striped_writer;
179 const Size_t n = striped_writer.write_data_parallele_plan_template<float,_TYPE_,_TYPE_ARRAY_>(fd, f);
181 {
182 master_file.ouvrir(filename, ios::app);
183 Nom loc;
185 loc = "ELEM";
186 else
187 loc = "SOM";
188 const Nom& geomname = f.get_domaine().le_nom();
189 master_file << "Champ " << fieldname << " " << basename(fd_global) << " geometrie=" << geomname;
190#ifdef INT_is_64_
191 master_file << " file_offset=6";
192#endif
193 master_file << " size=" << (int)n << " localisation=" << loc << " composantes=1" << finl;
194 }
195}
196
197// If vy and vz refer to the same object thant vx, consider that we are loading 1 component...
198// Strategy: try to read quite large chunks of contiguous data on disk.
199// Reading only local data would generate many small reads (block size is typically 64-128 values in i).
200// So we read several rows in i, then dispatch the row to the processors.
201template<typename _TYPE_, typename _TYPE_ARRAY_>
202void read_lata_parallel_template(const char *filename_with_path, int tstep, const char *geometryname, const char *fieldname,
203 const int i_compo,
205{
206 Cerr << "Reading lata field: file=" << filename_with_path
207 << " tstep=" << tstep
208 << " geom=" << geometryname
209 << " field=" << fieldname
210 << " component= " << i_compo << finl;
211 Process::barrier(); // to print message before crash
212 const Domaine_IJK& splitting = field.get_domaine();
213 const int offset_j = splitting.get_offset_local(DIRECTION_J);
214 const int offset_k = splitting.get_offset_local(DIRECTION_K);
215 const int ni_local = field.ni();
216 const int nj_local = field.nj();
217 const int nk_local = field.nk();
218 const int slice_i = splitting.get_local_slice_index(DIRECTION_I);
219 const int slice_j = splitting.get_local_slice_index(DIRECTION_J);
220 const int slice_k = splitting.get_local_slice_index(DIRECTION_K);
221 const int n_slices_i = splitting.get_nprocessor_per_direction(DIRECTION_I);
222 // Load data by batches of 32MB.
223 const int batch_size = (int)(Parallel_io_parameters::get_max_block_size() / sizeof(_TYPE_));
224
225 // If I have no data in the field, skip:
226 if (slice_i >= 0)
227 {
228 // Processors on slice i=0 open the lata file:
229 LataDB lata_db;
230 const LataDBField *db_field = 0;
231 // For each slice in i, number of field values:
232 ArrOfInt ni_per_slice(n_slices_i);
233 ArrOfInt slices_offsets_i;
234 splitting.get_slice_offsets(DIRECTION_I, slices_offsets_i);
235 // On processors that do not read data on disk, input_n?_tot will be -1:
236 int input_ni_tot = -1, input_nj_tot = -1, input_nk_tot = -1;
237 int number_of_j_per_batch = -1;
238 if (slice_i == 0)
239 {
240 Nom path, dbname;
241 split_path_filename(filename_with_path, path, dbname);
242 lata_db.read_master_file(path, filename_with_path);
243 const char * locstring;
244 if (field.get_localisation() == Domaine_IJK::ELEM)
245 locstring = "ELEM";
246 else if (field.get_localisation() == Domaine_IJK::NODES)
247 locstring = "SOM";
248 else
249 locstring = "FACES";
250 db_field = &lata_db.get_field(tstep, geometryname, fieldname, locstring);
251 input_ni_tot = (int)lata_db.get_field(tstep, geometryname, "SOMMETS_IJK_I", "", LataDB::FIRST_AND_CURRENT).size_;
252 input_nj_tot = (int)lata_db.get_field(tstep, geometryname, "SOMMETS_IJK_J", "", LataDB::FIRST_AND_CURRENT).size_;
253 input_nk_tot = (int)lata_db.get_field(tstep, geometryname, "SOMMETS_IJK_K", "", LataDB::FIRST_AND_CURRENT).size_;
254 if (input_ni_tot-1 != splitting.get_nb_elem_tot(DIRECTION_I)
255 || input_nj_tot-1 != splitting.get_nb_elem_tot(DIRECTION_J)
256 || input_nk_tot-1 != splitting.get_nb_elem_tot(DIRECTION_K))
257 {
258 Cerr << "Error: size mismatch. Current grid (number of elements): "
259 << splitting.get_nb_elem_tot(DIRECTION_I) << " "
260 << splitting.get_nb_elem_tot(DIRECTION_J) << " "
261 << splitting.get_nb_elem_tot(DIRECTION_K) << finl;
262 Cerr << "Grid in lata file: "
263 << input_ni_tot-1 << " " << input_nj_tot-1 << " " << input_nk_tot-1 << finl;
265 }
266 if (field.get_localisation() == Domaine_IJK::ELEM)
267 {
268 input_ni_tot--;
269 input_nj_tot--;
270 input_nk_tot--;
271 }
272 number_of_j_per_batch = batch_size / input_ni_tot;
273 if (number_of_j_per_batch < 1)
274 number_of_j_per_batch = 1;
275 ni_per_slice[0] = ni_local;
276 for (int islice = 1; islice < n_slices_i; islice++)
277 {
278 const int src_process = splitting.get_processor_by_ijk(islice, slice_j, slice_k);
279 recevoir(ni_per_slice[islice], src_process, 0 /* mpi channel */);
280 envoyer(number_of_j_per_batch, src_process, 0);
281 }
282 }
283 else
284 {
285 // Send my slice size to processor 0:
286 const int dest_process = splitting.get_processor_by_ijk(0, slice_j, slice_k);
287 envoyer(ni_local, dest_process, 0 /* mpi channel */);
288 recevoir(number_of_j_per_batch, dest_process, 0);
289 }
290
291 for (int k = 0; k < nk_local; k++)
292 {
293 const int global_k = offset_k + k;
294 for (int j = 0; j < nj_local; j += number_of_j_per_batch)
295 {
296 // How many rows shall we read ?
297 const int number_of_j_this_batch = std::min(nj_local - j, number_of_j_per_batch);
298 const int global_j = offset_j + j;
299 BigFloatTab tmp_read; // Buffer where reading processes put data
300 ArrOfDouble tmp_dispatch; // Buffer where other buffers receive their data
301 if (slice_i == 0)
302 {
303 // First processor in the row reads the data
304 const Size_t start = ((Size_t) global_k * input_nj_tot + global_j) * input_ni_tot;
305 const Size_t n = number_of_j_this_batch * input_ni_tot;
306 lata_db.read_data(*db_field, tmp_read, start, n);
307 if (tmp_read.dimension_int(1) <= i_compo)
308 {
309 Cerr << "Error in read_lata_parallel_template: requested component " << i_compo
310 << " but only " << tmp_read.dimension_int(1) << " components are available" << finl;
312 }
313 // Send some data to other processors:
314 // process in reverse order, so at the end tmp_dispatch has the data for the local slice:
315 for (int islice = n_slices_i - 1; islice >= 0; islice--)
316 {
317 const int ni_this_slice = ni_per_slice[islice];
318 // Select and copy data for this slice into tmp_dispatch
319 tmp_dispatch.resize_array(ni_this_slice * number_of_j_this_batch);
320 const int slice_offset_i = slices_offsets_i[islice];
321 for (int j2 = 0; j2 < number_of_j_this_batch; j2++)
322 {
323 for (int i = 0; i < ni_this_slice; i++)
324 {
325 int src_index = j2 * input_ni_tot + (slice_offset_i + i);
326 int dest_index = j2 * ni_this_slice + i;
327 tmp_dispatch[dest_index] = tmp_read(src_index, i_compo);
328 }
329 }
330 // Send tmp_dispatch to appropriate process
331 if (islice > 0)
332 {
333 const int dest_process = splitting.get_processor_by_ijk(islice, slice_j, slice_k);
334 envoyer(tmp_dispatch, dest_process, 0 /* mpi channel */);
335 }
336 }
337 }
338 const int src_process = splitting.get_processor_by_ijk(0, slice_j, slice_k);
339 // Receive tmp_dispatch if not already here:
340 if (slice_i > 0)
341 {
342 recevoir(tmp_dispatch, src_process, 0 /* mpi channel */);
343 }
344 // Extract data from tmp_dispatch and copy to destination field:
345 for (int j2 = 0; j2 < number_of_j_this_batch; j2++)
346 {
347 for (int i = 0; i < ni_local; i++)
348 {
349 int src_index = j2 * ni_local + i;
350 field(i, j2 + j, k) = tmp_dispatch[src_index];
351 }
352 }
353 }
354 }
355 }
356}
357
358template<typename _TYPE_, typename _TYPE_ARRAY_>
359void lire_dans_lata(const char *filename_with_path, int tstep, const char *geometryname, const char *fieldname,
361{
364 {
365 read_lata_parallel_template<_TYPE_,_TYPE_ARRAY_>(filename_with_path, tstep, geometryname, fieldname, 0 /* component */,
366 f);
368 return;
369 }
370
371
373 {
374 Cerr << "Error in lire_dans_lata(scalar field): provided field has unsupported localisation" << finl;
376 }
377 const int master = Process::je_suis_maitre();
378 // Collate data on processor 0
379 const Domaine_IJK& splitting = f.get_domaine();
381 const int nitot = splitting.get_nb_items_global(loc, DIRECTION_I);
382 const int njtot = splitting.get_nb_items_global(loc, DIRECTION_J);
383 const int nktot = splitting.get_nb_items_global(loc, DIRECTION_K);
384
385 Nom path, dbname;
386 split_path_filename(filename_with_path, path, dbname);
387 LataDB db;
388 if (master)
389 db.read_master_file(path, filename_with_path);
390 //db.read_master_file(path, dbname);
391
392 const char * locstring;
394 locstring = "ELEM";
395 else
396 locstring = "SOM";
397
398 const LataDBField *db_field = 0;
399 int is_double;
400 if (master)
401 {
402 db_field = &db.get_field(tstep, geometryname, fieldname, locstring);
403
404 if (db_field->size_ != nitot * njtot * nktot)
405 {
406 Cerr << "Error reading field " << geometryname << " / " << fieldname << " / " << locstring << " at timestep " << tstep;
407 Cerr << " in file " << filename_with_path << " : wrong size\n";
408 Cerr << " Expected size = " << nitot << " x " << njtot << " x " << nktot << " = " << nitot * njtot * nktot << "\n";
409 Cerr << " Size in file = " << db_field->size_ << finl;
411 }
412 is_double = (db_field->datatype_.type_ == LataDBDataType::REAL64);
413 }
414 envoyer_broadcast(is_double, 0);
415 if (!is_double)
416 {
417 BigFloatTab data;
418 if (master)
419 db.read_data(*db_field, data);
420 IJK_Striped_Writer reader;
421 reader.redistribute_load(data, f, nitot, njtot, nktot, 1 /* total nbcompo */, 0 /* this component */);
422 }
423 else
424 {
425 BigDoubleTab data;
426 if (master)
427 db.read_data(*db_field, data);
428 IJK_Striped_Writer reader;
429 reader.redistribute_load(data, f, nitot, njtot, nktot, 1 /* total nbcompo */, 0 /* this component */);
430 }
432}
433
434template<typename _TYPE_, typename _TYPE_ARRAY_>
435void lire_dans_lata(const char *filename_with_path, int tstep, const char *geometryname, const char *fieldname,
437{
440 {
441 read_lata_parallel_template<_TYPE_,_TYPE_ARRAY_>(filename_with_path, tstep, geometryname, fieldname, 0 /* component */, vx);
442 read_lata_parallel_template<_TYPE_,_TYPE_ARRAY_>(filename_with_path, tstep, geometryname, fieldname, 1 /* component */, vy);
443 read_lata_parallel_template<_TYPE_,_TYPE_ARRAY_>(filename_with_path, tstep, geometryname, fieldname, 2 /* component */, vz);
445 return;
446 }
447
448
452 {
453 Cerr << "Error in lire_dans_lata(vx, vy, vz): provided fields have incorrect localisation" << finl;
455 }
456 const Domaine_IJK& splitting = vx.get_domaine();
457 // Collate data on processor 0
458 // In lata format, the velocity is written as an array of (vx, vy, vz) vectors.
459 // Size of the array is the total number of nodes in the mesh.
460 // The velocity associated with a node is the combination of velocities at the faces
461 // at the right of the node (in each direction).
462 const int nitot = splitting.get_nb_items_global(Domaine_IJK::ELEM, 0) + 1;
463 const int njtot = splitting.get_nb_items_global(Domaine_IJK::ELEM, 1) + 1;
464 const int nktot = splitting.get_nb_items_global(Domaine_IJK::ELEM, 2) + 1;
465
466 const int master = Process::je_suis_maitre();
467
468 Nom path, dbname;
469 split_path_filename(filename_with_path, path, dbname);
470 LataDB db;
471 if (master)
472 db.read_master_file(path, filename_with_path);
473 //db.read_master_file(path, dbname);
474
475 const char * locstring = "FACES";
476
477 const LataDBField *db_field = 0;
478 int is_double;
479 if (master)
480 {
481 db_field = &db.get_field(tstep, geometryname, fieldname, locstring);
482
483 if (db_field->size_ != nitot * njtot * nktot)
484 {
485 Cerr << "Error reading field " << geometryname << " / " << fieldname << " / " << locstring << " at timestep " << tstep;
486 Cerr << " in file " << filename_with_path << " : wrong size\n";
487 Cerr << " Expected size = " << nitot << " x " << njtot << " x " << nktot << " = " << nitot * njtot * nktot << "\n";
488 Cerr << " Size in file = " << db_field->size_ << finl;
490 }
491 is_double = (db_field->datatype_.type_ == LataDBDataType::REAL64);
492 }
493 envoyer_broadcast(is_double, 0);
494
495 if (!is_double)
496 {
497 BigFloatTab data;
498 if (master)
499 db.read_data(*db_field, data);
500 IJK_Striped_Writer reader;
501 reader.redistribute_load(data, vx, nitot, njtot, nktot, 3 /* total nbcompo */, 0 /* this component */);
502 reader.redistribute_load(data, vy, nitot, njtot, nktot, 3 /* total nbcompo */, 1 /* this component */);
503 reader.redistribute_load(data, vz, nitot, njtot, nktot, 3 /* total nbcompo */, 2 /* this component */);
504 }
505 else
506 {
507 BigDoubleTab data;
508 if (master)
509 db.read_data(*db_field, data);
510 IJK_Striped_Writer reader;
511 reader.redistribute_load(data, vx, nitot, njtot, nktot, 3 /* total nbcompo */, 0 /* this component */);
512 reader.redistribute_load(data, vy, nitot, njtot, nktot, 3 /* total nbcompo */, 1 /* this component */);
513 reader.redistribute_load(data, vz, nitot, njtot, nktot, 3 /* total nbcompo */, 2 /* this component */);
514 }
516}
517
518#endif
virtual void set_64b(bool is_64b)
Definition AbstractIO.h:38
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
int get_offset_local(int direction) const
Returns the local offset in requested direction.
int get_processor_by_ijk(const FixedVector< int, 3 > &slice) const
Return the global index of the processor according to its position.
int get_nprocessor_per_direction(int direction) const
Returns the number of slices in the given direction.
void get_slice_offsets(int direction, ArrOfInt &tab) const
Returns the indices of the first cell in requested direction of every slices in this direction.
int get_nb_items_global(Localisation loc, int direction) const
Returns the number of local items (on this processor) for the given localisation in the requested dir...
int get_nb_elem_tot(int direction) const
Returns the total (global) number of mesh cells in requested direction.
const ArrOfDouble & get_node_coordinates(int direction) const
Returns an array with the coordinates of all nodes in the mesh in requested direction.
int get_local_slice_index(int direction) const
Returns the position of the local subdomain in the requested direction.
Localisation
Localisation sub class.
Definition Domaine_IJK.h:53
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
: This class is an IJK_Field_local with parallel informations.
Domaine_IJK::Localisation get_localisation() const
const Domaine_IJK & get_domaine() const
The class IJK_Field_vector is a fixed array of polymorphic IJK fields.
: class IJK_Striped_Writer
void redistribute_load(const BigTRUSTArray< _IN_TYPE_ > &input, IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &output, const int nitot, const int njtot, const int nktot, const int nbcompo, const int component)
Size_t write_data_template(const char *filename, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &f)
Size_t write_data_parallele_plan_template(const char *filename, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vx, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vy, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vz)
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
const Nom & le_nom() const override
Renvoie *this;.
Definition Nom.cpp:563
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
static void barrier()
Synchronise tous les processeurs du groupe courant (attend que tous les processeurs soient arrives a ...
Definition Process.cpp:136
static int me()
renvoie mon rang dans le groupe de communication courant.
Definition Process.cpp:125
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
Definition Process.cpp:86
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::out)
virtual int put(const unsigned *ob, std::streamsize n, std::streamsize nb_colonnes=1)
Definition Sortie.cpp:101
void set_bin(bool bin) override
Change le mode d'ecriture du fichier.
Definition Sortie.cpp:255
_SIZE_ size_array() const
_TYPE_ * addr()
void resize_array(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
int dimension_int(int d) const
Definition TRUSTTab.tpp:152