7.0
general documentation
cs_post.h
Go to the documentation of this file.
1 #ifndef __CS_POST_H__
2 #define __CS_POST_H__
3 
4 /*============================================================================
5  * Post-processing management
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2021 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Standard C library headers
32  *----------------------------------------------------------------------------*/
33 
34 /*----------------------------------------------------------------------------
35  * Local headers
36  *----------------------------------------------------------------------------*/
37 
38 #include "fvm_nodal.h"
39 #include "fvm_writer.h"
40 
41 #include "cs_base.h"
42 #include "cs_interpolate.h"
43 #include "cs_probe.h"
44 #include "cs_time_step.h"
45 
46 /*----------------------------------------------------------------------------*/
47 
49 
50 /*============================================================================
51  * Macro definitions
52  *============================================================================*/
53 
54 /* Output type masks */
55 
56 #define CS_POST_ON_LOCATION (1 << 0) /* postprocess variables
57  on their base location
58  (volume for variables) */
59 #define CS_POST_BOUNDARY_NR (1 << 1) /* postprocess boundary
60  without reconstruction */
61 
62 #define CS_POST_MONITOR (1 << 2) /* monitor variables */
63 
64 /* Default writer ids and filters */
65 
66 #define CS_POST_WRITER_ALL_ASSOCIATED 0
68 #define CS_POST_WRITER_DEFAULT -1
69 #define CS_POST_WRITER_ERRORS -2
70 #define CS_POST_WRITER_PARTICLES -3
71 #define CS_POST_WRITER_TRAJECTORIES -4
72 #define CS_POST_WRITER_PROBES -5
73 #define CS_POST_WRITER_PROFILES -6
74 #define CS_POST_WRITER_HISTOGRAMS -7
76 /* Default mesh ids */
77 
78 #define CS_POST_MESH_VOLUME -1
79 #define CS_POST_MESH_BOUNDARY -2
80 #define CS_POST_MESH_PARTICLES -3
81 #define CS_POST_MESH_TRAJECTORIES -4
82 #define CS_POST_MESH_PROBES -5
84 /* Additional categories (no associated default mesh) */
85 
86 #define CS_POST_MESH_SURFACE -12 /* surface (boundary and/or
87  interior) mesh */
88 
89 /*============================================================================
90  * Local type definitions
91  *============================================================================*/
92 
93 /* Datatype enumeration */
94 
95 typedef enum {
101 
102 /*----------------------------------------------------------------------------
103  * Function pointer to elements selection definition.
104  *
105  * Each function of this sort may be used to select a given type of element,
106  * usually cells, interior faces, boundary faces, or particles.
107  *
108  * If non-empty and not containing all elements, a list of elements of the
109  * main mesh should be allocated (using BFT_MALLOC) and defined by this
110  * function when called. This list's lifecycle is then managed by the
111  * postprocessing subsystem.
112  *
113  * Note: if the input pointer is non-NULL, it must point to valid data
114  * when the selection function is called, so either:
115  * - that value or structure should not be temporary (i.e. local);
116  * - post-processing output must be ensured using cs_post_write_meshes()
117  * with a fixed-mesh writer before the data pointed to goes out of scope;
118  *
119  * parameters:
120  * input <-> pointer to optional (untyped) value or structure.
121  * n_elts --> number of selected elements.
122  * elt_list --> list of selected elements (0 to n-1 numbering).
123  *----------------------------------------------------------------------------*/
124 
125 typedef void
126 (cs_post_elt_select_t) (void *input,
127  cs_lnum_t *n_elts,
128  cs_lnum_t **elt_list);
129 
130 /*----------------------------------------------------------------------------
131  * Function pointer associated with a specific post-processing output.
132  *
133  * Such functions are registered using the cs_post_add_time_dep_vars(),
134  * and all registered functions are automatically called by
135  * cs_post_write_vars().
136  *
137  * Note: if the input pointer is non-NULL, it must point to valid data
138  * when the output function is called, so either:
139  * - that value or structure should not be temporary (i.e. local);
140  * - post-processing output must be ensured using cs_post_write_var()
141  * or similar before the data pointed to goes out of scope.
142  *
143  * parameters:
144  * input <-> pointer to optional (untyped) value or structure.
145  * ts <-- time step status structure, or NULL
146  *----------------------------------------------------------------------------*/
147 
148 typedef void
150  const cs_time_step_t *ts);
151 
152 /*----------------------------------------------------------------------------
153  * Function pointer associated with a specific post-processing output
154  * on multiple meshes.
155  *
156  * Such functions are registered using the cs_post_add_time_mesh_dep_vars(),
157  * and all registered functions are automatically called by
158  * cs_post_write_vars().
159  *
160  * Note: if the input pointer is non-NULL, it must point to valid data
161  * when the output function is called, so either:
162  * - that value or structure should not be temporary (i.e. local);
163  * - post-processing output must be ensured using cs_post_write_var()
164  * or similar before the data pointed to goes out of scope.
165  *
166  * parameters:
167  * input <-> pointer to optional (untyped) value or structure.
168  * mesh_id <-- id of the output mesh for the current call
169  * cat_id <-- category id of the output mesh for the current call
170  * ent_flag <-- indicate global presence of cells (ent_flag[0]), interior
171  * faces (ent_flag[1]), boundary faces (ent_flag[2]),
172  * particles (ent_flag[3]) or probes (ent_flag[4])
173  * n_cells <-- local number of cells of post_mesh
174  * n_i_faces <-- local number of interior faces of post_mesh
175  * n_b_faces <-- local number of boundary faces of post_mesh
176  * cell_ids <-- list of cells (0 to n-1) of post-processing mesh
177  * i_face_ids <-- list of interior faces (0 to n-1) of post-processing mesh
178  * b_face_ids <-- list of boundary faces (0 to n-1) of post-processing mesh
179  * ts <-- time step status structure, or NULL
180  *----------------------------------------------------------------------------*/
181 
182 typedef void
184  int mesh_id,
185  int cat_id,
186  int ent_flag[5],
187  cs_lnum_t n_cells,
188  cs_lnum_t n_i_faces,
189  cs_lnum_t n_b_faces,
190  const cs_lnum_t cell_ids[],
191  const cs_lnum_t i_face_ids[],
192  const cs_lnum_t b_face_ids[],
193  const cs_time_step_t *ts);
194 
195 /*=============================================================================
196  * Global variables
197  *============================================================================*/
198 
199 /*============================================================================
200  * Public function prototypes
201  *============================================================================*/
202 
203 /*----------------------------------------------------------------------------*/
288 /*----------------------------------------------------------------------------*/
289 
290 void
291 cs_post_define_writer(int writer_id,
292  const char *case_name,
293  const char *dir_name,
294  const char *fmt_name,
295  const char *fmt_opts,
296  fvm_writer_time_dep_t time_dep,
297  bool output_at_start,
298  bool output_at_end,
299  int interval_n,
300  double interval_t);
301 
302 /*----------------------------------------------------------------------------*/
315 /*----------------------------------------------------------------------------*/
316 
317 void
318 cs_post_define_volume_mesh(int mesh_id,
319  const char *mesh_name,
320  const char *cell_criteria,
321  bool add_groups,
322  bool auto_variables,
323  int n_writers,
324  const int writer_ids[]);
325 
326 /*----------------------------------------------------------------------------*/
353 /*----------------------------------------------------------------------------*/
354 
355 void
357  const char *mesh_name,
358  cs_post_elt_select_t *cell_select_func,
359  void *cell_select_input,
360  bool time_varying,
361  bool add_groups,
362  bool auto_variables,
363  int n_writers,
364  const int writer_ids[]);
365 
366 /*----------------------------------------------------------------------------*/
380 /*----------------------------------------------------------------------------*/
381 
382 void
383 cs_post_define_surface_mesh(int mesh_id,
384  const char *mesh_name,
385  const char *i_face_criteria,
386  const char *b_face_criteria,
387  bool add_groups,
388  bool auto_variables,
389  int n_writers,
390  const int writer_ids[]);
391 
392 /*----------------------------------------------------------------------------*/
423 /*----------------------------------------------------------------------------*/
424 
425 void
427  const char *mesh_name,
428  cs_post_elt_select_t *i_face_select_func,
429  cs_post_elt_select_t *b_face_select_func,
430  void *i_face_select_input,
431  void *b_face_select_input,
432  bool time_varying,
433  bool add_groups,
434  bool auto_variables,
435  int n_writers,
436  const int writer_ids[]);
437 
438 /*----------------------------------------------------------------------------*/
463 /*----------------------------------------------------------------------------*/
464 
465 void
467  const char *mesh_name,
468  const char *cell_criteria,
469  double density,
470  bool trajectory,
471  bool auto_variables,
472  int n_writers,
473  const int writer_ids[]);
474 
475 /*----------------------------------------------------------------------------*/
505 /*----------------------------------------------------------------------------*/
506 
507 void
509  const char *mesh_name,
510  cs_post_elt_select_t *p_select_func,
511  void *p_select_input,
512  bool trajectory,
513  bool auto_variables,
514  int n_writers,
515  const int writer_ids[]);
516 
517 /*----------------------------------------------------------------------------*/
547 /*----------------------------------------------------------------------------*/
548 
549 void
550 cs_post_define_existing_mesh(int mesh_id,
551  fvm_nodal_t *exp_mesh,
552  int dim_shift,
553  bool transfer,
554  bool auto_variables,
555  int n_writers,
556  const int writer_ids[]);
557 
558 /*----------------------------------------------------------------------------*/
575 /*----------------------------------------------------------------------------*/
576 
577 void
578 cs_post_define_edges_mesh(int mesh_id,
579  int base_mesh_id,
580  int n_writers,
581  const int writer_ids[]);
582 
583 /*----------------------------------------------------------------------------*/
598 /*----------------------------------------------------------------------------*/
599 
600 void
601 cs_post_mesh_attach_writer(int mesh_id,
602  int writer_id);
603 
604 /*----------------------------------------------------------------------------*/
619 /*----------------------------------------------------------------------------*/
620 
621 void
622 cs_post_mesh_detach_writer(int mesh_id,
623  int writer_id);
624 
625 /*----------------------------------------------------------------------------*/
641 /*----------------------------------------------------------------------------*/
642 
643 void
644 cs_post_mesh_attach_field(int mesh_id,
645  int writer_id,
646  int field_id,
647  int comp_id);
648 
649 /*----------------------------------------------------------------------------*/
665 /*----------------------------------------------------------------------------*/
666 
667 const int *
668 cs_post_mesh_get_ent_flag(int mesh_id);
669 
670 /*----------------------------------------------------------------------------*/
678 /*----------------------------------------------------------------------------*/
679 
680 cs_lnum_t
681 cs_post_mesh_get_n_cells(int mesh_id);
682 
683 /*----------------------------------------------------------------------------*/
694 /*----------------------------------------------------------------------------*/
695 
696 void
697 cs_post_mesh_get_cell_ids(int mesh_id,
698  cs_lnum_t *cell_ids);
699 
700 /*----------------------------------------------------------------------------*/
708 /*----------------------------------------------------------------------------*/
709 
710 cs_lnum_t
711 cs_post_mesh_get_n_i_faces(int mesh_id);
712 
713 /*----------------------------------------------------------------------------*/
724 /*----------------------------------------------------------------------------*/
725 
726 void
727 cs_post_mesh_get_i_face_ids(int mesh_id,
728  cs_lnum_t i_face_ids[]);
729 
730 /*----------------------------------------------------------------------------*/
738 /*----------------------------------------------------------------------------*/
739 
740 cs_lnum_t
741 cs_post_mesh_get_n_b_faces(int mesh_id);
742 
743 /*----------------------------------------------------------------------------*/
754 /*----------------------------------------------------------------------------*/
755 
756 void
757 cs_post_mesh_get_b_face_ids(int mesh_id,
758  cs_lnum_t b_face_ids[]);
759 
760 /*----------------------------------------------------------------------------*/
768 /*----------------------------------------------------------------------------*/
769 
770 cs_lnum_t
771 cs_post_mesh_get_n_vertices(int mesh_id);
772 
773 /*----------------------------------------------------------------------------*/
784 /*----------------------------------------------------------------------------*/
785 
786 void
787 cs_post_mesh_get_vertex_ids(int mesh_id,
788  cs_lnum_t *vertex_ids);
789 
790 /*----------------------------------------------------------------------------*/
798 /*----------------------------------------------------------------------------*/
799 
800 void
801 cs_post_mesh_set_post_domain(int mesh_id,
802  bool post_domain);
803 
804 /*----------------------------------------------------------------------------*/
816 /*----------------------------------------------------------------------------*/
817 
818 void
819 cs_post_free_mesh(int mesh_id);
820 
821 /*----------------------------------------------------------------------------*/
829 /*----------------------------------------------------------------------------*/
830 
831 bool
832 cs_post_writer_exists(int writer_id);
833 
834 /*----------------------------------------------------------------------------*/
842 /*----------------------------------------------------------------------------*/
843 
844 bool
845 cs_post_mesh_exists(int mesh_id);
846 
847 /*----------------------------------------------------------------------------*/
853 /*----------------------------------------------------------------------------*/
854 
855 const char *
857 
858 /*----------------------------------------------------------------------------*/
864 /*----------------------------------------------------------------------------*/
865 
866 const char *
868 
869 /*----------------------------------------------------------------------------*/
875 /*----------------------------------------------------------------------------*/
876 
877 int
879 
880 /*----------------------------------------------------------------------------*/
886 /*----------------------------------------------------------------------------*/
887 
888 int
890 
891 /*----------------------------------------------------------------------------*/
901 /*----------------------------------------------------------------------------*/
902 
903 void
905 
906 /*----------------------------------------------------------------------------*/
914 /*----------------------------------------------------------------------------*/
915 
916 void
917 cs_post_activate_writer(int writer_id,
918  bool activate);
919 
920 /*----------------------------------------------------------------------------*/
935 /*----------------------------------------------------------------------------*/
936 
937 void
938 cs_post_disable_writer(int writer_id);
939 
940 /*----------------------------------------------------------------------------*/
954 /*----------------------------------------------------------------------------*/
955 
956 void
957 cs_post_enable_writer(int writer_id);
958 
959 /*----------------------------------------------------------------------------*/
967 /*----------------------------------------------------------------------------*/
968 
969 fvm_writer_t *
970 cs_post_get_writer(int writer_id);
971 
972 /*----------------------------------------------------------------------------*/
980 /*----------------------------------------------------------------------------*/
981 
983 cs_post_get_writer_time_dep(int writer_id);
984 
985 /*----------------------------------------------------------------------------*/
995 /*----------------------------------------------------------------------------*/
996 
997 void
998 cs_post_add_writer_t_step(int writer_id,
999  int nt);
1000 
1001 /*----------------------------------------------------------------------------*/
1011 /*----------------------------------------------------------------------------*/
1012 
1013 void
1014 cs_post_add_writer_t_value(int writer_id,
1015  double t);
1016 
1017 /*----------------------------------------------------------------------------*/
1026 /*----------------------------------------------------------------------------*/
1027 
1028 void
1030 
1031 /*----------------------------------------------------------------------------*/
1052 /*----------------------------------------------------------------------------*/
1053 
1054 void
1055 cs_post_write_var(int mesh_id,
1056  int writer_id,
1057  const char *var_name,
1058  int var_dim,
1059  bool interlace,
1060  bool use_parent,
1061  cs_post_type_t var_type,
1062  const void *cel_vals,
1063  const void *i_face_vals,
1064  const void *b_face_vals,
1065  const cs_time_step_t *ts);
1066 
1067 /*----------------------------------------------------------------------------*/
1086 /*----------------------------------------------------------------------------*/
1087 
1088 void
1089 cs_post_write_vertex_var(int mesh_id,
1090  int writer_id,
1091  const char *var_name,
1092  int var_dim,
1093  bool interlace,
1094  bool use_parent,
1095  cs_post_type_t var_type,
1096  const void *vtx_vals,
1097  const cs_time_step_t *ts);
1098 
1099 /*----------------------------------------------------------------------------*/
1114 /*----------------------------------------------------------------------------*/
1115 
1116 void
1117 cs_post_write_particle_values(int mesh_id,
1118  int writer_id,
1119  int attr_id,
1120  const char *var_name,
1121  int component_id,
1122  const cs_time_step_t *ts);
1123 
1124 /*----------------------------------------------------------------------------*/
1145 /*----------------------------------------------------------------------------*/
1146 
1147 void
1148 cs_post_write_probe_values(int mesh_id,
1149  int writer_id,
1150  const char *var_name,
1151  int var_dim,
1152  cs_post_type_t var_type,
1153  int parent_location_id,
1154  cs_interpolate_from_location_t *interpolate_func,
1155  void *interpolate_input,
1156  const void *vals,
1157  const cs_time_step_t *ts);
1158 
1159 /*----------------------------------------------------------------------------*/
1171 /*----------------------------------------------------------------------------*/
1172 
1173 void
1174 cs_post_renum_cells(const cs_lnum_t init_cell_num[]);
1175 
1176 /*----------------------------------------------------------------------------*/
1189 /*----------------------------------------------------------------------------*/
1190 
1191 void
1192 cs_post_renum_faces(const cs_lnum_t init_i_face_num[],
1193  const cs_lnum_t init_b_face_num[]);
1194 
1195 /*----------------------------------------------------------------------------*/
1206 /*----------------------------------------------------------------------------*/
1207 
1208 void
1210 
1211 /*----------------------------------------------------------------------------*/
1215 /*----------------------------------------------------------------------------*/
1216 
1217 void
1218 cs_post_init_writers(void);
1219 
1220 /*----------------------------------------------------------------------------*/
1238 /*----------------------------------------------------------------------------*/
1239 
1240 void
1241 cs_post_init_meshes(int check_mask);
1242 
1243 /*----------------------------------------------------------------------------*/
1250 /*----------------------------------------------------------------------------*/
1251 
1252 void
1254 
1255 /*----------------------------------------------------------------------------*/
1265 /*----------------------------------------------------------------------------*/
1266 
1267 void
1269 
1270 /*----------------------------------------------------------------------------*/
1275 /*----------------------------------------------------------------------------*/
1276 
1277 void
1278 cs_post_time_step_end(void);
1279 
1280 /*----------------------------------------------------------------------------*/
1290 /*----------------------------------------------------------------------------*/
1291 
1292 void
1294 
1295 /*----------------------------------------------------------------------------*/
1299 /*----------------------------------------------------------------------------*/
1300 
1301 void
1302 cs_post_finalize(void);
1303 
1304 /*----------------------------------------------------------------------------*/
1308 /*----------------------------------------------------------------------------*/
1309 
1310 void
1312 
1313 /*----------------------------------------------------------------------------*/
1319 /*----------------------------------------------------------------------------*/
1320 
1321 void
1323 
1324 /*----------------------------------------------------------------------------*/
1335 /*----------------------------------------------------------------------------*/
1336 
1337 int
1339 
1340 /*----------------------------------------------------------------------------*/
1354 /*----------------------------------------------------------------------------*/
1355 
1356 void
1358  void *input);
1359 
1360 /*----------------------------------------------------------------------------*/
1374 /*----------------------------------------------------------------------------*/
1375 
1376 void
1378  void *input);
1379 
1380 /*----------------------------------------------------------------------------*/
1381 
1383 
1384 #endif /* __CS_POST_H__ */
void cs_post_write_vars(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition: cs_post.c:6968
Definition: cs_post.h:99
const char * cs_post_get_default_format(void)
Return the default writer format name.
Definition: cs_post.c:5101
time step descriptor
Definition: cs_time_step.h:64
void cs_post_mesh_get_i_face_ids(int mesh_id, cs_lnum_t i_face_ids[])
Get a postprocessing mesh&#39;s list of boundary faces.
Definition: cs_post.c:4785
void cs_post_init_error_writer(void)
Initialize post-processing writer with same format and associated options as default writer...
Definition: cs_post.c:7302
cs_post_type_t
Postprocessing input variable type.
Definition: cs_post.h:95
void cs_post_enable_writer(int writer_id)
Enable a specific writer or all writers currently disabled by previous calls to cs_post_disable_write...
Definition: cs_post.c:5289
void cs_post_time_step_end(void)
Flush writers and free time-varying and Lagragian mesh if needed of meshes if there is a time-depende...
Definition: cs_post.c:6924
Definition: cs_post.h:98
void cs_post_define_surface_mesh_by_func(int mesh_id, const char *mesh_name, cs_post_elt_select_t *i_face_select_func, cs_post_elt_select_t *b_face_select_func, void *i_face_select_input, void *b_face_select_input, bool time_varying, bool add_groups, bool auto_variables, int n_writers, const int writer_ids[])
Define a surface post-processing mesh using selection functions.
Definition: cs_post.c:4134
cs_lnum_t cs_post_mesh_get_n_vertices(int mesh_id)
Get a postprocessing mesh&#39;s number of vertices.
Definition: cs_post.c:4900
void cs_post_free_mesh(int mesh_id)
Remove a post-processing mesh.
Definition: cs_post.c:4982
void cs_post_init_writers(void)
Initialize post-processing writers.
Definition: cs_post.c:6343
void cs_post_activate_by_time_step(const cs_time_step_t *ts)
Update "active" or "inactive" flag of writers based on the time step.
Definition: cs_post.c:5161
void cs_post_mesh_attach_writer(int mesh_id, int writer_id)
Associate a writer to a postprocessing mesh.
Definition: cs_post.c:4504
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
const int * cs_post_mesh_get_ent_flag(int mesh_id)
Get a postprocessing meshes entity presence flag.
Definition: cs_post.c:4678
void cs_post_define_particles_mesh_by_func(int mesh_id, const char *mesh_name, cs_post_elt_select_t *p_select_func, void *p_select_input, bool trajectory, bool auto_variables, int n_writers, const int writer_ids[])
Define a particles post-processing mesh using a selection function.
Definition: cs_post.c:4273
int cs_post_get_free_writer_id(void)
Return the next "reservable" (i.e. non-user) writer id available.
Definition: cs_post.c:5129
int cs_post_init_error_writer_cells(void)
Initialize post-processing writer with same format and associated options as default writer...
Definition: cs_post.c:7352
void cs_post_define_existing_mesh(int mesh_id, fvm_nodal_t *exp_mesh, int dim_shift, bool transfer, bool auto_variables, int n_writers, const int writer_ids[])
Create a post-processing mesh associated with an existing exportable mesh representation.
Definition: cs_post.c:4339
void cs_post_disable_writer(int writer_id)
Disable specific writer or all writers not currently active until cs_post_enable_writer or cs_post_ac...
Definition: cs_post.c:5252
void cs_post_mesh_set_post_domain(int mesh_id, bool post_domain)
Set whether postprocessing mesh&#39;s parallel domain should be output.
Definition: cs_post.c:4959
fvm_writer_time_dep_t
Definition: fvm_writer.h:57
fvm_writer_t * cs_post_get_writer(int writer_id)
Return a pointer to the FVM writer associated to a writer_id.
Definition: cs_post.c:5320
void cs_post_renum_faces(const cs_lnum_t init_i_face_num[], const cs_lnum_t init_b_face_num[])
Update references to parent mesh of post-processing meshes in case of computational mesh interior and...
Definition: cs_post.c:6236
void cs_post_write_var(int mesh_id, int writer_id, const char *var_name, int var_dim, bool interlace, bool use_parent, cs_post_type_t var_type, const void *cel_vals, const void *i_face_vals, const void *b_face_vals, const cs_time_step_t *ts)
Output a variable defined at cells or faces of a post-processing mesh using associated writers...
Definition: cs_post.c:5488
void cs_post_init_meshes(int check_mask)
Initialize main post-processing meshes.
Definition: cs_post.c:6457
void cs_post_mesh_get_b_face_ids(int mesh_id, cs_lnum_t b_face_ids[])
Get a postprocessing mesh&#39;s list of boundary faces.
Definition: cs_post.c:4858
cs_lnum_t cs_post_mesh_get_n_b_faces(int mesh_id)
Get a postprocessing mesh&#39;s number of boundary faces.
Definition: cs_post.c:4828
cs_lnum_t cs_post_mesh_get_n_i_faces(int mesh_id)
Get a postprocessing mesh&#39;s number of interior faces.
Definition: cs_post.c:4755
const char * cs_post_get_default_format_options(void)
Return the default writer format options.
Definition: cs_post.c:5115
void cs_post_define_particles_mesh(int mesh_id, const char *mesh_name, const char *cell_criteria, double density, bool trajectory, bool auto_variables, int n_writers, const int writer_ids[])
Define a particles post-processing mesh.
Definition: cs_post.c:4205
void cs_post_add_time_mesh_dep_output(cs_post_time_mesh_dep_output_t *function, void *input)
Register a processing of time-dependent variables than can be output on different meshes to the call ...
Definition: cs_post.c:7435
void cs_post_write_meshes(const cs_time_step_t *ts)
Output post-processing meshes using associated writers.
Definition: cs_post.c:5431
fvm_writer_time_dep_t cs_post_get_writer_time_dep(int writer_id)
Return time dependency associated to a writer_id.
Definition: cs_post.c:5345
void() cs_post_elt_select_t(void *input, cs_lnum_t *n_elts, cs_lnum_t **elt_list)
Function pointer to elements selection definition.
Definition: cs_post.h:126
void cs_post_define_volume_mesh(int mesh_id, const char *mesh_name, const char *cell_criteria, bool add_groups, bool auto_variables, int n_writers, const int writer_ids[])
Define a volume post-processing mesh.
Definition: cs_post.c:3943
void() cs_interpolate_from_location_t(void *input, cs_datatype_t datatype, int val_dim, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], const void *location_vals, void *point_vals)
Function pointer for interpolatation of values defined on a mesh location at a given set of points...
Definition: cs_interpolate.h:71
Definition: cs_post.h:96
void() cs_post_time_dep_output_t(void *input, const cs_time_step_t *ts)
Definition: cs_post.h:149
void cs_post_finalize(void)
Destroy all structures associated with post-processing.
Definition: cs_post.c:6990
void cs_post_write_probe_values(int mesh_id, int writer_id, const char *var_name, int var_dim, cs_post_type_t var_type, int parent_location_id, cs_interpolate_from_location_t *interpolate_func, void *interpolate_input, const void *vals, const cs_time_step_t *ts)
Output a variable defined at cells or faces of a post-processing mesh using associated writers...
Definition: cs_post.c:6026
void cs_post_define_surface_mesh(int mesh_id, const char *mesh_name, const char *i_face_criteria, const char *b_face_criteria, bool add_groups, bool auto_variables, int n_writers, const int writer_ids[])
Define a surface post-processing mesh.
Definition: cs_post.c:4056
void cs_post_mesh_detach_writer(int mesh_id, int writer_id)
De-associate a writer from a postprocessing mesh.
Definition: cs_post.c:4556
void cs_post_set_changing_connectivity(void)
Configure the post-processing output so that mesh connectivity may be automatically updated...
Definition: cs_post.c:6331
double precision, dimension(:,:,:), allocatable density
Definition: atimbr.f90:124
void() cs_post_time_mesh_dep_output_t(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *ts)
Definition: cs_post.h:183
void cs_post_time_step_output(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition: cs_post.c:6652
int cs_post_get_free_mesh_id(void)
Return the next "reservable" (i.e. non-user) mesh id available.
Definition: cs_post.c:5143
void cs_post_write_particle_values(int mesh_id, int writer_id, int attr_id, const char *var_name, int component_id, const cs_time_step_t *ts)
Output an existing lagrangian particle attribute at particle positions or trajectory endpoints of a p...
Definition: cs_post.c:5858
void cs_post_mesh_get_vertex_ids(int mesh_id, cs_lnum_t *vertex_ids)
Get a postprocessing mesh&#39;s list of vertices.
Definition: cs_post.c:4930
void cs_post_write_vertex_var(int mesh_id, int writer_id, const char *var_name, int var_dim, bool interlace, bool use_parent, cs_post_type_t var_type, const void *vtx_vals, const cs_time_step_t *ts)
Output a variable defined at vertices of a post-processing mesh using associated writers.
Definition: cs_post.c:5736
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:301
cs_lnum_t cs_post_mesh_get_n_cells(int mesh_id)
Get a postprocessing mesh&#39;s number of cells.
Definition: cs_post.c:4696
void cs_post_mesh_get_cell_ids(int mesh_id, cs_lnum_t *cell_ids)
Get a postprocessing mesh&#39;s list of cells.
Definition: cs_post.c:4726
void cs_post_activate_writer(int writer_id, bool activate)
Force the "active" or "inactive" flag for a specific writer or for all writers for the current time s...
Definition: cs_post.c:5215
void cs_post_add_free_faces(void)
Postprocess free (isolated) faces of the current global mesh.
Definition: cs_post.c:7091
#define END_C_DECLS
Definition: cs_defs.h:496
void cs_post_add_writer_t_value(int writer_id, double t)
Add an activation time value for a specific writer or for all writers.
Definition: cs_post.c:5404
void cs_post_add_time_dep_output(cs_post_time_dep_output_t *function, void *input)
Register a processing of time-dependent variables to the call to cs_post_write_vars().
Definition: cs_post.c:7394
Definition: cs_post.h:97
void cs_post_mesh_attach_field(int mesh_id, int writer_id, int field_id, int comp_id)
Associate a writer to a postprocessing mesh.
Definition: cs_post.c:4614
void cs_post_define_edges_mesh(int mesh_id, int base_mesh_id, int n_writers, const int writer_ids[])
Create a mesh based upon the extraction of edges from an existing mesh.
Definition: cs_post.c:4463
Definition: cs_field_pointer.h:98
bool cs_post_mesh_exists(int mesh_id)
Check for the existence of a post-processing mesh of the given id.
Definition: cs_post.c:5076
void cs_post_add_writer_t_step(int writer_id, int nt)
Add an activation time step for a specific writer or for all writers.
Definition: cs_post.c:5376
void cs_post_define_writer(int writer_id, const char *case_name, const char *dir_name, const char *fmt_name, const char *fmt_opts, fvm_writer_time_dep_t time_dep, bool output_at_start, bool output_at_end, int interval_n, double interval_t)
Define a writer; this objects manages a case&#39;s name, directory, and format, as well as associated mes...
Definition: cs_post.c:3788
bool cs_post_writer_exists(int writer_id)
Check for the existence of a writer of the given id.
Definition: cs_post.c:5047
void cs_post_define_volume_mesh_by_func(int mesh_id, const char *mesh_name, cs_post_elt_select_t *cell_select_func, void *cell_select_input, bool time_varying, bool add_groups, bool auto_variables, int n_writers, const int writer_ids[])
Define a volume post-processing mesh using a selection function.
Definition: cs_post.c:4006
void cs_post_renum_cells(const cs_lnum_t init_cell_num[])
Update references to parent mesh of post-processing meshes in case of computational mesh cell renumbe...
Definition: cs_post.c:6160
void cs_post_time_step_begin(const cs_time_step_t *ts)
Check if post-processing is activated and then update post-processing of meshes if there is a need to...
Definition: cs_post.c:6619