8.0
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-2023 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 
109 #define CS_PROPERTY_SUBCELL_DEFINITION (1 << 5)
110 
113 /*============================================================================
114  * Type definitions
115  *============================================================================*/
116 
118 
126 typedef enum {
127 
130 
132 
133 /* ======================================== */
134 /* Set of parameters attached to a property */
135 /* ======================================== */
136 
143 typedef struct _cs_property_t cs_property_t;
144 
146 
147  char *restrict name;
148  int id;
152 
153  /* Reference value wich is used as default when nothing else is set. This
154  * value can also be used to renormalized quantities related to this property
155  * By default, this is set to 1
156  */
157 
159 
160  /* Property is up to now only defined on the whole domain (volume) */
161 
162  int n_definitions; /* Current number of definitions used */
163  cs_xdef_t **defs; /* List of definitions */
164 
165  /* Store the definition id for each cell, NULL if there is only one
166  definition set */
167 
168  short int *def_ids;
169 
170  /* Function pointers to handle generic tasks related to a property. There
171  is one function related to each definition. Some functions may not be
172  allocated according to the kind of property */
173 
174  /* Retrieve the evaluation of the property at the cell center for each
175  definition */
176 
178 
179  /* Same thing as the previous one but now with the usage of cellwise algo.
180  relying on a cs_cell_mesh_t structure */
181 
183 
184  /* For properties relying on other properties for their definition, one
185  * stores the pointers to these related properties */
186 
189 
190  /* Optional: Definition(s) of the property at the boundary. If nothing is
191  set, then one uses the definition on the volume to get information on the
192  boundary. This is the default behavior. */
193 
196 
197  /* Store the definition id for each boundary face, NULL if there is only one
198  boundary definition set */
199 
200  short int *b_def_ids;
201 
202 };
203 
204 
211 typedef struct {
212 
213  const cs_property_t *property; /* shared pointer */
214 
215  bool is_iso; /* Detect if this an easier case */
216  bool is_unity; /* Detect if this a simple case */
217 
221 
223  cs_real_t tensor[3][3];
225 
227 
228 /*============================================================================
229  * Global variables
230  *============================================================================*/
231 
232 /*============================================================================
233  * Static inline public function prototypes
234  *============================================================================*/
235 
236 /*----------------------------------------------------------------------------*/
244 /*----------------------------------------------------------------------------*/
245 
246 static inline bool
248 {
249  if (pty == NULL)
250  return true; /* Treated as the "unity" property */
251 
252  if (pty->state_flag & CS_FLAG_STATE_STEADY) {
253  if (pty->state_flag & CS_FLAG_STATE_UNIFORM)
254  return true;
255  else
256  return false;
257  }
258  else
259  return false;
260 }
261 
262 /*----------------------------------------------------------------------------*/
270 /*----------------------------------------------------------------------------*/
271 
272 static inline bool
274 {
275  if (pty == NULL)
276  return true; /* Treated as the "unity" property */
277 
278  if (pty->state_flag & CS_FLAG_STATE_STEADY)
279  return true;
280  else
281  return false;
282 }
283 
284 /*----------------------------------------------------------------------------*/
292 /*----------------------------------------------------------------------------*/
293 
294 static inline bool
296 {
297  if (pty == NULL)
298  return true; /* Treated as the "unity" property */
299 
300  if (pty->state_flag & CS_FLAG_STATE_UNIFORM)
301  return true;
302  else
303  return false;
304 }
305 
306 /*----------------------------------------------------------------------------*/
314 /*----------------------------------------------------------------------------*/
315 
316 static inline bool
318 {
319  if (pty == NULL)
320  return false;
321 
322  if (pty->type & CS_PROPERTY_ISO)
323  return true;
324  else
325  return false;
326 }
327 
328 /*----------------------------------------------------------------------------*/
337 /*----------------------------------------------------------------------------*/
338 
339 static inline bool
341 {
342  if (pty == NULL)
343  return false;
344 
345  if (pty->type & CS_PROPERTY_SUBCELL_DEFINITION)
346  return true;
347  else
348  return false;
349 }
350 
351 /*----------------------------------------------------------------------------*/
359 /*----------------------------------------------------------------------------*/
360 
361 static inline const char *
363 {
364  if (pty == NULL)
365  return NULL;
366 
367  return pty->name;
368 }
369 
370 /*----------------------------------------------------------------------------*/
378 /*----------------------------------------------------------------------------*/
379 
380 static inline cs_property_type_t
382 {
383  if (pty == NULL)
384  return 0; /* means undefined */
385 
386  return pty->type;
387 }
388 
389 /*----------------------------------------------------------------------------*/
397 /*----------------------------------------------------------------------------*/
398 
399 static inline int
401 {
402  if (pty == NULL)
403  return 0; /* means undefined */
404 
405  if (pty->type & CS_PROPERTY_ISO)
406  return 1;
407  else if (pty->type & CS_PROPERTY_ORTHO)
408  return 3;
409  else if (pty->type & CS_PROPERTY_ANISO_SYM)
410  return 6;
411  else if (pty->type & CS_PROPERTY_ANISO)
412  return 9;
413  else
414  return 0; /* means undefined */
415 }
416 
417 /*============================================================================
418  * Public function prototypes
419  *============================================================================*/
420 
421 /*----------------------------------------------------------------------------*/
429 /*----------------------------------------------------------------------------*/
430 
431 void
433  const cs_cdo_quantities_t *quant,
434  const cs_cdo_connect_t *connect);
435 
436 /*----------------------------------------------------------------------------*/
442 /*----------------------------------------------------------------------------*/
443 
444 int
446 
447 /*----------------------------------------------------------------------------*/
456 /*----------------------------------------------------------------------------*/
457 
459 cs_property_add(const char *name,
460  cs_property_type_t type);
461 
462 /*----------------------------------------------------------------------------*/
474 /*----------------------------------------------------------------------------*/
475 
477 cs_property_subcell_add(const char *name,
478  cs_property_type_t type);
479 
480 /*----------------------------------------------------------------------------*/
494 /*----------------------------------------------------------------------------*/
495 
497 cs_property_add_as_product(const char *name,
498  const cs_property_t *pty_a,
499  const cs_property_t *pty_b);
500 
501 /*----------------------------------------------------------------------------*/
509 /*----------------------------------------------------------------------------*/
510 
512 cs_property_by_name(const char *name);
513 
514 /*----------------------------------------------------------------------------*/
522 /*----------------------------------------------------------------------------*/
523 
525 cs_property_by_id(int id);
526 
527 /*----------------------------------------------------------------------------*/
534 /*----------------------------------------------------------------------------*/
535 
536 void
538  cs_property_key_t key);
539 
540 /*----------------------------------------------------------------------------*/
548 /*----------------------------------------------------------------------------*/
549 
550 void
552  double refval);
553 
554 /*----------------------------------------------------------------------------*/
559 /*----------------------------------------------------------------------------*/
560 
561 void
563 
564 /*----------------------------------------------------------------------------*/
569 /*----------------------------------------------------------------------------*/
570 
571 void
573 
574 /*----------------------------------------------------------------------------*/
586 /*----------------------------------------------------------------------------*/
587 
589 cs_property_data_define(bool need_tensor,
590  bool need_eigen,
591  const cs_property_t *property);
592 
593 /*----------------------------------------------------------------------------*/
603 /*----------------------------------------------------------------------------*/
604 
605 void
606 cs_property_data_init(bool need_tensor,
607  bool need_eigen,
608  const cs_property_t *property,
609  cs_property_data_t *data);
610 
611 /*----------------------------------------------------------------------------*/
623 /*----------------------------------------------------------------------------*/
624 
625 cs_xdef_t *
627  double val);
628 
629 /*----------------------------------------------------------------------------*/
641 /*----------------------------------------------------------------------------*/
642 
643 cs_xdef_t *
645  const char *zname,
646  double val);
647 
648 /*----------------------------------------------------------------------------*/
661 /*----------------------------------------------------------------------------*/
662 
663 cs_xdef_t *
665  const char *zname,
666  double val);
667 
668 /*----------------------------------------------------------------------------*/
680 /*----------------------------------------------------------------------------*/
681 
682 cs_xdef_t *
684  const char *zname,
685  double val[]);
686 
687 /*----------------------------------------------------------------------------*/
700 /*----------------------------------------------------------------------------*/
701 
702 cs_xdef_t *
704  const char *zname,
705  double vals[]);
706 
707 /*----------------------------------------------------------------------------*/
719 /*----------------------------------------------------------------------------*/
720 
721 cs_xdef_t *
723  const char *zname,
724  cs_real_t tens[3][3]);
725 
726 /*----------------------------------------------------------------------------*/
739 /*----------------------------------------------------------------------------*/
740 
741 cs_xdef_t *
743  const char *zname,
744  double tens[3][3]);
745 
746 /*----------------------------------------------------------------------------*/
759 /*----------------------------------------------------------------------------*/
760 
761 cs_xdef_t *
763  const char *zname,
764  cs_real_t symtens[6]);
765 
766 /*----------------------------------------------------------------------------*/
780 /*----------------------------------------------------------------------------*/
781 
782 cs_xdef_t *
784  const char *zname,
785  double tens[6]);
786 
787 /*----------------------------------------------------------------------------*/
800 /*----------------------------------------------------------------------------*/
801 
802 cs_xdef_t *
804  const char *zname,
805  cs_time_func_t *func,
806  void *input);
807 
808 /*----------------------------------------------------------------------------*/
821 /*----------------------------------------------------------------------------*/
822 
823 cs_xdef_t *
825  const char *zname,
826  cs_time_func_t *func,
827  void *input);
828 
829 /*----------------------------------------------------------------------------*/
842 /*----------------------------------------------------------------------------*/
843 
844 cs_xdef_t *
846  const char *zname,
847  cs_analytic_func_t *func,
848  void *input);
849 
850 /*----------------------------------------------------------------------------*/
864 /*----------------------------------------------------------------------------*/
865 
866 cs_xdef_t *
868  const char *zname,
869  cs_analytic_func_t *func,
870  void *input);
871 
872 /*----------------------------------------------------------------------------*/
888 /*----------------------------------------------------------------------------*/
889 
890 cs_xdef_t *
892  const char *zname,
893  void *context,
894  cs_xdef_eval_t *get_eval_at_cell,
895  cs_xdef_cw_eval_t *get_eval_at_cell_cw);
896 
897 /*----------------------------------------------------------------------------*/
918 /*----------------------------------------------------------------------------*/
919 
920 cs_xdef_t *
922  const char *zname,
923  cs_flag_t val_location,
924  cs_real_t *array,
925  bool is_owner,
926  bool full_length);
927 
928 /*----------------------------------------------------------------------------*/
949 /*----------------------------------------------------------------------------*/
950 
951 cs_xdef_t *
953  const char *zname,
954  cs_flag_t val_loc,
955  cs_real_t *array,
956  bool is_owner,
957  bool full_length);
958 
959 /*----------------------------------------------------------------------------*/
969 /*----------------------------------------------------------------------------*/
970 
971 cs_xdef_t *
973  cs_field_t *field);
974 
975 /*----------------------------------------------------------------------------*/
986 /*----------------------------------------------------------------------------*/
987 
988 cs_xdef_t *
990  cs_field_t *field);
991 
992 /*----------------------------------------------------------------------------*/
1004 /*----------------------------------------------------------------------------*/
1005 
1006 void
1008  const cs_property_t *pty,
1009  int *pty_stride,
1010  cs_real_t **p_pty_vals);
1011 
1012 /*----------------------------------------------------------------------------*/
1027 /*----------------------------------------------------------------------------*/
1028 
1029 void
1031  int def_id,
1032  bool dense_output,
1033  double t_eval,
1034  cs_real_t *eval);
1035 
1036 /*----------------------------------------------------------------------------*/
1050 /*----------------------------------------------------------------------------*/
1051 
1052 void
1054  int def_id,
1055  bool dense_output,
1056  double t_eval,
1057  cs_real_t *array);
1058 
1059 /*----------------------------------------------------------------------------*/
1068 /*----------------------------------------------------------------------------*/
1069 
1070 void
1072  const cs_property_t *pty,
1073  cs_real_t *array);
1074 
1075 /*----------------------------------------------------------------------------*/
1084 /*----------------------------------------------------------------------------*/
1085 
1086 void
1088  const cs_property_t *pty,
1089  cs_real_t *array);
1090 
1091 /*----------------------------------------------------------------------------*/
1102 /*----------------------------------------------------------------------------*/
1103 
1104 void
1106  cs_real_t t_eval,
1107  const cs_property_t *pty,
1108  bool do_inversion,
1109  cs_real_t tensor[3][3]);
1110 
1111 /*----------------------------------------------------------------------------*/
1121 /*----------------------------------------------------------------------------*/
1122 
1123 cs_real_t
1125  cs_real_t t_eval,
1126  const cs_property_t *pty);
1127 
1128 /*----------------------------------------------------------------------------*/
1140 /*----------------------------------------------------------------------------*/
1141 
1142 void
1144  const cs_property_t *pty,
1145  cs_real_t t_eval,
1146  bool do_inversion,
1147  cs_real_t tensor[3][3]);
1148 
1149 /*----------------------------------------------------------------------------*/
1160 /*----------------------------------------------------------------------------*/
1161 
1162 cs_real_t
1164  const cs_property_t *pty,
1165  cs_real_t t_eval);
1166 
1167 /*----------------------------------------------------------------------------*/
1177 /*----------------------------------------------------------------------------*/
1178 
1179 void
1181  const cs_property_t *pty,
1182  cs_real_t t_eval,
1183  cs_real_t *eval);
1184 
1185 /*----------------------------------------------------------------------------*/
1194 /*----------------------------------------------------------------------------*/
1195 
1196 void
1198  cs_real_t t_eval,
1199  double dt,
1200  cs_real_t fourier[]);
1201 
1202 /*----------------------------------------------------------------------------*/
1207 /*----------------------------------------------------------------------------*/
1208 
1209 void
1210 cs_property_log_setup(void);
1211 
1212 /*----------------------------------------------------------------------------*/
1213 
1215 
1216 #endif /* __CS_PROPERTY_H__ */
#define restrict
Definition: cs_defs.h:139
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
unsigned short int cs_flag_t
Definition: cs_defs.h:321
@ 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_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.c:2135
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.c:1479
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.c:3036
int cs_property_get_n_properties(void)
Retrieve the number of properties.
Definition: cs_property.c:937
static const char * cs_property_get_name(const cs_property_t *pty)
Retrieve the name of a property.
Definition: cs_property.h:362
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.c:2389
cs_property_key_t
List of available keys for setting options on a property.
Definition: cs_property.h:126
@ CS_PTYKEY_POST_FOURIER
Definition: cs_property.h:128
@ CS_PTYKEY_N_KEYS
Definition: cs_property.h:129
void cs_property_destroy_all(void)
Free all cs_property_t structures and the array storing all the structures.
Definition: cs_property.c:1182
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.c:1856
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.c:2526
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.c:3347
cs_property_t * cs_property_add(const char *name, cs_property_type_t type)
Create and initialize a new property structure.
Definition: cs_property.c:954
cs_property_t * cs_property_by_name(const char *name)
Find the related property definition from its name.
Definition: cs_property.c:1087
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.c:3485
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.c:1232
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.c:2697
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.c:2587
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:247
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.c:2082
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.c:919
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.c:1134
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.c:1024
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.c:1700
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.c:1657
static bool cs_property_is_uniform(const cs_property_t *pty)
returns true if the property is uniform, otherwise false
Definition: cs_property.h:295
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.c:1422
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.c:3440
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.c:1165
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.c:2289
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.c:2641
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.c:2235
static cs_property_type_t cs_property_get_type(const cs_property_t *pty)
Retrieve the type of a property.
Definition: cs_property.h:381
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.c:2184
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.c:1752
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.c:2884
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.c:2464
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.c:1541
static bool cs_property_is_isotropic(const cs_property_t *pty)
returns true if the property is isotropic, otherwise false
Definition: cs_property.h:317
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.c:1795
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.c:3397
static int cs_property_get_dim(const cs_property_t *pty)
Retrieve the dimension of the property.
Definition: cs_property.h:400
cs_property_t * cs_property_by_id(int id)
Find the related property definition from its id.
Definition: cs_property.c:1114
void cs_property_log_setup(void)
Print a summary of the settings for all defined cs_property_t structures.
Definition: cs_property.c:3678
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.c:1906
cs_flag_t cs_property_type_t
Definition: cs_property.h:117
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.c:1001
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.c:3612
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:340
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.c:3306
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.c:1960
static bool cs_property_is_steady(const cs_property_t *pty)
returns true if the property is steady, otherwise false
Definition: cs_property.h:273
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.c:2005
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.c:1600
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:109
#define CS_PROPERTY_ANISO_SYM
Definition: cs_property.h:94
Definition: field.f90:27
Definition: mesh.f90:26
Definition: cs_property.h:145
cs_flag_t process_flag
Definition: cs_property.h:150
short int * b_def_ids
Definition: cs_property.h:200
int n_related_properties
Definition: cs_property.h:187
cs_property_type_t type
Definition: cs_property.h:151
cs_xdef_cw_eval_t ** get_eval_at_cell_cw
Definition: cs_property.h:182
int n_definitions
Definition: cs_property.h:162
int id
Definition: cs_property.h:148
cs_xdef_t ** b_defs
Definition: cs_property.h:195
int n_b_definitions
Definition: cs_property.h:194
const cs_property_t ** related_properties
Definition: cs_property.h:188
cs_xdef_eval_t ** get_eval_at_cell
Definition: cs_property.h:177
cs_flag_t state_flag
Definition: cs_property.h:149
short int * def_ids
Definition: cs_property.h:168
char *restrict name
Definition: cs_property.h:147
cs_real_t ref_value
Definition: cs_property.h:158
cs_xdef_t ** defs
Definition: cs_property.h:163
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
Field descriptor.
Definition: cs_field.h:130
Definition: cs_mesh.h:85
Structure storing the evaluation of a property and its related data.
Definition: cs_property.h:211
const cs_property_t * property
Definition: cs_property.h:213
bool need_eigen
Definition: cs_property.h:218
bool need_tensor
Definition: cs_property.h:222
bool is_unity
Definition: cs_property.h:216
cs_real_t eigen_max
Definition: cs_property.h:219
cs_real_t eigen_ratio
Definition: cs_property.h:220
cs_real_t value
Definition: cs_property.h:224
bool is_iso
Definition: cs_property.h:215
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