8.0
general documentation
Loading...
Searching...
No Matches
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-2023 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#include "cs_defs.h"
31
32/*----------------------------------------------------------------------------
33 * Standard C library headers
34 *----------------------------------------------------------------------------*/
35
36/*----------------------------------------------------------------------------
37 * Local headers
38 *----------------------------------------------------------------------------*/
39
40#include "fvm_nodal.h"
41#include "fvm_writer.h"
42
43#include "cs_base.h"
44#include "cs_function.h"
45#include "cs_interpolate.h"
46#include "cs_probe.h"
47#include "cs_time_step.h"
48#include "cs_time_control.h"
49
50/*----------------------------------------------------------------------------*/
51
53
54/*============================================================================
55 * Macro definitions
56 *============================================================================*/
57
58/* Output type masks */
59
60#define CS_POST_ON_LOCATION (1 << 0) /* postprocess variables
61 on their base location
62 (volume for variables) */
63#define CS_POST_BOUNDARY_NR (1 << 1) /* postprocess boundary
64 without reconstruction */
65
66#define CS_POST_MONITOR (1 << 2) /* monitor variables */
68/* Default writer ids and filters */
70#define CS_POST_WRITER_ALL_ASSOCIATED 0
72#define CS_POST_WRITER_DEFAULT -1
73#define CS_POST_WRITER_ERRORS -2
74#define CS_POST_WRITER_PARTICLES -3
75#define CS_POST_WRITER_TRAJECTORIES -4
76#define CS_POST_WRITER_PROBES -5
77#define CS_POST_WRITER_PROFILES -6
78#define CS_POST_WRITER_HISTOGRAMS -7
80/* Default mesh ids */
82#define CS_POST_MESH_VOLUME -1
83#define CS_POST_MESH_BOUNDARY -2
84#define CS_POST_MESH_PARTICLES -3
85#define CS_POST_MESH_TRAJECTORIES -4
86#define CS_POST_MESH_PROBES -5
88/* Additional categories (no associated default mesh) */
89
90#define CS_POST_MESH_SURFACE -12 /* surface (boundary and/or
91 interior) mesh */
92
93/*============================================================================
94 * Local type definitions
95 *============================================================================*/
96
97/* Datatype enumeration (deprecated; cs_datatype_t preferred) */
101#define CS_POST_TYPE_int CS_INT_TYPE
102#define CS_POST_TYPE_cs_real_t CS_REAL_TYPE
103#define CS_POST_TYPE_float CS_FLOAT
104#define CS_POST_TYPE_double CS_DOUBLE
105
106/*----------------------------------------------------------------------------
107 * Function pointer to elements selection definition.
108 *
109 * Each function of this sort may be used to select a given type of element,
110 * usually cells, interior faces, boundary faces, or particles.
111 *
112 * If non-empty and not containing all elements, a list of elements of the
113 * main mesh should be allocated (using BFT_MALLOC) and defined by this
114 * function when called. This list's lifecycle is then managed by the
115 * postprocessing subsystem.
116 *
117 * Note: if the input pointer is non-NULL, it must point to valid data
118 * when the selection function is called, so either:
119 * - that value or structure should not be temporary (i.e. local);
120 * - post-processing output must be ensured using cs_post_write_meshes()
121 * with a fixed-mesh writer before the data pointed to goes out of scope;
122 *
123 * parameters:
124 * input <-> pointer to optional (untyped) value or structure.
125 * n_elts --> number of selected elements.
126 * elt_list --> list of selected elements (0 to n-1 numbering).
127 *----------------------------------------------------------------------------*/
128
129typedef void
130(cs_post_elt_select_t) (void *input,
131 cs_lnum_t *n_elts,
132 cs_lnum_t **elt_list);
133
134/*----------------------------------------------------------------------------
135 * Function pointer associated with a specific post-processing output.
136 *
137 * Such functions are registered using the cs_post_add_time_dep_vars(),
138 * and all registered functions are automatically called by
139 * cs_post_write_vars().
140 *
141 * Note: if the input pointer is non-NULL, it must point to valid data
142 * when the output function is called, so either:
143 * - that value or structure should not be temporary (i.e. local);
144 * - post-processing output must be ensured using cs_post_write_var()
145 * or similar before the data pointed to goes out of scope.
146 *
147 * parameters:
148 * input <-> pointer to optional (untyped) value or structure.
149 * ts <-- time step status structure, or NULL
150 *----------------------------------------------------------------------------*/
151
152typedef void
153(cs_post_time_dep_output_t) (void *input,
154 const cs_time_step_t *ts);
155
156/*----------------------------------------------------------------------------
157 * Function pointer associated with a specific post-processing output
158 * on multiple meshes.
159 *
160 * Such functions are registered using the cs_post_add_time_mesh_dep_vars(),
161 * and all registered functions are automatically called by
162 * cs_post_write_vars().
163 *
164 * Note: if the input pointer is non-NULL, it must point to valid data
165 * when the output function is called, so either:
166 * - that value or structure should not be temporary (i.e. local);
167 * - post-processing output must be ensured using cs_post_write_var()
168 * or similar before the data pointed to goes out of scope.
169 *
170 * parameters:
171 * input <-> pointer to optional (untyped) value or structure.
172 * mesh_id <-- id of the output mesh for the current call
173 * cat_id <-- category id of the output mesh for the current call
174 * ent_flag <-- indicate global presence of cells (ent_flag[0]), interior
175 * faces (ent_flag[1]), boundary faces (ent_flag[2]),
176 * particles (ent_flag[3]) or probes (ent_flag[4])
177 * n_cells <-- local number of cells of post_mesh
178 * n_i_faces <-- local number of interior faces of post_mesh
179 * n_b_faces <-- local number of boundary faces of post_mesh
180 * cell_ids <-- list of cells (0 to n-1) of post-processing mesh
181 * i_face_ids <-- list of interior faces (0 to n-1) of post-processing mesh
182 * b_face_ids <-- list of boundary faces (0 to n-1) of post-processing mesh
183 * ts <-- time step status structure, or NULL
184 *----------------------------------------------------------------------------*/
185
186typedef void
187(cs_post_time_mesh_dep_output_t) (void *input,
188 int mesh_id,
189 int cat_id,
190 int ent_flag[5],
191 cs_lnum_t n_cells,
192 cs_lnum_t n_i_faces,
193 cs_lnum_t n_b_faces,
194 const cs_lnum_t cell_ids[],
195 const cs_lnum_t i_face_ids[],
196 const cs_lnum_t b_face_ids[],
197 const cs_time_step_t *ts);
198
199/*=============================================================================
200 * Global variables
201 *============================================================================*/
202
203/*============================================================================
204 * Public function prototypes
205 *============================================================================*/
206
207/*----------------------------------------------------------------------------*/
292/*----------------------------------------------------------------------------*/
293
294void
295cs_post_define_writer(int writer_id,
296 const char *case_name,
297 const char *dir_name,
298 const char *fmt_name,
299 const char *fmt_opts,
300 fvm_writer_time_dep_t time_dep,
301 bool output_at_start,
302 bool output_at_end,
303 int interval_n,
304 double interval_t);
305
306/*----------------------------------------------------------------------------*/
319/*----------------------------------------------------------------------------*/
320
321void
323 const char *mesh_name,
324 const char *cell_criteria,
325 bool add_groups,
326 bool auto_variables,
327 int n_writers,
328 const int writer_ids[]);
329
330/*----------------------------------------------------------------------------*/
357/*----------------------------------------------------------------------------*/
358
359void
361 const char *mesh_name,
362 cs_post_elt_select_t *cell_select_func,
363 void *cell_select_input,
364 bool time_varying,
365 bool add_groups,
366 bool auto_variables,
367 int n_writers,
368 const int writer_ids[]);
369
370/*----------------------------------------------------------------------------*/
384/*----------------------------------------------------------------------------*/
385
386void
388 const char *mesh_name,
389 const char *i_face_criteria,
390 const char *b_face_criteria,
391 bool add_groups,
392 bool auto_variables,
393 int n_writers,
394 const int writer_ids[]);
395
396/*----------------------------------------------------------------------------*/
427/*----------------------------------------------------------------------------*/
428
429void
431 const char *mesh_name,
432 cs_post_elt_select_t *i_face_select_func,
433 cs_post_elt_select_t *b_face_select_func,
434 void *i_face_select_input,
435 void *b_face_select_input,
436 bool time_varying,
437 bool add_groups,
438 bool auto_variables,
439 int n_writers,
440 const int writer_ids[]);
441
442/*----------------------------------------------------------------------------*/
456/*----------------------------------------------------------------------------*/
457
458void
460 const char *mesh_name,
461 int location_id,
462 bool add_groups,
463 bool auto_variables,
464 int n_writers,
465 const int writer_ids[]);
466
467/*----------------------------------------------------------------------------*/
492/*----------------------------------------------------------------------------*/
493
494void
496 const char *mesh_name,
497 const char *cell_criteria,
498 double density,
499 bool trajectory,
500 bool auto_variables,
501 int n_writers,
502 const int writer_ids[]);
503
504/*----------------------------------------------------------------------------*/
534/*----------------------------------------------------------------------------*/
535
536void
538 const char *mesh_name,
539 cs_post_elt_select_t *p_select_func,
540 void *p_select_input,
541 bool trajectory,
542 bool auto_variables,
543 int n_writers,
544 const int writer_ids[]);
545
546/*----------------------------------------------------------------------------*/
576/*----------------------------------------------------------------------------*/
577
578void
580 fvm_nodal_t *exp_mesh,
581 int dim_shift,
582 bool transfer,
583 bool auto_variables,
584 int n_writers,
585 const int writer_ids[]);
586
587/*----------------------------------------------------------------------------*/
604/*----------------------------------------------------------------------------*/
605
606void
607cs_post_define_edges_mesh(int mesh_id,
608 int base_mesh_id,
609 int n_writers,
610 const int writer_ids[]);
611
612/*----------------------------------------------------------------------------*/
627/*----------------------------------------------------------------------------*/
628
629void
631 int writer_id);
632
633/*----------------------------------------------------------------------------*/
648/*----------------------------------------------------------------------------*/
649
650void
652 int writer_id);
653
654/*----------------------------------------------------------------------------*/
670/*----------------------------------------------------------------------------*/
671
672void
673cs_post_mesh_attach_field(int mesh_id,
674 int writer_id,
675 int field_id,
676 int comp_id);
677
678/*----------------------------------------------------------------------------*/
694/*----------------------------------------------------------------------------*/
695
696const int *
697cs_post_mesh_get_ent_flag(int mesh_id);
698
699/*----------------------------------------------------------------------------*/
707/*----------------------------------------------------------------------------*/
708
710cs_post_mesh_get_n_cells(int mesh_id);
711
712/*----------------------------------------------------------------------------*/
723/*----------------------------------------------------------------------------*/
724
725void
726cs_post_mesh_get_cell_ids(int mesh_id,
727 cs_lnum_t *cell_ids);
728
729/*----------------------------------------------------------------------------*/
737/*----------------------------------------------------------------------------*/
738
740cs_post_mesh_get_n_i_faces(int mesh_id);
741
742/*----------------------------------------------------------------------------*/
753/*----------------------------------------------------------------------------*/
754
755void
757 cs_lnum_t i_face_ids[]);
758
759/*----------------------------------------------------------------------------*/
767/*----------------------------------------------------------------------------*/
768
770cs_post_mesh_get_n_b_faces(int mesh_id);
771
772/*----------------------------------------------------------------------------*/
783/*----------------------------------------------------------------------------*/
784
785void
787 cs_lnum_t b_face_ids[]);
788
789/*----------------------------------------------------------------------------*/
797/*----------------------------------------------------------------------------*/
798
800cs_post_mesh_get_n_vertices(int mesh_id);
801
802/*----------------------------------------------------------------------------*/
813/*----------------------------------------------------------------------------*/
814
815void
817 cs_lnum_t *vertex_ids);
818
819/*----------------------------------------------------------------------------*/
827/*----------------------------------------------------------------------------*/
828
829void
831 bool post_domain);
832
833/*----------------------------------------------------------------------------*/
845/*----------------------------------------------------------------------------*/
846
847void
848cs_post_free_mesh(int mesh_id);
849
850/*----------------------------------------------------------------------------*/
858/*----------------------------------------------------------------------------*/
859
860bool
861cs_post_writer_exists(int writer_id);
862
863/*----------------------------------------------------------------------------*/
871/*----------------------------------------------------------------------------*/
872
873bool
874cs_post_mesh_exists(int mesh_id);
875
876/*----------------------------------------------------------------------------*/
882/*----------------------------------------------------------------------------*/
883
884const char *
886
887/*----------------------------------------------------------------------------*/
893/*----------------------------------------------------------------------------*/
894
895const char *
897
898/*----------------------------------------------------------------------------*/
904/*----------------------------------------------------------------------------*/
905
906int
908
909/*----------------------------------------------------------------------------*/
915/*----------------------------------------------------------------------------*/
916
917int
919
920/*----------------------------------------------------------------------------*/
930/*----------------------------------------------------------------------------*/
931
932void
934
935/*----------------------------------------------------------------------------*/
943/*----------------------------------------------------------------------------*/
944
945bool
946cs_post_writer_is_active(int writer_id);
947
948/*----------------------------------------------------------------------------*/
956/*----------------------------------------------------------------------------*/
957
958void
959cs_post_activate_writer(int writer_id,
960 bool activate);
961
962/*----------------------------------------------------------------------------*/
972/*----------------------------------------------------------------------------*/
973
974void
976 bool activate);
977
978/*----------------------------------------------------------------------------*/
993/*----------------------------------------------------------------------------*/
994
995void
996cs_post_disable_writer(int writer_id);
997
998/*----------------------------------------------------------------------------*/
1012/*----------------------------------------------------------------------------*/
1013
1014void
1015cs_post_enable_writer(int writer_id);
1016
1017/*----------------------------------------------------------------------------*/
1025/*----------------------------------------------------------------------------*/
1026
1027fvm_writer_t *
1028cs_post_get_writer(int writer_id);
1029
1030/*----------------------------------------------------------------------------*/
1038/*----------------------------------------------------------------------------*/
1039
1041cs_post_get_time_control(int writer_id);
1042
1043/*----------------------------------------------------------------------------*/
1051/*----------------------------------------------------------------------------*/
1052
1054cs_post_get_writer_time_dep(int writer_id);
1055
1056/*----------------------------------------------------------------------------*/
1066/*----------------------------------------------------------------------------*/
1067
1068void
1069cs_post_add_writer_t_step(int writer_id,
1070 int nt);
1071
1072/*----------------------------------------------------------------------------*/
1082/*----------------------------------------------------------------------------*/
1083
1084void
1085cs_post_add_writer_t_value(int writer_id,
1086 double t);
1087
1088/*----------------------------------------------------------------------------*/
1097/*----------------------------------------------------------------------------*/
1098
1099void
1101
1102/*----------------------------------------------------------------------------*/
1123/*----------------------------------------------------------------------------*/
1124
1125void
1126cs_post_write_var(int mesh_id,
1127 int writer_id,
1128 const char *var_name,
1129 int var_dim,
1130 bool interlace,
1131 bool use_parent,
1132 cs_datatype_t datatype,
1133 const void *cel_vals,
1134 const void *i_face_vals,
1135 const void *b_face_vals,
1136 const cs_time_step_t *ts);
1137
1138/*----------------------------------------------------------------------------*/
1157/*----------------------------------------------------------------------------*/
1158
1159void
1160cs_post_write_function(int mesh_id,
1161 int writer_id,
1162 const cs_function_t *cel_f,
1163 const cs_function_t *i_face_f,
1164 const cs_function_t *b_face_f,
1165 const cs_time_step_t *ts);
1166
1167/*----------------------------------------------------------------------------*/
1186/*----------------------------------------------------------------------------*/
1187
1188void
1189cs_post_write_vertex_var(int mesh_id,
1190 int writer_id,
1191 const char *var_name,
1192 int var_dim,
1193 bool interlace,
1194 bool use_parent,
1195 cs_datatype_t datatype,
1196 const void *vtx_vals,
1197 const cs_time_step_t *ts);
1198
1199/*----------------------------------------------------------------------------*/
1212/*----------------------------------------------------------------------------*/
1213
1214void
1216 int writer_id,
1217 const cs_function_t *f,
1218 const cs_time_step_t *ts);
1219
1220/*----------------------------------------------------------------------------*/
1235/*----------------------------------------------------------------------------*/
1236
1237void
1239 int writer_id,
1240 int attr_id,
1241 const char *var_name,
1242 int component_id,
1243 const cs_time_step_t *ts);
1244
1245/*----------------------------------------------------------------------------*/
1266/*----------------------------------------------------------------------------*/
1267
1268void
1269cs_post_write_probe_values(int mesh_id,
1270 int writer_id,
1271 const char *var_name,
1272 int var_dim,
1273 cs_datatype_t datatype,
1274 int parent_location_id,
1275 cs_interpolate_from_location_t *interpolate_func,
1276 void *interpolate_input,
1277 const void *vals,
1278 const cs_time_step_t *ts);
1279
1280/*----------------------------------------------------------------------------*/
1315/*----------------------------------------------------------------------------*/
1316
1317void
1319 int writer_id,
1320 const cs_function_t *f,
1321 int parent_location_id,
1322 cs_interpolate_from_location_t *interpolate_func,
1323 void *interpolate_input,
1324 const cs_time_step_t *ts);
1325
1326/*----------------------------------------------------------------------------*/
1338/*----------------------------------------------------------------------------*/
1339
1340void
1341cs_post_renum_cells(const cs_lnum_t init_cell_num[]);
1342
1343/*----------------------------------------------------------------------------*/
1356/*----------------------------------------------------------------------------*/
1357
1358void
1359cs_post_renum_faces(const cs_lnum_t init_i_face_num[],
1360 const cs_lnum_t init_b_face_num[]);
1361
1362/*----------------------------------------------------------------------------*/
1373/*----------------------------------------------------------------------------*/
1374
1375void
1377
1378/*----------------------------------------------------------------------------*/
1382/*----------------------------------------------------------------------------*/
1383
1384void
1386
1387/*----------------------------------------------------------------------------*/
1405/*----------------------------------------------------------------------------*/
1406
1407void
1408cs_post_init_meshes(int check_mask);
1409
1410/*----------------------------------------------------------------------------*/
1417/*----------------------------------------------------------------------------*/
1418
1419void
1421
1422/*----------------------------------------------------------------------------*/
1432/*----------------------------------------------------------------------------*/
1433
1434void
1436
1437/*----------------------------------------------------------------------------*/
1442/*----------------------------------------------------------------------------*/
1443
1444void
1446
1447/*----------------------------------------------------------------------------*/
1457/*----------------------------------------------------------------------------*/
1458
1459void
1461
1462/*----------------------------------------------------------------------------*/
1466/*----------------------------------------------------------------------------*/
1467
1468void
1469cs_post_finalize(void);
1470
1471/*----------------------------------------------------------------------------*/
1475/*----------------------------------------------------------------------------*/
1476
1477void
1479
1480/*----------------------------------------------------------------------------*/
1486/*----------------------------------------------------------------------------*/
1487
1488void
1490
1491/*----------------------------------------------------------------------------*/
1502/*----------------------------------------------------------------------------*/
1503
1504int
1506
1507/*----------------------------------------------------------------------------*/
1521/*----------------------------------------------------------------------------*/
1522
1523void
1525 void *input);
1526
1527/*----------------------------------------------------------------------------*/
1541/*----------------------------------------------------------------------------*/
1542
1543void
1545 void *input);
1546
1547/*----------------------------------------------------------------------------*/
1548
1550
1551#endif /* __CS_POST_H__ */
cs_datatype_t
Definition cs_defs.h:272
#define BEGIN_C_DECLS
Definition cs_defs.h:509
#define END_C_DECLS
Definition cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:313
@ t
Definition cs_field_pointer.h:92
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
const char * cs_post_get_default_format_options(void)
Return the default writer format options.
Definition cs_post.c:5469
int cs_post_get_free_mesh_id(void)
Return the next "reservable" (i.e. non-user) mesh id available.
Definition cs_post.c:5497
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:5213
void cs_post_write_probe_values(int mesh_id, int writer_id, const char *var_name, int var_dim, cs_datatype_t datatype, 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:6790
void cs_post_time_step_output(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition cs_post.c:7581
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:8385
int cs_post_get_free_writer_id(void)
Return the next "reservable" (i.e. non-user) writer id available.
Definition cs_post.c:5483
void cs_post_init_error_writer(void)
Initialize post-processing writer with same format and associated options as default writer,...
Definition cs_post.c:8252
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:5830
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:7165
void cs_post_init_meshes(int check_mask)
Initialize main post-processing meshes.
Definition cs_post.c:7386
void cs_post_add_free_faces(void)
Postprocess free (isolated) faces of the current global mesh.
Definition cs_post.c:8041
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:7548
void cs_post_finalize(void)
Destroy all structures associated with post-processing.
Definition cs_post.c:7946
void cs_post_define_mesh_by_location(int mesh_id, const char *mesh_name, int location_id, bool add_groups, bool auto_variables, int n_writers, const int writer_ids[])
Define a volume or surface post-processing mesh by associated mesh location id.
Definition cs_post.c:4482
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:4231
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:4294
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:5285
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_datatype_t datatype, 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:6398
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:6627
void cs_post_elt_select_t(void *input, cs_lnum_t *n_elts, cs_lnum_t **elt_list)
Function pointer to elements selection definition.
Definition cs_post.h:126
cs_lnum_t cs_post_mesh_get_n_vertices(int mesh_id)
Get a postprocessing mesh's number of vertices.
Definition cs_post.c:5255
cs_time_control_t * cs_post_get_time_control(int writer_id)
Return a pointer to the time control associated to a writer_id.
Definition cs_post.c:5780
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:5755
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:4629
void cs_post_write_var(int mesh_id, int writer_id, const char *var_name, int var_dim, bool interlace, bool use_parent, cs_datatype_t datatype, 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:5942
void cs_post_write_meshes(const cs_time_step_t *ts)
Output post-processing meshes using associated writers.
Definition cs_post.c:5885
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:8302
bool cs_post_writer_exists(int writer_id)
Check for the existence of a writer of the given id.
Definition cs_post.c:5401
void cs_post_write_vertex_function(int mesh_id, int writer_id, const cs_function_t *f, const cs_time_step_t *ts)
Output a function evaluation at cells or faces of a post-processing mesh using associated writers.
Definition cs_post.c:6513
void cs_post_set_changing_connectivity(void)
Configure the post-processing output so that mesh connectivity may be automatically updated.
Definition cs_post.c:7260
void cs_post_define_writer(int writer_id, const char *case_name, const char *dir_name, const char *fmt_name, const char *fmt_opts, fvm_writer_time_dep_t time_dep, bool output_at_start, bool output_at_end, int interval_n, double interval_t)
Define a writer; this objects manages a case's name, directory, and format, as well as associated mes...
Definition cs_post.c:4076
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:4561
void cs_post_write_probe_function(int mesh_id, int writer_id, const cs_function_t *f, int parent_location_id, cs_interpolate_from_location_t *interpolate_func, void *interpolate_input, const cs_time_step_t *ts)
Output function-evaluated values at cells or faces of a post-processing probe set using associated wr...
Definition cs_post.c:6928
const char * cs_post_get_default_format(void)
Return the default writer format name.
Definition cs_post.c:5455
cs_lnum_t cs_post_mesh_get_n_cells(int mesh_id)
Get a postprocessing mesh's number of cells.
Definition cs_post.c:5051
void cs_post_write_vars(const cs_time_step_t *ts)
Loop on post-processing meshes to output variables.
Definition cs_post.c:7924
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:8344
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:5183
cs_datatype_t cs_post_type_t
Definition cs_post.h:95
void cs_post_time_mesh_dep_output_t(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *ts)
Definition cs_post.h:183
void cs_post_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:5858
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:5314
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:5515
void cs_post_activate_writer_if_enabled(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:5649
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:5081
void cs_post_write_function(int mesh_id, int writer_id, const cs_function_t *cel_f, const cs_function_t *i_face_f, const cs_function_t *b_face_f, const cs_time_step_t *ts)
Output a function evaluation at cells or faces of a post-processing mesh using associated writers.
Definition cs_post.c:6185
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:5687
void cs_post_free_mesh(int mesh_id)
Remove a post-processing mesh.
Definition cs_post.c:5337
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:5620
void cs_post_time_dep_output_t(void *input, const cs_time_step_t *ts)
Definition cs_post.h:149
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:4344
void cs_post_mesh_detach_writer(int mesh_id, int writer_id)
De-associate a writer from a postprocessing mesh.
Definition cs_post.c:4905
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:5140
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:4819
void cs_post_mesh_attach_field(int mesh_id, int writer_id, int field_id, int comp_id)
Associate a field to a writer and postprocessing mesh combination.
Definition cs_post.c:4969
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:5110
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:7880
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:7089
const int * cs_post_mesh_get_ent_flag(int mesh_id)
Get a postprocessing meshes entity presence flag.
Definition cs_post.c:5033
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:4422
void cs_post_init_writers(void)
Initialize post-processing writers.
Definition cs_post.c:7272
void cs_post_mesh_attach_writer(int mesh_id, int writer_id)
Associate a writer to a postprocessing mesh.
Definition cs_post.c:4860
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:5724
bool cs_post_writer_is_active(int writer_id)
Query if a given writer is currently active.
Definition cs_post.c:5601
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:5430
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:4695
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:5799
fvm_writer_time_dep_t
Definition fvm_writer.h:57
Definition cs_function.h:115
Definition cs_time_control.h:96
time step descriptor
Definition cs_time_step.h:64