9.2
general documentation
cs_boundary_conditions_set_coeffs.h
Go to the documentation of this file.
1#ifndef CS_BOUNDARY_CONDITIONS_SET_COEFFS_H
2#define CS_BOUNDARY_CONDITIONS_SET_COEFFS_H
3
4/*============================================================================
5 * Translation of the boundary conditions given by the user in a form
6 * that fits the solver.
7 *============================================================================*/
8
9/*
10 This file is part of code_saturne, a general-purpose CFD tool.
11
12 Copyright (C) 1998-2026 EDF S.A.
13
14 This program is free software; you can redistribute it and/or modify it under
15 the terms of the GNU General Public License as published by the Free Software
16 Foundation; either version 2 of the License, or (at your option) any later
17 version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 details.
23
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26 Street, Fifth Floor, Boston, MA 02110-1301, USA.
27*/
28
29/*----------------------------------------------------------------------------*/
30
31/*----------------------------------------------------------------------------
32 * Local headers
33 *----------------------------------------------------------------------------*/
34
35#include "base/cs_defs.h"
36
37#include "base/cs_dispatch.h"
38#include "base/cs_profiling.h"
39#include "bft/bft_error.h"
40#include "base/cs_field.h"
41#include "base/cs_math.h"
42#include "base/cs_profiling.h"
44
45/*=============================================================================
46 * Public function prototypes
47 *============================================================================*/
48
49/*----------------------------------------------------------------------------*/
50/*
51 * \brief Translation of the boundary conditions given by the user
52 * in a form that fits to the solver.
53 *
54 * The values at a boundary face \f$ \fib \f$ stored in the face center
55 * \f$ \centf \f$ of the variable \f$ P \f$ and its diffusive flux \f$ Q \f$
56 * are written as:
57 * \f[
58 * P_{\face} = A_P^g + B_P^g P_{\centi}
59 * \f]
60 * and
61 * \f[
62 * Q_{\face} = A_P^f + B_P^f P_{\centi}
63 * \f]
64 * where \f$ P_\centi \f$ is the value of the variable \f$ P \f$ at the
65 * neighboring cell.
66 *
67 * \warning
68 * - If we consider an increment of a variable, the boundary conditions
69 * read:
70 * \f[
71 * \delta P_{\face} = B_P^g \delta P_{\centi}
72 * \f]
73 * and
74 * \f[
75 * \delta Q_{\face} = -B_P^f \delta P_{\centi}
76 * \f]
77 *
78 * - For a vector field such as the velocity \f$ \vect{u} \f$ the boundary
79 * conditions may read:
80 * \f[
81 * \vect{u}_{\face} = \vect{A}_u^g + \tens{B}_u^g \vect{u}_{\centi}
82 * \f]
83 * and
84 * \f[
85 * \vect{Q}_{\face} = \vect{A}_u^f + \tens{B}_u^f \vect{u}_{\centi}
86 * \f]
87 * where \f$ \tens{B}_u^g \f$ and \f$ \tens{B}_u^f \f$ are 3x3 tensor matrix
88 * which coupled velocity components next to a boundary.
89 *
90 * Please refer to the
91 * <a href="../../theory.pdf#boundary"><b>boundary conditions</b></a> section
92 * of the theory guide for more informations, as well as the
93 * <a href="../../theory.pdf#condli"><b>condli</b></a> section.
94 *
95 * \param[in] nvar total number of variables
96 * \param[in] iterns iteration number on Navier-Stokes equations
97 * \param[in] isvhb id of field whose exchange coeffient should be
98 * saved at the walls, or -1.
99 * \param[in] italim for ALE
100 * \param[in] itrfin Last velocity-pressure sub-iteration indicator
101 * \param[in] ineefl for ALE
102 * \param[in] itrfup Update after velocity-pressure sub-iterations
103 * \param[in, out] isostd indicator for standard outlet
104 * \param[in] dt time step (per cell)
105 * \param[in, out] visvdr dynamic viscosity after V. Driest damping in
106 * boundary cells
107 * \param[out] hbord exchange coefficient at boundary
108 * \param[out] theipb value of thermal scalar at \f$ \centip \f$
109 * f boundary cells
110 * \param[in] nftcdt Global indicator of condensation source terms
111 * (ie. sum on the processors of nfbpcd) cells
112 * associated to the face with condensation
113 * phenomenon
114 */
115/*----------------------------------------------------------------------------*/
116
117void
119 int iterns,
120 int isvhb,
121 int italim,
122 int itrfin,
123 int ineefl,
124 int itrfup,
125 int isostd[],
126 cs_real_t *visvdr,
127 cs_real_t hbord[],
128 cs_real_t theipb[],
129 int nftcdt);
130
131/*----------------------------------------------------------------------------*/
135/*----------------------------------------------------------------------------*/
136
137void
139
140/*----------------------------------------------------------------------------*/
141/*
142 * \brief Update pressure boundary condition coefficients.
143 *
144 * \param[in] ctx associated dispatch context
145 * \param[in] f_p pointer to field
146 */
147/*----------------------------------------------------------------------------*/
148
149void
151 cs_field_t *f_p);
152
153/*============================================================================
154 * Public inline function definitions
155 *============================================================================*/
156
157/*----------------------------------------------------------------------------*/
168/*----------------------------------------------------------------------------*/
169
170CS_F_HOST_DEVICE inline void
172 cs_real_t af[3],
173 cs_real_t b[3][3],
174 cs_real_t bf[3][3],
175 const cs_real_t qimpv[3],
176 cs_real_t hint)
177{
178 /* Gradient BCs */
179
180 for (size_t i = 0; i < 3; i++) {
181 a[i] = -qimpv[i] / fmax(hint, 1.e-300);
182 }
183
184 b[0][0] = 1., b[0][1] = 0., b[0][2] = 0.;
185 b[1][0] = 0., b[1][1] = 1., b[1][2] = 0.;
186 b[2][0] = 0., b[2][1] = 0., b[2][2] = 1.;
187
188 /* Flux BCs */
189
190 for (size_t i = 0; i < 3; i++) {
191 af[i] = qimpv[i];
192
193 for (size_t j = 0; j < 3; j++)
194 bf[i][j] = 0.;
195 }
196}
197
198/*----------------------------------------------------------------------------*/
209/*----------------------------------------------------------------------------*/
210
211CS_F_HOST_DEVICE inline void
213 cs_real_t af[3],
214 cs_real_t b[3][3],
215 cs_real_t bf[3][3],
216 const cs_real_t qimpv[3],
217 const cs_real_t hint[6])
218{
219 cs_real_t m[6] = {0., 0., 0., 0., 0., 0.};
220 m[0] = hint[1]*hint[2] - hint[4]*hint[4];
221 m[1] = hint[0]*hint[2] - hint[5]*hint[5];
222 m[2] = hint[0]*hint[1] - hint[3]*hint[3];
223 m[3] = hint[4]*hint[5] - hint[3]*hint[2];
224 m[4] = hint[3]*hint[5] - hint[0]*hint[4];
225 m[5] = hint[3]*hint[4] - hint[1]*hint[5];
226
227 cs_real_t invdet = 1./(hint[0]*m[0] + hint[3]*m[3] + hint[5]*m[5]);
228
229 cs_real_t invh[6] = {0., 0., 0., 0., 0., 0.};
230 invh[0] = m[0] * invdet;
231 invh[1] = m[1] * invdet;
232 invh[2] = m[2] * invdet;
233 invh[3] = m[3] * invdet;
234 invh[4] = m[4] * invdet;
235 invh[5] = m[5] * invdet;
236
237 /* Gradient BCs */
238 cs_math_sym_33_3_product(invh, qimpv, a);
239 for (cs_lnum_t i = 0; i < 3; i++)
240 a[i] = -a[i];
241
242 b[0][0] = 1.0, b[0][1] = 0.0, b[0][2] = 0.0;
243 b[1][0] = 0.0, b[1][1] = 1.0, b[1][2] = 0.0;
244 b[2][0] = 0.0, b[2][1] = 0.0, b[2][2] = 1.0;
245
246 for (cs_lnum_t i = 0; i < 3; i++) {
247 /* Flux BCs */
248 af[i] = qimpv[i];
249 for (cs_lnum_t jsou = 0; jsou < 3; jsou++)
250 bf[i][jsou] = 0.0;
251 }
252}
253
254/*----------------------------------------------------------------------------*/
264/*----------------------------------------------------------------------------*/
265
266CS_F_HOST_DEVICE inline void
268 cs_real_t af[6],
269 cs_real_t b[6][6],
270 cs_real_t bf[6][6],
271 const cs_real_t qimpts[6],
272 cs_real_t hint)
273{
274 for (int i = 0; i < 6; i++) {
275
276 /* Gradient BC */
277 a[i] = -qimpts[i]/cs::max(hint, 1.e-300);
278 for (int jsou = 0; jsou < 6; jsou++) {
279 if (jsou == i)
280 b[i][jsou] = 1.0;
281 else
282 b[i][jsou] = 0.0;
283 }
284
285 /* Flux BCs */
286 af[i] = qimpts[i];
287 for (int jsou = 0; jsou < 6; jsou++)
288 bf[i][jsou] = 0.0;
289 }
290}
291
292/*----------------------------------------------------------------------------*/
305/*----------------------------------------------------------------------------*/
306
307CS_F_HOST_DEVICE inline void
309 cs_real_t af[3],
310 cs_real_t b[3][3],
311 cs_real_t bf[3][3],
312 const cs_real_t pimpv[3],
313 cs_real_t hint,
314 const cs_real_t hextv[3])
315{
316 for (int i = 0; i < 3; i++) {
317 if (fabs(hextv[i]) > 0.5*cs_math_infinite_r) {
318
319 /* Gradient BCs */
320 a[i] = pimpv[i];
321 for (int jsou = 0; jsou < 3; jsou++)
322 b[i][jsou] = 0.;
323
324 /* Flux BCs */
325 af[i] = -hint*pimpv[i];
326
327 bf[0][0] = hint, bf[0][1] = 0., bf[0][2] = 0.;
328 bf[1][0] = 0., bf[1][1] = hint, bf[1][2] = 0.;
329 bf[2][0] = 0., bf[2][1] = 0., bf[2][2] = hint;
330
331 }
332 else {
333
334 const cs_real_t val = hint/(hint + hextv[i]);
335 const cs_real_t heq = hextv[i]*val;
336
337 /* Gradient BCs */
338 a[i] = hextv[i]*pimpv[i]/(hint + hextv[i]);
339
340 b[0][0] = val, b[0][1] = 0., b[0][2] = 0.;
341 b[1][0] = 0., b[1][1] = val, b[1][2] = 0.;
342 b[2][0] = 0., b[2][1] = 0., b[2][2] = val;
343
344 /* Flux BCs */
345 af[i] = -heq*pimpv[i];
346
347 bf[0][0] = heq, bf[0][1] = 0., bf[0][2] = 0.;
348 bf[1][0] = 0., bf[1][1] = heq, bf[1][2] = 0.;
349 bf[2][0] = 0., bf[2][1] = 0., bf[2][2] = heq;
350
351 }
352 }
353}
354
355/*----------------------------------------------------------------------------*/
356/*
357 * \brief Set convective oulet BC for a scalar for a given face.
358 *
359 * \param[out] a explicit BC coefficient for gradients
360 * \param[out] af explicit BC coefficient for diffusive flux
361 * \param[out] b implicit BC coefficient for gradients
362 * \param[out] bf implicit BC coefficient for diffusive flux
363 * \param[in] pimp flux value to impose
364 * \param[in] cfl local Courant number used to convect
365 * \param[in] hint internal exchange coefficient
366 */
367/*----------------------------------------------------------------------------*/
368
371 (cs_real_t &a,
372 cs_real_t &af,
373 cs_real_t &b,
374 cs_real_t &bf,
375 cs_real_t pimp,
376 cs_real_t cfl,
377 cs_real_t hint);
378
379/*----------------------------------------------------------------------------*/
393/*----------------------------------------------------------------------------*/
394
395CS_F_HOST_DEVICE inline void
397 (cs_real_t a[3],
398 cs_real_t af[3],
399 cs_real_t b[3][3],
400 cs_real_t bf[3][3],
401 const cs_real_t pimpv[3],
402 const cs_real_t hintt[6],
403 const cs_real_t hextv[3])
404{
405 /* Gradient BCs */
406 for (int i = 0; i < 3; i++) {
407 if (fabs(hextv[i]) > 0.5*cs_math_infinite_r) {
408 a[i] = pimpv[i];
409 for (int jsou = 0; jsou < 3; jsou++)
410 b[i][jsou] = 0.;
411 }
412 else {
413 /* FIXME: at least log error message */
414#if defined(CS_DEVICE_COMPILE)
415 assert(0);
416#else
417 bft_error(__FILE__, __LINE__, 0,
418 _(" %s: hextv not set for component %d."),
419 __func__, i);
420#endif
421 }
422 }
423
424 /* Flux BCs */
425 cs_math_sym_33_3_product(hintt, pimpv, af);
426 for (int i = 0; i < 3; i++)
427 af[i] = -af[i];
428
429 bf[0][0] = hintt[0];
430 bf[1][1] = hintt[1];
431 bf[2][2] = hintt[2];
432 bf[0][1] = hintt[3];
433 bf[1][0] = hintt[3];
434 bf[1][2] = hintt[4];
435 bf[2][1] = hintt[4];
436 bf[0][2] = hintt[5];
437 bf[2][0] = hintt[5];
438}
439
440/*----------------------------------------------------------------------------*/
452/*----------------------------------------------------------------------------*/
453
454CS_F_HOST_DEVICE inline void
456 cs_real_t af[6],
457 cs_real_t b[6][6],
458 cs_real_t bf[6][6],
459 const cs_real_t pimpts[6],
460 cs_real_t hint,
461 const cs_real_t hextts[6])
462{
463 for (int i = 0; i < 6; i++) {
464
465 if (fabs(hextts[i]) > 0.5*cs_math_infinite_r) {
466 /* Gradient BCs */
467 a[i] = pimpts[i];
468 for (int jsou = 0; jsou < 6; jsou++)
469 b[i][jsou] = 0.;
470
471 /* Flux BCs */
472 af[i] = -hint * pimpts[i];
473 for (int jsou = 0; jsou < 6; jsou++) {
474 if (jsou == i)
475 bf[i][jsou] = hint;
476 else
477 bf[i][jsou] = 0.;
478 }
479 }
480
481 else {
482
483 const cs_real_t heq = hint * hextts[i] / (hint + hextts[i]);
484
485 /* Gradient BCs */
486 a[i] = hextts[i] * pimpts[i] / (hint + hextts[i]);
487 for (int jsou = 0; jsou < 6; jsou++) {
488 if (jsou == i)
489 b[i][jsou] = hint / (hint + hextts[i]);
490 else
491 b[i][jsou] = 0.;
492 }
493
494 /* Flux BCs */
495 af[i] = -heq * pimpts[i];
496 for (int jsou = 0; jsou < 6; jsou++) {
497 if (jsou == i)
498 bf[i][jsou] = heq;
499 else
500 bf[i][jsou] = 0.;
501 }
502 }
503 }
504}
505
506/*----------------------------------------------------------------------------*/
519/*----------------------------------------------------------------------------*/
520
521CS_F_HOST_DEVICE inline void
523 (cs_real_t a[3],
524 cs_real_t af[3],
525 cs_real_t b[3][3],
526 cs_real_t bf[3][3],
527 const cs_real_t pimpv[3],
528 const cs_real_t qimpv[3],
529 cs_real_t hint,
530 const cs_nreal_t normal[3])
531{
532 for (int i = 0; i < 3; i++) {
533
534 /* Gradient BCs */
535 a[i] = - qimpv[i]/cs::max(hint, 1.e-300);
536 /* "[1 -n(x)n] Qimp / hint" is divided into two */
537 for (int j = 0; j < 3; j++) {
538
539 a[i] = a[i] + normal[i]*normal[j]
540 * (pimpv[j] + qimpv[j] / cs::max(hint, 1.e-300));
541
542 if (j == i)
543 b[i][j] = 1.0 - normal[i] * normal[j];
544 else
545 b[i][j] = - normal[i] * normal[j];
546 }
547
548 /* Flux BCs */
549 af[i] = qimpv[i];
550 /* "[1 -n(x)n] Qimp" is divided into two */
551 for (int j = 0; j < 3; j++){
552
553 af[i] = af[i] - normal[i]*normal[j]
554 * (hint * pimpv[j] + qimpv[j]);
555
556 bf[i][j] = hint * normal[i] * normal[j];
557 }
558 }
559}
560
561/*----------------------------------------------------------------------------*/
575/*----------------------------------------------------------------------------*/
576
579 (cs_real_t a[3],
580 cs_real_t af[3],
581 cs_real_t b[3][3],
582 cs_real_t bf[3][3],
583 const cs_real_t pimpv[3],
584 const cs_real_t qimpv[3],
585 const cs_real_t hint[6],
586 const cs_nreal_t normal[3]);
587
588/*----------------------------------------------------------------------------*/
602/*----------------------------------------------------------------------------*/
603
604CS_F_HOST_DEVICE inline void
606 (cs_real_t a[3],
607 cs_real_t af[3],
608 cs_real_t b[3][3],
609 cs_real_t bf[3][3],
610 const cs_real_t pimpv[3],
611 const cs_real_t qimpv[3],
612 cs_real_t hint,
613 const cs_nreal_t normal[3])
614{
615 for (int i = 0; i < 3; i++) {
616
617 /* Gradient BC*/
618 /* "[1 -n(x)n] Pimp" is divided into two */
619 a[i] = pimpv[i];
620 for (int j = 0; j < 3; j++) {
621
622 a[i] = a[i] - normal[i]*normal[j]
623 * (pimpv[j] + qimpv[j] / cs::max(hint, 1.e-300));
624
625 b[i][j] = normal[i] * normal[j];
626 }
627
628 /* Flux BC */
629 /* "[1 -n(x)n] Pimp" is divided into two */
630 af[i] = -hint*pimpv[i];
631 for (int j = 0; j < 3; j++) {
632
633 af[i] = af[i] + normal[i]*normal[j]
634 * (qimpv[j] + pimpv[j] * hint);
635
636 if (j == i)
637 bf[i][j] = hint * (1.0 - normal[i] * normal[j]);
638 else
639 bf[i][j] = - hint * normal[i] * normal[j];
640 }
641 }
642}
643
644/*----------------------------------------------------------------------------*/
660/*----------------------------------------------------------------------------*/
661
662CS_F_HOST_DEVICE inline void
664 (cs_real_t a[6],
665 cs_real_t af[6],
666 cs_real_t b[6][6],
667 cs_real_t bf[6][6],
668 const cs_real_t pimpv[6],
669 const cs_real_t qimpv[6],
670 cs_real_t hint,
671 const cs_nreal_t normal[3])
672{
673 const int iv2t[6] = {0, 1, 2, 0, 1, 0};
674 const int jv2t[6] = {0, 1, 2, 1, 2, 2};
675 const cs_real_t delta[3][3] = {{1., 0., 0.}, {0., 1., 0.}, {0., 0., 1.}};
676
677 cs_real_t d[6][6];
678 cs_real_t n[6][6];
679
680 for (int ij = 0; ij < 6; ij++) {
681
682 int i = iv2t[ij];
683 int j = jv2t[ij];
684 /* Gradient BC*/
685 /* "[1 -n(x)n] Pimp" is divided into two */
686 //a[ij] = pimpv[ij];
687 a[ij] = 0;
688 for (int kl = 0; kl < 6; kl++) {
689
690 int k = iv2t[kl];
691 int l = jv2t[kl];
692
693 d[ij][kl] = (delta[i][k] - normal[i]*normal[k]) * normal[l]*normal[j]
694 + normal[i]*normal[k] * (delta[j][l] - normal[l]*normal[j]);
695
696 n[ij][kl] = normal[i]*normal[k]*normal[l]*normal[j]
697 + (delta[i][k] - normal[i]*normal[k])
698 * (delta[j][l] - normal[j]*normal[l]);
699
700 a[ij] += d[ij][kl]*pimpv[kl]
701 - n[ij][kl]*qimpv[kl]/(cs::max(hint, 1.e-300));
702
703 b[ij][kl] = n[ij][kl];
704 }
705
706 /* Flux BC */
707 /* "[1 -n(x)n] Pimp" is divided into two */
708 //af[ij] = -hint*pimpv[ij];
709 af[ij] = 0;
710 for (int kl = 0; kl < 6; kl++) {
711
712 int k = iv2t[kl];
713 int l = jv2t[kl];
714
715 d[ij][kl] = (delta[i][k] - normal[i]*normal[k]) * normal[l]*normal[j]
716 + normal[i]*normal[k] * (delta[j][l] - normal[l]*normal[j]);
717
718 n[ij][kl] = normal[i]*normal[k]*normal[l]*normal[j]
719 + (delta[i][k] - normal[i]*normal[k])
720 * (delta[j][l] - normal[l]*normal[j]);
721
722 af[ij] += n[ij][kl]*qimpv[kl]
723 - hint*d[ij][kl]*pimpv[kl];
724
725 bf[ij][kl] = hint*d[ij][kl];
726 }
727 }
728}
729
730/*----------------------------------------------------------------------------*/
745/*----------------------------------------------------------------------------*/
746
749 (cs_real_t a[3],
750 cs_real_t af[3],
751 cs_real_t b[3][3],
752 cs_real_t bf[3][3],
753 const cs_real_t pimpv[3],
754 const cs_real_t qimpv[3],
755 const cs_real_t hint[6],
756 const cs_nreal_t normal[3]);
757
758/*----------------------------------------------------------------------------*/
770/*----------------------------------------------------------------------------*/
771
772CS_F_HOST_DEVICE inline void
774 (cs_real_t a[3],
775 cs_real_t af[3],
776 cs_real_t b[3][3],
777 cs_real_t bf[3][3],
778 const cs_real_t pimpv[3],
779 const cs_real_t cflv[3],
780 cs_real_t hint)
781{
782 for (int i = 0; i < 3; i++) {
783
784 /* Gradient BCs */
785 for (int j = 0; j < 3; j ++) {
786 if (j == i)
787 b[i][j] = cflv[i] / (1.0 + cflv[i]);
788 else
789 b[i][j] = 0.0;
790 }
791 a[i] = pimpv[i] * (1.0 - b[i][i]);
792
793 /* Flux BCs */
794 af[i] = -hint * a[i];
795 for (int j = 0; j < 3; j++) {
796 if (j == i)
797 bf[i][j] = hint * (1.0 - b[i][j]);
798 else
799 bf[i][j] = 0.0;
800 }
801 }
802}
803
804/*----------------------------------------------------------------------------*/
816/*----------------------------------------------------------------------------*/
817
818CS_F_HOST_DEVICE inline void
820 cs_real_t af[6],
821 cs_real_t b[6][6],
822 cs_real_t bf[6][6],
823 const cs_real_t pimpts[6],
824 const cs_real_t cflts[6],
825 cs_real_t hint)
826{
827 for (int ij = 0; ij < 6; ij++) {
828
829 /* Gradient BCs */
830 for (int kl = 0; kl < 6; kl++) {
831 if (kl == ij)
832 b[ij][kl] = cflts[ij] / (1.0 + cflts[ij]);
833 else
834 b[ij][kl] = 0.0;
835 }
836 a[ij] = (1.0 - b[ij][ij]) * pimpts[ij];
837
838 /* Flux BCs */
839 af[ij] = -hint*a[ij];
840 for (int kl = 0; kl < 6; kl++) {
841 if (kl == ij)
842 bf[ij][kl] = hint * (1.0 - b[ij][kl]);
843 else
844 bf[ij][kl] = 0.0;
845 }
846 }
847}
848
849/*----------------------------------------------------------------------------*/
861/*----------------------------------------------------------------------------*/
862
863CS_F_HOST_DEVICE inline void
865 (cs_real_t a[3],
866 cs_real_t af[3],
867 cs_real_t b[3][3],
868 cs_real_t bf[3][3],
869 const cs_real_t pimpv[3],
870 const cs_real_t cflv[3],
871 const cs_real_t hintt[6])
872{
873 for(int i = 0; i < 3; i++) {
874
875 /* Gradient BCs */
876 for (int j = 0; j < 3; j++) {
877 if (j == i)
878 b[i][j] = cflv[i]/(1.0+cflv[i]);
879 else
880 b[i][j] = 0.0;
881 }
882 a[i] = (1.0-b[i][i])*pimpv[i];
883
884 }
885
886 /* Flux BCs */
887 cs_math_sym_33_3_product(hintt, a, af);
888 for (int i = 0; i < 3; i++)
889 af[i] = -af[i];
890
891 bf[0][0] = hintt[0]*(1.0 - b[0][0]);
892 bf[1][1] = hintt[1]*(1.0 - b[1][1]);
893 bf[2][2] = hintt[2]*(1.0 - b[2][2]);
894 bf[0][1] = hintt[3]*(1.0 - b[0][0]);
895 bf[1][0] = hintt[3]*(1.0 - b[0][0]);
896 bf[1][2] = hintt[4]*(1.0 - b[1][1]);
897 bf[2][1] = hintt[4]*(1.0 - b[1][1]);
898 bf[0][2] = hintt[5]*(1.0 - b[2][2]);
899 bf[2][0] = hintt[5]*(1.0 - b[2][2]);
900}
901
902/*----------------------------------------------------------------------------*/
914/*----------------------------------------------------------------------------*/
915
916CS_F_HOST_DEVICE inline void
918 (cs_real_t a[3],
919 cs_real_t af[3],
920 cs_real_t b[3][3],
921 cs_real_t bf[3][3],
922 const cs_real_t pimpv[3],
923 const cs_real_t qimpv[3])
924{
925 for (int i = 0; i < 3; i++) {
926
927 /* Gradient BCs */
928 a[i] = pimpv[i];
929 for (int j = 0; j < 3; j++)
930 b[i][j] = 0.0;
931
932 /* Flux BCs */
933 af[i] = qimpv[i];
934 for (int j = 0; j < 3; j++)
935 bf[i][j] = 0.0;
936 }
937}
938
939/*----------------------------------------------------------------------------*/
951/*----------------------------------------------------------------------------*/
952
953CS_F_HOST_DEVICE inline void
955 (cs_real_t a[6],
956 cs_real_t af[6],
957 cs_real_t b[6][6],
958 cs_real_t bf[6][6],
959 const cs_real_t pimpts[6],
960 const cs_real_t qimpts[6])
961{
962 for (int ij = 0; ij < 6; ij++) {
963
964 /* BS test on hextv ? if (abs(hextv[ij]) > cs_math_infinite_r * 0.5) */
965
966 /* Gradient BCs */
967 a[ij] = pimpts[ij];
968 for (int kl = 0; kl < 6; kl++)
969 b[ij][kl] = 0.0;
970
971 /* Flux BCs */
972 af[ij] = qimpts[ij];
973 for (int kl = 0; kl < 6; kl++)
974 bf[ij][kl] = 0.0;
975 }
976}
977
978/*----------------------------------------------------------------------------*/
989/*----------------------------------------------------------------------------*/
990
991CS_F_HOST_DEVICE inline void
993 cs_real_t &af,
994 cs_real_t &b,
995 cs_real_t &bf,
996 cs_real_t qimp,
997 cs_real_t hint)
998{
999 /* Gradient BCs */
1000 a = -qimp/cs::max(hint, 1.e-300);
1001 b = 1.;
1002
1003 /* Flux BCs */
1004 af = qimp;
1005 bf = 0.;
1006}
1007
1008/*----------------------------------------------------------------------------*/
1017/*----------------------------------------------------------------------------*/
1018
1019CS_F_HOST_DEVICE inline void
1021 cs_real_t &af,
1022 cs_real_t &b,
1023 cs_real_t &bf)
1024{
1025 /* Gradient BCs */
1026 a = 0.;
1027 b = 1.;
1028
1029 /* Flux BCs */
1030 af = 0.;
1031 bf = 0.;
1032}
1033
1034/*----------------------------------------------------------------------------*/
1047/*----------------------------------------------------------------------------*/
1048
1049CS_F_HOST_DEVICE inline void
1051 cs_real_t &af,
1052 cs_real_t &b,
1053 cs_real_t &bf,
1054 cs_real_t pimp,
1055 cs_real_t hint,
1056 cs_real_t hext)
1057{
1058 if (hext < 0.) {
1059
1060 /* Gradient BCs */
1061 a = pimp;
1062 b = 0.;
1063
1064 /* Flux BCs */
1065 af = -hint*pimp;
1066 bf = hint;
1067
1068 }
1069 else {
1070
1071 /* Gradient BCs */
1072 a = hext*pimp/(hint + hext);
1073 b = hint /(hint + hext);
1074
1075 /* Flux BCs */
1076 cs_real_t heq = hint*hext/(hint + hext);
1077 af = -heq*pimp;
1078 bf = heq;
1079
1080 }
1081}
1082
1083/*----------------------------------------------------------------------------*/
1094/*----------------------------------------------------------------------------*/
1095
1096CS_F_HOST_DEVICE inline void
1098 (cs_real_t &a,
1099 cs_real_t &af,
1100 cs_real_t &b,
1101 cs_real_t &bf,
1102 cs_real_t dimp,
1103 cs_real_t hint)
1104
1105{
1106 /* Gradient BCs */
1108 af,
1109 b,
1110 bf,
1111 dimp,
1112 hint);
1113
1114 /* Flux BCs */
1115 af = 0.;
1116 bf = 0.;
1117}
1118
1119/*----------------------------------------------------------------------------*/
1131/*----------------------------------------------------------------------------*/
1132
1133CS_F_HOST_DEVICE inline void
1135 (cs_real_t &a,
1136 cs_real_t &af,
1137 cs_real_t &b,
1138 cs_real_t &bf,
1139 cs_real_t pinf,
1140 cs_real_t ratio,
1141 cs_real_t hint)
1142{
1143 /* Gradient BCs */
1144 b = ratio;
1145 a = pinf;
1146
1147 /* Flux BCs */
1148 af = -hint * a;
1149 bf = hint * (1. - b);
1150}
1151
1152/*----------------------------------------------------------------------------*/
1165/*----------------------------------------------------------------------------*/
1166
1167CS_F_HOST_DEVICE inline void
1169 (cs_real_t &a,
1170 cs_real_t &af,
1171 cs_real_t &b,
1172 cs_real_t &bf,
1173 cs_real_t pinf,
1174 cs_real_t ratio,
1175 cs_real_t dimp)
1176{
1177 /* Gradient BCs */
1178 b = ratio;
1179 a = pinf;
1180
1181 /* Flux BCs */
1182 af = dimp;
1183 bf = 0.;
1184}
1185
1186/*----------------------------------------------------------------------------*/
1197/*----------------------------------------------------------------------------*/
1198
1199CS_F_HOST_DEVICE inline void
1201 cs_real_t &af,
1202 cs_real_t &b,
1203 cs_real_t &bf,
1204 cs_real_t hext,
1205 cs_real_t dimp)
1206{
1207 /* Gradients BCs */
1208 a = 0.;
1209 b = 1.;
1210
1211 /* Flux BCs */
1212 af = dimp;
1213 bf = hext;
1214}
1215
1216/*----------------------------------------------------------------------------*/
1228/*----------------------------------------------------------------------------*/
1229
1230CS_F_HOST_DEVICE inline void
1232 (cs_real_t &a,
1233 cs_real_t &af,
1234 cs_real_t &b,
1235 cs_real_t &bf,
1236 cs_real_t pimp,
1237 cs_real_t dimp)
1238{
1239 /* Gradients BC */
1240 a = pimp;
1241 b = 0.;
1242
1243 /* Flux BCs */
1244 af = dimp;
1245 bf = 0.;
1246}
1247
1248/*----------------------------------------------------------------------------*/
1249/*
1250 * \brief Update face value for gradient and diffusion when solving
1251 * in increment.
1252 *
1253 * \param[in] ctx reference to dispatch context
1254 * \param[in] f pointer to field
1255 * \param[in] bc_coeffs boundary condition structure
1256 * \param[in] inc 0 if an increment, 1 otherwise
1257 * \param[in] eqp equation parameters
1258 * \param[in] need_compute_bc_grad val_f must be computed
1259 * \param[in] need_compute_bc_flux flux must be computed
1260 * \param[in] hyd_p_flag hydrostatic pressure indicator
1261 * \param[in] f_ext exterior force generating pressure
1262 * \param[in] c_weight viscosity by cell, or nullptr
1263 * \param[in] weighb boundary face weight for cells i in
1264 * case of tensor diffusion, or nullptr
1265 * \param[in] var variable values at cell centers
1266 *
1267 */
1268/*----------------------------------------------------------------------------*/
1269
1270void
1272 (cs_dispatch_context &ctx,
1273 const cs_field_t *f,
1274 cs_field_bc_coeffs_t *bc_coeffs,
1275 const int inc,
1276 const cs_equation_param_t *eqp,
1277 const bool need_compute_bc_grad,
1278 const bool need_compute_bc_flux,
1279 int hyd_p_flag,
1280 cs_real_t f_ext[][3],
1281 cs_real_t *c_weight,
1282 const cs_real_t weighb[],
1283 const cs_real_t pvar[]);
1284
1285/*----------------------------------------------------------------------------*/
1286/*
1287 * \brief Update boundary coefficient face values for gradient and diffusion
1288 * when solving for a given field.
1289 *
1290 * \param[in] ctx reference to dispatch context
1291 * \param[in, out] f pointer to field
1292 * \param[in] eqp equation parameters
1293 * \param[in] need_compute_bc_grad val_f must be computed
1294 * \param[in] need_compute_bc_flux flux must be computed
1295 * \param[in] hyd_p_flag flag for hydrostatic pressure
1296 * \param[in] f_ext exterior force generating pressure
1297 * \param[in] c_weight viscosity by cell, or nullptr
1298 * \param[in] weighb boundary face weight for cells i in
1299 * case of tensor diffusion, or nullptr
1300 * \param[in] pvar variable values at cell centers
1301 */
1302/*----------------------------------------------------------------------------*/
1303
1304void
1306 (cs_dispatch_context &ctx,
1307 cs_field_t *f,
1308 const cs_equation_param_t *eqp,
1309 const bool need_compute_bc_grad,
1310 const bool need_compute_bc_flux,
1311 int hyd_p_flag,
1312 cs_real_t f_ext[][3],
1313 cs_real_t *c_weight,
1314 const cs_real_t weighb[],
1315 const cs_real_t pvar[]);
1316
1317/*----------------------------------------------------------------------------*/
1318/*
1319 * \brief Update face value for gradient and diffusion when solving
1320 * in increment.
1321 *
1322 * \param[in] ctx reference to dispatch context
1323 * \param[in] f pointer to field
1324 * \param[in] bc_coeffs boundary condition structure for the variable
1325 * \param[in] inc 0 if an increment, 1 otherwise
1326 * \param[in] halo_type halo type (extended or not)
1327 * \param[in] var variable values at cell centers
1328 * \param[in,out] var_ip boundary variable values at I' position
1329 * \param[in,out] var_f face values for the gradient computation
1330 * \param[in,out] var_f_d face values for the diffusion computation
1331 * \param[in,out] var_f_d_lim face values for the diffusion computation
1332 * (with limiter)
1333 */
1334/*----------------------------------------------------------------------------*/
1335
1336template <cs_lnum_t stride>
1337void
1339 (cs_dispatch_context &ctx,
1340 cs_field_t *f,
1341 cs_field_bc_coeffs_t *bc_coeffs,
1342 const int inc,
1343 const cs_equation_param_t *eqp,
1344 const cs_real_t pvar[][stride]);
1345
1346/*----------------------------------------------------------------------------*/
1347/*
1348 * \brief Update boundary coefficient face values for gradient and diffusion
1349 * when solving for a given field.
1350 *
1351 * \param[in] ctx reference to dispatch context
1352 * \param[in, out] f pointer to field
1353 * \param[in] pvar variable values at cell centers
1354 */
1355/*----------------------------------------------------------------------------*/
1356
1357template <cs_lnum_t stride>
1358void
1360 (cs_dispatch_context &ctx,
1361 cs_field_t *f,
1362 const cs_real_t pvar[][stride]);
1363
1364/*----------------------------------------------------------------------------*/
1373/*----------------------------------------------------------------------------*/
1374
1375void
1377 (cs_field_bc_coeffs_t *bc_coeffs,
1378 cs_lnum_t n_b_faces,
1379 cs_lnum_t dim,
1380 cs_alloc_mode_t amode);
1381
1382/*----------------------------------------------------------------------------*/
1383
1384#endif /* CS_BOUNDARY_CONDITIONS_SET_COEFFS_H */
void bft_error(const char *const file_name, const int line_num, const int sys_error_code, const char *const format,...)
Calls the error handler (set by bft_error_handler_set() or default).
Definition: bft_error.cpp:187
Definition: cs_dispatch.h:2288
Field boundary condition descriptor (for variables)
Definition: cs_field.h:107
Field descriptor.
Definition: cs_field.h:275
CS_F_HOST_DEVICE void cs_boundary_conditions_set_neumann_vector_aniso(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t qimpv[3], const cs_real_t hint[6])
Set neumann BC for an anisotropic vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:212
CS_F_HOST_DEVICE void cs_boundary_conditions_set_neumann_scalar_hmg(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf)
Set homogeneous Neumann BC for a scalar for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:1020
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_conv_neumann_diff_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3])
Imposed value for the convection operator, imposed flux for diffusion, for a vector.
Definition: cs_boundary_conditions_set_coeffs.h:918
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_tensor(cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpts[6], cs_real_t hint, const cs_real_t hextts[6])
Set Dirichlet BC for a tensor for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:455
void cs_boundary_conditions_ensure_bc_coeff_face_values_allocated(cs_field_bc_coeffs_t *bc_coeffs, cs_lnum_t n_b_faces, cs_lnum_t dim, cs_alloc_mode_t amode)
Allocate BC coefficients face values if needed.
Definition: cs_boundary_conditions_set_coeffs.cpp:4935
void cs_boundary_conditions_set_coeffs(int nvar, int iterns, int isvhb, int italim, int itrfin, int ineefl, int itrfup, int isostd[], cs_real_t *visvdr, cs_real_t hbord[], cs_real_t theipb[], int nftcdt)
Translation of the boundary conditions given by the user in a form that fits to the solver.
Definition: cs_boundary_conditions_set_coeffs.cpp:751
CS_F_HOST_DEVICE void cs_boundary_conditions_set_convective_outlet_tensor(cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpts[6], const cs_real_t cflts[6], cs_real_t hint)
Set convective outlet BC for a tensor for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:819
CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_sym_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], cs_real_t hint, const cs_nreal_t normal[3])
Set generalized BC for a symmetric vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:523
CS_F_HOST_DEVICE void cs_boundary_conditions_set_total_flux(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t hext, cs_real_t dimp)
Set total flux as a Robin condition.
Definition: cs_boundary_conditions_set_coeffs.h:1200
void cs_boundary_conditions_update_bc_coeff_face_values(cs_dispatch_context &ctx, const cs_field_t *f, cs_field_bc_coeffs_t *bc_coeffs, const int inc, const cs_equation_param_t *eqp, const bool need_compute_bc_grad, const bool need_compute_bc_flux, int hyd_p_flag, cs_real_t f_ext[][3], cs_real_t *c_weight, const cs_real_t weighb[], const cs_real_t pvar[])
Update face value for gradient and diffusion when solving in increment.
Definition: cs_boundary_conditions_set_coeffs.cpp:4359
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_conv_neumann_diff_tensor(cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpts[6], const cs_real_t qimpts[6])
Imposed value for the convection operator, imposed flux for diffusion, for a tensor.
Definition: cs_boundary_conditions_set_coeffs.h:955
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_vector_aniso(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t hintt[6], const cs_real_t hextv[3])
Set Dirichlet BC for a vector for a given face with left anisotropic diffusion.
Definition: cs_boundary_conditions_set_coeffs.h:397
CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_dirichlet_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], cs_real_t hint, const cs_nreal_t normal[3])
Set generalized Dirichlet BC for a vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:606
CS_F_HOST_DEVICE void cs_boundary_conditions_set_neumann_conv_h_neumann_diff_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t dimp, cs_real_t hint)
Set Neumann BC for the convection operator, zero flux for diffusion.
Definition: cs_boundary_conditions_set_coeffs.h:1098
CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_dirichlet_vector_aniso(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], const cs_real_t hint[6], const cs_nreal_t normal[3])
Set generalized Dirichlet BC for an anisotropic vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.cpp:4265
void cs_boundary_conditions_set_coeffs_pressure(cs_dispatch_context &ctx, cs_field_t *f_p)
Update pressure boundary condition coefficients.
Definition: cs_boundary_conditions_set_coeffs.cpp:3882
void cs_boundary_conditions_set_coeffs_init(void)
Initialization of boundary condition arrays.
Definition: cs_boundary_conditions_set_coeffs.cpp:3738
CS_F_HOST_DEVICE void cs_boundary_conditions_set_affine_function_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pinf, cs_real_t ratio, cs_real_t hint)
Set BC for an affine scalar function for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:1135
CS_F_HOST_DEVICE void cs_boundary_conditions_set_convective_outlet_vector_aniso(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t cflv[3], const cs_real_t hintt[6])
Set convective outlet BC for an anisotropic vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:865
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pimp, cs_real_t hint, cs_real_t hext)
Set Dirichlet BC for a scalar for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:1050
CS_F_HOST_DEVICE void cs_boundary_conditions_set_neumann_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t qimp, cs_real_t hint)
Set Neumann BC for a scalar for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:992
void cs_boundary_conditions_update_bc_coeff_face_values_strided(cs_dispatch_context &ctx, cs_field_t *f, cs_field_bc_coeffs_t *bc_coeffs, const int inc, const cs_equation_param_t *eqp, const cs_real_t pvar[][stride])
Update face value for gradient and diffusion when solving in increments.
Definition: cs_boundary_conditions_set_coeffs.cpp:4662
CS_F_HOST_DEVICE void cs_boundary_conditions_set_neumann_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t qimpv[3], cs_real_t hint)
Set Neumann BC for a scalar for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:171
CS_F_HOST_DEVICE void cs_boundary_conditions_set_convective_outlet_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t cflv[3], cs_real_t hint)
Set convective outlet BC for a vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:774
CS_F_HOST_DEVICE void cs_boundary_conditions_set_convective_outlet_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pimp, cs_real_t cfl, cs_real_t hint)
Set convective oulet boundary condition for a scalar.
Definition: cs_boundary_conditions_set_coeffs.cpp:4147
CS_F_HOST_DEVICE void cs_boundary_conditions_set_affine_function_conv_neumann_diff_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pinf, cs_real_t ratio, cs_real_t dimp)
Set Neumann BC for the convection operator, imposed flux for diffusion.
Definition: cs_boundary_conditions_set_coeffs.h:1169
CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_sym_vector_aniso(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], const cs_real_t hint[6], const cs_nreal_t normal[3])
Set generalized BC for an anisotropic symmetric vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.cpp:4182
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], cs_real_t hint, const cs_real_t hextv[3])
Set Dirichlet BC for a vector for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:308
CS_F_HOST_DEVICE void cs_boundary_conditions_set_neumann_tensor(cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t qimpts[6], cs_real_t hint)
Set Neumann boundary conditions for a tensor for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:267
CS_F_HOST_DEVICE void cs_boundary_conditions_set_dirichlet_conv_neumann_diff_scalar(cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pimp, cs_real_t dimp)
Imposed value for the convection operator, imposed flux for diffusion, for a scalar.
Definition: cs_boundary_conditions_set_coeffs.h:1232
CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_dirichlet_sym_tensor(cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpv[6], const cs_real_t qimpv[6], cs_real_t hint, const cs_nreal_t normal[3])
Set generalized Dirichlet BC for a symmetric tensor for a given face.
Definition: cs_boundary_conditions_set_coeffs.h:664
#define CS_F_HOST_DEVICE
Definition: cs_defs.h:555
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
#define _(String)
Definition: cs_defs.h:61
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
double cs_nreal_t
Definition: cs_defs.h:336
@ k
Definition: cs_field_pointer.h:68
CS_F_HOST_DEVICE void cs_math_sym_33_3_product(const T m[6], const U v[3], V *restrict mv)
Compute the product of a symmetric matrix of 3x3 real values by a vector of 3 real values....
Definition: cs_math.h:416
static constexpr cs_real_t cs_math_infinite_r
Definition: cs_math.h:105
cs_alloc_mode_t
Definition: cs_mem.h:46
CS_F_HOST_DEVICE T max(const T a, const T b)
Definition: cs_defs.h:735
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:190