TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Imposer_vitesse_lagrangienne.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 <Imposer_vitesse_lagrangienne.h>
17#include <Domaine_ALE.h>
18
19Implemente_instanciable(Imposer_vitesse_lagrangienne, "Imposer_vitesse_lagrangienne", Interprete_geometrique_base);
20// XD imposer_vitesse_lagrangienne interprete imposer_vitesse_lagrangienne NO_BRACE Imposer une vitesse purement
21// XD_CONT lagrangienne au maillage ALE a partir d'un champ nodal externe.
22// XD attr dom ref_domaine domaine REQ Nom du domaine ALE cible.
23// XD attr pb ref_pb_base probleme REQ Nom du probleme qui porte le champ de vitesse nodale.
24// XD attr champ chaine nom REQ Nom du champ nodal dont les valeurs sont referencees comme vitesse du maillage.
25
28
30{
32 Nom dom_type = domaine().que_suis_je();
33 if (!dom_type.contient("ALE"))
34 {
35 Cerr << "Imposer_vitesse_lagrangienne : le domaine " << domaine().le_nom()
36 << " n'est pas de type ALE." << finl;
38 }
39
40 Domaine_ALE& dom = ref_cast(Domaine_ALE, domaine());
41 Nom nom_pb, nom_champ;
42 is >> nom_pb >> nom_champ;
43 dom.associer_vitesse_lagrangienne(nom_pb, nom_champ);
44 return is;
45}
void associer_vitesse_lagrangienne(const Nom &nom_pb, const Nom &nom_champ)
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Interprete permettant d'associer une vitesse purement lagrangienne a un domaine ALE.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
bool contient(const Nom &nom) const
Definition Nom.h:86
friend class Entree
Definition Objet_U.h:71
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
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
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52