TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
IJK_tools.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_tools_included
17#define IJK_tools_included
18
19#include <IJK_Field.h>
20#include <IJK_Field_vector.h>
21#include <TRUSTTab.h>
22#include <Probleme_base.h>
23
24#define select_dir(a,x,y,z) ((a==0)?(x):((a==1)?(y):(z)))
25
26void build_extended_splitting(const Domaine_IJK& split, Domaine_IJK& split_ext, int n_cells);
27
28Probleme_base& creer_domaine_vdf(const Domaine_IJK& splitting, const Nom& nom_domaine);
29
30void ijk_interpolate(const IJK_Field_double& field, const DoubleTab& coordinates, ArrOfDouble& result);
31void ijk_interpolate_skip_unknown_points(const IJK_Field_double& field, const DoubleTab& coordinates, ArrOfDouble& result, const double value_for_bad_points);
32
33double ijk_interpolate(const IJK_Field_double& field, const Vecteur3& coordinates);
34double ijk_interpolate_skip_unknown_points(const IJK_Field_double& field, const Vecteur3& coordinates, const double value_for_bad_points);
35
36
37
38void compose_field_data(IJK_Field_double& f, const Nom& parser_expression_of_x_y_z);
39
40void set_field_data(IJK_Field_double& f, const Nom& parser_expression_of_x_y_z);
41void set_field_data(IJK_Field_double& f, const Nom& parser_expression_of_x_y_z_and_t, const double current_time);
42void set_field_data(IJK_Field_double& f, const Nom& parser_expression_of_x_y_z_and_t,
43 const IJK_Field_double& input_f, const double current_time);
44void set_field_data(IJK_Field_double& f, const Nom& parser_expression_of_x_y_z_and_t,
45 const IJK_Field_double& input_f1,const IJK_Field_double& input_f2, const double current_time);
46
47void set_field_data(IJK_Field_double& f, double func(double, double, double));
48void set_field_data(IJK_Field_double& f, const Nom& parser_expression_of_x_y_z_and_t,
49 const IJK_Field_double& input_f1,const IJK_Field_double& input_f2, const double current_time);
50
51
52void build_local_coords(const IJK_Field_double& f, ArrOfDouble& coord_i, ArrOfDouble& coord_j, ArrOfDouble& coord_k);
53
54
55void complex_to_trig(const double re, const double im, double& modul, double& arg);
56void squared_3x3(double& a11, double& a12, double& a13,
57 double& a21, double& a22, double& a23,
58 double& a31, double& a32, double& a33);
59
60
61double maxValue(IJK_Field_double& indic);
62
63void interpolate_to_center(IJK_Field_vector3_double& cell_center_field, const IJK_Field_vector3_double& face_field);
64void interpolate_to_center_compo(IJK_Field_double& cell_center_field_compo, const IJK_Field_double& face_field_compo);
65
66
67#endif /* IJK_tools_included */
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.