programmer's 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-2018 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 /* all associated writers */
67 
68 #define CS_POST_WRITER_DEFAULT -1 /* default visualisation */
69 #define CS_POST_WRITER_ERRORS -2 /* error visualisation */
70 #define CS_POST_WRITER_PARTICLES -3 /* particle visualisation */
71 #define CS_POST_WRITER_TRAJECTORIES -4 /* trajectories visualisation */
72 #define CS_POST_WRITER_PROBES -5 /* probe monitoring */
73 #define CS_POST_WRITER_PROFILES -6 /* profiles */
74 #define CS_POST_WRITER_HISTOGRAMS -7 /* histograms */
75 
76 /* Default mesh ids */
77 
78 #define CS_POST_MESH_VOLUME -1 /* volume mesh output */
79 #define CS_POST_MESH_BOUNDARY -2 /* boundary mesh output */
80 #define CS_POST_MESH_PARTICLES -3 /* particle output */
81 #define CS_POST_MESH_TRAJECTORIES -4 /* particle output */
82 #define CS_POST_MESH_PROBES -5 /* probes output */
83 
84 /*============================================================================
85  * Local type definitions
86  *============================================================================*/
87 
88 /* Datatype enumeration */
89 
90 typedef enum {
97 
98 /*----------------------------------------------------------------------------
99  * Function pointer to elements selection definition.
100  *
101  * Each function of this sort may be used to select a given type of element,
102  * usually cells, interior faces, boundary faces, or particles.
103  *
104  * If non-empty and not containing all elements, a list of elements of the
105  * main mesh should be allocated (using BFT_MALLOC) and defined by this
106  * function when called. This list's lifecycle is then managed by the
107  * postprocessing subsystem.
108  *
109  * Note: if the input pointer is non-NULL, it must point to valid data
110  * when the selection function is called, so either:
111  * - that value or structure should not be temporary (i.e. local);
112  * - post-processing output must be ensured using cs_post_write_meshes()
113  * with a fixed-mesh writer before the data pointed to goes out of scope;
114  *
115  * parameters:
116  * input <-> pointer to optional (untyped) value or structure.
117  * n_elts --> number of selected elements.
118  * elt_list --> list of selected elements (0 to n-1 numbering).
119  *----------------------------------------------------------------------------*/
120 
121 typedef void
122 (cs_post_elt_select_t) (void *input,
123  cs_lnum_t *n_elts,
124  cs_lnum_t **elt_list);
125 
126 /*----------------------------------------------------------------------------
127  * Function pointer associated with a specific post-processing output.
128  *
129  * Such functions are registered using the cs_post_add_time_dep_vars(),
130  * and all registered functions are automatically called by
131  * cs_post_write_vars().
132  *
133  * Note: if the input pointer is non-NULL, it must point to valid data
134  * when the output function is called, so either:
135  * - that value or structure should not be temporary (i.e. local);
136  * - post-processing output must be ensured using cs_post_write_var()
137  * or similar before the data pointed to goes out of scope.
138  *
139  * parameters:
140  * input <-> pointer to optional (untyped) value or structure.
141  * ts <-- time step status structure, or NULL
142  *----------------------------------------------------------------------------*/
143 
144 typedef void
146  const cs_time_step_t *ts);
147 
148 /*----------------------------------------------------------------------------
149  * Function pointer associated with a specific post-processing output
150  * on multiple meshes.
151  *
152  * Such functions are registered using the cs_post_add_time_mesh_dep_vars(),
153  * and all registered functions are automatically called by
154  * cs_post_write_vars().
155  *
156  * Note: if the input pointer is non-NULL, it must point to valid data
157  * when the output function is called, so either:
158  * - that value or structure should not be temporary (i.e. local);
159  * - post-processing output must be ensured using cs_post_write_var()
160  * or similar before the data pointed to goes out of scope.
161  *
162  * parameters:
163  * input <-> pointer to optional (untyped) value or structure.
164  * mesh_id <-- id of the output mesh for the current call
165  * cat_id <-- category id of the output mesh for the current call
166  * ent_flag <-- indicate global presence of cells (ent_flag[0]), interior
167  * faces (ent_flag[1]), boundary faces (ent_flag[2]),
168  * particles (ent_flag[3]) or probes (ent_flag[4])
169  * n_cells <-- local number of cells of post_mesh
170  * n_i_faces <-- local number of interior faces of post_mesh
171  * n_b_faces <-- local number of boundary faces of post_mesh
172  * cell_ids <-- list of cells (0 to n-1) of post-processing mesh
173  * i_face_ids <-- list of interior faces (0 to n-1) of post-processing mesh
174  * b_face_ids <-- list of boundary faces (0 to n-1) of post-processing mesh
175  * ts <-- time step status structure, or NULL
176  *----------------------------------------------------------------------------*/
177 
178 typedef void
180  int mesh_id,
181  int cat_id,
182  int ent_flag[5],
183  cs_lnum_t n_cells,
184  cs_lnum_t n_i_faces,
185  cs_lnum_t n_b_faces,
186  const cs_lnum_t cell_ids[],
187  const cs_lnum_t i_face_ids[],
188  const cs_lnum_t b_face_ids[],
189  const cs_time_step_t *ts);
190 
191 /*=============================================================================
192  * Global variables
193  *============================================================================*/
194 
195 /*============================================================================
196  * Public function prototypes
197  *============================================================================*/
198 
199 /*----------------------------------------------------------------------------*/
284 /*----------------------------------------------------------------------------*/
285 
286 void
287 cs_post_define_writer(int writer_id,
288  const char *case_name,
289  const char *dir_name,
290  const char *fmt_name,
291  const char *fmt_opts,
292  fvm_writer_time_dep_t time_dep,
293  bool output_at_start,
294  bool output_at_end,
295  int frequency_n,
296  double frequency_t);
297 
298 /*----------------------------------------------------------------------------*/
311 /*----------------------------------------------------------------------------*/
312 
313 void
314 cs_post_define_volume_mesh(int mesh_id,
315  const char *mesh_name,
316  const char *cell_criteria,
317  bool add_groups,
318  bool auto_variables,
319  int n_writers,
320  const int writer_ids[]);
321 
322 /*----------------------------------------------------------------------------*/
349 /*----------------------------------------------------------------------------*/
350 
351 void
353  const char *mesh_name,
354  cs_post_elt_select_t *cell_select_func,
355  void *cell_select_input,
356  bool time_varying,
357  bool add_groups,
358  bool auto_variables,
359  int n_writers,
360  const int writer_ids[]);
361 
362 /*----------------------------------------------------------------------------*/
376 /*----------------------------------------------------------------------------*/
377 
378 void
379 cs_post_define_surface_mesh(int mesh_id,
380  const char *mesh_name,
381  const char *i_face_criteria,
382  const char *b_face_criteria,
383  bool add_groups,
384  bool auto_variables,
385  int n_writers,
386  const int writer_ids[]);
387 
388 /*----------------------------------------------------------------------------*/
419 /*----------------------------------------------------------------------------*/
420 
421 void
423  const char *mesh_name,
424  cs_post_elt_select_t *i_face_select_func,
425  cs_post_elt_select_t *b_face_select_func,
426  void *i_face_select_input,
427  void *b_face_select_input,
428  bool time_varying,
429  bool add_groups,
430  bool auto_variables,
431  int n_writers,
432  const int writer_ids[]);
433 
434 /*----------------------------------------------------------------------------*/
459 /*----------------------------------------------------------------------------*/
460 
461 void
463  const char *mesh_name,
464  const char *cell_criteria,
465  double density,
466  bool trajectory,
467  bool auto_variables,
468  int n_writers,
469  const int writer_ids[]);
470 
471 /*----------------------------------------------------------------------------*/
501 /*----------------------------------------------------------------------------*/
502 
503 void
505  const char *mesh_name,
506  cs_post_elt_select_t *p_select_func,
507  void *p_select_input,
508  bool trajectory,
509  bool auto_variables,
510  int n_writers,
511  const int writer_ids[]);
512 
513 /*----------------------------------------------------------------------------*/
543 /*----------------------------------------------------------------------------*/
544 
545 void
546 cs_post_define_existing_mesh(int mesh_id,
547  fvm_nodal_t *exp_mesh,
548  int dim_shift,
549  bool transfer,
550  bool auto_variables,
551  int n_writers,
552  const int writer_ids[]);
553 
554 /*----------------------------------------------------------------------------*/
571 /*----------------------------------------------------------------------------*/
572 
573 void
574 cs_post_define_edges_mesh(int mesh_id,
575  int base_mesh_id,
576  int n_writers,
577  const int writer_ids[]);
578 
579 /*----------------------------------------------------------------------------*/
594 /*----------------------------------------------------------------------------*/
595 
596 void
597 cs_post_mesh_attach_writer(int mesh_id,
598  int writer_id);
599 
600 /*----------------------------------------------------------------------------*/
615 /*----------------------------------------------------------------------------*/
616 
617 void
618 cs_post_mesh_detach_writer(int mesh_id,
619  int writer_id);
620 
621 /*----------------------------------------------------------------------------*/
637 /*----------------------------------------------------------------------------*/
638 
639 const int *
640 cs_post_mesh_get_ent_flag(int mesh_id);
641 
642 /*----------------------------------------------------------------------------*/
650 /*----------------------------------------------------------------------------*/
651 
652 cs_lnum_t
653 cs_post_mesh_get_n_cells(int mesh_id);
654 
655 /*----------------------------------------------------------------------------*/
666 /*----------------------------------------------------------------------------*/
667 
668 void
669 cs_post_mesh_get_cell_ids(int mesh_id,
670  cs_lnum_t *cell_ids);
671 
672 /*----------------------------------------------------------------------------*/
680 /*----------------------------------------------------------------------------*/
681 
682 cs_lnum_t
683 cs_post_mesh_get_n_i_faces(int mesh_id);
684 
685 /*----------------------------------------------------------------------------*/
696 /*----------------------------------------------------------------------------*/
697 
698 void
699 cs_post_mesh_get_i_face_ids(int mesh_id,
700  cs_lnum_t i_face_ids[]);
701 
702 /*----------------------------------------------------------------------------*/
710 /*----------------------------------------------------------------------------*/
711 
712 cs_lnum_t
713 cs_post_mesh_get_n_b_faces(int mesh_id);
714 
715 /*----------------------------------------------------------------------------*/
726 /*----------------------------------------------------------------------------*/
727 
728 void
729 cs_post_mesh_get_b_face_ids(int mesh_id,
730  cs_lnum_t b_face_ids[]);
731 
732 /*----------------------------------------------------------------------------*/
740 /*----------------------------------------------------------------------------*/
741 
742 cs_lnum_t
743 cs_post_mesh_get_n_vertices(int mesh_id);
744 
745 /*----------------------------------------------------------------------------*/
756 /*----------------------------------------------------------------------------*/
757 
758 void
759 cs_post_mesh_get_vertex_ids(int mesh_id,
760  cs_lnum_t *vertex_ids);
761 
762 /*----------------------------------------------------------------------------*/
770 /*----------------------------------------------------------------------------*/
771 
772 void
773 cs_post_mesh_set_post_domain(int mesh_id,
774  bool post_domain);
775 
776 /*----------------------------------------------------------------------------*/
788 /*----------------------------------------------------------------------------*/
789 
790 void
791 cs_post_free_mesh(int mesh_id);
792 
793 /*----------------------------------------------------------------------------*/
801 /*----------------------------------------------------------------------------*/
802 
803 bool
804 cs_post_writer_exists(int writer_id);
805 
806 /*----------------------------------------------------------------------------*/
814 /*----------------------------------------------------------------------------*/
815 
816 bool
817 cs_post_mesh_exists(int mesh_id);
818 
819 /*----------------------------------------------------------------------------*/
825 /*----------------------------------------------------------------------------*/
826 
827 const char *
829 
830 /*----------------------------------------------------------------------------*/
836 /*----------------------------------------------------------------------------*/
837 
838 const char *
840 
841 /*----------------------------------------------------------------------------*/
847 /*----------------------------------------------------------------------------*/
848 
849 int
851 
852 /*----------------------------------------------------------------------------*/
858 /*----------------------------------------------------------------------------*/
859 
860 int
862 
863 /*----------------------------------------------------------------------------*/
873 /*----------------------------------------------------------------------------*/
874 
875 void
877 
878 /*----------------------------------------------------------------------------*/
886 /*----------------------------------------------------------------------------*/
887 
888 void
889 cs_post_activate_writer(int writer_id,
890  bool activate);
891 
892 /*----------------------------------------------------------------------------*/
907 /*----------------------------------------------------------------------------*/
908 
909 void
910 cs_post_disable_writer(int writer_id);
911 
912 /*----------------------------------------------------------------------------*/
926 /*----------------------------------------------------------------------------*/
927 
928 void
929 cs_post_enable_writer(int writer_id);
930 
931 /*----------------------------------------------------------------------------*/
939 /*----------------------------------------------------------------------------*/
940 
941 fvm_writer_t *
942 cs_post_get_writer(int writer_id);
943 
944 /*----------------------------------------------------------------------------*/
952 /*----------------------------------------------------------------------------*/
953 
955 cs_post_get_writer_time_dep(int writer_id);
956 
957 /*----------------------------------------------------------------------------*/
967 /*----------------------------------------------------------------------------*/
968 
969 void
970 cs_post_add_writer_t_step(int writer_id,
971  int nt);
972 
973 /*----------------------------------------------------------------------------*/
983 /*----------------------------------------------------------------------------*/
984 
985 void
986 cs_post_add_writer_t_value(int writer_id,
987  double t);
988 
989 /*----------------------------------------------------------------------------*/
998 /*----------------------------------------------------------------------------*/
999 
1000 void
1002 
1003 /*----------------------------------------------------------------------------*/
1024 /*----------------------------------------------------------------------------*/
1025 
1026 void
1027 cs_post_write_var(int mesh_id,
1028  int writer_id,
1029  const char *var_name,
1030  int var_dim,
1031  bool interlace,
1032  bool use_parent,
1033  cs_post_type_t var_type,
1034  const void *cel_vals,
1035  const void *i_face_vals,
1036  const void *b_face_vals,
1037  const cs_time_step_t *ts);
1038 
1039 /*----------------------------------------------------------------------------*/
1058 /*----------------------------------------------------------------------------*/
1059 
1060 void
1061 cs_post_write_vertex_var(int mesh_id,
1062  int writer_id,
1063  const char *var_name,
1064  int var_dim,
1065  bool interlace,
1066  bool use_parent,
1067  cs_post_type_t var_type,
1068  const void *vtx_vals,
1069  const cs_time_step_t *ts);
1070 
1071 /*----------------------------------------------------------------------------*/
1086 /*----------------------------------------------------------------------------*/
1087 
1088 void
1089 cs_post_write_particle_values(int mesh_id,
1090  int writer_id,
1091  int attr_id,
1092  const char *var_name,
1093  int component_id,
1094  const cs_time_step_t *ts);
1095 
1096 /*----------------------------------------------------------------------------*/
1117 /*----------------------------------------------------------------------------*/
1118 
1119 void
1120 cs_post_write_probe_values(int mesh_id,
1121  int writer_id,
1122  const char *var_name,
1123  int var_dim,
1124  cs_post_type_t var_type,
1125  int parent_location_id,
1126  cs_interpolate_from_location_t *interpolate_func,
1127  void *interpolate_input,
1128  const void *vals,
1129  const cs_time_step_t *ts);
1130 
1131 /*----------------------------------------------------------------------------*/
1143 /*----------------------------------------------------------------------------*/
1144 
1145 void
1146 cs_post_renum_cells(const cs_lnum_t init_cell_num[]);
1147 
1148 /*----------------------------------------------------------------------------*/
1161 /*----------------------------------------------------------------------------*/
1162 
1163 void
1164 cs_post_renum_faces(const cs_lnum_t init_i_face_num[],
1165  const cs_lnum_t init_b_face_num[]);
1166 
1167 /*----------------------------------------------------------------------------*/
1173 /*----------------------------------------------------------------------------*/
1174 
1175 void
1177 
1178 /*----------------------------------------------------------------------------*/
1189 /*----------------------------------------------------------------------------*/
1190 
1191 void
1193 
1194 /*----------------------------------------------------------------------------*/
1198 /*----------------------------------------------------------------------------*/
1199 
1200 void
1201 cs_post_init_writers(void);
1202 
1203 /*----------------------------------------------------------------------------*/
1221 /*----------------------------------------------------------------------------*/
1222 
1223 void
1224 cs_post_init_meshes(int check_mask);
1225 
1226 /*----------------------------------------------------------------------------*/
1233 /*----------------------------------------------------------------------------*/
1234 
1235 void
1237 
1238 /*----------------------------------------------------------------------------*/
1248 /*----------------------------------------------------------------------------*/
1249 
1250 void
1252 
1253 /*----------------------------------------------------------------------------*/
1258 /*----------------------------------------------------------------------------*/
1259 
1260 void
1261 cs_post_time_step_end(void);
1262 
1263 /*----------------------------------------------------------------------------*/
1273 /*----------------------------------------------------------------------------*/
1274 
1275 void
1277 
1278 /*----------------------------------------------------------------------------*/
1282 /*----------------------------------------------------------------------------*/
1283 
1284 void
1285 cs_post_finalize(void);
1286 
1287 /*----------------------------------------------------------------------------*/
1291 /*----------------------------------------------------------------------------*/
1292 
1293 void
1295 
1296 /*----------------------------------------------------------------------------*/
1302 /*----------------------------------------------------------------------------*/
1303 
1304 void
1306 
1307 /*----------------------------------------------------------------------------*/
1318 /*----------------------------------------------------------------------------*/
1319 
1320 int
1322 
1323 /*----------------------------------------------------------------------------*/
1337 /*----------------------------------------------------------------------------*/
1338 
1339 void
1341  void *input);
1342 
1343 /*----------------------------------------------------------------------------*/
1357 /*----------------------------------------------------------------------------*/
1358 
1359 void
1361  void *input);
1362 
1363 /*----------------------------------------------------------------------------*/
1364 
1366 
1367 #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:6552
Definition: cs_post.h:95
const char * cs_post_get_default_format(void)
Return the default writer format name.
Definition: cs_post.c:4650
time step descriptor
Definition: cs_time_step.h:51
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:4334
void cs_post_init_error_writer(void)
Initialize post-processing writer with same format and associated options as default writer...
Definition: cs_post.c:6891
cs_post_type_t
Postprocessing input variable type.
Definition: cs_post.h:90
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 frequency_n, double frequency_t)
Define a writer; this objects manages a case&#39;s name, directory, and format, as well as associated mes...
Definition: cs_post.c:3438
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:4859
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:6508
Definition: cs_post.h:94
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:3752
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:4449
void cs_post_free_mesh(int mesh_id)
Remove a post-processing mesh.
Definition: cs_post.c:4531
void cs_post_init_writers(void)
Initialize post-processing writers.
Definition: cs_post.c:5927
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:4710
void cs_post_mesh_attach_writer(int mesh_id, int writer_id)
Associate a writer to a postprocessing mesh.
Definition: cs_post.c:4119
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
const int * cs_post_mesh_get_ent_flag(int mesh_id)
Get a postprocessing meshes entity presence flag.
Definition: cs_post.c:4227
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:3888
int cs_post_get_free_writer_id(void)
Return the next "reservable" (i.e. non-user) writer id available.
Definition: cs_post.c:4678
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:6941
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:3954
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:4822
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:4508
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:4890
Definition: cs_post.h:91
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:5805
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:5058
void cs_post_init_meshes(int check_mask)
Initialize main post-processing meshes.
Definition: cs_post.c:6041
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:4407
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:4377
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:4304
const char * cs_post_get_default_format_options(void)
Return the default writer format options.
Definition: cs_post.c:4664
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:3820
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:7027
void cs_post_write_meshes(const cs_time_step_t *ts)
Output post-processing meshes using associated writers.
Definition: cs_post.c:5001
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:4915
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:122
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:3574
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:93
void() cs_post_time_dep_output_t(void *input, const cs_time_step_t *ts)
Definition: cs_post.h:145
void cs_post_finalize(void)
Destroy all structures associated with post-processing.
Definition: cs_post.c:6575
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:5597
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:3681
void cs_post_mesh_detach_writer(int mesh_id, int writer_id)
De-associate a writer from a postprocessing mesh.
Definition: cs_post.c:4171
void cs_post_set_changing_connectivity(void)
Configure the post-processing output so that mesh connectivity may be automatically updated...
Definition: cs_post.c:5915
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:179
void cs_post_time_step_output(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition: cs_post.c:6244
int cs_post_get_free_mesh_id(void)
Return the next "reservable" (i.e. non-user) mesh id available.
Definition: cs_post.c:4692
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:5428
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:4479
void cs_post_set_deformable(void)
Configure the post-processing output so that a mesh displacement field may be output automatically fo...
Definition: cs_post.c:5896
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:5306
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
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:4245
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:4275
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:4785
void cs_post_add_free_faces(void)
Postprocess free (isolated) faces of the current global mesh.
Definition: cs_post.c:6680
#define END_C_DECLS
Definition: cs_defs.h:454
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:4974
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:6986
Definition: cs_post.h:92
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:4078
Definition: cs_field_pointer.h:96
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:4625
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:4946
bool cs_post_writer_exists(int writer_id)
Check for the existence of a writer of the given id.
Definition: cs_post.c:4596
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:3634
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:5729
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:6211