TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Conv_EF_VEF_P1NC.h
1/****************************************************************************
2* Copyright (c) 2023, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16
17#ifndef Op_Conv_EF_VEF_P1NC_included
18#define Op_Conv_EF_VEF_P1NC_included
19
20#include <Op_Conv_VEF_base.h>
21class Matrice_Morse;
22/*! @brief class Op_Conv_EF_VEF_P1NC
23 *
24 * This class represents the convection operator associated with a scalar transport equation.
25 * The discretization is VEF.
26 * The convected field is a scalar or vector of type Champ_P1NC.
27 * The convection scheme is of upwind (Amont) type.
28 * Methods for the implicit scheme are implemented.
29 *
30 *
31 * @sa Operateur_Conv_base
32 */
34{
35
36 Declare_instanciable(Op_Conv_EF_VEF_P1NC);
37
38public:
39
40 DoubleTab& ajouter(const DoubleTab& , DoubleTab& ) const override;
41
42 // Methods for implicit assembly.
43 inline void dimensionner(Matrice_Morse& ) const override;
44 inline void modifier_pour_Cl(Matrice_Morse&, DoubleTab&) const override;
45 inline void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const override;
46 inline void contribuer_au_second_membre(DoubleTab& ) const override;
47 void contribue_au_second_membre(DoubleTab& ) const;
48 void ajouter_contribution(const DoubleTab&, Matrice_Morse& ) const;
49
50protected:
52 int filtrer_resu = 1, antisym = 1;
53};
54
55
56/*! @brief @brief Size the matrix using the dimensionner method of class Op_VEF_Face.
57 *
58 */
60{
61 Op_VEF_Face::dimensionner(le_dom_vef.valeur(),la_zcl_vef.valeur(), matrice);
62}
63
64
65/*! @brief Modify the right-hand side and the matrix for Dirichlet conditions.
66 *
67 */
68inline void Op_Conv_EF_VEF_P1NC::modifier_pour_Cl(Matrice_Morse& matrice, DoubleTab& secmem) const
69{
70 Op_VEF_Face::modifier_pour_Cl(le_dom_vef.valeur(),la_zcl_vef.valeur(), matrice, secmem);
71}
72
73
74/*! @brief Assemble the implicit unknown matrix.
75 *
76 */
77inline void Op_Conv_EF_VEF_P1NC::contribuer_a_avec(const DoubleTab& inco,
78 Matrice_Morse& matrice) const
79{
80 ajouter_contribution(inco, matrice);
81}
82
83/*! @brief Add the contribution to the right-hand side.
84 *
85 */
86inline void Op_Conv_EF_VEF_P1NC::contribuer_au_second_membre(DoubleTab& resu) const
87{
89}
90
91#endif
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
class Op_Conv_EF_VEF_P1NC
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
void modifier_pour_Cl(Matrice_Morse &, DoubleTab &) const override
Modify the right-hand side and the matrix for Dirichlet conditions.
void ajouter_contribution(const DoubleTab &, Matrice_Morse &) const
void contribue_au_second_membre(DoubleTab &) const
void dimensionner(Matrice_Morse &) const override
Size the matrix using the dimensionner method of class Op_VEF_Face.
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const override
Assemble the implicit unknown matrix.
void contribuer_au_second_membre(DoubleTab &) const override
Add the contribution to the right-hand side.
class Op_Conv_VEF_base
void dimensionner(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &) const
Dimensioning of the matrix that will receive the coefficients from convection and diffusion for the f...
void modifier_pour_Cl(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &, DoubleTab &) const
Modify the matrix coefficients and the right-hand side for Dirichlet boundary conditions.