8.0
general documentation
Loading...
Searching...
No Matches
cs_log_iteration.h
Go to the documentation of this file.
1#ifndef __CS_LOG_ITERATION_H__
2#define __CS_LOG_ITERATION_H__
3
4/*============================================================================
5 * Log field and other array statistics at relevant time steps.
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/*----------------------------------------------------------------------------
31 * Standard C library headers
32 *----------------------------------------------------------------------------*/
33
34/*----------------------------------------------------------------------------
35 * Local headers
36 *----------------------------------------------------------------------------*/
37
38#include "cs_base.h"
39#include "cs_mesh_location.h"
40#include "cs_time_step.h"
41
42/*----------------------------------------------------------------------------*/
43
45
46/*============================================================================
47 * Macro definitions
48 *============================================================================*/
49
50/*============================================================================
51 * Local type definitions
52 *============================================================================*/
53
54/*=============================================================================
55 * Global variables
56 *============================================================================*/
57
58/*============================================================================
59 * Public function prototypes
60 *============================================================================*/
61
62/*----------------------------------------------------------------------------
63 * Free arrays possible used by logging of array statistics.
64 *----------------------------------------------------------------------------*/
65
66void
68
69/*----------------------------------------------------------------------------
70 * Log field and other array statistics for the current time step.
71 *----------------------------------------------------------------------------*/
72
73void
75
76/*----------------------------------------------------------------------------
77 * Add or update array not saved as permanent field to iteration log.
78 *
79 * parameters:
80 * name <-- array name
81 * category <-- category name
82 * loc_id <-- associated mesh location id
83 * is_intensive <-- are the matching values intensive ?
84 * dim <-- associated dimension (interleaved)
85 * val <-- associated values
86 *----------------------------------------------------------------------------*/
87
88void
89cs_log_iteration_add_array(const char *name,
90 const char *category,
91 const cs_mesh_location_type_t loc_id,
92 bool is_intensive,
93 int dim,
94 const cs_real_t val[]);
95
96/*----------------------------------------------------------------------------
97 * Add or update clipping info for a given array.
98 *
99 * parameters:
100 * name <-- array name
101 * dim <-- associated dimension
102 * n_clip_min <-- number of local clippings to minimum value
103 * n_clip_max <-- number of local clippings to maximum value
104 * min_pre_clip <-- minimum values prior to clipping
105 * max_pre_clip <-- maximum values prior to clipping
106 */
107/*----------------------------------------------------------------------------*/
108
109void
110cs_log_iteration_clipping(const char *name,
111 int dim,
112 cs_lnum_t n_clip_min,
113 cs_lnum_t n_clip_max,
114 const cs_real_t min_pre_clip[],
115 const cs_real_t max_pre_clip[]);
116
117/*----------------------------------------------------------------------------
118 * Add or update clipping info for a field.
119 *
120 * parameters:
121 * f_id <-- associated field id
122 * n_clip_min <-- number of local clippings to minimum value
123 * n_clip_max <-- number of local clippings to maximum value
124 * min_pre_clip <-- minimum values prior to clipping
125 * max_pre_clip <-- maximum values prior to clipping
126 */
127/*----------------------------------------------------------------------------*/
128
129void
131 cs_lnum_t n_clip_min,
132 cs_lnum_t n_clip_max,
133 const cs_real_t min_pre_clip[],
134 const cs_real_t max_pre_clip[],
135 cs_lnum_t n_clip_min_comp[],
136 cs_lnum_t n_clip_max_comp[]);
137
138/*----------------------------------------------------------------------------*/
142/*----------------------------------------------------------------------------*/
143
144void
146
147/*----------------------------------------------------------------------------
148 * Log L2 time residual for variable fields.
149 *----------------------------------------------------------------------------*/
150
151void
153
154/*----------------------------------------------------------------------------*/
155
157
158#endif /* __CS_LOG_ITERATION_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:509
double cs_real_t
Floating-point value.
Definition cs_defs.h:319
#define END_C_DECLS
Definition cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:313
void cs_log_iteration(void)
Log field and other array statistics for the current time step.
Definition cs_log_iteration.c:1560
void cs_log_iteration_destroy_all(void)
Free arrays possible used by logging of array statistics.
Definition cs_log_iteration.c:1520
void cs_log_iteration_prepare(void)
Initialize structures used for logging for new iteration.
Definition cs_log_iteration.c:1803
void cs_log_iteration_clipping_field(int f_id, cs_lnum_t n_clip_min, cs_lnum_t n_clip_max, const cs_real_t min_pre_clip[], const cs_real_t max_pre_clip[], cs_lnum_t n_clip_min_comp[], cs_lnum_t n_clip_max_comp[])
Add or update clipping info for a field.
Definition cs_log_iteration.c:1781
void cs_log_iteration_clipping(const char *name, int dim, cs_lnum_t n_clip_min, cs_lnum_t n_clip_max, const cs_real_t min_pre_clip[], const cs_real_t max_pre_clip[])
Add or update clipping info for a given array.
Definition cs_log_iteration.c:1747
void cs_log_iteration_add_array(const char *name, const char *category, const cs_mesh_location_type_t loc_id, bool is_intensive, int dim, const cs_real_t val[])
Add or update array not saved as permanent field to iteration log.
Definition cs_log_iteration.c:1592
void cs_log_iteration_l2residual(void)
Log L2 time residual for variable fields.
Definition cs_log_iteration.c:1826
cs_mesh_location_type_t
Definition cs_mesh_location.h:60