7.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-2022 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,
461 
462 /*----------------------------------------------------------------------------*/
474 /*----------------------------------------------------------------------------*/
475 
477 cs_property_subcell_add(const char *name,
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,
896 
897 /*----------------------------------------------------------------------------*/
912 /*----------------------------------------------------------------------------*/
913 
914 cs_xdef_t *
916  cs_flag_t loc,
917  cs_real_t *array,
918  bool is_owner,
919  const cs_lnum_t *index,
920  const cs_lnum_t *ids);
921 
922 /*----------------------------------------------------------------------------*/
939 /*----------------------------------------------------------------------------*/
940 
941 cs_xdef_t *
943  const char *zname,
944  cs_flag_t loc,
945  cs_real_t *array,
946  bool is_owner,
947  const cs_lnum_t *index,
948  const cs_lnum_t *ids);
949 
950 /*----------------------------------------------------------------------------*/
960 /*----------------------------------------------------------------------------*/
961 
962 cs_xdef_t *
964  cs_field_t *field);
965 
966 /*----------------------------------------------------------------------------*/
977 /*----------------------------------------------------------------------------*/
978 
979 cs_xdef_t *
981  cs_field_t *field);
982 
983 /*----------------------------------------------------------------------------*/
995 /*----------------------------------------------------------------------------*/
996 
997 void
999  const cs_property_t *pty,
1000  int *pty_stride,
1001  cs_real_t **p_pty_vals);
1002 
1003 /*----------------------------------------------------------------------------*/
1012 /*----------------------------------------------------------------------------*/
1013 
1014 void
1016  const cs_property_t *pty,
1017  cs_real_t *array);
1018 
1019 /*----------------------------------------------------------------------------*/
1030 /*----------------------------------------------------------------------------*/
1031 
1032 void
1034  cs_real_t t_eval,
1035  const cs_property_t *pty,
1036  bool do_inversion,
1037  cs_real_t tensor[3][3]);
1038 
1039 /*----------------------------------------------------------------------------*/
1049 /*----------------------------------------------------------------------------*/
1050 
1051 cs_real_t
1053  cs_real_t t_eval,
1054  const cs_property_t *pty);
1055 
1056 /*----------------------------------------------------------------------------*/
1068 /*----------------------------------------------------------------------------*/
1069 
1070 void
1072  const cs_property_t *pty,
1073  cs_real_t t_eval,
1074  bool do_inversion,
1075  cs_real_t tensor[3][3]);
1076 
1077 /*----------------------------------------------------------------------------*/
1088 /*----------------------------------------------------------------------------*/
1089 
1090 cs_real_t
1092  const cs_property_t *pty,
1093  cs_real_t t_eval);
1094 
1095 /*----------------------------------------------------------------------------*/
1105 /*----------------------------------------------------------------------------*/
1106 
1107 void
1109  const cs_property_t *pty,
1110  cs_real_t t_eval,
1111  cs_real_t *eval);
1112 
1113 /*----------------------------------------------------------------------------*/
1122 /*----------------------------------------------------------------------------*/
1123 
1124 void
1126  cs_real_t t_eval,
1127  double dt,
1128  cs_real_t fourier[]);
1129 
1130 /*----------------------------------------------------------------------------*/
1135 /*----------------------------------------------------------------------------*/
1136 
1137 void
1138 cs_property_log_setup(void);
1139 
1140 /*----------------------------------------------------------------------------*/
1141 
1143 
1144 #endif /* __CS_PROPERTY_H__ */
int id
Definition: cs_property.h:148
void cs_property_log_setup(void)
Print a summary of the settings for all defined cs_property_t structures.
Definition: cs_property.c:2874
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:2222
#define CS_PROPERTY_ORTHO
Definition: cs_property.h:81
#define restrict
Definition: cs_defs.h:142
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:789
cs_property_t * cs_property_by_name(const char *name)
Find the related property definition from its name.
Definition: cs_property.c:921
short int * def_ids
Definition: cs_property.h:168
cs_real_t eigen_ratio
Definition: cs_property.h:220
#define CS_FLAG_STATE_UNIFORM
Definition: cs_flag.h:103
cs_flag_t state_flag
Definition: cs_property.h:149
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:836
static int cs_property_get_dim(const cs_property_t *pty)
Retrieve the dimension of the property.
Definition: cs_property.h:400
cs_real_t eigen_max
Definition: cs_property.h:219
Field descriptor.
Definition: cs_field.h:130
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:1589
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:1650
bool is_iso
Definition: cs_property.h:215
Structure storing the evaluation of a property and its related data.
Definition: cs_property.h:211
char *restrict name
Definition: cs_property.h:147
#define BEGIN_C_DECLS
Definition: cs_defs.h:512
cs_flag_t process_flag
Definition: cs_property.h:150
cs_real_t ref_value
Definition: cs_property.h:158
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:754
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
cs_real_t value
Definition: cs_property.h:224
cs_xdef_cw_eval_t ** get_eval_at_cell_cw
Definition: cs_property.h:182
void cs_property_destroy_all(void)
Free all cs_property_t structures and the array storing all the structures.
Definition: cs_property.c:1016
Definition: cs_cdo_connect.h:61
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:1494
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
int n_b_definitions
Definition: cs_property.h:194
Definition: field.f90:27
#define CS_PROPERTY_ANISO_SYM
Definition: cs_property.h:94
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:1066
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:999
cs_xdef_t ** b_defs
Definition: cs_property.h:195
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:1546
cs_property_type_t type
Definition: cs_property.h:151
cs_xdef_eval_t ** get_eval_at_cell
Definition: cs_property.h:177
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:1451
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_cdo_quantities.h:132
#define CS_PROPERTY_ISO
Definition: cs_property.h:75
Definition: cs_property.h:128
bool need_eigen
Definition: cs_property.h:218
Definition: cs_mesh.h:85
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:1394
cs_xdef_t * cs_property_boundary_def_by_array(cs_property_t *pty, const char *zname, cs_flag_t loc, cs_real_t *array, bool is_owner, const cs_lnum_t *index, const cs_lnum_t *ids)
Define the values of a property at the boundarye thanks to an array All boundary faces associated to ...
Definition: cs_property.c:2164
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:2028
#define CS_PROPERTY_SUBCELL_DEFINITION
Definition: cs_property.h:109
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_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
Definition: cs_property.h:145
const cs_property_t ** related_properties
Definition: cs_property.h:188
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:1699
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:2637
cs_xdef_t ** defs
Definition: cs_property.h:163
Definition: cs_field_pointer.h:65
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:2345
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:1273
#define CS_FLAG_STATE_STEADY
Definition: cs_flag.h:106
static const char * cs_property_get_name(const cs_property_t *pty)
Retrieve the name of a property.
Definition: cs_property.h:362
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_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:2544
short int * b_def_ids
Definition: cs_property.h:200
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:2393
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:155
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:1798
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_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:2682
bool need_tensor
Definition: cs_property.h:222
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:968
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:1928
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
int n_definitions
Definition: cs_property.h:162
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:2503
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:1216
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:1977
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:2808
int n_related_properties
Definition: cs_property.h:187
#define END_C_DECLS
Definition: cs_defs.h:513
unsigned short int cs_flag_t
Definition: cs_defs.h:324
cs_property_t * cs_property_by_id(int id)
Find the related property definition from its id.
Definition: cs_property.c:948
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
bool is_unity
Definition: cs_property.h:216
const cs_property_t * property
Definition: cs_property.h:213
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:2284
Definition: cs_property.h:129
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:1875
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:1753
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
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:2594
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:859
#define CS_PROPERTY_ANISO
Definition: cs_property.h:88
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
cs_flag_t cs_property_type_t
Definition: cs_property.h:117
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_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:1335
cs_property_key_t
List of available keys for setting options on a property.
Definition: cs_property.h:126
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
int cs_property_get_n_properties(void)
Retrieve the number of properties.
Definition: cs_property.c:772
Structure associated to the definition of a property relying on the cs_xdef_t structure.
Definition: mesh.f90:26
cs_xdef_t * cs_property_def_by_array(cs_property_t *pty, cs_flag_t loc, cs_real_t *array, bool is_owner, const cs_lnum_t *index, const cs_lnum_t *ids)
Define a cs_property_t structure thanks to an array of values. One assumes that all cells are defined...
Definition: cs_property.c:2076