TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
VDF_to_IJK.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 VDF_to_IJK_included
17#define VDF_to_IJK_included
18
19class Domaine_VF;
20class Domaine_IJK;
21
22#include <IJK_Field_forward.h>
23#include <TRUSTTabs_forward.h>
24#include <Static_Int_Lists.h>
25#include <Domaine_IJK.h>
26
27// This class provides methods to convert a vdf field to an ijk field and reversed
29{
30public:
31 void initialize(const Domaine_VF& domaine_vf, const Domaine_IJK& splitting,
32 Domaine_IJK::Localisation localisation,
33 int direction_for_x,
34 int direction_for_y,
35 int direction_for_z);
36 template <typename _TYPE_, typename _TYPE_ARRAY_>
37 void convert_from_ijk(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& ijk_x, DoubleVect& x, bool add = false) const;
38 template <typename _TYPE_, typename _TYPE_ARRAY_>
39 void convert_to_ijk(const DoubleVect& x, IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& ijk_x) const;
40
41protected:
42 // List of processors to which vdf data will be sent
43 ArrOfInt pe_send_;
44 // List of processors from which vdf data will be received
45 ArrOfInt pe_recv_;
46 // Size of received data
47 ArrOfInt pe_recv_size_;
48 // For each processor to which vdf data is sent, list of indices
49 // in the vdf field to send to the processor, ordered in
50 // ascending order of the local storage on the destination processor
51 Static_Int_Lists pe_send_data_;
52 Static_Int_Lists pe_recv_data_;
53
54
55
56 // Local size of the ijk_field
59};
60
61#include <VDF_to_IJK.tpp>
62
63#endif
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
Localisation
Localisation sub class.
Definition Domaine_IJK.h:53
class Domaine_VF
Definition Domaine_VF.h:44
: This class is an IJK_Field_local with parallel informations.
ArrOfInt pe_send_
Definition VDF_to_IJK.h:43
void convert_from_ijk(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &ijk_x, DoubleVect &x, bool add=false) const
ArrOfInt pe_recv_
Definition VDF_to_IJK.h:45
Static_Int_Lists pe_recv_data_
Definition VDF_to_IJK.h:52
void initialize(const Domaine_VF &domaine_vf, const Domaine_IJK &splitting, Domaine_IJK::Localisation localisation, int direction_for_x, int direction_for_y, int direction_for_z)
Static_Int_Lists pe_send_data_
Definition VDF_to_IJK.h:51
ArrOfInt pe_recv_size_
Definition VDF_to_IJK.h:47
void convert_to_ijk(const DoubleVect &x, IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &ijk_x) const