My Project
programmer's documentation
cs_internal_coupling.h
Go to the documentation of this file.
1 #ifndef __CS_INTERNAL_COUPLING_H__
2 #define __CS_INTERNAL_COUPLING_H__
3 
4 /*============================================================================
5  * Internal coupling: coupling for one instance of Code_Saturne
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 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  * PLE library headers
32  *----------------------------------------------------------------------------*/
33 
34 #include <ple_locator.h>
35 
36 /*----------------------------------------------------------------------------
37  * Local headers
38  *----------------------------------------------------------------------------*/
39 
40 #include "cs_defs.h"
41 
42 #include "cs_base.h"
43 #include "cs_matrix_assembler.h"
44 #include "cs_mesh.h"
45 #include "cs_parameters.h"
46 
47 /*----------------------------------------------------------------------------*/
48 
50 
51 /*=============================================================================
52  * Macro definitions
53  *============================================================================*/
54 
55 /*============================================================================
56  * Type definitions
57  *============================================================================*/
58 
59 
60 /* Internal coupling structure definition */
61 
62 typedef struct {
63 
64  /* Locator + tag for exchanging variables */
65  ple_locator_t *locator;
66  int *c_tag;
67 
68  /* Selection criteria for coupled domains */
71 
72  cs_lnum_t n_local; /* Number of faces */
73  cs_lnum_t *faces_local; /* Coupling boundary faces, numbered 0..n-1 */
74 
75  cs_lnum_t n_distant; /* Number of faces in faces_distant */
76  cs_lnum_t *faces_distant; /* Distant boundary faces associated with locator */
77 
78  /* face i is coupled in this entity if coupled_faces[i] = true */
80 
81  /* Geometrical weights around coupling interface */
83 
84  /* IJ vectors */
86 
87  /* OF vectors */
89 
90  /* Gradient reconstruction */
93 
94  /* User information */
95  char *namesca;
96 
98 
99 /*============================================================================
100  * Public function prototypes
101  *============================================================================*/
102 
103 /*----------------------------------------------------------------------------*/
109 /*----------------------------------------------------------------------------*/
110 
111 int
113 
114 /*----------------------------------------------------------------------------*/
124 /*----------------------------------------------------------------------------*/
125 
126 void
128  const char criteria_cells[],
129  const char criteria_faces[]);
130 
131 /*----------------------------------------------------------------------------*/
139 /*----------------------------------------------------------------------------*/
140 
141 void
143  const char criteria_cells[]);
144 
145 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 void
154 cs_internal_coupling_bcs(int bc_type[]);
155 
156 /*----------------------------------------------------------------------------*/
160 /*----------------------------------------------------------------------------*/
161 
162 void
164 
165 /*----------------------------------------------------------------------------*/
173 /*----------------------------------------------------------------------------*/
174 
176 cs_internal_coupling_by_id(int coupling_id);
177 
178 /*----------------------------------------------------------------------------*/
188 /*----------------------------------------------------------------------------*/
189 
190 void
192  int stride,
193  cs_real_t distant[],
194  cs_real_t local[]);
195 
196 /*----------------------------------------------------------------------------*/
205 /*----------------------------------------------------------------------------*/
206 
207 void
209  int stride,
210  const cs_real_t tab[],
211  cs_real_t local[]);
212 
213 /*----------------------------------------------------------------------------*/
222 /*----------------------------------------------------------------------------*/
223 
224 void
226  int stride,
227  const cs_real_t tab[],
228  cs_real_t local[]);
229 
230 /*----------------------------------------------------------------------------
231  * Modify LSQ COCG matrix to include internal coupling
232  *
233  * parameters:
234  * cpl <-- pointer to coupling entity
235  * cocg <-> cocg matrix modified
236  *----------------------------------------------------------------------------*/
237 
238 void
240  cs_real_33_t cocg[]);
241 
242 /*----------------------------------------------------------------------------
243  * Modify LSQ COCG matrix to include internal coupling
244  * when diffusivity is a tensor
245  *
246  * parameters:
247  * cpl <-- pointer to coupling entity
248  * c_weight <-- weigthing coefficients
249  * cocg <-> cocg matrix modified
250  *----------------------------------------------------------------------------*/
251 
252 void
254  const cs_real_t *c_weight,
255  cs_real_33_t cocg[]);
256 
257 /*----------------------------------------------------------------------------
258  * Modify iterative COCG matrix to include internal coupling
259  *
260  * parameters:
261  * cpl <-- pointer to coupling entity
262  * cocg <-> cocg matrix modified
263  *----------------------------------------------------------------------------*/
264 
265 void
267  cs_real_33_t cocg[]);
268 
269 /*----------------------------------------------------------------------------*/
273 /*----------------------------------------------------------------------------*/
274 
275 void
277 
278 /*----------------------------------------------------------------------------*/
282 /*----------------------------------------------------------------------------*/
283 
284 void
286 
287 /*----------------------------------------------------------------------------*/
296 /*----------------------------------------------------------------------------*/
297 
298 void
300  const cs_internal_coupling_t *cpl,
301  const cs_real_t c_weight[],
302  const int w_stride,
303  cs_real_4_t rhsv[]);
304 
305 /*----------------------------------------------------------------------------*/
315 /*----------------------------------------------------------------------------*/
316 
317 void
319  const cs_internal_coupling_t *cpl,
320  const cs_real_t c_weight[],
321  const int w_stride,
322  const cs_real_3_t pvar[],
323  cs_real_33_t rhs[]);
324 
325 /*----------------------------------------------------------------------------*/
335 /*----------------------------------------------------------------------------*/
336 
337 void
339  const cs_internal_coupling_t *cpl,
340  const cs_real_t c_weight[],
341  const int w_stride,
342  const cs_real_6_t pvar[],
343  cs_real_63_t rhs[]);
344 
345 /*----------------------------------------------------------------------------*/
356 /*----------------------------------------------------------------------------*/
357 
358 void
360  const cs_internal_coupling_t *cpl,
361  const cs_real_t c_weight[],
363  const cs_real_t pvar[],
364  cs_real_3_t rhs[]);
365 
366 /*----------------------------------------------------------------------------*/
377 /*----------------------------------------------------------------------------*/
378 
379 void
381  const cs_internal_coupling_t *cpl,
382  const cs_real_t c_weight[],
384  const cs_real_3_t pvar[],
385  cs_real_33_t rhs[]);
386 
387 /*----------------------------------------------------------------------------*/
398 /*----------------------------------------------------------------------------*/
399 
400 void
402  const cs_internal_coupling_t *cpl,
403  const cs_real_t c_weight[],
405  const cs_real_6_t pvar[],
406  cs_real_63_t rhs[]);
407 
408 /*----------------------------------------------------------------------------*/
417 /*----------------------------------------------------------------------------*/
418 
419 void
421  const cs_internal_coupling_t *cpl,
422  cs_real_3_t *restrict r_grad,
423  cs_real_3_t grad[]);
424 
425 /*----------------------------------------------------------------------------*/
434 /*----------------------------------------------------------------------------*/
435 
436 void
438  const cs_internal_coupling_t *cpl,
439  cs_real_33_t *restrict r_grad,
440  cs_real_33_t grad[]);
441 
442 /*----------------------------------------------------------------------------*/
451 /*----------------------------------------------------------------------------*/
452 
453 void
455  const cs_internal_coupling_t *cpl,
456  cs_real_63_t *restrict r_grad,
457  cs_real_63_t grad[]);
458 
459 /*----------------------------------------------------------------------------
460  * Addition to matrix-vector product in case of internal coupling.
461  *
462  * parameters:
463  * exclude_diag <-- extra diagonal flag
464  * f <-- associated field pointer
465  * x <-- vector x in m * x = y
466  * y <-> vector y in m * x = y
467  *----------------------------------------------------------------------------*/
468 
469 void
471  const cs_field_t *f,
472  const cs_real_t *restrict x,
473  cs_real_t *restrict y);
474 
475 /*----------------------------------------------------------------------------
476  * Add coupling term coordinates to matrix assembler.
477  *
478  * parameters:
479  * coupling_id
480  * r_g_id <-- global row ids (per cell)
481  * ma <-> matrix assembler
482  *----------------------------------------------------------------------------*/
483 
484 void
486  const cs_gnum_t *r_g_id,
488 
489 /*----------------------------------------------------------------------------
490  * Add coupling terms to matrix values assembly.
491  *
492  * parameters:
493  * f <-- associated field
494  * db_size <-- diagonal block size
495  * eb_size <-- extra-diagonal block size
496  * r_g_id <-- global row ids (per cell)
497  * mav <-> matrix values assembler
498  *----------------------------------------------------------------------------*/
499 
500 void
502  cs_lnum_t db_size,
503  cs_lnum_t eb_size,
504  const cs_gnum_t r_g_id[],
506 
507 /*----------------------------------------------------------------------------
508  * Return pointers to coupling components
509  *
510  * parameters:
511  * cpl <-- pointer to coupling entity
512  * n_local --> NULL or pointer to component n_local
513  * faces_local --> NULL or pointer to component faces_local
514  * n_distant --> NULL or pointer to component n_distant
515  * faces_distant --> NULL or pointer to component faces_distant
516  *----------------------------------------------------------------------------*/
517 
518 void
520  cs_lnum_t *n_local,
521  cs_lnum_t *faces_local[],
522  cs_lnum_t *n_distant,
523  cs_lnum_t *faces_distant[]);
524 
525 /*----------------------------------------------------------------------------
526  * Log information about a given internal coupling entity
527  *
528  * parameters:
529  * cpl <-- pointer to coupling entity
530  *----------------------------------------------------------------------------*/
531 
532 void
534 
535 /*----------------------------------------------------------------------------
536  * Print informations about all coupling entities
537  *
538  * parameters:
539  * cpl <-- pointer to coupling entity
540  *----------------------------------------------------------------------------*/
541 
542 void
544 
545 /*----------------------------------------------------------------------------
546  * Add preprocessing operations required by coupling volume using given
547  * criteria.
548  *
549  * The volume is seperated from the rest of the domain with inserted
550  * boundaries.
551  *
552  * parameters:
553  * mesh <-> pointer to mesh structure to modify
554  *----------------------------------------------------------------------------*/
555 
556 void
558 
559 /*----------------------------------------------------------------------------
560  * Define face to face mappings for internal couplings.
561  *
562  * parameters:
563  * mesh <-> pointer to mesh structure to modify
564  *----------------------------------------------------------------------------*/
565 
566 void
568 
569 /*----------------------------------------------------------------------------
570  * Define coupling entity using given criteria.
571  *
572  * parameters:
573  * f_id <-- id of the field
574  *----------------------------------------------------------------------------*/
575 
576 void
578 
579 /*----------------------------------------------------------------------------*/
589 /*----------------------------------------------------------------------------*/
590 
591 void
593  const cs_internal_coupling_t *cpl,
594  const cs_real_t c_weight[],
595  const cs_real_t pvar[],
597 
598 /*----------------------------------------------------------------------------*/
608 /*----------------------------------------------------------------------------*/
609 
610 void
612  const cs_internal_coupling_t *cpl,
613  const cs_real_t c_weight[],
614  const cs_real_3_t pvar[],
616 
617 
618 /*----------------------------------------------------------------------------*/
628 /*----------------------------------------------------------------------------*/
629 
630 void
632  const cs_internal_coupling_t *cpl,
633  const cs_real_t c_weight[],
634  const cs_real_6_t pvar[],
636 
637 /*----------------------------------------------------------------------------*/
645 /*----------------------------------------------------------------------------*/
646 
647 void
648 cs_ic_field_set_exchcoeff(const int field_id,
649  const cs_real_t *hbnd);
650 
651 /*----------------------------------------------------------------------------*/
661 /*----------------------------------------------------------------------------*/
662 
663 void
664 cs_ic_field_dist_data_by_face_id(const int field_id,
665  int stride,
666  const cs_real_t tab_distant[],
667  cs_real_t tab_local[]);
668 
669 /*----------------------------------------------------------------------------*/
670 
672 
673 #endif /* __CS_INTERNAL_COUPLING_H__ */
cs_internal_coupling_reconstruct_tensor_gradient
void cs_internal_coupling_reconstruct_tensor_gradient(const cs_internal_coupling_t *cpl, cs_real_63_t *restrict r_grad, cs_real_63_t grad[])
Add internal coupling contribution for reconstruction of the gradient of a symmetric tensor.
Definition: cs_internal_coupling.c:1700
cs_internal_coupling_iterative_scalar_gradient
void cs_internal_coupling_iterative_scalar_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], cs_real_3_t *restrict grad, const cs_real_t pvar[], cs_real_3_t rhs[])
Add internal coupling rhs contribution for iterative gradient calculation.
Definition: cs_internal_coupling.c:1258
f_id
void const int * f_id
Definition: cs_gui.h:292
cs_internal_coupling_finalize
void cs_internal_coupling_finalize(void)
Destruction of all internal coupling related structures.
Definition: cs_internal_coupling.c:2145
cs_internal_coupling_t::n_distant
cs_lnum_t n_distant
Definition: cs_internal_coupling.h:75
cs_internal_coupling_map
void cs_internal_coupling_map(cs_mesh_t *mesh)
Definition: cs_internal_coupling.c:2877
cs_defs.h
cs_ic_field_set_exchcoeff
void cs_ic_field_set_exchcoeff(const int field_id, const cs_real_t *hbnd)
Update internal coupling coefficients of the field of the given id using given boundary exchange coef...
Definition: cs_internal_coupling.c:2927
cs_internal_coupling_t::n_local
cs_lnum_t n_local
Definition: cs_internal_coupling.h:72
cs_internal_coupling_preprocess
void cs_internal_coupling_preprocess(cs_mesh_t *mesh)
Definition: cs_internal_coupling.c:2838
cs_internal_coupling_t::namesca
char * namesca
Definition: cs_internal_coupling.h:95
restrict
#define restrict
Definition: cs_defs.h:127
cs_real_3_t
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
cs_matrix_assembler_values_t
struct _cs_matrix_assembler_values_t cs_matrix_assembler_values_t
Definition: cs_matrix_assembler.h:65
cs_internal_coupling_t::cells_criteria
char * cells_criteria
Definition: cs_internal_coupling.h:69
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_internal_coupling_lsq_tensor_gradient
void cs_internal_coupling_lsq_tensor_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], const int w_stride, const cs_real_6_t pvar[], cs_real_63_t rhs[])
Add internal coupling rhs contribution for LSQ gradient calculation.
cs_internal_coupling_dump
void cs_internal_coupling_dump(void)
Definition: cs_internal_coupling.c:2811
grad
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t const cs_real_t const cs_real_t cs_real_t cs_real_t cs_real_3_t grad[]
Definition: cs_gradient.h:93
cs_internal_coupling_exchange_var
void cs_internal_coupling_exchange_var(const cs_internal_coupling_t *cpl, int stride, cs_real_t distant[], cs_real_t local[])
Exchange quantities from distant to local (update local using distant).
Definition: cs_internal_coupling.c:2190
cs_internal_coupling_lsq_cocg_weighted
void cs_internal_coupling_lsq_cocg_weighted(const cs_internal_coupling_t *cpl, const cs_real_t *c_weight, cs_real_33_t cocg[])
Definition: cs_internal_coupling.c:2053
cs_internal_coupling_initialize
void cs_internal_coupling_initialize(void)
Initialize internal coupling related structures.
Definition: cs_internal_coupling.c:2695
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
cs_internal_coupling_initialize_tensor_gradient
void cs_internal_coupling_initialize_tensor_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], const cs_real_6_t pvar[], cs_real_63_t *restrict grad)
Add contribution from coupled faces (internal coupling) to initialisation for iterative symmetric ten...
Definition: cs_internal_coupling.c:1172
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_internal_coupling_lsq_scalar_gradient
void cs_internal_coupling_lsq_scalar_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], const int w_stride, cs_real_4_t rhsv[])
Add internal coupling rhs contribution for LSQ gradient calculation.
Definition: cs_internal_coupling.c:1762
cs_internal_coupling_spmv_contribution
void cs_internal_coupling_spmv_contribution(bool exclude_diag, const cs_field_t *f, const cs_real_t *restrict x, cs_real_t *restrict y)
Definition: cs_internal_coupling.c:2332
cs_internal_coupling_add_volume
void cs_internal_coupling_add_volume(cs_mesh_t *mesh, const char criteria_cells[])
Define coupling volume using given criteria. Then, this volume will be separated from the rest of the...
Definition: cs_internal_coupling.c:945
cs_ic_field_dist_data_by_face_id
void cs_ic_field_dist_data_by_face_id(const int field_id, int stride, const cs_real_t tab_distant[], cs_real_t tab_local[])
Get distant data using face id at all coupling faces for a given field id.
Definition: cs_internal_coupling.c:2978
cs_internal_coupling_t::faces_criteria
char * faces_criteria
Definition: cs_internal_coupling.h:70
cs_matrix_assembler.h
cs_internal_coupling_t::ci_cj_vect
cs_real_3_t * ci_cj_vect
Definition: cs_internal_coupling.h:85
cs_internal_coupling_t
Definition: cs_internal_coupling.h:62
cs_internal_coupling_t::offset_vect
cs_real_3_t * offset_vect
Definition: cs_internal_coupling.h:88
mesh
Definition: mesh.f90:26
cs_internal_coupling_lsq_vector_gradient
void cs_internal_coupling_lsq_vector_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], const int w_stride, const cs_real_3_t pvar[], cs_real_33_t rhs[])
Add internal coupling rhs contribution for LSQ gradient calculation.
Definition: cs_internal_coupling.c:1884
cs_internal_coupling_t::cocg_it
cs_real_33_t * cocg_it
Definition: cs_internal_coupling.h:92
cs_mesh.h
stride
void const cs_int_t const cs_int_t const cs_int_t const cs_int_t * stride
Definition: cs_sat_coupling.h:325
pvar
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t pvar[]
Definition: cs_convection_diffusion.h:5386
cs_parameters.h
cs_gnum_t
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
cs_internal_coupling_exchange_by_face_id
void cs_internal_coupling_exchange_by_face_id(const cs_internal_coupling_t *cpl, int stride, const cs_real_t tab[], cs_real_t local[])
Exchange variable between groups using face id.
Definition: cs_internal_coupling.c:2265
cs_internal_coupling_initialize_vector_gradient
void cs_internal_coupling_initialize_vector_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], const cs_real_3_t pvar[], cs_real_33_t *restrict grad)
Add contribution from coupled faces (internal coupling) to initialisation for iterative vector gradie...
Definition: cs_internal_coupling.c:1088
cs_internal_coupling_t::g_weight
cs_real_t * g_weight
Definition: cs_internal_coupling.h:82
y
void const cs_lnum_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const y
Definition: cs_wall_functions.h:1147
cs_internal_coupling_by_id
cs_internal_coupling_t * cs_internal_coupling_by_id(int coupling_id)
Return the coupling associated with a given coupling_id.
Definition: cs_internal_coupling.c:2167
cs_internal_coupling_iterative_tensor_gradient
void cs_internal_coupling_iterative_tensor_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], cs_real_63_t *restrict grad, const cs_real_6_t pvar[], cs_real_63_t rhs[])
Add internal coupling rhs contribution for iterative tensor gradient calculation.
Definition: cs_internal_coupling.c:1472
cs_real_6_t
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:317
cs_internal_coupling_it_cocg_contribution
void cs_internal_coupling_it_cocg_contribution(const cs_internal_coupling_t *cpl, cs_real_33_t cocg[])
Definition: cs_internal_coupling.c:2110
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_internal_coupling_matrix_add_ids
void cs_internal_coupling_matrix_add_ids(int coupling_id, const cs_gnum_t *r_g_id, cs_matrix_assembler_t *ma)
Definition: cs_internal_coupling.c:2433
cs_internal_coupling_bcs
void cs_internal_coupling_bcs(int bc_type[])
Impose wall BCs to internal coupled faces if not yet defined.
Definition: cs_internal_coupling.c:976
cs_internal_coupling_reconstruct_vector_gradient
void cs_internal_coupling_reconstruct_vector_gradient(const cs_internal_coupling_t *cpl, cs_real_33_t *restrict r_grad, cs_real_33_t grad[])
Add internal coupling contribution for reconstruction of the gradient of a vector.
Definition: cs_internal_coupling.c:1638
cs_internal_coupling_n_couplings
int cs_internal_coupling_n_couplings(void)
Return number of defined internal couplings.
Definition: cs_internal_coupling.c:897
cs_internal_coupling_coupled_faces
void cs_internal_coupling_coupled_faces(const cs_internal_coupling_t *cpl, cs_lnum_t *n_local, cs_lnum_t *faces_local[], cs_lnum_t *n_distant, cs_lnum_t *faces_distant[])
Definition: cs_internal_coupling.c:2305
cs_internal_coupling_t::cocgb_s_lsq
cs_real_33_t * cocgb_s_lsq
Definition: cs_internal_coupling.h:91
cs_internal_coupling_lsq_cocg_contribution
void cs_internal_coupling_lsq_cocg_contribution(const cs_internal_coupling_t *cpl, cs_real_33_t cocg[])
Definition: cs_internal_coupling.c:2012
cs_matrix_assembler_t
struct _cs_matrix_assembler_t cs_matrix_assembler_t
Definition: cs_matrix_assembler.h:61
cs_internal_coupling_reconstruct_scalar_gradient
void cs_internal_coupling_reconstruct_scalar_gradient(const cs_internal_coupling_t *cpl, cs_real_3_t *restrict r_grad, cs_real_3_t grad[])
Add internal coupling contribution for reconstruction of the gradient of a scalar.
cs_internal_coupling_t::locator
ple_locator_t * locator
Definition: cs_internal_coupling.h:65
cs_internal_coupling_iterative_vector_gradient
void cs_internal_coupling_iterative_vector_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], cs_real_33_t *restrict grad, const cs_real_3_t pvar[], cs_real_33_t rhs[])
Add internal coupling rhs contribution for iterative vector gradient calculation.
Definition: cs_internal_coupling.c:1364
cs_internal_coupling_add_entity
void cs_internal_coupling_add_entity(int f_id)
Definition: cs_internal_coupling.c:2897
cs_internal_coupling_t::faces_local
cs_lnum_t * faces_local
Definition: cs_internal_coupling.h:73
cs_real_33_t
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:321
cs_real_4_t
cs_real_t cs_real_4_t[4]
vector of 4 floating-point values
Definition: cs_defs.h:316
cs_internal_coupling_t::coupled_faces
bool * coupled_faces
Definition: cs_internal_coupling.h:79
cs_internal_coupling_log
void cs_internal_coupling_log(const cs_internal_coupling_t *cpl)
Definition: cs_internal_coupling.c:2784
cs_internal_coupling_add
void cs_internal_coupling_add(cs_mesh_t *mesh, const char criteria_cells[], const char criteria_faces[])
Define coupling volume using given selection criteria.
Definition: cs_internal_coupling.c:915
cs_internal_coupling_setup
void cs_internal_coupling_setup(void)
Setup internal coupling related parameters.
Definition: cs_internal_coupling.c:2631
cs_internal_coupling_matrix_add_values
void cs_internal_coupling_matrix_add_values(const cs_field_t *f, cs_lnum_t db_size, cs_lnum_t eb_size, const cs_gnum_t r_g_id[], cs_matrix_assembler_values_t *mav)
Definition: cs_internal_coupling.c:2504
cs_internal_coupling_initialize_scalar_gradient
void cs_internal_coupling_initialize_scalar_gradient(const cs_internal_coupling_t *cpl, const cs_real_t c_weight[], const cs_real_t pvar[], cs_real_3_t *restrict grad)
Add contribution from coupled faces (internal coupling) to initialisation for iterative scalar gradie...
Definition: cs_internal_coupling.c:1007
cs_field_t
Field descriptor.
Definition: cs_field.h:124
cs_real_63_t
cs_real_t cs_real_63_t[6][3]
Definition: cs_defs.h:327
cs_internal_coupling_exchange_by_cell_id
void cs_internal_coupling_exchange_by_cell_id(const cs_internal_coupling_t *cpl, int stride, const cs_real_t tab[], cs_real_t local[])
Exchange variable between groups using cell id.
Definition: cs_internal_coupling.c:2216
cs_internal_coupling_t::c_tag
int * c_tag
Definition: cs_internal_coupling.h:66
cs_mesh_t
Definition: cs_mesh.h:63
cs_internal_coupling_t::faces_distant
cs_lnum_t * faces_distant
Definition: cs_internal_coupling.h:76
cs_base.h