My Project
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-2019 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 /* 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 {
102 
103 /*----------------------------------------------------------------------------
104  * Function pointer to elements selection definition.
105  *
106  * Each function of this sort may be used to select a given type of element,
107  * usually cells, interior faces, boundary faces, or particles.
108  *
109  * If non-empty and not containing all elements, a list of elements of the
110  * main mesh should be allocated (using BFT_MALLOC) and defined by this
111  * function when called. This list's lifecycle is then managed by the
112  * postprocessing subsystem.
113  *
114  * Note: if the input pointer is non-NULL, it must point to valid data
115  * when the selection function is called, so either:
116  * - that value or structure should not be temporary (i.e. local);
117  * - post-processing output must be ensured using cs_post_write_meshes()
118  * with a fixed-mesh writer before the data pointed to goes out of scope;
119  *
120  * parameters:
121  * input <-> pointer to optional (untyped) value or structure.
122  * n_elts --> number of selected elements.
123  * elt_list --> list of selected elements (0 to n-1 numbering).
124  *----------------------------------------------------------------------------*/
125 
126 typedef void
128  cs_lnum_t *n_elts,
129  cs_lnum_t **elt_list);
130 
131 /*----------------------------------------------------------------------------
132  * Function pointer associated with a specific post-processing output.
133  *
134  * Such functions are registered using the cs_post_add_time_dep_vars(),
135  * and all registered functions are automatically called by
136  * cs_post_write_vars().
137  *
138  * Note: if the input pointer is non-NULL, it must point to valid data
139  * when the output function is called, so either:
140  * - that value or structure should not be temporary (i.e. local);
141  * - post-processing output must be ensured using cs_post_write_var()
142  * or similar before the data pointed to goes out of scope.
143  *
144  * parameters:
145  * input <-> pointer to optional (untyped) value or structure.
146  * ts <-- time step status structure, or NULL
147  *----------------------------------------------------------------------------*/
148 
149 typedef void
151  const cs_time_step_t *ts);
152 
153 /*----------------------------------------------------------------------------
154  * Function pointer associated with a specific post-processing output
155  * on multiple meshes.
156  *
157  * Such functions are registered using the cs_post_add_time_mesh_dep_vars(),
158  * and all registered functions are automatically called by
159  * cs_post_write_vars().
160  *
161  * Note: if the input pointer is non-NULL, it must point to valid data
162  * when the output function is called, so either:
163  * - that value or structure should not be temporary (i.e. local);
164  * - post-processing output must be ensured using cs_post_write_var()
165  * or similar before the data pointed to goes out of scope.
166  *
167  * parameters:
168  * input <-> pointer to optional (untyped) value or structure.
169  * mesh_id <-- id of the output mesh for the current call
170  * cat_id <-- category id of the output mesh for the current call
171  * ent_flag <-- indicate global presence of cells (ent_flag[0]), interior
172  * faces (ent_flag[1]), boundary faces (ent_flag[2]),
173  * particles (ent_flag[3]) or probes (ent_flag[4])
174  * n_cells <-- local number of cells of post_mesh
175  * n_i_faces <-- local number of interior faces of post_mesh
176  * n_b_faces <-- local number of boundary faces of post_mesh
177  * cell_ids <-- list of cells (0 to n-1) of post-processing mesh
178  * i_face_ids <-- list of interior faces (0 to n-1) of post-processing mesh
179  * b_face_ids <-- list of boundary faces (0 to n-1) of post-processing mesh
180  * ts <-- time step status structure, or NULL
181  *----------------------------------------------------------------------------*/
182 
183 typedef void
185  int mesh_id,
186  int cat_id,
187  int ent_flag[5],
188  cs_lnum_t n_cells,
189  cs_lnum_t n_i_faces,
190  cs_lnum_t n_b_faces,
191  const cs_lnum_t cell_ids[],
192  const cs_lnum_t i_face_ids[],
193  const cs_lnum_t b_face_ids[],
194  const cs_time_step_t *ts);
195 
196 /*=============================================================================
197  * Global variables
198  *============================================================================*/
199 
200 /*============================================================================
201  * Public function prototypes
202  *============================================================================*/
203 
204 /*----------------------------------------------------------------------------*/
289 /*----------------------------------------------------------------------------*/
290 
291 void
292 cs_post_define_writer(int writer_id,
293  const char *case_name,
294  const char *dir_name,
295  const char *fmt_name,
296  const char *fmt_opts,
297  fvm_writer_time_dep_t time_dep,
298  bool output_at_start,
299  bool output_at_end,
300  int frequency_n,
301  double frequency_t);
302 
303 /*----------------------------------------------------------------------------*/
316 /*----------------------------------------------------------------------------*/
317 
318 void
319 cs_post_define_volume_mesh(int mesh_id,
320  const char *mesh_name,
321  const char *cell_criteria,
322  bool add_groups,
323  bool auto_variables,
324  int n_writers,
325  const int writer_ids[]);
326 
327 /*----------------------------------------------------------------------------*/
354 /*----------------------------------------------------------------------------*/
355 
356 void
358  const char *mesh_name,
359  cs_post_elt_select_t *cell_select_func,
360  void *cell_select_input,
361  bool time_varying,
362  bool add_groups,
363  bool auto_variables,
364  int n_writers,
365  const int writer_ids[]);
366 
367 /*----------------------------------------------------------------------------*/
381 /*----------------------------------------------------------------------------*/
382 
383 void
384 cs_post_define_surface_mesh(int mesh_id,
385  const char *mesh_name,
386  const char *i_face_criteria,
387  const char *b_face_criteria,
388  bool add_groups,
389  bool auto_variables,
390  int n_writers,
391  const int writer_ids[]);
392 
393 /*----------------------------------------------------------------------------*/
424 /*----------------------------------------------------------------------------*/
425 
426 void
428  const char *mesh_name,
429  cs_post_elt_select_t *i_face_select_func,
430  cs_post_elt_select_t *b_face_select_func,
431  void *i_face_select_input,
432  void *b_face_select_input,
433  bool time_varying,
434  bool add_groups,
435  bool auto_variables,
436  int n_writers,
437  const int writer_ids[]);
438 
439 /*----------------------------------------------------------------------------*/
464 /*----------------------------------------------------------------------------*/
465 
466 void
468  const char *mesh_name,
469  const char *cell_criteria,
470  double density,
471  bool trajectory,
472  bool auto_variables,
473  int n_writers,
474  const int writer_ids[]);
475 
476 /*----------------------------------------------------------------------------*/
506 /*----------------------------------------------------------------------------*/
507 
508 void
510  const char *mesh_name,
511  cs_post_elt_select_t *p_select_func,
512  void *p_select_input,
513  bool trajectory,
514  bool auto_variables,
515  int n_writers,
516  const int writer_ids[]);
517 
518 /*----------------------------------------------------------------------------*/
548 /*----------------------------------------------------------------------------*/
549 
550 void
551 cs_post_define_existing_mesh(int mesh_id,
552  fvm_nodal_t *exp_mesh,
553  int dim_shift,
554  bool transfer,
555  bool auto_variables,
556  int n_writers,
557  const int writer_ids[]);
558 
559 /*----------------------------------------------------------------------------*/
576 /*----------------------------------------------------------------------------*/
577 
578 void
579 cs_post_define_edges_mesh(int mesh_id,
580  int base_mesh_id,
581  int n_writers,
582  const int writer_ids[]);
583 
584 /*----------------------------------------------------------------------------*/
599 /*----------------------------------------------------------------------------*/
600 
601 void
602 cs_post_mesh_attach_writer(int mesh_id,
603  int writer_id);
604 
605 /*----------------------------------------------------------------------------*/
620 /*----------------------------------------------------------------------------*/
621 
622 void
623 cs_post_mesh_detach_writer(int mesh_id,
624  int writer_id);
625 
626 /*----------------------------------------------------------------------------*/
642 /*----------------------------------------------------------------------------*/
643 
644 const int *
645 cs_post_mesh_get_ent_flag(int mesh_id);
646 
647 /*----------------------------------------------------------------------------*/
655 /*----------------------------------------------------------------------------*/
656 
657 cs_lnum_t
658 cs_post_mesh_get_n_cells(int mesh_id);
659 
660 /*----------------------------------------------------------------------------*/
671 /*----------------------------------------------------------------------------*/
672 
673 void
674 cs_post_mesh_get_cell_ids(int mesh_id,
675  cs_lnum_t *cell_ids);
676 
677 /*----------------------------------------------------------------------------*/
685 /*----------------------------------------------------------------------------*/
686 
687 cs_lnum_t
688 cs_post_mesh_get_n_i_faces(int mesh_id);
689 
690 /*----------------------------------------------------------------------------*/
701 /*----------------------------------------------------------------------------*/
702 
703 void
704 cs_post_mesh_get_i_face_ids(int mesh_id,
705  cs_lnum_t i_face_ids[]);
706 
707 /*----------------------------------------------------------------------------*/
715 /*----------------------------------------------------------------------------*/
716 
717 cs_lnum_t
718 cs_post_mesh_get_n_b_faces(int mesh_id);
719 
720 /*----------------------------------------------------------------------------*/
731 /*----------------------------------------------------------------------------*/
732 
733 void
734 cs_post_mesh_get_b_face_ids(int mesh_id,
735  cs_lnum_t b_face_ids[]);
736 
737 /*----------------------------------------------------------------------------*/
745 /*----------------------------------------------------------------------------*/
746 
747 cs_lnum_t
748 cs_post_mesh_get_n_vertices(int mesh_id);
749 
750 /*----------------------------------------------------------------------------*/
761 /*----------------------------------------------------------------------------*/
762 
763 void
764 cs_post_mesh_get_vertex_ids(int mesh_id,
765  cs_lnum_t *vertex_ids);
766 
767 /*----------------------------------------------------------------------------*/
775 /*----------------------------------------------------------------------------*/
776 
777 void
778 cs_post_mesh_set_post_domain(int mesh_id,
779  bool post_domain);
780 
781 /*----------------------------------------------------------------------------*/
793 /*----------------------------------------------------------------------------*/
794 
795 void
796 cs_post_free_mesh(int mesh_id);
797 
798 /*----------------------------------------------------------------------------*/
806 /*----------------------------------------------------------------------------*/
807 
808 bool
809 cs_post_writer_exists(int writer_id);
810 
811 /*----------------------------------------------------------------------------*/
819 /*----------------------------------------------------------------------------*/
820 
821 bool
822 cs_post_mesh_exists(int mesh_id);
823 
824 /*----------------------------------------------------------------------------*/
830 /*----------------------------------------------------------------------------*/
831 
832 const char *
834 
835 /*----------------------------------------------------------------------------*/
841 /*----------------------------------------------------------------------------*/
842 
843 const char *
845 
846 /*----------------------------------------------------------------------------*/
852 /*----------------------------------------------------------------------------*/
853 
854 int
856 
857 /*----------------------------------------------------------------------------*/
863 /*----------------------------------------------------------------------------*/
864 
865 int
867 
868 /*----------------------------------------------------------------------------*/
878 /*----------------------------------------------------------------------------*/
879 
880 void
882 
883 /*----------------------------------------------------------------------------*/
891 /*----------------------------------------------------------------------------*/
892 
893 void
894 cs_post_activate_writer(int writer_id,
895  bool activate);
896 
897 /*----------------------------------------------------------------------------*/
912 /*----------------------------------------------------------------------------*/
913 
914 void
915 cs_post_disable_writer(int writer_id);
916 
917 /*----------------------------------------------------------------------------*/
931 /*----------------------------------------------------------------------------*/
932 
933 void
934 cs_post_enable_writer(int writer_id);
935 
936 /*----------------------------------------------------------------------------*/
944 /*----------------------------------------------------------------------------*/
945 
946 fvm_writer_t *
947 cs_post_get_writer(int writer_id);
948 
949 /*----------------------------------------------------------------------------*/
957 /*----------------------------------------------------------------------------*/
958 
960 cs_post_get_writer_time_dep(int writer_id);
961 
962 /*----------------------------------------------------------------------------*/
972 /*----------------------------------------------------------------------------*/
973 
974 void
975 cs_post_add_writer_t_step(int writer_id,
976  int nt);
977 
978 /*----------------------------------------------------------------------------*/
988 /*----------------------------------------------------------------------------*/
989 
990 void
991 cs_post_add_writer_t_value(int writer_id,
992  double t);
993 
994 /*----------------------------------------------------------------------------*/
1003 /*----------------------------------------------------------------------------*/
1004 
1005 void
1007 
1008 /*----------------------------------------------------------------------------*/
1029 /*----------------------------------------------------------------------------*/
1030 
1031 void
1032 cs_post_write_var(int mesh_id,
1033  int writer_id,
1034  const char *var_name,
1035  int var_dim,
1036  bool interlace,
1037  bool use_parent,
1038  cs_post_type_t var_type,
1039  const void *cel_vals,
1040  const void *i_face_vals,
1041  const void *b_face_vals,
1042  const cs_time_step_t *ts);
1043 
1044 /*----------------------------------------------------------------------------*/
1063 /*----------------------------------------------------------------------------*/
1064 
1065 void
1066 cs_post_write_vertex_var(int mesh_id,
1067  int writer_id,
1068  const char *var_name,
1069  int var_dim,
1070  bool interlace,
1071  bool use_parent,
1072  cs_post_type_t var_type,
1073  const void *vtx_vals,
1074  const cs_time_step_t *ts);
1075 
1076 /*----------------------------------------------------------------------------*/
1091 /*----------------------------------------------------------------------------*/
1092 
1093 void
1094 cs_post_write_particle_values(int mesh_id,
1095  int writer_id,
1096  int attr_id,
1097  const char *var_name,
1098  int component_id,
1099  const cs_time_step_t *ts);
1100 
1101 /*----------------------------------------------------------------------------*/
1122 /*----------------------------------------------------------------------------*/
1123 
1124 void
1125 cs_post_write_probe_values(int mesh_id,
1126  int writer_id,
1127  const char *var_name,
1128  int var_dim,
1129  cs_post_type_t var_type,
1130  int parent_location_id,
1131  cs_interpolate_from_location_t *interpolate_func,
1132  void *interpolate_input,
1133  const void *vals,
1134  const cs_time_step_t *ts);
1135 
1136 /*----------------------------------------------------------------------------*/
1148 /*----------------------------------------------------------------------------*/
1149 
1150 void
1151 cs_post_renum_cells(const cs_lnum_t init_cell_num[]);
1152 
1153 /*----------------------------------------------------------------------------*/
1166 /*----------------------------------------------------------------------------*/
1167 
1168 void
1169 cs_post_renum_faces(const cs_lnum_t init_i_face_num[],
1170  const cs_lnum_t init_b_face_num[]);
1171 
1172 /*----------------------------------------------------------------------------*/
1178 /*----------------------------------------------------------------------------*/
1179 
1180 void
1182 
1183 /*----------------------------------------------------------------------------*/
1194 /*----------------------------------------------------------------------------*/
1195 
1196 void
1198 
1199 /*----------------------------------------------------------------------------*/
1203 /*----------------------------------------------------------------------------*/
1204 
1205 void
1206 cs_post_init_writers(void);
1207 
1208 /*----------------------------------------------------------------------------*/
1226 /*----------------------------------------------------------------------------*/
1227 
1228 void
1229 cs_post_init_meshes(int check_mask);
1230 
1231 /*----------------------------------------------------------------------------*/
1238 /*----------------------------------------------------------------------------*/
1239 
1240 void
1242 
1243 /*----------------------------------------------------------------------------*/
1253 /*----------------------------------------------------------------------------*/
1254 
1255 void
1257 
1258 /*----------------------------------------------------------------------------*/
1263 /*----------------------------------------------------------------------------*/
1264 
1265 void
1266 cs_post_time_step_end(void);
1267 
1268 /*----------------------------------------------------------------------------*/
1278 /*----------------------------------------------------------------------------*/
1279 
1280 void
1282 
1283 /*----------------------------------------------------------------------------*/
1287 /*----------------------------------------------------------------------------*/
1288 
1289 void
1290 cs_post_finalize(void);
1291 
1292 /*----------------------------------------------------------------------------*/
1296 /*----------------------------------------------------------------------------*/
1297 
1298 void
1300 
1301 /*----------------------------------------------------------------------------*/
1307 /*----------------------------------------------------------------------------*/
1308 
1309 void
1311 
1312 /*----------------------------------------------------------------------------*/
1323 /*----------------------------------------------------------------------------*/
1324 
1325 int
1327 
1328 /*----------------------------------------------------------------------------*/
1342 /*----------------------------------------------------------------------------*/
1343 
1344 void
1346  void *input);
1347 
1348 /*----------------------------------------------------------------------------*/
1362 /*----------------------------------------------------------------------------*/
1363 
1364 void
1366  void *input);
1367 
1368 /*----------------------------------------------------------------------------*/
1369 
1371 
1372 #endif /* __CS_POST_H__ */
cs_post_time_dep_output_t
void() cs_post_time_dep_output_t(void *input, const cs_time_step_t *ts)
Definition: cs_post.h:150
cs_post_mesh_attach_writer
void cs_post_mesh_attach_writer(int mesh_id, int writer_id)
Associate a writer to a postprocessing mesh.
Definition: cs_post.c:4141
cs_post_init_writers
void cs_post_init_writers(void)
Initialize post-processing writers.
Definition: cs_post.c:5949
input
static int input(void)
cs_post_mesh_detach_writer
void cs_post_mesh_detach_writer(int mesh_id, int writer_id)
De-associate a writer from a postprocessing mesh.
Definition: cs_post.c:4193
cs_post_set_changing_connectivity
void cs_post_set_changing_connectivity(void)
Configure the post-processing output so that mesh connectivity may be automatically updated.
Definition: cs_post.c:5937
cs_post_get_free_writer_id
int cs_post_get_free_writer_id(void)
Return the next "reservable" (i.e. non-user) writer id available.
Definition: cs_post.c:4700
cs_post_write_probe_values
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:5619
cs_post_writer_exists
bool cs_post_writer_exists(int writer_id)
Check for the existence of a writer of the given id.
Definition: cs_post.c:4618
cs_post_time_mesh_dep_output_t
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:184
cs_post_write_particle_values
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:5450
cs_post_time_step_begin
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:6237
cs_post_disable_writer
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:4844
cs_interpolate.h
cs_post_mesh_get_b_face_ids
void cs_post_mesh_get_b_face_ids(int mesh_id, cs_lnum_t b_face_ids[])
Get a postprocessing mesh's list of boundary faces.
Definition: cs_post.c:4429
cs_post_define_particles_mesh
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:3842
cs_post_mesh_get_n_cells
cs_lnum_t cs_post_mesh_get_n_cells(int mesh_id)
Get a postprocessing mesh's number of cells.
Definition: cs_post.c:4267
cs_post_time_step_output
void cs_post_time_step_output(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition: cs_post.c:6270
cs_post_write_vertex_var
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:5328
cs_post_elt_select_t
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:127
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_interpolate_from_location_t
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
cs_post_get_default_format_options
const char * cs_post_get_default_format_options(void)
Return the default writer format options.
Definition: cs_post.c:4686
cs_post_add_time_mesh_dep_output
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:7050
cs_post_type_t
cs_post_type_t
Postprocessing input variable type.
Definition: cs_post.h:95
cs_post_mesh_get_cell_ids
void cs_post_mesh_get_cell_ids(int mesh_id, cs_lnum_t *cell_ids)
Get a postprocessing mesh's list of cells.
Definition: cs_post.c:4297
cs_post_define_surface_mesh_by_func
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:3774
CS_POST_TYPE_cs_real_t
Definition: cs_post.h:97
cs_post_define_edges_mesh
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:4100
fvm_writer.h
cs_post_mesh_exists
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:4647
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_post_define_volume_mesh_by_func
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:3652
atimbr::density
double precision, dimension(:,:,:), allocatable density
Definition: atimbr.f90:124
CS_POST_TYPE_int
Definition: cs_post.h:98
cs_post_activate_by_time_step
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:4732
CS_POST_TYPE_cs_int_t
Definition: cs_post.h:96
cs_post_define_particles_mesh_by_func
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:3910
cs_post_get_default_format
const char * cs_post_get_default_format(void)
Return the default writer format name.
Definition: cs_post.c:4672
cs_post_add_writer_t_step
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:4968
cs_post_write_vars
void cs_post_write_vars(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition: cs_post.c:6578
cs_post_get_writer
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:4912
cs_post_set_deformable
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:5918
cs_post_define_existing_mesh
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:3976
cs_post_define_writer
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's name, directory, and format, as well as associated mes...
Definition: cs_post.c:3456
CS_POST_TYPE_double
Definition: cs_post.h:100
cs_post_mesh_get_n_b_faces
cs_lnum_t cs_post_mesh_get_n_b_faces(int mesh_id)
Get a postprocessing mesh's number of boundary faces.
Definition: cs_post.c:4399
cs_post_renum_faces
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:5827
cs_time_step_t
time step descriptor
Definition: cs_time_step.h:51
fvm_writer_time_dep_t
fvm_writer_time_dep_t
Definition: fvm_writer.h:57
cs_post_mesh_get_n_i_faces
cs_lnum_t cs_post_mesh_get_n_i_faces(int mesh_id)
Get a postprocessing mesh's number of interior faces.
Definition: cs_post.c:4326
cs_post_add_time_dep_output
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:7009
cs_post_mesh_get_i_face_ids
void cs_post_mesh_get_i_face_ids(int mesh_id, cs_lnum_t i_face_ids[])
Get a postprocessing mesh's list of boundary faces.
Definition: cs_post.c:4356
cs_post_init_error_writer
void cs_post_init_error_writer(void)
Initialize post-processing writer with same format and associated options as default writer,...
Definition: cs_post.c:6917
cs_post_time_step_end
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:6534
ts
void cs_int_t cs_int_t cs_int_t cs_real_t * ts
Definition: cs_at_plugin.h:63
cs_post_add_writer_t_value
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:4996
CS_POST_TYPE_float
Definition: cs_post.h:99
cs_post_mesh_get_n_vertices
cs_lnum_t cs_post_mesh_get_n_vertices(int mesh_id)
Get a postprocessing mesh's number of vertices.
Definition: cs_post.c:4471
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_post_enable_writer
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:4881
cs_probe.h
cs_post_define_volume_mesh
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:3592
cs_post_finalize
void cs_post_finalize(void)
Destroy all structures associated with post-processing.
Definition: cs_post.c:6601
cs_post_mesh_get_ent_flag
const int * cs_post_mesh_get_ent_flag(int mesh_id)
Get a postprocessing meshes entity presence flag.
Definition: cs_post.c:4249
cs_time_step.h
cs_post_renum_cells
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:5751
cs_post_write_var
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:5080
cs_post_init_meshes
void cs_post_init_meshes(int check_mask)
Initialize main post-processing meshes.
Definition: cs_post.c:6063
t
Definition: cs_field_pointer.h:98
cs_post_mesh_set_post_domain
void cs_post_mesh_set_post_domain(int mesh_id, bool post_domain)
Set whether postprocessing mesh's parallel domain should be output.
Definition: cs_post.c:4530
fvm_nodal.h
cs_post_init_error_writer_cells
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:6967
cs_post_define_surface_mesh
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:3699
cs_post_mesh_get_vertex_ids
void cs_post_mesh_get_vertex_ids(int mesh_id, cs_lnum_t *vertex_ids)
Get a postprocessing mesh's list of vertices.
Definition: cs_post.c:4501
cs_post_write_meshes
void cs_post_write_meshes(const cs_time_step_t *ts)
Output post-processing meshes using associated writers.
Definition: cs_post.c:5023
cs_post_get_free_mesh_id
int cs_post_get_free_mesh_id(void)
Return the next "reservable" (i.e. non-user) mesh id available.
Definition: cs_post.c:4714
cs_post_add_free_faces
void cs_post_add_free_faces(void)
Postprocess free (isolated) faces of the current global mesh.
Definition: cs_post.c:6706
cs_post_get_writer_time_dep
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:4937
cs_post_activate_writer
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:4807
cs_post_free_mesh
void cs_post_free_mesh(int mesh_id)
Remove a post-processing mesh.
Definition: cs_post.c:4553
cs_base.h