8.3
general documentation
cs_property.h
Go to the documentation of this file.
1#ifndef __CS_PROPERTY_H__
2#define __CS_PROPERTY_H__
3
4/*============================================================================
5 * Manage the definition/setting of properties
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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_field.h"
35#include "cs_flag.h"
36#include "cs_param_types.h"
37#include "cs_xdef.h"
38#include "cs_xdef_cw_eval.h"
39#include "cs_xdef_eval.h"
40
41/*----------------------------------------------------------------------------*/
42
44
45/*============================================================================
46 * Macro definitions
47 *============================================================================*/
48
49/* Common property names (property which is shared between different module) */
50
51#define CS_PROPERTY_MASS_DENSITY "mass_density"
52
61#define CS_PROPERTY_POST_FOURIER (1 << 0)
62
75#define CS_PROPERTY_ISO (1 << 0)
76
81#define CS_PROPERTY_ORTHO (1 << 1)
82
88#define CS_PROPERTY_ANISO (1 << 2)
89
94#define CS_PROPERTY_ANISO_SYM (1 << 3)
95
100#define CS_PROPERTY_BY_PRODUCT (1 << 4)
101
106#define CS_PROPERTY_SCALED (1 << 5)
107
115#define CS_PROPERTY_SUBCELL_DEFINITION (1 << 6)
116
119/*============================================================================
120 * Type definitions
121 *============================================================================*/
122
124
132typedef enum {
133
136
138
139/* ======================================== */
140/* Set of parameters attached to a property */
141/* ======================================== */
142
149typedef struct _cs_property_t cs_property_t;
150
152
154 int id;
158
159 /* Reference value wich is used as default when nothing else is set. This
160 * value can also be used to renormalized quantities related to this property
161 * By default, this is set to 1
162 */
163
165
166 /* Value of the scaling factor to apply when a property is defined up to a
167 * scaling factor. By default the value is 1.0 and the property is not
168 * scaled.
169 */
170
172
173 /* Property is up to now only defined on the whole domain (volume) */
174
175 int n_definitions; /* Current number of definitions used */
176 cs_xdef_t **defs; /* List of definitions */
177
178 /* Store the definition id for each cell, null if there is only one
179 definition set */
180
181 short int *def_ids;
182
183 /* Function pointers to handle generic tasks related to a property. There
184 is one function related to each definition. Some functions may not be
185 allocated according to the kind of property */
186
187 /* Retrieve the evaluation of the property at the cell center for each
188 definition */
189
191
192 /* Same thing as the previous one but now with the usage of cellwise algo.
193 relying on a cs_cell_mesh_t structure */
194
196
197 /* For properties relying on other properties for their definition, one
198 * stores the pointers to these related properties */
199
202
203 /* Optional: Definition(s) of the property at the boundary. If nothing is
204 set, then one uses the definition on the volume to get information on the
205 boundary. This is the default behavior. */
206
209
210 /* Store the definition id for each boundary face, null if there is only one
211 boundary definition set */
212
213 short int *b_def_ids;
214
215};
216
223typedef struct {
224
225 const cs_property_t *property; /* shared pointer */
226
227 bool is_iso; /* Detect if this an easier case */
228 bool is_unity; /* Detect if this the simplest case */
229
230 /* Way to evaluate the property and buffer to store the evaluation done
231 on-the-fly */
232
234 cs_real_t tensor[3][3];
236
237 /* Additional metadata */
238
242
244
245/*============================================================================
246 * Global variables
247 *============================================================================*/
248
249/*============================================================================
250 * Static inline public function prototypes
251 *============================================================================*/
252
253/*----------------------------------------------------------------------------*/
261/*----------------------------------------------------------------------------*/
262
263static inline bool
265{
266 if (pty == NULL)
267 return true; /* Treated as the "unity" property */
268
269 if (pty->state_flag & CS_FLAG_STATE_STEADY) {
270 if (pty->state_flag & CS_FLAG_STATE_UNIFORM)
271 return true;
272 else
273 return false;
274 }
275 else
276 return false;
277}
278
279/*----------------------------------------------------------------------------*/
287/*----------------------------------------------------------------------------*/
288
289static inline bool
291{
292 if (pty == NULL)
293 return true; /* Treated as the "unity" property */
294
295 if (pty->state_flag & CS_FLAG_STATE_STEADY)
296 return true;
297 else
298 return false;
299}
300
301/*----------------------------------------------------------------------------*/
309/*----------------------------------------------------------------------------*/
310
311static inline bool
313{
314 if (pty == NULL)
315 return true; /* Treated as the "unity" property */
316
317 if (pty->state_flag & CS_FLAG_STATE_UNIFORM)
318 return true;
319 else
320 return false;
321}
322
323/*----------------------------------------------------------------------------*/
331/*----------------------------------------------------------------------------*/
332
333static inline bool
335{
336 if (pty == NULL)
337 return false;
338
339 if (pty->type & CS_PROPERTY_ISO)
340 return true;
341 else
342 return false;
343}
344
345/*----------------------------------------------------------------------------*/
354/*----------------------------------------------------------------------------*/
355
356static inline bool
358{
359 if (pty == NULL)
360 return false;
361
362 if (pty->type & CS_PROPERTY_SUBCELL_DEFINITION)
363 return true;
364 else
365 return false;
366}
367
368/*----------------------------------------------------------------------------*/
376/*----------------------------------------------------------------------------*/
377
378static inline const char *
380{
381 if (pty == NULL)
382 return NULL;
383
384 return pty->name;
385}
386
387/*----------------------------------------------------------------------------*/
395/*----------------------------------------------------------------------------*/
396
397static inline cs_property_type_t
399{
400 if (pty == NULL)
401 return 0; /* means undefined */
402
403 return pty->type;
404}
405
406/*----------------------------------------------------------------------------*/
414/*----------------------------------------------------------------------------*/
415
416static inline int
418{
419 if (pty == NULL)
420 return 0; /* means undefined */
421
422 if (pty->type & CS_PROPERTY_ISO)
423 return 1;
424 else if (pty->type & CS_PROPERTY_ORTHO)
425 return 3;
426 else if (pty->type & CS_PROPERTY_ANISO_SYM)
427 return 6;
428 else if (pty->type & CS_PROPERTY_ANISO)
429 return 9;
430 else
431 return 0; /* means undefined */
432}
433
434/*============================================================================
435 * Public function prototypes
436 *============================================================================*/
437
438/*----------------------------------------------------------------------------*/
446/*----------------------------------------------------------------------------*/
447
448void
450 const cs_cdo_quantities_t *quant,
451 const cs_cdo_connect_t *connect);
452
453/*----------------------------------------------------------------------------*/
459/*----------------------------------------------------------------------------*/
460
461int
463
464/*----------------------------------------------------------------------------*/
473/*----------------------------------------------------------------------------*/
474
476cs_property_add(const char *name,
477 cs_property_type_t type);
478
479/*----------------------------------------------------------------------------*/
491/*----------------------------------------------------------------------------*/
492
494cs_property_subcell_add(const char *name,
495 cs_property_type_t type);
496
497/*----------------------------------------------------------------------------*/
510/*----------------------------------------------------------------------------*/
511
513cs_property_add_as_product(const char *name,
514 const cs_property_t *pty_a,
515 const cs_property_t *pty_b);
516
517/*----------------------------------------------------------------------------*/
525/*----------------------------------------------------------------------------*/
526
528cs_property_by_name(const char *name);
529
530/*----------------------------------------------------------------------------*/
538/*----------------------------------------------------------------------------*/
539
541cs_property_by_id(int id);
542
543/*----------------------------------------------------------------------------*/
550/*----------------------------------------------------------------------------*/
551
552void
555
556/*----------------------------------------------------------------------------*/
564/*----------------------------------------------------------------------------*/
565
566void
568 double refval);
569
570/*----------------------------------------------------------------------------*/
580/*----------------------------------------------------------------------------*/
581
582void
584 double val);
585
586/*----------------------------------------------------------------------------*/
595/*----------------------------------------------------------------------------*/
596
597void
599
600/*----------------------------------------------------------------------------*/
605/*----------------------------------------------------------------------------*/
606
607void
609
610/*----------------------------------------------------------------------------*/
615/*----------------------------------------------------------------------------*/
616
617void
619
620/*----------------------------------------------------------------------------*/
630/*----------------------------------------------------------------------------*/
631
632cs_real_t *
634
635/*----------------------------------------------------------------------------*/
647/*----------------------------------------------------------------------------*/
648
650cs_property_data_define(bool need_tensor,
651 bool need_eigen,
652 const cs_property_t *property);
653
654/*----------------------------------------------------------------------------*/
664/*----------------------------------------------------------------------------*/
665
666void
667cs_property_data_init(bool need_tensor,
668 bool need_eigen,
669 const cs_property_t *property,
670 cs_property_data_t *data);
671
672/*----------------------------------------------------------------------------*/
684/*----------------------------------------------------------------------------*/
685
686cs_xdef_t *
688 double val);
689
690/*----------------------------------------------------------------------------*/
702/*----------------------------------------------------------------------------*/
703
704cs_xdef_t *
706 const char *zname,
707 double val);
708
709/*----------------------------------------------------------------------------*/
722/*----------------------------------------------------------------------------*/
723
724cs_xdef_t *
726 const char *zname,
727 double val);
728
729/*----------------------------------------------------------------------------*/
741/*----------------------------------------------------------------------------*/
742
743cs_xdef_t *
745 const char *zname,
746 double val[]);
747
748/*----------------------------------------------------------------------------*/
761/*----------------------------------------------------------------------------*/
762
763cs_xdef_t *
765 const char *zname,
766 double vals[]);
767
768/*----------------------------------------------------------------------------*/
780/*----------------------------------------------------------------------------*/
781
782cs_xdef_t *
784 const char *zname,
785 cs_real_t tens[3][3]);
786
787/*----------------------------------------------------------------------------*/
800/*----------------------------------------------------------------------------*/
801
802cs_xdef_t *
804 const char *zname,
805 double tens[3][3]);
806
807/*----------------------------------------------------------------------------*/
820/*----------------------------------------------------------------------------*/
821
822cs_xdef_t *
824 const char *zname,
825 cs_real_t symtens[6]);
826
827/*----------------------------------------------------------------------------*/
841/*----------------------------------------------------------------------------*/
842
843cs_xdef_t *
845 const char *zname,
846 double tens[6]);
847
848/*----------------------------------------------------------------------------*/
861/*----------------------------------------------------------------------------*/
862
863cs_xdef_t *
865 const char *zname,
866 cs_time_func_t *func,
867 void *input);
868
869/*----------------------------------------------------------------------------*/
882/*----------------------------------------------------------------------------*/
883
884cs_xdef_t *
886 const char *zname,
887 cs_time_func_t *func,
888 void *input);
889
890/*----------------------------------------------------------------------------*/
903/*----------------------------------------------------------------------------*/
904
905cs_xdef_t *
907 const char *zname,
908 cs_analytic_func_t *func,
909 void *input);
910
911/*----------------------------------------------------------------------------*/
925/*----------------------------------------------------------------------------*/
926
927cs_xdef_t *
929 const char *zname,
930 cs_analytic_func_t *func,
931 void *input);
932
933/*----------------------------------------------------------------------------*/
949/*----------------------------------------------------------------------------*/
950
951cs_xdef_t *
953 const char *zname,
954 void *context,
955 cs_xdef_eval_t *get_eval_at_cell,
956 cs_xdef_cw_eval_t *get_eval_at_cell_cw);
957
958/*----------------------------------------------------------------------------*/
979/*----------------------------------------------------------------------------*/
980
981cs_xdef_t *
983 const char *zname,
984 cs_flag_t val_location,
985 cs_real_t *array,
986 bool is_owner,
987 bool full_length);
988
989/*----------------------------------------------------------------------------*/
1010/*----------------------------------------------------------------------------*/
1011
1012cs_xdef_t *
1014 const char *zname,
1015 cs_flag_t val_loc,
1016 cs_real_t *array,
1017 bool is_owner,
1018 bool full_length);
1019
1020/*----------------------------------------------------------------------------*/
1030/*----------------------------------------------------------------------------*/
1031
1032cs_xdef_t *
1034 cs_field_t *field);
1035
1036/*----------------------------------------------------------------------------*/
1047/*----------------------------------------------------------------------------*/
1048
1049cs_xdef_t *
1051 cs_field_t *field);
1052
1053/*----------------------------------------------------------------------------*/
1072/*----------------------------------------------------------------------------*/
1073
1074void
1076 int def_id,
1077 bool dense_output,
1078 double t_eval,
1079 cs_real_t *eval);
1080
1081/*----------------------------------------------------------------------------*/
1098/*----------------------------------------------------------------------------*/
1099
1100void
1102 int def_id,
1103 bool dense_output,
1104 double t_eval,
1105 cs_real_t *array);
1106
1107/*----------------------------------------------------------------------------*/
1119/*----------------------------------------------------------------------------*/
1120
1121void
1123 const cs_property_t *pty,
1124 int *pty_stride,
1125 cs_real_t **p_pty_vals);
1126
1127/*----------------------------------------------------------------------------*/
1136/*----------------------------------------------------------------------------*/
1137
1138void
1140 const cs_property_t *pty,
1141 cs_real_t *array);
1142
1143/*----------------------------------------------------------------------------*/
1152/*----------------------------------------------------------------------------*/
1153
1154void
1156 const cs_property_t *pty,
1157 cs_real_t *array);
1158
1159/*----------------------------------------------------------------------------*/
1170/*----------------------------------------------------------------------------*/
1171
1172void
1174 cs_real_t t_eval,
1175 const cs_property_t *pty,
1176 bool do_inversion,
1177 cs_real_t tensor[3][3]);
1178
1179/*----------------------------------------------------------------------------*/
1189/*----------------------------------------------------------------------------*/
1190
1193 cs_real_t t_eval,
1194 const cs_property_t *pty);
1195
1196/*----------------------------------------------------------------------------*/
1208/*----------------------------------------------------------------------------*/
1209
1210void
1212 const cs_property_t *pty,
1213 cs_real_t t_eval,
1214 bool do_inversion,
1215 cs_real_t tensor[3][3]);
1216
1217/*----------------------------------------------------------------------------*/
1228/*----------------------------------------------------------------------------*/
1229
1232 const cs_property_t *pty,
1233 cs_real_t t_eval);
1234
1235/*----------------------------------------------------------------------------*/
1245/*----------------------------------------------------------------------------*/
1246
1247void
1249 const cs_property_t *pty,
1250 cs_real_t t_eval,
1251 cs_real_t *eval);
1252
1253/*----------------------------------------------------------------------------*/
1263/*----------------------------------------------------------------------------*/
1264
1266 cs_real_t t_eval,
1267 const cs_property_t *pty);
1268
1269/*----------------------------------------------------------------------------*/
1278/*----------------------------------------------------------------------------*/
1279
1280void
1282 cs_real_t t_eval,
1283 double dt,
1284 cs_real_t fourier[]);
1285
1286/*----------------------------------------------------------------------------*/
1291/*----------------------------------------------------------------------------*/
1292
1293void
1295
1296/*----------------------------------------------------------------------------*/
1297
1299
1300#endif /* __CS_PROPERTY_H__ */
#define restrict
Definition: cs_defs.h:145
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
unsigned short int cs_flag_t
Definition: cs_defs.h:344
@ dt
Definition: cs_field_pointer.h:65
#define CS_FLAG_STATE_UNIFORM
Definition: cs_flag.h:103
#define CS_FLAG_STATE_STEADY
Definition: cs_flag.h:106
void() cs_analytic_func_t(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool dense_output, void *input, cs_real_t *retval)
Generic function pointer for an evaluation relying on an analytic function.
Definition: cs_param_types.h:127
void() cs_time_func_t(double time, void *input, cs_real_t *retval)
Function which defines the evolution of a quantity according to the current time and any structure gi...
Definition: cs_param_types.h:172
cs_property_t * cs_property_by_name(const char *name)
Find the related property definition from its name.
Definition: cs_property.cpp:1179
void cs_property_data_init(bool need_tensor, bool need_eigen, const cs_property_t *property, cs_property_data_t *data)
Initialize a cs_property_data_t structure. If property is null then one considers that this is a unit...
Definition: cs_property.cpp:1662
void cs_property_set_scaling_factor(cs_property_t *pty, double val)
Set the scaling factor associated to a cs_property_t structure This is a real number whatever the typ...
Definition: cs_property.cpp:1279
void cs_property_eval_at_boundary_faces(cs_real_t t_eval, const cs_property_t *pty, cs_real_t *array)
Evaluate the value of the property at each boundary face. Store the result of the evaluation in the g...
Definition: cs_property.cpp:3259
cs_xdef_t * cs_property_def_by_array(cs_property_t *pty, const char *zname, cs_flag_t val_location, cs_real_t *array, bool is_owner, bool full_length)
Define a cs_property_t structure thanks to an array of values. If an advanced usage of the definition...
Definition: cs_property.cpp:2463
int cs_property_get_n_properties(void)
Retrieve the number of properties.
Definition: cs_property.cpp:1030
cs_property_key_t
List of available keys for setting options on a property.
Definition: cs_property.h:132
@ CS_PTYKEY_POST_FOURIER
Definition: cs_property.h:134
@ CS_PTYKEY_N_KEYS
Definition: cs_property.h:135
cs_xdef_t * cs_property_boundary_def_by_time_func(cs_property_t *pty, const char *zname, cs_time_func_t *func, void *input)
Define the value of a cs_property_t structure at the boundary thanks to a time function in a subdomai...
Definition: cs_property.cpp:2264
void cs_property_destroy_all(void)
Free all cs_property_t structures and the array storing all the structures.
Definition: cs_property.cpp:1319
cs_real_t cs_property_get_cell_value(cs_lnum_t c_id, cs_real_t t_eval, const cs_property_t *pty)
Compute the value of a property at the cell center.
Definition: cs_property.cpp:3611
void cs_property_c2v_values(const cs_cell_mesh_t *cm, const cs_property_t *pty, cs_real_t t_eval, cs_real_t *eval)
Compute the values of an isotropic property in each portion of dual cell in a (primal) cell....
Definition: cs_property.cpp:3793
cs_property_t * cs_property_subcell_add(const char *name, cs_property_type_t type)
Create and initialize a new property structure with an evaluation which can be called on a sub-partit...
Definition: cs_property.cpp:1094
cs_xdef_t * cs_property_def_iso_by_value(cs_property_t *pty, const char *zname, double val)
Define an isotropic cs_property_t structure by value for entities related to a volume zone.
Definition: cs_property.cpp:1783
void cs_property_finalize_setup(void)
Last stage of the definition of a property based on several definitions (i.e. definition by subdomain...
Definition: cs_property.cpp:1369
cs_xdef_t * cs_property_def_by_analytic(cs_property_t *pty, const char *zname, cs_analytic_func_t *func, void *input)
Define the value of a cs_property_t structure thanks to an analytic function for all cells associated...
Definition: cs_property.cpp:2316
void cs_property_evaluate_boundary_def(const cs_property_t *pty, int def_id, bool dense_output, double t_eval, cs_real_t *array)
Evaluate the values of a property at boundary faces from the given boundary definition....
Definition: cs_property.cpp:2835
void cs_property_iso_get_cell_values(cs_real_t t_eval, const cs_property_t *pty, int *pty_stride, cs_real_t **p_pty_vals)
Evaluate the value of the property at each cell. Store the evaluation in the given array.
Definition: cs_property.cpp:3035
static bool cs_property_is_constant(const cs_property_t *pty)
Returns true if the property is steady and uniform, otherwise false.
Definition: cs_property.h:264
static const char * cs_property_get_name(const cs_property_t *pty)
Retrieve the name of a property.
Definition: cs_property.h:379
cs_xdef_t * cs_property_boundary_def_aniso_sym_by_value(cs_property_t *pty, const char *zname, double tens[6])
Define the value at the boundary for the given (anisotropic) property. This value is uniform and stea...
Definition: cs_property.cpp:2143
void cs_property_init_sharing(const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect)
Set shared pointers to main domain members.
Definition: cs_property.cpp:1012
void cs_property_set_option(cs_property_t *pty, cs_property_key_t key)
Set optional parameters related to a cs_property_t structure.
Definition: cs_property.cpp:1226
cs_xdef_t * cs_property_boundary_def_by_analytic(cs_property_t *pty, const char *zname, cs_analytic_func_t *func, void *input)
Define the value of a cs_property_t structure at the boundary thanks to a time function for all bound...
Definition: cs_property.cpp:2363
static bool cs_property_is_uniform(const cs_property_t *pty)
Returns true if the property is uniform, otherwise false.
Definition: cs_property.h:312
cs_property_data_t cs_property_data_define(bool need_tensor, bool need_eigen, const cs_property_t *property)
Define a cs_property_data_t structure (not a pointer to this structure). If property is null then one...
Definition: cs_property.cpp:1601
void cs_property_unscale(cs_property_t *pty)
Set the scaling factor associated to a cs_property_t structure This is a real number whatever the typ...
Definition: cs_property.cpp:1301
cs_real_t cs_property_value_in_cell(const cs_cell_mesh_t *cm, const cs_property_t *pty, cs_real_t t_eval)
Compute the value of a property at the cell center Version using a cs_cell_mesh_t structure.
Definition: cs_property.cpp:3736
void cs_property_set_reference_value(cs_property_t *pty, double refval)
Set the reference value associated to a cs_property_t structure This is a real number even whatever t...
Definition: cs_property.cpp:1257
cs_property_t * cs_property_add(const char *name, cs_property_type_t type)
Create and initialize a new property structure.
Definition: cs_property.cpp:1047
void cs_property_evaluate_def(const cs_property_t *pty, int def_id, bool dense_output, double t_eval, cs_real_t *eval)
Evaluate the values of the property at cells from the given definition. According to the parameter "d...
Definition: cs_property.cpp:2771
cs_xdef_t * cs_property_def_aniso_sym_by_value(cs_property_t *pty, const char *zname, cs_real_t symtens[6])
Define the value of a cs_property_t structure thanks to a time function for all cells associated to t...
Definition: cs_property.cpp:2089
static cs_property_type_t cs_property_get_type(const cs_property_t *pty)
Retrieve the type of a property.
Definition: cs_property.h:398
cs_xdef_t * cs_property_def_aniso_by_value(cs_property_t *pty, const char *zname, cs_real_t tens[3][3])
Define an anisotropic cs_property_t structure by value for entities related to a volume zone.
Definition: cs_property.cpp:1978
void cs_property_eval_at_cells(cs_real_t t_eval, const cs_property_t *pty, cs_real_t *array)
Evaluate the value of the property at each cell. Store the evaluation in the given array.
Definition: cs_property.cpp:3090
cs_xdef_t * cs_property_def_ortho_by_value(cs_property_t *pty, const char *zname, double val[])
Define an orthotropic cs_property_t structure by value for entities related to a volume zone.
Definition: cs_property.cpp:1883
cs_real_t * cs_property_get_array(const cs_property_t *pty)
Retrieve the array associated to the volume definition for the given property. Available only if ther...
Definition: cs_property.cpp:1570
cs_real_t cs_property_get_face_value(cs_lnum_t f_id, cs_real_t t_eval, const cs_property_t *pty)
Compute the value of a property at the face center.
Definition: cs_property.cpp:3925
cs_xdef_t * cs_property_def_by_time_func(cs_property_t *pty, const char *zname, cs_time_func_t *func, void *input)
Define a cs_property_t structure thanks to a time function for all cells associated to the zone named...
Definition: cs_property.cpp:2188
cs_xdef_t * cs_property_boundary_def_by_field(cs_property_t *pty, cs_field_t *field)
Define the values of a property at the boundary thanks to a field structure. One assumes that all bou...
Definition: cs_property.cpp:2703
static bool cs_property_is_isotropic(const cs_property_t *pty)
Returns true if the property is isotropic, otherwise false.
Definition: cs_property.h:334
void cs_property_tensor_in_cell(const cs_cell_mesh_t *cm, const cs_property_t *pty, cs_real_t t_eval, bool do_inversion, cs_real_t tensor[3][3])
Compute the value of the tensor attached to a property at the cell center Version using a cs_cell_mes...
Definition: cs_property.cpp:3670
static int cs_property_get_dim(const cs_property_t *pty)
Retrieve the dimension of the property.
Definition: cs_property.h:417
void cs_property_log_setup(void)
Print a summary of the settings for all defined cs_property_t structures.
Definition: cs_property.cpp:4049
cs_xdef_t * cs_property_def_constant_value(cs_property_t *pty, double val)
Define a single uniform and steady isotropic definition for the given cs_property_t structure....
Definition: cs_property.cpp:1724
cs_property_t * cs_property_add_as_product(const char *name, const cs_property_t *pty_a, const cs_property_t *pty_b)
Define a cs_property_t structure thanks to the product of two properties The type is infered from tha...
Definition: cs_property.cpp:1116
cs_flag_t cs_property_type_t
Definition: cs_property.h:123
void cs_property_get_fourier(const cs_property_t *pty, cs_real_t t_eval, double dt, cs_real_t fourier[])
Compute the Fourier number in each cell.
Definition: cs_property.cpp:3983
static bool cs_property_is_subcell(const cs_property_t *pty)
Returns true if the property is allowed to be evaluated on a sub-partition of a cell.
Definition: cs_property.h:357
cs_xdef_t * cs_property_boundary_def_ortho_by_value(cs_property_t *pty, const char *zname, double vals[])
Define the value at the boundary for the given (orthotropic) property. This value is uniform and stea...
Definition: cs_property.cpp:1935
cs_xdef_t * cs_property_boundary_def_aniso_by_value(cs_property_t *pty, const char *zname, double tens[3][3])
Define the value at the boundary for the given (anisotropic) property. This value is uniform and stea...
Definition: cs_property.cpp:2039
cs_xdef_t * cs_property_boundary_def_iso_by_value(cs_property_t *pty, const char *zname, double val)
Define the value at the boundary for the given (isotropic) property. This value is uniform and steady...
Definition: cs_property.cpp:1840
cs_xdef_t * cs_property_def_by_field(cs_property_t *pty, cs_field_t *field)
Define a cs_property_t structure thanks to a field structure. One assumes that all cells are defined ...
Definition: cs_property.cpp:2641
cs_property_t * cs_property_by_id(int id)
Find the related property definition from its id.
Definition: cs_property.cpp:1206
void cs_property_get_cell_tensor(cs_lnum_t c_id, cs_real_t t_eval, const cs_property_t *pty, bool do_inversion, cs_real_t tensor[3][3])
Compute the value of the tensor attached to a property at the cell center.
Definition: cs_property.cpp:3547
static bool cs_property_is_steady(const cs_property_t *pty)
Returns true if the property is steady, otherwise false.
Definition: cs_property.h:290
cs_xdef_t * cs_property_def_by_func(cs_property_t *pty, const char *zname, void *context, cs_xdef_eval_t *get_eval_at_cell, cs_xdef_cw_eval_t *get_eval_at_cell_cw)
Define the value of a cs_property_t structure thanks to low-level functions specifying how to evaluat...
Definition: cs_property.cpp:2410
cs_xdef_t * cs_property_boundary_def_by_array(cs_property_t *pty, const char *zname, cs_flag_t val_loc, cs_real_t *array, bool is_owner, bool full_length)
Define the values of a property at the boundary thanks to an array. If an advanced usage of the defin...
Definition: cs_property.cpp:2565
void() cs_xdef_cw_eval_t(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) by a ce...
Definition: cs_xdef_cw_eval.h:70
void() cs_xdef_eval_t(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure)
Definition: cs_xdef_eval.h:66
#define CS_PROPERTY_ISO
Definition: cs_property.h:75
#define CS_PROPERTY_ORTHO
Definition: cs_property.h:81
#define CS_PROPERTY_ANISO
Definition: cs_property.h:88
#define CS_PROPERTY_SUBCELL_DEFINITION
Definition: cs_property.h:115
#define CS_PROPERTY_ANISO_SYM
Definition: cs_property.h:94
Definition: field.f90:27
Definition: mesh.f90:26
Definition: cs_property.h:151
cs_flag_t process_flag
Definition: cs_property.h:156
cs_real_t scaling_factor
Definition: cs_property.h:171
short int * b_def_ids
Definition: cs_property.h:213
int n_related_properties
Definition: cs_property.h:200
cs_property_type_t type
Definition: cs_property.h:157
cs_xdef_cw_eval_t ** get_eval_at_cell_cw
Definition: cs_property.h:195
int n_definitions
Definition: cs_property.h:175
int id
Definition: cs_property.h:154
cs_xdef_t ** b_defs
Definition: cs_property.h:208
int n_b_definitions
Definition: cs_property.h:207
const cs_property_t ** related_properties
Definition: cs_property.h:201
cs_xdef_eval_t ** get_eval_at_cell
Definition: cs_property.h:190
cs_flag_t state_flag
Definition: cs_property.h:155
short int * def_ids
Definition: cs_property.h:181
char *restrict name
Definition: cs_property.h:153
cs_real_t ref_value
Definition: cs_property.h:164
cs_xdef_t ** defs
Definition: cs_property.h:176
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:139
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
Field descriptor.
Definition: cs_field.h:131
Definition: cs_mesh.h:85
Structure storing the evaluation of a property and its related data.
Definition: cs_property.h:223
const cs_property_t * property
Definition: cs_property.h:225
bool need_eigen
Definition: cs_property.h:239
bool need_tensor
Definition: cs_property.h:233
bool is_unity
Definition: cs_property.h:228
cs_real_t eigen_max
Definition: cs_property.h:240
cs_real_t eigen_ratio
Definition: cs_property.h:241
cs_real_t value
Definition: cs_property.h:235
bool is_iso
Definition: cs_property.h:227
Structure associated to the definition of a property relying on the cs_xdef_t structure.
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:160