TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
OpConvQuickSharpIJK.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 OpConvQuickSharpIJK_included
17#define OpConvQuickSharpIJK_included
18#include <Operateur_IJK_faces_conv_base.h>
19
20
22{
23 Declare_instanciable(OpConvQuickSharpIJK_double);
24public:
25 void initialize(const Domaine_IJK& splitting) override;
26
27protected:
28 inline void compute_flux_x_vx(IJK_Field_local_double& resu, const int k_layer) override
29 {
30 compute_flux_<DIRECTION::X,DIRECTION::X>(resu,k_layer);
31 }
32 inline void compute_flux_x_vy(IJK_Field_local_double& resu, const int k_layer) override
33 {
34 compute_flux_<DIRECTION::X,DIRECTION::Y>(resu,k_layer);
35 }
36 inline void compute_flux_x_vz(IJK_Field_local_double& resu, const int k_layer) override
37 {
38 compute_flux_<DIRECTION::X,DIRECTION::Z>(resu,k_layer);
39 }
40 inline void compute_flux_y_vx(IJK_Field_local_double& resu, const int k_layer) override
41 {
42 compute_flux_<DIRECTION::Y,DIRECTION::X>(resu,k_layer);
43 }
44 inline void compute_flux_y_vy(IJK_Field_local_double& resu, const int k_layer) override
45 {
46 compute_flux_<DIRECTION::Y,DIRECTION::Y>(resu,k_layer);
47 }
48 inline void compute_flux_y_vz(IJK_Field_local_double& resu, const int k_layer) override
49 {
50 compute_flux_<DIRECTION::Y,DIRECTION::Z>(resu,k_layer);
51 }
52 inline void compute_flux_z_vx(IJK_Field_local_double& resu, const int k_layer) override
53 {
54 compute_flux_<DIRECTION::Z,DIRECTION::X>(resu,k_layer);
55 }
56 inline void compute_flux_z_vy(IJK_Field_local_double& resu, const int k_layer) override
57 {
58 compute_flux_<DIRECTION::Z,DIRECTION::Y>(resu,k_layer);
59 }
60 inline void compute_flux_z_vz(IJK_Field_local_double& resu, const int k_layer) override
61 {
62 compute_flux_<DIRECTION::Z,DIRECTION::Z>(resu,k_layer);
63 }
64
65 double delta_x_ = 0;
66 double delta_y_ = 0;
67 double delta_z_ = 0; // coded for uniform mesh
68
69private:
70 template <DIRECTION _DIR_, DIRECTION _VCOMPO_>
71 void compute_flux_(IJK_Field_local_double& resu, const int k_layer);
72
73 inline double get_delta(DIRECTION _DIR_) const
74 {
75 switch(_DIR_)
76 {
77 case DIRECTION::X:
78 return delta_x_;
79 case DIRECTION::Y:
80 return delta_y_;
81 case DIRECTION::Z:
82 return delta_z_;
83 default:
84 Cerr << "Error in OpConvIJKQuickSsarp::get_delta: wrong direction..." << finl;
86 }
87 //for compilation only...
88 return 0.0;
89 }
90
91};
92
93#include <OpConvQuickSharpIJK.tpp>
94
95#endif /* OpConvQuickSharpIJK_included */
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
void compute_flux_x_vx(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_z_vz(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_y_vy(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_z_vx(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_x_vy(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_y_vx(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_x_vz(IJK_Field_local_double &resu, const int k_layer) override
void compute_flux_z_vy(IJK_Field_local_double &resu, const int k_layer) override
void initialize(const Domaine_IJK &splitting) override
void compute_flux_y_vz(IJK_Field_local_double &resu, const int k_layer) override
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455