programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cs_xdef_eval.h
Go to the documentation of this file.
1 #ifndef __CS_XDEF_EVAL_H__
2 #define __CS_XDEF_EVAL_H__
3 
4 /*============================================================================
5  * Manage the (generic) evaluation of extended definitions
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2018 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_cdo.h"
35 #include "cs_cdo_connect.h"
36 #include "cs_cdo_local.h"
37 #include "cs_cdo_quantities.h"
38 #include "cs_mesh.h"
39 #include "cs_quadrature.h"
40 #include "cs_time_step.h"
41 
42 /*----------------------------------------------------------------------------*/
43 
45 
46 /*============================================================================
47  * Function pointer type definitions
48  *============================================================================*/
49 
50 /*----------------------------------------------------------------------------*/
65 /*----------------------------------------------------------------------------*/
66 
67 typedef void
69  const cs_lnum_t *elt_ids,
70  bool compact,
71  const cs_mesh_t *mesh,
72  const cs_cdo_connect_t *connect,
73  const cs_cdo_quantities_t *quant,
74  const cs_time_step_t *ts,
75  void *input,
76  cs_real_t *eval);
77 
78 /*----------------------------------------------------------------------------*/
89 /*----------------------------------------------------------------------------*/
90 
91 typedef void
93  const cs_time_step_t *ts,
94  void *input,
95  cs_real_t *eval);
96 
97 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
112 typedef void
114  cs_lnum_t n_points,
115  const cs_real_t *xyz,
116  const cs_time_step_t *ts,
117  void *input,
118  cs_real_t *eval);
119 
120 /*============================================================================
121  * Type definitions
122  *============================================================================*/
123 
124 /*============================================================================
125  * Global variables
126  *============================================================================*/
127 
128 /*============================================================================
129  * Public function prototypes
130  *============================================================================*/
131 
132 /*----------------------------------------------------------------------------*/
146 /*----------------------------------------------------------------------------*/
147 
148 void
150  const cs_lnum_t *elt_ids,
151  bool compact,
152  const cs_mesh_t *mesh,
153  const cs_cdo_connect_t *connect,
154  const cs_cdo_quantities_t *quant,
155  const cs_time_step_t *ts,
156  void *input,
157  cs_real_t *eval);
158 
159 /*----------------------------------------------------------------------------*/
168 /*----------------------------------------------------------------------------*/
169 
170 void
172  const cs_time_step_t *ts,
173  void *input,
174  cs_real_t *eval);
175 
176 /*----------------------------------------------------------------------------*/
190 /*----------------------------------------------------------------------------*/
191 
192 void
194  const cs_lnum_t *elt_ids,
195  bool compact,
196  const cs_mesh_t *mesh,
197  const cs_cdo_connect_t *connect,
198  const cs_cdo_quantities_t *quant,
199  const cs_time_step_t *ts,
200  void *input,
201  cs_real_t *eval);
202 
203 /*----------------------------------------------------------------------------*/
212 /*----------------------------------------------------------------------------*/
213 
214 void
216  const cs_time_step_t *ts,
217  void *input,
218  cs_real_t *eval);
219 
220 /*----------------------------------------------------------------------------*/
234 /*----------------------------------------------------------------------------*/
235 
236 void
238  const cs_lnum_t *elt_ids,
239  bool compact,
240  const cs_mesh_t *mesh,
241  const cs_cdo_connect_t *connect,
242  const cs_cdo_quantities_t *quant,
243  const cs_time_step_t *ts,
244  void *input,
245  cs_real_t *eval);
246 
247 /*----------------------------------------------------------------------------*/
256 /*----------------------------------------------------------------------------*/
257 
258 void
260  const cs_time_step_t *ts,
261  void *input,
262  cs_real_t *eval);
263 
264 /*----------------------------------------------------------------------------*/
278 /*----------------------------------------------------------------------------*/
279 
280 void
282  const cs_lnum_t *elt_ids,
283  bool compact,
284  const cs_mesh_t *mesh,
285  const cs_cdo_connect_t *connect,
286  const cs_cdo_quantities_t *quant,
287  const cs_time_step_t *ts,
288  void *input,
289  cs_real_t *eval);
290 
291 /*----------------------------------------------------------------------------*/
305 /*----------------------------------------------------------------------------*/
306 
307 void
309  const cs_lnum_t *elt_ids,
310  bool compact,
311  const cs_mesh_t *mesh,
312  const cs_cdo_connect_t *connect,
313  const cs_cdo_quantities_t *quant,
314  const cs_time_step_t *ts,
315  void *input,
316  cs_real_t *eval);
317 
318 /*----------------------------------------------------------------------------*/
333 /*----------------------------------------------------------------------------*/
334 
335 void
337  const cs_lnum_t *elt_ids,
338  bool compact,
339  const cs_mesh_t *mesh,
340  const cs_cdo_connect_t *connect,
341  const cs_cdo_quantities_t *quant,
342  const cs_time_step_t *ts,
343  void *input,
344  cs_real_t *eval);
345 
346 /*----------------------------------------------------------------------------*/
356 /*----------------------------------------------------------------------------*/
357 
358 void
360  const cs_time_step_t *ts,
361  void *input,
362  cs_real_t *eval);
363 
364 /*----------------------------------------------------------------------------*/
379 /*----------------------------------------------------------------------------*/
380 
381 void
383  const cs_lnum_t *elt_ids,
384  bool compact,
385  const cs_mesh_t *mesh,
386  const cs_cdo_connect_t *connect,
387  const cs_cdo_quantities_t *quant,
388  const cs_time_step_t *ts,
389  void *input,
390  cs_real_t *eval);
391 
392 /*----------------------------------------------------------------------------*/
407 /*----------------------------------------------------------------------------*/
408 
409 void
411  const cs_lnum_t *elt_ids,
412  bool compact,
413  const cs_mesh_t *mesh,
414  const cs_cdo_connect_t *connect,
415  const cs_cdo_quantities_t *quant,
416  const cs_time_step_t *ts,
417  void *input,
418  cs_real_t *eval);
419 
420 /*----------------------------------------------------------------------------*/
434 /*----------------------------------------------------------------------------*/
435 
436 void
438  const cs_lnum_t *elt_ids,
439  bool compact,
440  const cs_mesh_t *mesh,
441  const cs_cdo_connect_t *connect,
442  const cs_cdo_quantities_t *quant,
443  const cs_time_step_t *ts,
444  void *input,
445  cs_real_t *eval);
446 
447 /*----------------------------------------------------------------------------*/
463 /*----------------------------------------------------------------------------*/
464 
465 void
467  const cs_lnum_t *elt_ids,
468  bool compact,
469  const cs_mesh_t *mesh,
470  const cs_cdo_connect_t *connect,
471  const cs_cdo_quantities_t *quant,
472  const cs_time_step_t *ts,
473  void *input,
474  cs_real_t *eval);
475 
476 /*----------------------------------------------------------------------------*/
487 /*----------------------------------------------------------------------------*/
488 
489 void
491  const cs_time_step_t *ts,
492  void *input,
493  cs_real_t *eval);
494 
495 /*----------------------------------------------------------------------------*/
509 /*----------------------------------------------------------------------------*/
510 
511 void
513  const cs_lnum_t *elt_ids,
514  bool compact,
515  const cs_mesh_t *mesh,
516  const cs_cdo_connect_t *connect,
517  const cs_cdo_quantities_t *quant,
518  const cs_time_step_t *ts,
519  void *input,
520  cs_real_t *eval);
521 
522 /*----------------------------------------------------------------------------*/
532 /*----------------------------------------------------------------------------*/
533 
534 void
536  const cs_time_step_t *ts,
537  void *input,
538  cs_real_t *eval);
539 
540 /*----------------------------------------------------------------------------*/
553 /*----------------------------------------------------------------------------*/
554 
555 void
557  cs_lnum_t n_points,
558  const cs_real_t *xyz,
559  const cs_time_step_t *ts,
560  void *input,
561  cs_real_t *eval);
562 
563 /*----------------------------------------------------------------------------*/
576 /*----------------------------------------------------------------------------*/
577 
578 void
580  cs_lnum_t n_points,
581  const cs_real_t *xyz,
582  const cs_time_step_t *ts,
583  void *input,
584  cs_real_t *eval);
585 
586 /*----------------------------------------------------------------------------*/
599 /*----------------------------------------------------------------------------*/
600 
601 void
603  cs_lnum_t n_points,
604  const cs_real_t *xyz,
605  const cs_time_step_t *ts,
606  void *input,
607  cs_real_t *eval);
608 
609 /*----------------------------------------------------------------------------*/
622 /*----------------------------------------------------------------------------*/
623 
624 void
626  cs_lnum_t n_points,
627  const cs_real_t *xyz,
628  const cs_time_step_t *ts,
629  void *input,
630  cs_real_t *eval);
631 
632 /*----------------------------------------------------------------------------*/
644 /*----------------------------------------------------------------------------*/
645 
646 void
648  short int f,
649  void *input,
650  cs_real_t *eval);
651 
652 /*----------------------------------------------------------------------------*/
666 /*----------------------------------------------------------------------------*/
667 
668 void
670  short int f,
671  const cs_time_step_t *ts,
672  void *input,
673  cs_quadrature_type_t qtype,
674  cs_real_t *eval);
675 
676 /*----------------------------------------------------------------------------*/
687 /*----------------------------------------------------------------------------*/
688 
689 void
691  short int f,
692  void *input,
693  cs_real_t *eval);
694 
695 /*----------------------------------------------------------------------------*/
708 /*----------------------------------------------------------------------------*/
709 
710 void
712  short int f,
713  const cs_time_step_t *ts,
714  void *input,
715  cs_quadrature_type_t qtype,
716  cs_real_t *eval);
717 
718 /*----------------------------------------------------------------------------*/
719 
721 
722 #endif /* __CS_XDEF_EVAL_H__ */
void cs_xdef_eval_cw_at_vtx_flux_by_val(const cs_cell_mesh_t *cm, short int f, void *input, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by values. The normal flux is t...
Definition: cs_xdef_eval.c:1344
void( cs_xdef_eval_cw_xyz_t)(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity at several locations in a cell defined through a descripto...
Definition: cs_xdef_eval.h:113
time step descriptor
Definition: cs_time_step.h:51
void cs_xdef_eval_cw_flux_by_analytic(const cs_cell_mesh_t *cm, short int f, const cs_time_step_t *ts, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by analytic function...
Definition: cs_xdef_eval.c:1633
void cs_xdef_eval_scalar_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a scalar-valued quantity for a list of elements.
Definition: cs_xdef_eval.c:93
void cs_xdef_eval_cw_at_vtx_flux_by_analytic(const cs_cell_mesh_t *cm, short int f, const cs_time_step_t *ts, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by analytic function...
Definition: cs_xdef_eval.c:1403
void cs_xdef_eval_cw_tensor_by_val(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a tensor-valued quantity by a cellwise process.
Definition: cs_xdef_eval.c:312
void cs_xdef_eval_at_cells_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity defined at cells using an analytic function.
Definition: cs_xdef_eval.c:343
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
Definition: cs_cdo_local.h:138
void cs_xdef_eval_cw_cell_by_array(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity at cells defined by an array. Array is assumed to be interlaced. Variation using a cs_cell_mesh_t structure.
Definition: cs_xdef_eval.c:898
Definition: cs_cdo_connect.h:55
void cs_xdef_eval_cw_cell_by_field(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity inside a cell defined using a field Variation using a cs_cell_mesh_t structure...
Definition: cs_xdef_eval.c:1068
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_quantities.h:89
void cs_xdef_eval_scalar_at_cells_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a scalar-valued quantity at cells defined by an array. Array is assumed to be interlaced...
Definition: cs_xdef_eval.c:493
Definition: cs_mesh.h:63
void cs_xdef_eval_cw_3_at_xyz_by_array(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined by analytic function at a precise location inside ...
Definition: cs_xdef_eval.c:1192
cs_quadrature_type_t
Definition: cs_quadrature.h:48
void cs_xdef_eval_at_b_faces_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity defined at border faces using an analytic function.
Definition: cs_xdef_eval.c:384
void cs_xdef_eval_at_vertices_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity defined at vertices using an array.
Definition: cs_xdef_eval.c:703
void( cs_xdef_eval_t)(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) ...
Definition: cs_xdef_eval.h:68
void cs_xdef_eval_cw_vector_by_val(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a vector-valued quantity by a cellwise process.
Definition: cs_xdef_eval.c:221
void cs_xdef_eval_cw_scalar_by_val(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a scalar-valued quantity by a cellwise process.
Definition: cs_xdef_eval.c:139
void cs_xdef_eval_tensor_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a tensor-valued quantity for a list of elements.
Definition: cs_xdef_eval.c:253
void cs_xdef_eval_cw_vector_at_xyz_by_val(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined by analytic function at a precise location inside ...
Definition: cs_xdef_eval.c:1156
void( cs_xdef_eval_cw_t)(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, 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_eval.h:92
void cs_xdef_eval_cw_cell_by_analytic(const cs_cell_mesh_t *cm, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity defined using an analytic function by a cellwise process (usage of a cs_cell_mesh...
Definition: cs_xdef_eval.c:460
void cs_xdef_eval_vector_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a vector-valued quantity for a list of elements.
Definition: cs_xdef_eval.c:168
void cs_xdef_eval_3_at_all_vertices_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a vector-valued quantity at all vertices defined by an array. Array is assumed to be interla...
Definition: cs_xdef_eval.c:770
void cs_xdef_eval_cw_flux_by_val(const cs_cell_mesh_t *cm, short int f, void *input, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by values. Use of a cs_cell_mes...
Definition: cs_xdef_eval.c:1606
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
void cs_xdef_eval_cw_3_at_xyz_by_field(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined by a field at a precise location inside a cell Use...
Definition: cs_xdef_eval.c:1276
#define END_C_DECLS
Definition: cs_defs.h:454
void cs_xdef_eval_cw_at_xyz_by_analytic(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined by analytic function at a precise location inside ...
Definition: cs_xdef_eval.c:1121
void cs_xdef_eval_cell_by_field(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity inside a cell defined using a field.
Definition: cs_xdef_eval.c:961
void cs_xdef_eval_at_vertices_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a quantity defined at vertices using an analytic function.
Definition: cs_xdef_eval.c:424
void cs_xdef_eval_nd_at_cells_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, void *input, cs_real_t *eval)
Evaluate a nd-valued quantity at cells defined by an array. Array is assumed to be interlaced...
Definition: cs_xdef_eval.c:595