TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_implementation_P0.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 Champ_implementation_P0_included
17#define Champ_implementation_P0_included
18
19#include <Champ_implementation.h>
20#include <Frontiere_dis_base.h>
21#include <Frontiere.h>
22
24{
25public:
27 DoubleVect& valeur_a_elem(const DoubleVect& position, DoubleVect& result, int poly) const override;
28 double valeur_a_elem_compo(const DoubleVect& position, int poly, int ncomp) const override;
29 DoubleTab& valeur_aux_centres_de_gravite(const Domaine&, DoubleTab& valeurs) const;
30 DoubleTab& valeur_aux_elems(const DoubleTab& positions, const IntVect& polys, DoubleTab& result) const override;
31 DoubleVect& valeur_aux_elems_compo(const DoubleTab& positions, const IntVect& polys, DoubleVect& result, int ncomp) const override;
32 DoubleTab& remplir_coord_noeuds(DoubleTab& positions) const override;
33 int remplir_coord_noeuds_et_polys(DoubleTab& positions, IntVect& polys) const override;
34 int imprime_P0(Sortie&, int) const;
35
36 public_for_cuda
37 DoubleTab& valeur_aux_sommets_impl(DoubleTab& result) const override;
38
39protected:
40 DoubleVect& valeur_aux_sommets_compo_impl(DoubleVect& result, int ncomp) const override;
41 int affecter_(const Champ_base&);
42 inline DoubleTab& trace(const Frontiere_dis_base& fr, const DoubleTab& y, DoubleTab& x, int distant) const;
43};
44
45inline DoubleTab& Champ_implementation_P0::trace(const Frontiere_dis_base& fr, const DoubleTab& y, DoubleTab& x, int distant) const
46{
47 if (distant)
49 else
50 {
51 fr.frontiere().trace_elem_local(y, x);
53 }
54 return x;
55}
56
57#endif /* Champ_implementation_P0_inclus */
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
public_for_cuda DoubleTab & valeur_aux_sommets_impl(DoubleTab &result) const override
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &result, int poly) const override
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &polys, DoubleTab &result) const override
int imprime_P0(Sortie &, int) const
double valeur_a_elem_compo(const DoubleVect &position, int poly, int ncomp) const override
DoubleVect & valeur_aux_sommets_compo_impl(DoubleVect &result, int ncomp) const override
int remplir_coord_noeuds_et_polys(DoubleTab &positions, IntVect &polys) const override
DoubleTab & valeur_aux_centres_de_gravite(const Domaine &, DoubleTab &valeurs) const
Computes field values at centers of gravity.
int affecter_(const Champ_base &)
DoubleTab & remplir_coord_noeuds(DoubleTab &positions) const override
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &polys, DoubleVect &result, int ncomp) const override
DoubleTab & trace(const Frontiere_dis_base &fr, const DoubleTab &y, DoubleTab &x, int distant) const
virtual void trace_elem_distant(const DoubleTab &, DoubleTab &) const
virtual void trace_elem_local(const DoubleTab &, DoubleTab &) const
classe Frontiere_dis_base Classe representant une frontiere discretisee.
const Frontiere & frontiere() const
Renvoie la frontiere geometrique associee.
Classe de base des flux de sortie.
Definition Sortie.h:52
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")