TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
IJK_Shear_Periodic_helpler.h
1/****************************************************************************
2* Copyright (c) 2025, 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 IJK_Shear_Periodic_helpler_included
17#define IJK_Shear_Periodic_helpler_included
18
19#include <IJK_Field_local_template.h>
20#include <TRUSTTab.h>
21
23{
24public:
25 static double shear_x_time_ ;
26 static double Lx_for_shear_perio ;
27 static int defilement_ ;
31
34 int compo_ ;
36 ArrOfInt x_;
37 ArrOfInt send_i_real_;
38 ArrOfDouble denum_;
39 ArrOfDouble res_;
41 double DU_ = 0. ;
42 double Phi_ppty_v_ = -123., Phi_ppty_l_ = -123.;
43
48 //IJK_Field_local_template<_TYPE_,_TYPE_ARRAY_> I_sigma_kappa_ghost_zmin_ ;
49 //IJK_Field_local_template<_TYPE_,_TYPE_ARRAY_> I_sigma_kappa_ghost_zmax_ ;
50 void allocate(const int ni_local, const int nj_local, const int nk_local, int ghost_size, int ncompo, int type, double rov, double rol, int use_inv_rho_in_pressure_solver);
51 void prepare_interpolation_for_shear_periodicity(const int send_i, const double istmp, const int real_size_i);
52
69
70 void set_indicatrice_ghost_zmin_(const IJK_Field_local_template<double,TRUSTArray<double>>& indic_z_min, int decallage = 0)
71 {
72 for (int k = 0; k < indicatrice_ghost_zmin_.nk() ; k++)
73 for (int j = 0; j < indicatrice_ghost_zmin_.nj() ; j++)
74 for (int i = 0; i < indicatrice_ghost_zmin_.ni(); i++)
75 indicatrice_ghost_zmin_(i,j,k)=indic_z_min(i,j,k+decallage);
76 }
77 void set_indicatrice_ghost_zmax_(const IJK_Field_local_template<double,TRUSTArray<double>>& indic_z_max, int decallage = 0)
78 {
79 for (int k = 0; k < indicatrice_ghost_zmax_.nk() ; k++)
80 for (int j = 0; j < indicatrice_ghost_zmax_.nj() ; j++)
81 for (int i = 0; i < indicatrice_ghost_zmax_.ni(); i++)
82 indicatrice_ghost_zmax_(i,j,k)=indic_z_max(i,j,k+decallage);
83
84 }
85 void set_I_sig_kappa_zmin_(const IJK_Field_local_template<double,TRUSTArray<double>>& indic_z_min, const IJK_Field_local_template<double,TRUSTArray<double>>& kappa_z_min, const double sigma, const int decallage = 0)
86 {
88 {
89 for (int k = 0; k < I_sig_kappa_zmin_.nk() ; k++)
90 for (int j = 0; j < I_sig_kappa_zmin_.nj() ; j++)
91 for (int i = 0; i < I_sig_kappa_zmin_.ni(); i++)
92 I_sig_kappa_zmin_(i,j,k)=indic_z_min(i,j,k+decallage)*kappa_z_min(i,j,k+decallage)*sigma;
93 }
94 }
95 void set_I_sig_kappa_zmax_(const IJK_Field_local_template<double,TRUSTArray<double>>& indic_z_max, const IJK_Field_local_template<double,TRUSTArray<double>>& kappa_z_max, const double sigma, const int decallage = 0)
96 {
98 {
99 for (int k = 0; k < I_sig_kappa_zmax_.nk() ; k++)
100 for (int j = 0; j < I_sig_kappa_zmax_.nj() ; j++)
101 for (int i = 0; i < I_sig_kappa_zmax_.ni(); i++)
102 I_sig_kappa_zmax_(i,j,k)=indic_z_max(i,j,k+decallage)*kappa_z_max(i,j,k+decallage)*sigma;
103 }
104
105 }
106 void set_dU_(double DU)
107 {
108 DU_ = DU;
109 }
110};
111
112#endif /* IJK_Shear_Periodic_helpler_included */
: This class describes a scalar field in an ijk box without any parallel information.
IJK_Field_local_template< double, ArrOfDouble > I_sig_kappa_zmax_
IJK_Field_local_template< double, ArrOfDouble > I_sig_kappa_zmin_
IJK_Field_local_template< double, ArrOfDouble > indicatrice_ghost_zmin_
const IJK_Field_local_template< double, ArrOfDouble > & get_I_kappa_ghost_zmin_() const
const IJK_Field_local_template< double, ArrOfDouble > & get_indicatrice_ghost_zmax_() const
void set_I_sig_kappa_zmin_(const IJK_Field_local_template< double, TRUSTArray< double > > &indic_z_min, const IJK_Field_local_template< double, TRUSTArray< double > > &kappa_z_min, const double sigma, const int decallage=0)
void allocate(const int ni_local, const int nj_local, const int nk_local, int ghost_size, int ncompo, int type, double rov, double rol, int use_inv_rho_in_pressure_solver)
const IJK_Field_local_template< double, ArrOfDouble > & get_indicatrice_ghost_zmin_() const
void set_I_sig_kappa_zmax_(const IJK_Field_local_template< double, TRUSTArray< double > > &indic_z_max, const IJK_Field_local_template< double, TRUSTArray< double > > &kappa_z_max, const double sigma, const int decallage=0)
const IJK_Field_local_template< double, ArrOfDouble > & get_I_kappa_ghost_zmax_() const
void set_indicatrice_ghost_zmin_(const IJK_Field_local_template< double, TRUSTArray< double > > &indic_z_min, int decallage=0)
void set_indicatrice_ghost_zmax_(const IJK_Field_local_template< double, TRUSTArray< double > > &indic_z_max, int decallage=0)
void prepare_interpolation_for_shear_periodicity(const int send_i, const double istmp, const int real_size_i)
IJK_Field_local_template< double, ArrOfDouble > indicatrice_ghost_zmax_
Represents a an array of int/int64/double/... values.
Definition TRUSTArray.h:81