TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_Q1NC.h
1/****************************************************************************
2* Copyright (c) 2023, 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_Q1NC_included
17#define Champ_Q1NC_included
18
19#include <Champ_Inc_base.h>
20#include <Champ_Q1NC_implementation.h>
21#include <Domaine_VEF.h>
22
23#include <Domaine_forward.h>
24
26{
27 Declare_instanciable(Champ_Q1NC);
28public:
29 void verifie_valeurs_cl() override;
30 int fixer_nb_valeurs_nodales(int n) override;
31 int compo_normale_sortante(int) const;
32 DoubleTab& trace(const Frontiere_dis_base&, DoubleTab&, double, int distant) const override;
33 void cal_rot_ordre1(DoubleTab&);
34 void gradient(DoubleTab&);
35
36 // Inline methods
37 inline const Domaine_VEF& domaine_vef() const override { return ref_cast(Domaine_VEF, le_dom_VF.valeur()); }
38
39 inline DoubleVect& valeur_a_elem(const DoubleVect& position, DoubleVect& val, int le_poly) const override
40 {
41 return Champ_Q1NC_implementation::valeur_a_elem(position, val, le_poly);
42 }
43
44 inline double valeur_a_elem_compo(const DoubleVect& position, int le_poly, int ncomp) const override
45 {
46 return Champ_Q1NC_implementation::valeur_a_elem_compo(position, le_poly, ncomp);
47 }
48
49 inline double valeur_a_sommet_compo(int num_som, int le_poly, int ncomp) const override
50 {
51 return Champ_Q1NC_implementation::valeur_a_sommet_compo(num_som, le_poly, ncomp);
52 }
53
54 inline DoubleTab& valeur_aux_elems(const DoubleTab& positions, const IntVect& les_polys, DoubleTab& tab_valeurs) const override
55 {
56 return Champ_Q1NC_implementation::valeur_aux_elems(positions, les_polys, tab_valeurs);
57 }
58
59 inline DoubleVect& valeur_aux_elems_compo(const DoubleTab& positions, const IntVect& les_polys, DoubleVect& tab_valeurs, int ncomp) const override
60 {
61 return Champ_Q1NC_implementation::valeur_aux_elems_compo(positions, les_polys, tab_valeurs, ncomp);
62 }
63
64 inline DoubleTab& valeur_aux_sommets(const Domaine& dom, DoubleTab& val) const override
65 {
67 }
68
69 inline DoubleVect& valeur_aux_sommets_compo(const Domaine& dom, DoubleVect& val, int comp) const override
70 {
72 }
73
74 inline DoubleTab& remplir_coord_noeuds(DoubleTab& positions) const override
75 {
77 }
78
79 inline int remplir_coord_noeuds_et_polys(DoubleTab& positions, IntVect& polys) const override
80 {
82 }
83
84private:
85 inline const Champ_base& le_champ() const override { return *this; }
86 inline Champ_base& le_champ() override { return *this; }
87};
88
89#endif /* Champ_Q1NC_included */
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const override
DoubleTab & valeur_aux_sommets(const Domaine &, DoubleTab &) const override
double valeur_a_elem_compo(const DoubleVect &position, int le_poly, int ncomp) const override
DoubleTab & remplir_coord_noeuds(DoubleTab &positions) const override
DoubleVect & valeur_aux_sommets_compo(const Domaine &, DoubleVect &, int) const override
int remplir_coord_noeuds_et_polys(DoubleTab &positions, IntVect &polys) const override
double valeur_a_sommet_compo(int num_som, int le_poly, int ncomp) const
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const override
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &val, int le_poly) const override
DoubleTab & remplir_coord_noeuds(DoubleTab &positions) const override
Definition Champ_Q1NC.h:74
void cal_rot_ordre1(DoubleTab &)
int compo_normale_sortante(int) const
void gradient(DoubleTab &)
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &tab_valeurs, int ncomp) const override
Causes an error! Must be overridden by derived classes.
Definition Champ_Q1NC.h:59
DoubleTab & valeur_aux_sommets(const Domaine &dom, DoubleTab &val) const override
Returns the values at the vertices of the Domain dom.
Definition Champ_Q1NC.h:64
double valeur_a_sommet_compo(int num_som, int le_poly, int ncomp) const override
Returns the compo-th coordinate of the values at the element le_poly at the vertex sommet.
Definition Champ_Q1NC.h:49
DoubleVect & valeur_aux_sommets_compo(const Domaine &dom, DoubleVect &val, int comp) const override
Returns the compo-th value at the vertices of dom.
Definition Champ_Q1NC.h:69
double valeur_a_elem_compo(const DoubleVect &position, int le_poly, int ncomp) const override
Causes an error! Must be overridden by derived classes.
Definition Champ_Q1NC.h:44
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &val, int le_poly) const override
Causes an error! Must be overridden by derived classes.
Definition Champ_Q1NC.h:39
DoubleTab & trace(const Frontiere_dis_base &, DoubleTab &, double, int distant) const override
See Champ_base. Special case (unfortunately) of Champ_P0_VDF:
void verifie_valeurs_cl() override
const Domaine_VEF & domaine_vef() const override
Definition Champ_Q1NC.h:37
int remplir_coord_noeuds_et_polys(DoubleTab &positions, IntVect &polys) const override
DOES NOTHING. Method to override.
Definition Champ_Q1NC.h:79
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &tab_valeurs) const override
Causes an error! Must be overridden by derived classes.
Definition Champ_Q1NC.h:54
int fixer_nb_valeurs_nodales(int n) override
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Champ_base()
Default constructor of a Champ_base.
virtual Champ_base & le_champ()=0
class Domaine_VEF
Definition Domaine_VEF.h:53
class Frontiere_dis_base Class representing a discretized boundary.