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 
75 /* Default mesh ids */
76 
77 #define CS_POST_MESH_VOLUME -1 /* volume mesh output */
78 #define CS_POST_MESH_BOUNDARY -2 /* boundary mesh output */
79 #define CS_POST_MESH_PARTICLES -3 /* particle output */
80 #define CS_POST_MESH_TRAJECTORIES -4 /* particle output */
81 #define CS_POST_MESH_PROBES -5 /* probes output */
82 
83 /*============================================================================
84  * Local type definitions
85  *============================================================================*/
86 
87 /* Datatype enumeration */
88 
89 typedef enum {
96 
97 /*----------------------------------------------------------------------------
98  * Function pointer to elements selection definition.
99  *
100  * Each function of this sort may be used to select a given type of element,
101  * usually cells, interior faces, boundary faces, or particles.
102  *
103  * If non-empty and not containing all elements, a list of elements of the
104  * main mesh should be allocated (using BFT_MALLOC) and defined by this
105  * function when called. This list's lifecycle is then managed by the
106  * postprocessing subsystem.
107  *
108  * Note: if the input pointer is non-NULL, it must point to valid data
109  * when the selection function is called, so either:
110  * - that value or structure should not be temporary (i.e. local);
111  * - post-processing output must be ensured using cs_post_write_meshes()
112  * with a fixed-mesh writer before the data pointed to goes out of scope;
113  *
114  * parameters:
115  * input <-> pointer to optional (untyped) value or structure.
116  * n_elts --> number of selected elements.
117  * elt_list --> list of selected elements (0 to n-1 numbering).
118  *----------------------------------------------------------------------------*/
119 
120 typedef void
121 (cs_post_elt_select_t) (void *input,
122  cs_lnum_t *n_elts,
123  cs_lnum_t **elt_list);
124 
125 /*----------------------------------------------------------------------------
126  * Function pointer associated with a specific post-processing output.
127  *
128  * Such functions are registered using the cs_post_add_time_dep_vars(),
129  * and all registered functions are automatically called by
130  * cs_post_write_vars().
131  *
132  * Note: if the input pointer is non-NULL, it must point to valid data
133  * when the output function is called, so either:
134  * - that value or structure should not be temporary (i.e. local);
135  * - post-processing output must be ensured using cs_post_write_var()
136  * or similar before the data pointed to goes out of scope.
137  *
138  * parameters:
139  * input <-> pointer to optional (untyped) value or structure.
140  * ts <-- time step status structure, or NULL
141  *----------------------------------------------------------------------------*/
142 
143 typedef void
145  const cs_time_step_t *ts);
146 
147 /*----------------------------------------------------------------------------
148  * Function pointer associated with a specific post-processing output
149  * on multiple meshes.
150  *
151  * Such functions are registered using the cs_post_add_time_mesh_dep_vars(),
152  * and all registered functions are automatically called by
153  * cs_post_write_vars().
154  *
155  * Note: if the input pointer is non-NULL, it must point to valid data
156  * when the output function is called, so either:
157  * - that value or structure should not be temporary (i.e. local);
158  * - post-processing output must be ensured using cs_post_write_var()
159  * or similar before the data pointed to goes out of scope.
160  *
161  * parameters:
162  * input <-> pointer to optional (untyped) value or structure.
163  * mesh_id <-- id of the output mesh for the current call
164  * cat_id <-- category id of the output mesh for the current call
165  * ent_flag <-- indicate global presence of cells (ent_flag[0]), interior
166  * faces (ent_flag[1]), boundary faces (ent_flag[2]),
167  * particles (ent_flag[3]) or probes (ent_flag[4])
168  * n_cells <-- local number of cells of post_mesh
169  * n_i_faces <-- local number of interior faces of post_mesh
170  * n_b_faces <-- local number of boundary faces of post_mesh
171  * cell_ids <-- list of cells (0 to n-1) of post-processing mesh
172  * i_face_ids <-- list of interior faces (0 to n-1) of post-processing mesh
173  * b_face_ids <-- list of boundary faces (0 to n-1) of post-processing mesh
174  * ts <-- time step status structure, or NULL
175  *----------------------------------------------------------------------------*/
176 
177 typedef void
179  int mesh_id,
180  int cat_id,
181  int ent_flag[5],
182  cs_lnum_t n_cells,
183  cs_lnum_t n_i_faces,
184  cs_lnum_t n_b_faces,
185  const cs_lnum_t cell_ids[],
186  const cs_lnum_t i_face_ids[],
187  const cs_lnum_t b_face_ids[],
188  const cs_time_step_t *ts);
189 
190 /*=============================================================================
191  * Global variables
192  *============================================================================*/
193 
194 /*============================================================================
195  * Public function prototypes
196  *============================================================================*/
197 
198 /*----------------------------------------------------------------------------*/
283 /*----------------------------------------------------------------------------*/
284 
285 void
286 cs_post_define_writer(int writer_id,
287  const char *case_name,
288  const char *dir_name,
289  const char *fmt_name,
290  const char *fmt_opts,
291  fvm_writer_time_dep_t time_dep,
292  bool output_at_start,
293  bool output_at_end,
294  int frequency_n,
295  double frequency_t);
296 
297 /*----------------------------------------------------------------------------*/
310 /*----------------------------------------------------------------------------*/
311 
312 void
313 cs_post_define_volume_mesh(int mesh_id,
314  const char *mesh_name,
315  const char *cell_criteria,
316  bool add_groups,
317  bool auto_variables,
318  int n_writers,
319  const int writer_ids[]);
320 
321 /*----------------------------------------------------------------------------*/
348 /*----------------------------------------------------------------------------*/
349 
350 void
352  const char *mesh_name,
353  cs_post_elt_select_t *cell_select_func,
354  void *cell_select_input,
355  bool time_varying,
356  bool add_groups,
357  bool auto_variables,
358  int n_writers,
359  const int writer_ids[]);
360 
361 /*----------------------------------------------------------------------------*/
375 /*----------------------------------------------------------------------------*/
376 
377 void
378 cs_post_define_surface_mesh(int mesh_id,
379  const char *mesh_name,
380  const char *i_face_criteria,
381  const char *b_face_criteria,
382  bool add_groups,
383  bool auto_variables,
384  int n_writers,
385  const int writer_ids[]);
386 
387 /*----------------------------------------------------------------------------*/
418 /*----------------------------------------------------------------------------*/
419 
420 void
422  const char *mesh_name,
423  cs_post_elt_select_t *i_face_select_func,
424  cs_post_elt_select_t *b_face_select_func,
425  void *i_face_select_input,
426  void *b_face_select_input,
427  bool time_varying,
428  bool add_groups,
429  bool auto_variables,
430  int n_writers,
431  const int writer_ids[]);
432 
433 /*----------------------------------------------------------------------------*/
458 /*----------------------------------------------------------------------------*/
459 
460 void
462  const char *mesh_name,
463  const char *cell_criteria,
464  double density,
465  bool trajectory,
466  bool auto_variables,
467  int n_writers,
468  const int writer_ids[]);
469 
470 /*----------------------------------------------------------------------------*/
500 /*----------------------------------------------------------------------------*/
501 
502 void
504  const char *mesh_name,
505  cs_post_elt_select_t *p_select_func,
506  void *p_select_input,
507  bool trajectory,
508  bool auto_variables,
509  int n_writers,
510  const int writer_ids[]);
511 
512 /*----------------------------------------------------------------------------*/
542 /*----------------------------------------------------------------------------*/
543 
544 void
545 cs_post_define_existing_mesh(int mesh_id,
546  fvm_nodal_t *exp_mesh,
547  int dim_shift,
548  bool transfer,
549  bool auto_variables,
550  int n_writers,
551  const int writer_ids[]);
552 
553 /*----------------------------------------------------------------------------*/
570 /*----------------------------------------------------------------------------*/
571 
572 void
573 cs_post_define_edges_mesh(int mesh_id,
574  int base_mesh_id,
575  int n_writers,
576  const int writer_ids[]);
577 
578 /*----------------------------------------------------------------------------*/
593 /*----------------------------------------------------------------------------*/
594 
595 void
596 cs_post_mesh_attach_writer(int mesh_id,
597  int writer_id);
598 
599 /*----------------------------------------------------------------------------*/
614 /*----------------------------------------------------------------------------*/
615 
616 void
617 cs_post_mesh_detach_writer(int mesh_id,
618  int writer_id);
619 
620 /*----------------------------------------------------------------------------*/
636 /*----------------------------------------------------------------------------*/
637 
638 const int *
639 cs_post_mesh_get_ent_flag(int mesh_id);
640 
641 /*----------------------------------------------------------------------------*/
649 /*----------------------------------------------------------------------------*/
650 
651 cs_lnum_t
652 cs_post_mesh_get_n_cells(int mesh_id);
653 
654 /*----------------------------------------------------------------------------*/
665 /*----------------------------------------------------------------------------*/
666 
667 void
668 cs_post_mesh_get_cell_ids(int mesh_id,
669  cs_lnum_t *cell_ids);
670 
671 /*----------------------------------------------------------------------------*/
679 /*----------------------------------------------------------------------------*/
680 
681 cs_lnum_t
682 cs_post_mesh_get_n_i_faces(int mesh_id);
683 
684 /*----------------------------------------------------------------------------*/
695 /*----------------------------------------------------------------------------*/
696 
697 void
698 cs_post_mesh_get_i_face_ids(int mesh_id,
699  cs_lnum_t i_face_ids[]);
700 
701 /*----------------------------------------------------------------------------*/
709 /*----------------------------------------------------------------------------*/
710 
711 cs_lnum_t
712 cs_post_mesh_get_n_b_faces(int mesh_id);
713 
714 /*----------------------------------------------------------------------------*/
725 /*----------------------------------------------------------------------------*/
726 
727 void
728 cs_post_mesh_get_b_face_ids(int mesh_id,
729  cs_lnum_t b_face_ids[]);
730 
731 /*----------------------------------------------------------------------------*/
739 /*----------------------------------------------------------------------------*/
740 
741 cs_lnum_t
742 cs_post_mesh_get_n_vertices(int mesh_id);
743 
744 /*----------------------------------------------------------------------------*/
755 /*----------------------------------------------------------------------------*/
756 
757 void
758 cs_post_mesh_get_vertex_ids(int mesh_id,
759  cs_lnum_t *vertex_ids);
760 
761 /*----------------------------------------------------------------------------*/
769 /*----------------------------------------------------------------------------*/
770 
771 void
772 cs_post_mesh_set_post_domain(int mesh_id,
773  bool post_domain);
774 
775 /*----------------------------------------------------------------------------*/
787 /*----------------------------------------------------------------------------*/
788 
789 void
790 cs_post_free_mesh(int mesh_id);
791 
792 /*----------------------------------------------------------------------------*/
800 /*----------------------------------------------------------------------------*/
801 
802 bool
803 cs_post_writer_exists(int writer_id);
804 
805 /*----------------------------------------------------------------------------*/
813 /*----------------------------------------------------------------------------*/
814 
815 bool
816 cs_post_mesh_exists(int mesh_id);
817 
818 /*----------------------------------------------------------------------------*/
824 /*----------------------------------------------------------------------------*/
825 
826 const char *
828 
829 /*----------------------------------------------------------------------------*/
835 /*----------------------------------------------------------------------------*/
836 
837 const char *
839 
840 /*----------------------------------------------------------------------------*/
846 /*----------------------------------------------------------------------------*/
847 
848 int
850 
851 /*----------------------------------------------------------------------------*/
857 /*----------------------------------------------------------------------------*/
858 
859 int
861 
862 /*----------------------------------------------------------------------------*/
872 /*----------------------------------------------------------------------------*/
873 
874 void
876 
877 /*----------------------------------------------------------------------------*/
885 /*----------------------------------------------------------------------------*/
886 
887 void
888 cs_post_activate_writer(int writer_id,
889  bool activate);
890 
891 /*----------------------------------------------------------------------------*/
906 /*----------------------------------------------------------------------------*/
907 
908 void
909 cs_post_disable_writer(int writer_id);
910 
911 /*----------------------------------------------------------------------------*/
925 /*----------------------------------------------------------------------------*/
926 
927 void
928 cs_post_enable_writer(int writer_id);
929 
930 /*----------------------------------------------------------------------------*/
938 /*----------------------------------------------------------------------------*/
939 
940 fvm_writer_t *
941 cs_post_get_writer(int writer_id);
942 
943 /*----------------------------------------------------------------------------*/
951 /*----------------------------------------------------------------------------*/
952 
954 cs_post_get_writer_time_dep(int writer_id);
955 
956 /*----------------------------------------------------------------------------*/
966 /*----------------------------------------------------------------------------*/
967 
968 void
969 cs_post_add_writer_t_step(int writer_id,
970  int nt);
971 
972 /*----------------------------------------------------------------------------*/
982 /*----------------------------------------------------------------------------*/
983 
984 void
985 cs_post_add_writer_t_value(int writer_id,
986  double t);
987 
988 /*----------------------------------------------------------------------------*/
997 /*----------------------------------------------------------------------------*/
998 
999 void
1001 
1002 /*----------------------------------------------------------------------------*/
1023 /*----------------------------------------------------------------------------*/
1024 
1025 void
1026 cs_post_write_var(int mesh_id,
1027  int writer_id,
1028  const char *var_name,
1029  int var_dim,
1030  bool interlace,
1031  bool use_parent,
1032  cs_post_type_t var_type,
1033  const void *cel_vals,
1034  const void *i_face_vals,
1035  const void *b_face_vals,
1036  const cs_time_step_t *ts);
1037 
1038 /*----------------------------------------------------------------------------*/
1057 /*----------------------------------------------------------------------------*/
1058 
1059 void
1060 cs_post_write_vertex_var(int mesh_id,
1061  int writer_id,
1062  const char *var_name,
1063  int var_dim,
1064  bool interlace,
1065  bool use_parent,
1066  cs_post_type_t var_type,
1067  const void *vtx_vals,
1068  const cs_time_step_t *ts);
1069 
1070 /*----------------------------------------------------------------------------*/
1085 /*----------------------------------------------------------------------------*/
1086 
1087 void
1088 cs_post_write_particle_values(int mesh_id,
1089  int writer_id,
1090  int attr_id,
1091  const char *var_name,
1092  int component_id,
1093  const cs_time_step_t *ts);
1094 
1095 /*----------------------------------------------------------------------------*/
1116 /*----------------------------------------------------------------------------*/
1117 
1118 void
1119 cs_post_write_probe_values(int mesh_id,
1120  int writer_id,
1121  const char *var_name,
1122  int var_dim,
1123  cs_post_type_t var_type,
1124  int parent_location_id,
1125  cs_interpolate_from_location_t *interpolate_func,
1126  void *interpolate_input,
1127  const void *vals,
1128  const cs_time_step_t *ts);
1129 
1130 /*----------------------------------------------------------------------------*/
1142 /*----------------------------------------------------------------------------*/
1143 
1144 void
1145 cs_post_renum_cells(const cs_lnum_t init_cell_num[]);
1146 
1147 /*----------------------------------------------------------------------------*/
1160 /*----------------------------------------------------------------------------*/
1161 
1162 void
1163 cs_post_renum_faces(const cs_lnum_t init_i_face_num[],
1164  const cs_lnum_t init_b_face_num[]);
1165 
1166 /*----------------------------------------------------------------------------*/
1172 /*----------------------------------------------------------------------------*/
1173 
1174 void
1176 
1177 /*----------------------------------------------------------------------------*/
1188 /*----------------------------------------------------------------------------*/
1189 
1190 void
1192 
1193 /*----------------------------------------------------------------------------*/
1197 /*----------------------------------------------------------------------------*/
1198 
1199 void
1200 cs_post_init_writers(void);
1201 
1202 /*----------------------------------------------------------------------------*/
1220 /*----------------------------------------------------------------------------*/
1221 
1222 void
1223 cs_post_init_meshes(int check_mask);
1224 
1225 /*----------------------------------------------------------------------------*/
1232 /*----------------------------------------------------------------------------*/
1233 
1234 void
1236 
1237 /*----------------------------------------------------------------------------*/
1247 /*----------------------------------------------------------------------------*/
1248 
1249 void
1251 
1252 /*----------------------------------------------------------------------------*/
1257 /*----------------------------------------------------------------------------*/
1258 
1259 void
1260 cs_post_time_step_end(void);
1261 
1262 /*----------------------------------------------------------------------------*/
1272 /*----------------------------------------------------------------------------*/
1273 
1274 void
1276 
1277 /*----------------------------------------------------------------------------*/
1281 /*----------------------------------------------------------------------------*/
1282 
1283 void
1284 cs_post_finalize(void);
1285 
1286 /*----------------------------------------------------------------------------*/
1290 /*----------------------------------------------------------------------------*/
1291 
1292 void
1294 
1295 /*----------------------------------------------------------------------------*/
1301 /*----------------------------------------------------------------------------*/
1302 
1303 void
1305 
1306 /*----------------------------------------------------------------------------*/
1317 /*----------------------------------------------------------------------------*/
1318 
1319 int
1321 
1322 /*----------------------------------------------------------------------------*/
1336 /*----------------------------------------------------------------------------*/
1337 
1338 void
1340  void *input);
1341 
1342 /*----------------------------------------------------------------------------*/
1356 /*----------------------------------------------------------------------------*/
1357 
1358 void
1360  void *input);
1361 
1362 /*----------------------------------------------------------------------------*/
1363 
1365 
1366 #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:6542
Definition: cs_post.h:94
const char * cs_post_get_default_format(void)
Return the default writer format name.
Definition: cs_post.c:4652
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:4336
void cs_post_init_error_writer(void)
Initialize post-processing writer with same format and associated options as default writer...
Definition: cs_post.c:6881
cs_post_type_t
Postprocessing input variable type.
Definition: cs_post.h:89
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:3440
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:4861
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:6498
Definition: cs_post.h:93
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:3754
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:4451
void cs_post_free_mesh(int mesh_id)
Remove a post-processing mesh.
Definition: cs_post.c:4533
void cs_post_init_writers(void)
Initialize post-processing writers.
Definition: cs_post.c:5929
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:4712
void cs_post_mesh_attach_writer(int mesh_id, int writer_id)
Associate a writer to a postprocessing mesh.
Definition: cs_post.c:4121
#define BEGIN_C_DECLS
Definition: cs_defs.h:451
const int * cs_post_mesh_get_ent_flag(int mesh_id)
Get a postprocessing meshes entity presence flag.
Definition: cs_post.c:4229
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:3890
int cs_post_get_free_writer_id(void)
Return the next "reservable" (i.e. non-user) writer id available.
Definition: cs_post.c:4680
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:6931
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:3956
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:4824
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:4510
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:4892
Definition: cs_post.h:90
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:5807
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:5060
void cs_post_init_meshes(int check_mask)
Initialize main post-processing meshes.
Definition: cs_post.c:6029
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:4409
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:4379
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:4306
const char * cs_post_get_default_format_options(void)
Return the default writer format options.
Definition: cs_post.c:4666
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:3822
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:7017
void cs_post_write_meshes(const cs_time_step_t *ts)
Output post-processing meshes using associated writers.
Definition: cs_post.c:5003
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:4917
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:121
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:3576
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:92
void() cs_post_time_dep_output_t(void *input, const cs_time_step_t *ts)
Definition: cs_post.h:144
void cs_post_finalize(void)
Destroy all structures associated with post-processing.
Definition: cs_post.c:6565
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:5599
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:3683
void cs_post_mesh_detach_writer(int mesh_id, int writer_id)
De-associate a writer from a postprocessing mesh.
Definition: cs_post.c:4173
void cs_post_set_changing_connectivity(void)
Configure the post-processing output so that mesh connectivity may be automatically updated...
Definition: cs_post.c:5917
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:178
void cs_post_time_step_output(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition: cs_post.c:6234
int cs_post_get_free_mesh_id(void)
Return the next "reservable" (i.e. non-user) mesh id available.
Definition: cs_post.c:4694
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:5430
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:4481
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:5898
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:5308
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:4247
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:4277
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:4787
void cs_post_add_free_faces(void)
Postprocess free (isolated) faces of the current global mesh.
Definition: cs_post.c:6670
#define END_C_DECLS
Definition: cs_defs.h:452
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:4976
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:6976
Definition: cs_post.h:91
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:4080
Definition: cs_field_pointer.h:94
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:4627
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:4948
bool cs_post_writer_exists(int writer_id)
Check for the existence of a writer of the given id.
Definition: cs_post.c:4598
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:3636
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:5731
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:6201