My Project
programmer's 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-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_mesh_location.h"
43#include "cs_time_step.h"
44
45/*----------------------------------------------------------------------------*/
46
48
49/*============================================================================
50 * Macro definitions
51 *============================================================================*/
52
53/*============================================================================
54 * Local type definitions
55 *============================================================================*/
56
57/*=============================================================================
58 * Global variables
59 *============================================================================*/
60
61/*============================================================================
62 * Public function prototypes
63 *============================================================================*/
64
65/*----------------------------------------------------------------------------
66 * Free arrays possible used by logging of array statistics.
67 *----------------------------------------------------------------------------*/
68
69void
71
72/*----------------------------------------------------------------------------
73 * Log field and other array statistics for the current time step.
74 *----------------------------------------------------------------------------*/
75
76void
78
79/*----------------------------------------------------------------------------
80 * Add or update array not saved as permanent field to iteration log.
81 *
82 * parameters:
83 * name <-- array name
84 * category <-- category name
85 * loc_id <-- associated mesh location id
86 * is_intensive <-- are the matching values intensive ?
87 * dim <-- associated dimension (interleaved)
88 * val <-- associated values
89 *----------------------------------------------------------------------------*/
90
91void
92cs_log_iteration_add_array(const char *name,
93 const char *category,
94 const cs_mesh_location_type_t loc_id,
95 bool is_intensive,
96 int dim,
97 const cs_real_t val[]);
98
99/*----------------------------------------------------------------------------
100 * Add or update clipping info for a given array.
101 *
102 * parameters:
103 * name <-- array name
104 * dim <-- associated dimension
105 * n_clip_min <-- number of local clippings to minimum value
106 * n_clip_max <-- number of local clippings to maximum value
107 * min_pre_clip <-- minimum values prior to clipping
108 * max_pre_clip <-- maximum values prior to clipping
109 */
110/*----------------------------------------------------------------------------*/
111
112void
113cs_log_iteration_clipping(const char *name,
114 int dim,
115 cs_lnum_t n_clip_min,
116 cs_lnum_t n_clip_max,
117 const cs_real_t min_pre_clip[],
118 const cs_real_t max_pre_clip[]);
119
120/*----------------------------------------------------------------------------
121 * Add or update clipping info for a field.
122 *
123 * parameters:
124 * f_id <-- associated field id
125 * n_clip_min <-- number of local clippings to minimum value
126 * n_clip_max <-- number of local clippings to maximum value
127 * min_pre_clip <-- minimum values prior to clipping
128 * max_pre_clip <-- maximum values prior to clipping
129 */
130/*----------------------------------------------------------------------------*/
131
132void
134 cs_lnum_t n_clip_min,
135 cs_lnum_t n_clip_max,
136 const cs_real_t min_pre_clip[],
137 const cs_real_t max_pre_clip[],
138 cs_lnum_t n_clip_min_comp[],
139 cs_lnum_t n_clip_max_comp[]);
140
141/*----------------------------------------------------------------------------
142 * Log L2 time residual for every variable fields.
143 *----------------------------------------------------------------------------*/
144
145void
147
148/*----------------------------------------------------------------------------*/
149
151
152#endif /* __CS_LOG_ITERATION_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:467
double cs_real_t
Floating-point value.
Definition cs_defs.h:302
#define END_C_DECLS
Definition cs_defs.h:468
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:298
void cs_log_l2residual(void)
Log L2 time residual for every variable fields.
Definition cs_log_iteration.c:1658
void cs_log_iteration(void)
Log field and other array statistics for the current time step.
Definition cs_log_iteration.c:1415
void cs_log_iteration_destroy_all(void)
Free arrays possible used by logging of array statistics.
Definition cs_log_iteration.c:1375
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:1636
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:1602
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:1447
cs_mesh_location_type_t
Definition cs_mesh_location.h:60