TrioCFD 1.9.9_beta
TrioCFD documentation
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// - discretization of the densite_particules field
45// - association of the domain to the set of tracked points
46// - t_debut_integr_ defaults to t_init if no value is read from the data file
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}
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Discretisation_base This class represents a spatial discretization scheme, which
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
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
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()
Returns the discretized domain associated with the equation.
Marqueur_Lagrange_base The Marqueur_Lagrange_base class is the base class for Lagrangian marker class...
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
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
class Probleme_base It is a Probleme_U that is not a coupling.
const Domaine & domaine() const
Returns the domain associated with the problem.
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
virtual const Equation_base & equation(int) const =0
double temps_courant() const
Returns the current time.
double temps_init() const
Returns the initial time.
Base class for output streams.
Definition Sortie.h:52