TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Diff_RotRot.h
1/****************************************************************************
2* Copyright (c) 2024, 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#ifndef Op_Diff_RotRot_included
17#define Op_Diff_RotRot_included
18
19#include <Operateur_Diff_base.h>
20#include <Op_Curl_VEFP1B.h>
21#include <Equation_base.h>
22#include <Op_Rot_VEFP1B.h>
23#include <Champ_base.h>
24#include <SolveurSys.h>
25#include <TRUST_Ref.h>
26
27class Champ_Uniforme;
28class Domaine_VEF;
29
31{
32 Declare_instanciable(Op_Diff_RotRot);
33public:
34 void associer(const Domaine_dis_base&, const Domaine_Cl_dis_base&, const Champ_Inc_base&) override;
35 void associer_diffusivite(const Champ_base&) override;
36 const Champ_base& diffusivite() const override;
37 DoubleTab& calculer(const DoubleTab&, DoubleTab&) const override;
38 DoubleTab& ajouter(const DoubleTab&, DoubleTab&) const override;
39
40 int tester() const;
41
42 /* Function to compute the vorticity from the velocity field. */
43 int calculer_vorticite(DoubleTab&, const DoubleTab&) const;
44
45 /* Assemble the vorticity matrix. */
47
48 /* For a given element "numero_elem", returns the list of vertices belonging to that element. */
49 IntList sommets_pour_element(int numero_elem) const;
50
51 /* For a given vertex "numero_som", returns the list of elements containing that vertex. */
52 IntList elements_pour_sommet(int numero_som) const;
53
54 /* For a given vertex "numero_som", returns */
55 /* the list of neighboring vertices of "numero_som". */
56 /* Parameter: the list of elements containing "numero_som". */
57 /* It is sufficient to search in those elements to get the result. */
58 /* NOTE: the result list includes the vertex "numero_som" itself. */
59 IntList sommets_voisins(int numero_som, const IntList& liste) const;
60
61 /* For element "numero_elem", returns the coefficient */
62 /* to place in the nb_elem * nb_elem sub-matrix */
63 /* at row "numero_elem". */
64 /* EF matrix */
65 double remplir_elem_elem_EF(const int numero_elem) const;
66
67 /* For element "numero_elem", returns the coefficient */
68 /* to place in the nb_elem * nb_som sub-matrix */
69 /* at row "numero_elem". */
70 /* EF matrix */
71 double remplir_elem_som_EF(const int numero_elem, const int numero_som) const;
72
73 /* For vertex "numero_som", returns the coefficient */
74 /* to place in the nb_som * nb_elem sub-matrix */
75 /* at row "numero_som". */
76 /* EF matrix */
77 double remplir_som_elem_EF(const int numero_elem, const int numero_som) const;
78
79 /* For element "numero_elem", returns the coefficient */
80 /* to place in the nb_elem * nb_som sub-matrix */
81 /* at row "numero_som". */
82 /* "IntList" is the array of elements containing "numero_som". */
83 /* EF matrix */
84 double remplir_som_som_EF(const int numero_som, const int sommet_voisin, const IntList&) const;
85
86 /* Function to sort an IntList */
87 /* Sorting is done in ascending order. */
88 void Tri(IntList& liste_a_trier) const;
89
90 //Method to return the outward normal vector at "face" of element "elem"
91 DoubleTab vecteur_normal(const int face, const int elem) const;
92
93 const Domaine_VEF& domaine_vef() const;
94
95protected:
96
97 mutable OWN_PTR(Champ_Inc_base) vorticite_;
99
102
104 //mutable Solv_GCP solveur_;
105
106 OBS_PTR(Domaine_VEF) le_dom_vef;
108 OBS_PTR(Champ_Uniforme) diffusivite_;
109};
110
111#endif
Class Champ_Inc_base.
Champ_Uniforme Represents a field that is constant in space and time.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VEF
Definition Domaine_VEF.h:53
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Matrice class - Generic class in the matrix hierarchy.
Definition Matrice.h:34
double remplir_elem_som_EF(const int numero_elem, const int numero_som) const
IntList sommets_voisins(int numero_som, const IntList &liste) const
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
void Tri(IntList &liste_a_trier) const
OBS_PTR(Domaine_VEF) le_dom_vef
OBS_PTR(Domaine_Cl_VEF) la_zcl_vef
IntList elements_pour_sommet(int numero_som) const
Op_Rot_VEFP1B rot_
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &) override
const Domaine_VEF & domaine_vef() const
DoubleTab vecteur_normal(const int face, const int elem) const
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
void associer_diffusivite(const Champ_base &) override
int assembler_matrice(Matrice &)
double remplir_elem_elem_EF(const int numero_elem) const
const Champ_base & diffusivite() const override
Matrice matrice_vorticite_
double remplir_som_som_EF(const int numero_som, const int sommet_voisin, const IntList &) const
OWN_PTR(Champ_Inc_base) vorticite_
SolveurSys solveur_
double remplir_som_elem_EF(const int numero_elem, const int numero_som) const
OBS_PTR(Champ_Uniforme) diffusivite_
IntList sommets_pour_element(int numero_elem) const
int calculer_vorticite(DoubleTab &, const DoubleTab &) const
Op_Curl_VEFP1B curl_
Operateur_Diff_base This class is the base of the hierarchy of operators representing.
class SolveurSys A SolveurSys represents any class
Definition SolveurSys.h:32