TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
ParcoursIJKDir.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#ifndef ParcoursIJKDir_included
17#define ParcoursIJKDir_included
18
19#include <Objet_U.h>
20#include <MonofluidVar.h>
21#include <Boundary_Conditions_Thermique.h>
22#include <Domaine_IJK.h>
23#include <Parser.h>
24#include <IJK_Interfaces.h>
25#include <IJK_Lata_writer.h>
26#include <Intersection_Interface_ijk.h>
27#include <Ouvrir_fichier.h>
28#include <TRUST_Ref.h>
29
30/////////////////////////////////////////////////////////////////////////////
31//
32// .DESCRIPTION : class ParcoursIJKDir
33//
34// <Description of class ParcoursIJKDir>
35//
36/////////////////////////////////////////////////////////////////////////////
37
39{
40
41 Declare_instanciable_sans_constructeur( ParcoursIJKDir );
42
43public:
44 ParcoursIJKDir() {next_elem_.resize(3); indices_to_keep_.resize(2); };
45 // void initialize();
46 FixedVector<int, 3> elem( const int q ) const
47 {
49 res[0] = i_ + q * next_elem_[0];
50 res[1] = j_ + q * next_elem_[1];
51 res[2] = k_ + q * next_elem_[2];
52 return res;
53 }
54 const int& i() const {return i_;}
55 const int& j() const {return j_;}
56 const int& k() const {return k_;}
57 const int& face() const {return dir_;}
58 void set_dir(const int dir)
59 {
60 dir_ = dir;
63 }
64 void set_elem(const int i1, const int j1, const int k1)
65 {
66 i_ = i1;
67 j_ = j1;
68 k_ = k1;
69 }
70 const ArrOfInt& get_indices_to_keep() const { return indices_to_keep_;}
71 const ArrOfInt& get_normale_vec() const {return next_elem_;}
72
73 double calculer_surface_face(const Domaine_IJK& geom) const
74 {
75 double surface = 1.;
76 for (int c = 0; c < 2; c++)
77 surface *= geom.get_constant_delta(indices_to_keep_[c]);
78 return surface;
79 }
80
81protected:
82 void set_next_elem();
84 int dir_=0;
85 int i_=0;
86 int j_=0;
87 int k_=0;
88 ArrOfInt next_elem_;
90};
91
92#endif /* ParcoursIJKDir_included */
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
double get_constant_delta(int direction) const
Returns the size of cells in a direction.
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
FixedVector< int, 3 > elem(const int q) const
ArrOfInt next_elem_
const int & i() const
const int & face() const
void set_dir(const int dir)
const int & j() const
void set_elem(const int i1, const int j1, const int k1)
double calculer_surface_face(const Domaine_IJK &geom) const
const ArrOfInt & get_normale_vec() const
ArrOfInt indices_to_keep_
const int & k() const
const ArrOfInt & get_indices_to_keep() const