programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_field_operator.h
Go to the documentation of this file.
1 #ifndef __CS_FIELD_OPERATOR_H__
2 #define __CS_FIELD_OPERATOR_H__
3 
4 /*============================================================================
5  * Field based algebraic operators.
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2013 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  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 #include "cs_field.h"
36 #include "cs_gradient.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*=============================================================================
43  * Macro definitions
44  *============================================================================*/
45 
46 /*============================================================================
47  * Type definitions
48  *============================================================================*/
49 
50 /*=============================================================================
51  * Public function prototypes
52  *============================================================================*/
53 
54 /*----------------------------------------------------------------------------
55  * Compute cell gradient of scalar field or component of vector or
56  * tensor field.
57  *
58  * parameters:
59  * f <-- pointer to field
60  * use_previous_t <-- should we use values from the previous time step ?
61  * gradient_type <-- gradient type
62  * halo_type <-- halo type
63  * inc <-- if 0, solve on increment; 1 otherwise
64  * recompute_cocg <-- should COCG FV quantities be recomputed ?
65  * n_r_sweeps <-- if > 1, number of reconstruction sweeps
66  * verbosity <-- verbosity level
67  * clip_mode <-- clipping mode
68  * epsilon <-- precision for iterative gradient calculation
69  * extrap <-- boundary gradient extrapolation coefficient
70  * clip_coeff <-- clipping coefficient
71  * grad --> gradient
72  *----------------------------------------------------------------------------*/
73 
75  bool use_previous_t,
76  cs_gradient_type_t gradient_type,
77  cs_halo_type_t halo_type,
78  int inc,
79  bool recompute_cocg,
80  int n_r_sweeps,
81  int verbosity,
82  int clip_mode,
83  double epsilon,
84  double extrap,
85  double clip_coeff,
86  cs_real_3_t *restrict grad);
87 
88 /*----------------------------------------------------------------------------
89  * Compute cell gradient of scalar field or component of vector or
90  * tensor field.
91  *
92  * parameters:
93  * f <-- pointer to field
94  * use_previous_t <-- should we use values from the previous time step ?
95  * gradient_type <-- gradient type
96  * halo_type <-- halo type
97  * inc <-- if 0, solve on increment; 1 otherwise
98  * recompute_cocg <-- should COCG FV quantities be recomputed ?
99  * n_r_sweeps <-- if > 1, number of reconstruction sweeps
100  * hyd_p_flag <-- flag for hydrostatic pressure
101  * verbosity <-- verbosity level
102  * clip_mode <-- clipping mode
103  * epsilon <-- precision for iterative gradient calculation
104  * extrap <-- boundary gradient extrapolation coefficient
105  * clip_coeff <-- clipping coefficient
106  * f_ext <-- exterior force generating the hydrostatic pressure
107  * grad --> gradient
108  *----------------------------------------------------------------------------*/
109 
111  bool use_previous_t,
112  cs_gradient_type_t gradient_type,
113  cs_halo_type_t halo_type,
114  int inc,
115  bool recompute_cocg,
116  int n_r_sweeps,
117  int hyd_p_flag,
118  int verbosity,
119  int clip_mode,
120  double epsilon,
121  double extrap,
122  double clip_coeff,
123  cs_real_3_t f_ext[],
124  cs_real_3_t *restrict grad);
125 
126 /*----------------------------------------------------------------------------
127  * Compute cell gradient of scalar field or component of vector or
128  * tensor field.
129  *
130  * parameters:
131  * f <-- pointer to field
132  * use_previous_t <-- should we use values from the previous time step ?
133  * gradient_type <-- gradient type
134  * halo_type <-- halo type
135  * inc <-- if 0, solve on increment; 1 otherwise
136  * recompute_cocg <-- should COCG FV quantities be recomputed ?
137  * n_r_sweeps <-- if > 1, number of reconstruction sweeps
138  * verbosity <-- verbosity level
139  * clip_mode <-- clipping mode
140  * epsilon <-- precision for iterative gradient calculation
141  * extrap <-- boundary gradient extrapolation coefficient
142  * clip_coeff <-- clipping coefficient
143  * grad --> gradient
144  *----------------------------------------------------------------------------*/
145 
147  bool use_previous_t,
148  cs_gradient_type_t gradient_type,
149  cs_halo_type_t halo_type,
150  int inc,
151  int n_r_sweeps,
152  int verbosity,
153  int clip_mode,
154  double epsilon,
155  double clip_coeff,
156  cs_real_33_t *restrict grad);
157 
158 /*----------------------------------------------------------------------------*/
159 
161 
162 #endif /* __CS_FIELD_OPERATOR_H__ */