TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
DomaineAxi1d.h
1/****************************************************************************
2* Copyright (c) 2026, 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 DomaineAxi1d_included
17#define DomaineAxi1d_included
18
19#include <TRUSTTabs_forward.h>
20#include <TRUST_Ref.h>
21#include <Domaine.h>
22#include <Champ_base.h>
23
24class Param;
25
26/*! @brief : class DomaineAxi1d
27 *
28 * <Description of class DomaineAxi1d>
29 */
30template <typename _SIZE_>
31class DomaineAxi1d_32_64 : public Domaine_32_64<_SIZE_>
32{
33
34 Declare_instanciable_32_64( DomaineAxi1d_32_64 ) ;
35
36public :
37 using int_t = _SIZE_;
38 using DoubleTab_t = DoubleTab_T<_SIZE_>;
39 using DoubleVect_t = DoubleVect_T<_SIZE_>;
40 const Champ_base& champ_origine() const { return champ_orig.valeur(); }
41 const Champ_base& champ_origine() { return champ_orig.valeur(); }
42 bool has_champ_origine() const { return bool(champ_orig); }
43 const DoubleTab_t& origine_repere() { return ref_origine_.valeur(); }
44 const DoubleTab_t& origine_repere() const { return ref_origine_.valeur(); }
45 void associer_origine_repere(const DoubleTab_t& orig) { ref_origine_ = orig; }
46 inline double origine_repere(int_t i,int j) { return ref_origine_.valeur()(i,j); }
47 inline double origine_repere(int_t i,int j) const { return ref_origine_.valeur()(i,j); }
48 void calculer_volumes(DoubleVect_t& volumes, DoubleVect_t& inverse_volumes) const override
49 {
50 if (ref_origine_)
51 Domaine_32_64<_SIZE_>::calculer_volumes(volumes, inverse_volumes);
52 else
53 Cerr << "DomaineAxi1d should be descritized before computing volumes." << finl;
54 }
55
56protected :
57 void set_param(Param& param) const override;
58
59 OWN_PTR(Champ_base) champ_orig;
60 OBS_PTR(DoubleTab_t) ref_origine_;
61};
62
63using DomaineAxi1d = DomaineAxi1d_32_64<int>;
64using DomaineAxi1d_64 = DomaineAxi1d_32_64<trustIdType>;
65
66#endif /* DomaineAxi1d_included */
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
: class DomaineAxi1d
void associer_origine_repere(const DoubleTab_t &orig)
bool has_champ_origine() const
OWN_PTR(Champ_base) champ_orig
OBS_PTR(DoubleTab_t) ref_origine_
void calculer_volumes(DoubleVect_t &volumes, DoubleVect_t &inverse_volumes) const override
Calcule les volumes des elements du domaine.
double origine_repere(int_t i, int j)
double origine_repere(int_t i, int j) const
const DoubleTab_t & origine_repere()
const DoubleTab_t & origine_repere() const
const Champ_base & champ_origine() const
const Champ_base & champ_origine()
void set_param(Param &param) const override
DoubleVect_T< int > DoubleVect_t
DoubleTab_T< int > DoubleTab_t
virtual void calculer_volumes(DoubleVect_t &volumes, DoubleVect_t &inv_volumes) const
Calcule les volumes des elements du domaine.
Definition Domaine.cpp:764
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112