9.2
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-2026 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 "base/cs_field.h"
35#include "base/cs_param_types.h"
36#include "cdo/cs_flag.h"
37#include "cdo/cs_xdef.h"
38#include "cdo/cs_xdef_cw_eval.h"
39#include "cdo/cs_xdef_eval.h"
40
41/*============================================================================
42 * Macro definitions
43 *============================================================================*/
44
45/* Common property names (property which is shared between different module) */
46
47#define CS_PROPERTY_MASS_DENSITY "mass_density"
48
57#define CS_PROPERTY_POST_FOURIER (1 << 0)
58
71#define CS_PROPERTY_ISO (1 << 0)
72
77#define CS_PROPERTY_ORTHO (1 << 1)
78
84#define CS_PROPERTY_ANISO (1 << 2)
85
90#define CS_PROPERTY_ANISO_SYM (1 << 3)
91
96#define CS_PROPERTY_BY_PRODUCT (1 << 4)
97
102#define CS_PROPERTY_SCALED (1 << 5)
103
111#define CS_PROPERTY_SUBCELL_DEFINITION (1 << 6)
112
115/*============================================================================
116 * Type definitions
117 *============================================================================*/
118
120
128typedef enum {
129
132
134
135/* ======================================== */
136/* Set of parameters attached to a property */
137/* ======================================== */
138
145typedef struct _cs_property_t cs_property_t;
146
148
150 int id;
154
155 /* Reference value wich is used as default when nothing else is set. This
156 * value can also be used to renormalized quantities related to this property
157 * By default, this is set to 1
158 */
159
161
162 /* Value of the scaling factor to apply when a property is defined up to a
163 * scaling factor. By default the value is 1.0 and the property is not
164 * scaled.
165 */
166
168
169 /* Property is up to now only defined on the whole domain (volume) */
170
171 int n_definitions; /* Current number of definitions used */
172 cs_xdef_t **defs; /* List of definitions */
173
174 /* Store the definition id for each cell, null if there is only one
175 definition set */
176
177 short int *def_ids;
178
179 /* Function pointers to handle generic tasks related to a property. There
180 is one function related to each definition. Some functions may not be
181 allocated according to the kind of property */
182
183 /* Retrieve the evaluation of the property at the cell center for each
184 definition */
185
187
188 /* Same thing as the previous one but now with the usage of cellwise algo.
189 relying on a cs_cell_mesh_t structure */
190
192
193 /* For properties relying on other properties for their definition, one
194 * stores the pointers to these related properties */
195
198
199 /* Optional: Definition(s) of the property at the boundary. If nothing is
200 set, then one uses the definition on the volume to get information on the
201 boundary. This is the default behavior. */
202
205
206 /* Store the definition id for each boundary face, null if there is only one
207 boundary definition set */
208
209 short int *b_def_ids;
210
211};
212
219typedef struct {
220
221 const cs_property_t *property; /* shared pointer */
222
223 bool is_iso; /* Detect if this an easier case */
224 bool is_unity; /* Detect if this the simplest case */
225
226 /* Way to evaluate the property and buffer to store the evaluation done
227 on-the-fly */
228
230 cs_real_t tensor[3][3];
232
233 /* Additional metadata */
234
238
240
241/*============================================================================
242 * Global variables
243 *============================================================================*/
244
245/*============================================================================
246 * Static inline public function prototypes
247 *============================================================================*/
248
249/*----------------------------------------------------------------------------*/
257/*----------------------------------------------------------------------------*/
258
259static inline bool
261{
262 if (pty == NULL)
263 return true; /* Treated as the "unity" property */
264
265 if (pty->state_flag & CS_FLAG_STATE_STEADY) {
266 if (pty->state_flag & CS_FLAG_STATE_UNIFORM)
267 return true;
268 else
269 return false;
270 }
271 else
272 return false;
273}
274
275/*----------------------------------------------------------------------------*/
283/*----------------------------------------------------------------------------*/
284
285static inline bool
287{
288 if (pty == NULL)
289 return true; /* Treated as the "unity" property */
290
291 if (pty->state_flag & CS_FLAG_STATE_STEADY)
292 return true;
293 else
294 return false;
295}
296
297/*----------------------------------------------------------------------------*/
305/*----------------------------------------------------------------------------*/
306
307static inline bool
309{
310 if (pty == NULL)
311 return true; /* Treated as the "unity" property */
312
313 if (pty->state_flag & CS_FLAG_STATE_UNIFORM)
314 return true;
315 else
316 return false;
317}
318
319/*----------------------------------------------------------------------------*/
327/*----------------------------------------------------------------------------*/
328
329static inline bool
331{
332 if (pty == NULL)
333 return false;
334
335 if (pty->type & CS_PROPERTY_ISO)
336 return true;
337 else
338 return false;
339}
340
341/*----------------------------------------------------------------------------*/
350/*----------------------------------------------------------------------------*/
351
352static inline bool
354{
355 if (pty == NULL)
356 return false;
357
358 if (pty->type & CS_PROPERTY_SUBCELL_DEFINITION)
359 return true;
360 else
361 return false;
362}
363
364/*----------------------------------------------------------------------------*/
372/*----------------------------------------------------------------------------*/
373
374static inline const char *
376{
377 if (pty == NULL)
378 return NULL;
379
380 return pty->name;
381}
382
383/*----------------------------------------------------------------------------*/
391/*----------------------------------------------------------------------------*/
392
393static inline cs_property_type_t
395{
396 if (pty == NULL)
397 return 0; /* means undefined */
398
399 return pty->type;
400}
401
402/*----------------------------------------------------------------------------*/
410/*----------------------------------------------------------------------------*/
411
412static inline int
414{
415 if (pty == NULL)
416 return 0; /* means undefined */
417
418 if (pty->type & CS_PROPERTY_ISO)
419 return 1;
420 else if (pty->type & CS_PROPERTY_ORTHO)
421 return 3;
422 else if (pty->type & CS_PROPERTY_ANISO_SYM)
423 return 6;
424 else if (pty->type & CS_PROPERTY_ANISO)
425 return 9;
426 else
427 return 0; /* means undefined */
428}
429
430/*============================================================================
431 * Public function prototypes
432 *============================================================================*/
433
434/*----------------------------------------------------------------------------*/
442/*----------------------------------------------------------------------------*/
443
444void
446 const cs_cdo_quantities_t *quant,
447 const cs_cdo_connect_t *connect);
448
449/*----------------------------------------------------------------------------*/
455/*----------------------------------------------------------------------------*/
456
457int
459
460/*----------------------------------------------------------------------------*/
469/*----------------------------------------------------------------------------*/
470
472cs_property_add(const char *name,
473 cs_property_type_t type);
474
475/*----------------------------------------------------------------------------*/
487/*----------------------------------------------------------------------------*/
488
490cs_property_subcell_add(const char *name,
491 cs_property_type_t type);
492
493/*----------------------------------------------------------------------------*/
506/*----------------------------------------------------------------------------*/
507
509cs_property_add_as_product(const char *name,
510 const cs_property_t *pty_a,
511 const cs_property_t *pty_b);
512
513/*----------------------------------------------------------------------------*/
521/*----------------------------------------------------------------------------*/
522
524cs_property_by_name(const char *name);
525
526/*----------------------------------------------------------------------------*/
534/*----------------------------------------------------------------------------*/
535
537cs_property_by_id(int id);
538
539/*----------------------------------------------------------------------------*/
546/*----------------------------------------------------------------------------*/
547
548void
551
552/*----------------------------------------------------------------------------*/
560/*----------------------------------------------------------------------------*/
561
562void
564 double refval);
565
566/*----------------------------------------------------------------------------*/
576/*----------------------------------------------------------------------------*/
577
578void
580 double val);
581
582/*----------------------------------------------------------------------------*/
591/*----------------------------------------------------------------------------*/
592
593void
595
596/*----------------------------------------------------------------------------*/
601/*----------------------------------------------------------------------------*/
602
603void
605
606/*----------------------------------------------------------------------------*/
611/*----------------------------------------------------------------------------*/
612
613void
615
616/*----------------------------------------------------------------------------*/
626/*----------------------------------------------------------------------------*/
627
628cs_real_t *
630
631/*----------------------------------------------------------------------------*/
643/*----------------------------------------------------------------------------*/
644
646cs_property_data_define(bool need_tensor,
647 bool need_eigen,
648 const cs_property_t *property);
649
650/*----------------------------------------------------------------------------*/
660/*----------------------------------------------------------------------------*/
661
662void
663cs_property_data_init(bool need_tensor,
664 bool need_eigen,
665 const cs_property_t *property,
666 cs_property_data_t *data);
667
668/*----------------------------------------------------------------------------*/
680/*----------------------------------------------------------------------------*/
681
682cs_xdef_t *
684 double val);
685
686/*----------------------------------------------------------------------------*/
698/*----------------------------------------------------------------------------*/
699
700cs_xdef_t *
702 const char *zname,
703 double val);
704
705/*----------------------------------------------------------------------------*/
720/*----------------------------------------------------------------------------*/
721
722cs_xdef_t *
724 const char *zname,
725 double val);
726
727/*----------------------------------------------------------------------------*/
741/*----------------------------------------------------------------------------*/
742
743cs_xdef_t *
745 const char *zname,
746 double val[]);
747
748/*----------------------------------------------------------------------------*/
763/*----------------------------------------------------------------------------*/
764
765cs_xdef_t *
767 const char *zname,
768 double vals[]);
769
770/*----------------------------------------------------------------------------*/
784/*----------------------------------------------------------------------------*/
785
786cs_xdef_t *
788 const char *zname,
789 cs_real_t tens[3][3]);
790
791/*----------------------------------------------------------------------------*/
806/*----------------------------------------------------------------------------*/
807
808cs_xdef_t *
810 const char *zname,
811 double tens[3][3]);
812
813/*----------------------------------------------------------------------------*/
828/*----------------------------------------------------------------------------*/
829
830cs_xdef_t *
832 const char *zname,
833 cs_real_t symtens[6]);
834
835/*----------------------------------------------------------------------------*/
851/*----------------------------------------------------------------------------*/
852
853cs_xdef_t *
855 const char *zname,
856 double tens[6]);
857
858/*----------------------------------------------------------------------------*/
873/*----------------------------------------------------------------------------*/
874
875cs_xdef_t *
877 const char *zname,
878 cs_time_func_t *func,
879 void *input);
880
881/*----------------------------------------------------------------------------*/
896/*----------------------------------------------------------------------------*/
897
898cs_xdef_t *
900 const char *zname,
901 cs_time_func_t *func,
902 void *input);
903
904/*----------------------------------------------------------------------------*/
919/*----------------------------------------------------------------------------*/
920
921cs_xdef_t *
923 const char *zname,
924 cs_analytic_func_t *func,
925 void *input);
926
927/*----------------------------------------------------------------------------*/
943/*----------------------------------------------------------------------------*/
944
945cs_xdef_t *
947 const char *zname,
948 cs_analytic_func_t *func,
949 void *input);
950
951/*----------------------------------------------------------------------------*/
970/*----------------------------------------------------------------------------*/
971
972cs_xdef_t *
974 const char *zname,
975 void *context,
976 cs_xdef_eval_t *get_eval_at_cell,
977 cs_xdef_cw_eval_t *get_eval_at_cell_cw);
978
979/*----------------------------------------------------------------------------*/
1003/*----------------------------------------------------------------------------*/
1004
1005cs_xdef_t *
1007 const char *zname,
1008 cs_flag_t val_location,
1009 cs_real_t *array,
1010 bool is_owner,
1011 bool full_length);
1012
1013/*----------------------------------------------------------------------------*/
1036/*----------------------------------------------------------------------------*/
1037
1038cs_xdef_t *
1040 const char *zname,
1041 cs_flag_t val_loc,
1042 cs_real_t *array,
1043 bool is_owner,
1044 bool full_length);
1045
1046/*----------------------------------------------------------------------------*/
1058/*----------------------------------------------------------------------------*/
1059
1060cs_xdef_t *
1062 cs_field_t *field);
1063
1064/*----------------------------------------------------------------------------*/
1077/*----------------------------------------------------------------------------*/
1078
1079cs_xdef_t *
1081 cs_field_t *field);
1082
1083/*----------------------------------------------------------------------------*/
1102/*----------------------------------------------------------------------------*/
1103
1104void
1106 int def_id,
1107 bool dense_output,
1108 double t_eval,
1109 cs_real_t *eval);
1110
1111/*----------------------------------------------------------------------------*/
1128/*----------------------------------------------------------------------------*/
1129
1130void
1132 int def_id,
1133 bool dense_output,
1134 double t_eval,
1135 cs_real_t *array);
1136
1137/*----------------------------------------------------------------------------*/
1149/*----------------------------------------------------------------------------*/
1150
1151void
1153 const cs_property_t *pty,
1154 int *pty_stride,
1155 cs_real_t **p_pty_vals);
1156
1157/*----------------------------------------------------------------------------*/
1166/*----------------------------------------------------------------------------*/
1167
1168void
1170 const cs_property_t *pty,
1171 cs_real_t *array);
1172
1173/*----------------------------------------------------------------------------*/
1182/*----------------------------------------------------------------------------*/
1183
1184void
1186 const cs_property_t *pty,
1187 cs_real_t *array);
1188
1189/*----------------------------------------------------------------------------*/
1200/*----------------------------------------------------------------------------*/
1201
1202void
1204 cs_real_t t_eval,
1205 const cs_property_t *pty,
1206 bool do_inversion,
1207 cs_real_t tensor[3][3]);
1208
1209/*----------------------------------------------------------------------------*/
1219/*----------------------------------------------------------------------------*/
1220
1223 cs_real_t t_eval,
1224 const cs_property_t *pty);
1225
1226/*----------------------------------------------------------------------------*/
1238/*----------------------------------------------------------------------------*/
1239
1240void
1242 const cs_property_t *pty,
1243 cs_real_t t_eval,
1244 bool do_inversion,
1245 cs_real_t tensor[3][3]);
1246
1247/*----------------------------------------------------------------------------*/
1258/*----------------------------------------------------------------------------*/
1259
1262 const cs_property_t *pty,
1263 cs_real_t t_eval);
1264
1265/*----------------------------------------------------------------------------*/
1275/*----------------------------------------------------------------------------*/
1276
1277void
1279 const cs_property_t *pty,
1280 cs_real_t t_eval,
1281 cs_real_t *eval);
1282
1283/*----------------------------------------------------------------------------*/
1293/*----------------------------------------------------------------------------*/
1294
1296 cs_real_t t_eval,
1297 const cs_property_t *pty);
1298
1299/*----------------------------------------------------------------------------*/
1308/*----------------------------------------------------------------------------*/
1309
1310void
1312 cs_real_t t_eval,
1313 double dt,
1314 cs_real_t fourier[]);
1315
1316/*----------------------------------------------------------------------------*/
1321/*----------------------------------------------------------------------------*/
1322
1323void
1325
1326/*----------------------------------------------------------------------------*/
1327
1328#endif /* CS_PROPERTY_H */
Field descriptor.
Definition: cs_field.h:275
#define restrict
Definition: cs_defs.h:148
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
unsigned short int cs_flag_t
Definition: cs_defs.h:334
@ dt
Definition: cs_field_pointer.h:61
#define CS_FLAG_STATE_UNIFORM
Definition: cs_flag.h:101
#define CS_FLAG_STATE_STEADY
Definition: cs_flag.h:104
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:1318
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:1809
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:1417
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:3511
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:2679
int cs_property_get_n_properties(void)
Retrieve the number of properties.
Definition: cs_property.cpp:1162
cs_property_key_t
List of available keys for setting options on a property.
Definition: cs_property.h:128
@ CS_PTYKEY_POST_FOURIER
Definition: cs_property.h:130
@ CS_PTYKEY_N_KEYS
Definition: cs_property.h:131
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:2457
void cs_property_destroy_all(void)
Free all cs_property_t structures and the array storing all the structures.
Definition: cs_property.cpp:1456
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:3866
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:4047
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:1228
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:1942
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:1503
cs_xdef_t * cs_property_def_by_analytic(cs_property_t *pty, const char *zname, cs_analytic_func_t *func, void *input)
Define a cs_property_t structure thanks to an analytic function for all cells associated to the zone ...
Definition: cs_property.cpp:2517
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:3080
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:3297
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:260
static const char * cs_property_get_name(const cs_property_t *pty)
Retrieve the name of a property.
Definition: cs_property.h:375
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:2328
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:1144
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:1365
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:2569
static bool cs_property_is_uniform(const cs_property_t *pty)
Returns true if the property is uniform, otherwise false.
Definition: cs_property.h:308
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:1749
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:1438
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:3991
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:1396
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:1179
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:3012
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:2274
static cs_property_type_t cs_property_get_type(const cs_property_t *pty)
Retrieve the type of a property.
Definition: cs_property.h:394
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 If a def...
Definition: cs_property.cpp:2151
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:3348
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:2050
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:1718
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:4171
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:2379
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:2936
static bool cs_property_is_isotropic(const cs_property_t *pty)
Returns true if the property is isotropic, otherwise false.
Definition: cs_property.h:330
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:3925
static int cs_property_get_dim(const cs_property_t *pty)
Retrieve the dimension of the property.
Definition: cs_property.h:413
void cs_property_log_setup(void)
Print a summary of the settings for all defined cs_property_t structures.
Definition: cs_property.cpp:4295
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:1869
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:1249
cs_flag_t cs_property_type_t
Definition: cs_property.h:119
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:4229
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:353
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:2102
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:2215
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:2001
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:2870
cs_property_t * cs_property_by_id(int id)
Find the related property definition from its id.
Definition: cs_property.cpp:1345
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:3804
static bool cs_property_is_steady(const cs_property_t *pty)
Returns true if the property is steady, otherwise false.
Definition: cs_property.h:286
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:2622
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:2785
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:64
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:62
#define CS_PROPERTY_ISO
Definition: cs_property.h:71
#define CS_PROPERTY_ORTHO
Definition: cs_property.h:77
#define CS_PROPERTY_ANISO
Definition: cs_property.h:84
#define CS_PROPERTY_SUBCELL_DEFINITION
Definition: cs_property.h:111
#define CS_PROPERTY_ANISO_SYM
Definition: cs_property.h:90
Definition: field.f90:27
Definition: mesh.f90:26
Definition: cs_property.h:147
cs_flag_t process_flag
Definition: cs_property.h:152
cs_real_t scaling_factor
Definition: cs_property.h:167
short int * b_def_ids
Definition: cs_property.h:209
int n_related_properties
Definition: cs_property.h:196
cs_property_type_t type
Definition: cs_property.h:153
cs_xdef_cw_eval_t ** get_eval_at_cell_cw
Definition: cs_property.h:191
int n_definitions
Definition: cs_property.h:171
int id
Definition: cs_property.h:150
cs_xdef_t ** b_defs
Definition: cs_property.h:204
int n_b_definitions
Definition: cs_property.h:203
const cs_property_t ** related_properties
Definition: cs_property.h:197
cs_xdef_eval_t ** get_eval_at_cell
Definition: cs_property.h:186
cs_flag_t state_flag
Definition: cs_property.h:151
short int * def_ids
Definition: cs_property.h:177
char *restrict name
Definition: cs_property.h:149
cs_real_t ref_value
Definition: cs_property.h:160
cs_xdef_t ** defs
Definition: cs_property.h:172
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:242
Definition: cs_mesh.h:85
Structure storing the evaluation of a property and its related data.
Definition: cs_property.h:219
const cs_property_t * property
Definition: cs_property.h:221
bool need_eigen
Definition: cs_property.h:235
bool need_tensor
Definition: cs_property.h:229
bool is_unity
Definition: cs_property.h:224
cs_real_t eigen_max
Definition: cs_property.h:236
cs_real_t eigen_ratio
Definition: cs_property.h:237
cs_real_t value
Definition: cs_property.h:231
bool is_iso
Definition: cs_property.h:223
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:156