TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Operateur_IJK_faces_conv_base.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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 Operateur_IJK_faces_conv_base_included
17#define Operateur_IJK_faces_conv_base_included
18#include <IJK_Field.h>
19#include <IJK_ptr.h>
20#include <TRUSTTab.h>
21#include <Domaine_IJK.h>
22#include <Operateur_IJK_base.h>
23#include <Operateur_IJK_data_channel.h>
24#include <Boundary_Conditions.h>
25#include <Boundary_Conditions_Thermique.h>
26
28{
30public:
31 virtual void initialize(const Domaine_IJK& splitting);
32 virtual inline void set_bc(const Boundary_Conditions& bc) { ; };
33 virtual inline void set_bc_thermique(const Boundary_Conditions_Thermique& bc_th) { ; };
34 void calculer(const IJK_Field_double& inputx, const IJK_Field_double& inputy, const IJK_Field_double& inputz,
35 const IJK_Field_double& vx, const IJK_Field_double& vy, const IJK_Field_double& vz,
36 IJK_Field_double& dvx, IJK_Field_double& dvy, IJK_Field_double& dvz);
37 void ajouter(const IJK_Field_double& inputx, const IJK_Field_double& inputy, const IJK_Field_double& inputz,
38 const IJK_Field_double& vx, const IJK_Field_double& vy, const IJK_Field_double& vz,
39 IJK_Field_double& dvx, IJK_Field_double& dvy, IJK_Field_double& dvz);
40 void set_velocity_components(const IJK_Field_double& vx, const IJK_Field_double& vy, const IJK_Field_double& vz) {vx_ = &vx; vy_ = &vy; vz_ = &vz; };
41 virtual void calculer_avec_u_div_rhou(const IJK_Field_double& rhovx, const IJK_Field_double& rhovy, const IJK_Field_double& rhovz,
42 const IJK_Field_double& vx, const IJK_Field_double& vy, const IJK_Field_double& vz,
43 IJK_Field_double& dvx, IJK_Field_double& dvy, IJK_Field_double& dvz,
44 IJK_Field_double& div_rho_u) { ; };
45 virtual void ajouter_avec_u_div_rhou(const IJK_Field_double& rhovx, const IJK_Field_double& rhovy, const IJK_Field_double& rhovz,
46 const IJK_Field_double& vx, const IJK_Field_double& vy, const IJK_Field_double& vz,
47 IJK_Field_double& dvx, IJK_Field_double& dvy, IJK_Field_double& dvz,
48 IJK_Field_double& div_rho_u) { ; };
49protected:
50
52
53 // Pointers to input velocity field
54 const IJK_Field_double *vx_;
55 const IJK_Field_double *vy_;
56 const IJK_Field_double *vz_;
57 bool perio_k_ ;
58 // Pointers to input convected field
59 const IJK_Field_double *inputx_;
60 const IJK_Field_double *inputy_;
61 const IJK_Field_double *inputz_;
62
63 inline const IJK_Field_double& get_input(DIRECTION _DIR_)
64 {
65 switch(_DIR_)
66 {
67 case DIRECTION::X:
68 return *inputx_;
69 case DIRECTION::Y:
70 return *inputy_;
71 case DIRECTION::Z:
72 return *inputz_;
73 default:
74 Cerr << "Error in OpConvIJKFacesCommon::get_input: wrong direction..." << finl;
76 }
77 // for compilation only...
78 return *inputx_;
79 }
80
81 inline const IJK_Field_double& get_v(DIRECTION _DIR_)
82 {
83 switch(_DIR_)
84 {
85 case DIRECTION::X:
86 return *vx_;
87 case DIRECTION::Y:
88 return *vy_;
89 case DIRECTION::Z:
90 return *vz_;
91 default:
92 Cerr << "Error in OpConvIJKFacesCommon::get_v: wrong direction..." << finl;
94 }
95 // for compilation only...
96 return *vx_;
97 }
98};
99
100#endif
: class Boundary_Conditions_Thermique
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
void ajouter(const IJK_Field_double &inputx, const IJK_Field_double &inputy, const IJK_Field_double &inputz, const IJK_Field_double &vx, const IJK_Field_double &vy, const IJK_Field_double &vz, IJK_Field_double &dvx, IJK_Field_double &dvy, IJK_Field_double &dvz)
void set_velocity_components(const IJK_Field_double &vx, const IJK_Field_double &vy, const IJK_Field_double &vz)
const IJK_Field_double & get_input(DIRECTION _DIR_)
const IJK_Field_double & get_v(DIRECTION _DIR_)
virtual void set_bc_thermique(const Boundary_Conditions_Thermique &bc_th)
virtual void initialize(const Domaine_IJK &splitting)
virtual void calculer_avec_u_div_rhou(const IJK_Field_double &rhovx, const IJK_Field_double &rhovy, const IJK_Field_double &rhovz, const IJK_Field_double &vx, const IJK_Field_double &vy, const IJK_Field_double &vz, IJK_Field_double &dvx, IJK_Field_double &dvy, IJK_Field_double &dvz, IJK_Field_double &div_rho_u)
virtual void ajouter_avec_u_div_rhou(const IJK_Field_double &rhovx, const IJK_Field_double &rhovy, const IJK_Field_double &rhovz, const IJK_Field_double &vx, const IJK_Field_double &vy, const IJK_Field_double &vz, IJK_Field_double &dvx, IJK_Field_double &dvy, IJK_Field_double &dvz, IJK_Field_double &div_rho_u)
void calculer(const IJK_Field_double &inputx, const IJK_Field_double &inputy, const IJK_Field_double &inputz, const IJK_Field_double &vx, const IJK_Field_double &vy, const IJK_Field_double &vz, IJK_Field_double &dvx, IJK_Field_double &dvy, IJK_Field_double &dvz)
virtual void set_bc(const Boundary_Conditions &bc)
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455