TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Marqueur_Lagrange_base.cpp
1/****************************************************************************
2* Copyright (c) 2024, 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#include <Marqueur_Lagrange_base.h>
17#include <Domaine_dis_base.h>
18#include <Discretisation_base.h>
19#include <Probleme_base.h>
20#include <Equation_base.h>
21#include <Schema_Temps_base.h>
22#include <Domaine.h>
23#include <Ensemble_Lagrange_base.h>
24
25Implemente_base_sans_constructeur(Marqueur_Lagrange_base,"Marqueur_Lagrange_base",Objet_U);
26
31
33{
34
35 return os;
36}
37
39{
40 return is;
41}
42
43
44// -discretisation du champ densite_particules
45// -association du domaine a l ensemble d points suivis
46// -t_debut_integr_ fixe par defaut a t_init si pas de valeur lue dans le jdd
48{
49 const Domaine_dis_base& domaine_dis=pb.equation(0).domaine_dis();
50 const Domaine& domaine = pb.domaine();
51 double temps = pb.schema_temps().temps_courant();
52 Nom nom="densite_particules";
53 Nom unite="sans_dimension";
54 dis.discretiser_champ("champ_elem",domaine_dis,nom,unite,1,temps,densite_particules_);
55 champs_compris_.ajoute_champ(densite_particules_.valeur());
56
58 if (t_debut_integr_==-1.)
60}
61
62
64{
66 densite_particules_->changer_temps(temps);
67}
68
70{
71 return champs_compris_.get_champ(nom);
72}
73
75{
76 if (opt == DESCRIPTION)
77 Cerr << " Marqueur_Lagrange_base : " << champs_compris_.liste_noms_compris() << finl;
78 else
79 nom.add(champs_compris_.liste_noms_compris());
80}
81
82bool Marqueur_Lagrange_base::has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const
83{
84 return champs_compris_.has_champ(nom, ref_champ);
85}
86
88{
89 return champs_compris_.has_champ(nom);
90}
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
void associer_domaine(const Domaine &domaine)
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
classe Marqueur_Lagrange_base La classe Marqueur_Lagange_base est la classe de base des classes de ma...
virtual void mettre_a_jour(double temps)
const Champ_base & get_champ(const Motcle &nom) const override
virtual void calculer_valeurs_champs()=0
virtual void discretiser(const Probleme_base &pb, const Discretisation_base &dis)
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
virtual Ensemble_Lagrange_base & ensemble_points()=0
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
const Domaine & domaine() const
Renvoie le domaine associe au probleme.
const Schema_Temps_base & schema_temps() const
Renvoie le schema en temps associe au probleme.
virtual const Equation_base & equation(int) const =0
double temps_courant() const
Renvoie le temps courant.
double temps_init() const
Renvoie le temps initial.
Classe de base des flux de sortie.
Definition Sortie.h:52