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-2014 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  * grad --> gradient
66  *----------------------------------------------------------------------------*/
67 
69  bool use_previous_t,
70  cs_gradient_type_t gradient_type,
71  cs_halo_type_t halo_type,
72  int inc,
73  bool recompute_cocg,
74  cs_real_3_t *restrict grad);
75 
76 /*----------------------------------------------------------------------------
77  * Compute cell gradient of scalar field or component of vector or
78  * tensor field.
79  *
80  * parameters:
81  * f <-- pointer to field
82  * use_previous_t <-- should we use values from the previous time step ?
83  * gradient_type <-- gradient type
84  * halo_type <-- halo type
85  * inc <-- if 0, solve on increment; 1 otherwise
86  * recompute_cocg <-- should COCG FV quantities be recomputed ?
87  * hyd_p_flag <-- flag for hydrostatic pressure
88  * f_ext <-- exterior force generating the hydrostatic pressure
89  * grad --> gradient
90  *----------------------------------------------------------------------------*/
91 
93  bool use_previous_t,
94  cs_gradient_type_t gradient_type,
95  cs_halo_type_t halo_type,
96  int inc,
97  bool recompute_cocg,
98  int hyd_p_flag,
99  cs_real_3_t f_ext[],
100  cs_real_3_t *restrict grad);
101 
102 /*----------------------------------------------------------------------------
103  * Compute cell gradient of scalar field or component of vector or
104  * tensor field.
105  *
106  * parameters:
107  * f <-- pointer to field
108  * use_previous_t <-- should we use values from the previous time step ?
109  * gradient_type <-- gradient type
110  * halo_type <-- halo type
111  * inc <-- if 0, solve on increment; 1 otherwise
112  * recompute_cocg <-- should COCG FV quantities be recomputed ?
113  * clip_coeff <-- clipping coefficient
114  * grad --> gradient
115  *----------------------------------------------------------------------------*/
116 
118  bool use_previous_t,
119  cs_gradient_type_t gradient_type,
120  cs_halo_type_t halo_type,
121  int inc,
122  cs_real_33_t *restrict grad);
123 
124 /*----------------------------------------------------------------------------*/
125 
127 
128 #endif /* __CS_FIELD_OPERATOR_H__ */
#define restrict
Definition: cs_defs.h:122
void cs_field_gradient_vector(const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, cs_real_33_t *restrict grad)
Compute cell gradient of scalar field or component of vector or tensor field.
Definition: cs_field_operator.c:397
Field descriptor.
Definition: cs_field.h:98
#define BEGIN_C_DECLS
Definition: cs_defs.h:405
void cs_field_gradient_scalar(const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, bool recompute_cocg, cs_real_3_t *restrict grad)
Compute cell gradient of scalar field or component of vector or tensor field.
Definition: cs_field_operator.c:281
void cs_field_gradient_potential(const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, bool recompute_cocg, int hyd_p_flag, cs_real_3_t f_ext[], cs_real_3_t *restrict grad)
Compute cell gradient of scalar field or component of vector or tensor field.
Definition: cs_field_operator.c:340
cs_halo_type_t
Definition: cs_halo.h:49
cs_gradient_type_t
Definition: cs_gradient.h:53
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:307
#define END_C_DECLS
Definition: cs_defs.h:406
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:311