TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Imposer_vit_bords_ALE.cpp
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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_vit_bords_ALE.h>
17#include <Domaine_ALE.h>
18
19
20Implemente_instanciable(Imposer_vit_bords_ALE,"Imposer_vit_bords_ALE",Interprete_geometrique_base);
21// XD imposer_vit_bords_ale interprete imposer_vit_bords_ale NO_BRACE For the Arbitrary Lagrangian-Eulerian framework:
22// XD_CONT block to indicate the number of mobile boundaries of the domain and specify the speed that must be imposed on
23// XD_CONT them.
24// XD attr dom ref_domaine dom REQ Name of domain.
25// XD attr bloc bloc_lecture bloc REQ between the braces, you must specify the numbers of the mobile borders of the
26// XD_CONT domain then list these mobile borders and indicate the speed which must be imposed on them NL2 Example:
27// XD_CONT Imposer_vit_bords_ALE dom_name { 1 boundary_name Champ_front_ALE 2 -(y-0.1)*0.01 (x-0.1)*0.01 }
28
29
30
31
32
33/*! @brief Simple appel a: Interprete::printOn(Sortie&)
34 *
35 * Imprime l'interprete sur un flot de sortie
36 *
37 * @param (Sortie& os) un flot de sortie
38 * @return (Sortie&) le flot de sortie modifie
39 */
41{
42 return Interprete::printOn(os);
43}
44
45
46/*! @brief Simple appel a: Interprete::readOn(Entree&)
47 *
48 * @param (Entree& is) un flot d'entree
49 * @return (Entree&) le flot d'entree modifie
50 */
52{
53 return Interprete::readOn(is);
54}
55
56
57/*! @brief Fonction principale de l'interprete Imposer_deplacements_bords_ALE: discretiser un probleme avec une discretisation
58 *
59 * On controle dynamiquement le type du probleme et
60 * de la discretisation que l'on a lu, on verifie
61 * que le schema en temps du probleme a ete lu et on
62 * discretise le probleme avec la discretisation.
63 *
64 * @throws discretisation non reconnue
65 * @throws on ne sait pas discretiser car le probleme n'est pas d'un
66 * sous-type reconnu (Probleme,Probleme_base,Probleme_Couple)
67 */
69{
71 Nom dom_name = domaine().que_suis_je();
72 if (!dom_name.contient("ALE"))
73 {
74 Cerr <<"Mobile domain: replace " <<domaine().que_suis_je()<<" with "<< domaine().que_suis_je() <<"_ALE and restart!"<< finl;
76 }
77 Domaine_ALE& dom=ref_cast(Domaine_ALE, domaine());
79 return is;
80}
void reading_vit_bords_ALE(Entree &is)
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Imposer_vit_bords_ALE Discretise un probleme:
Entree & interpreter_(Entree &) override
Fonction principale de l'interprete Imposer_deplacements_bords_ALE: discretiser un probleme avec une ...
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
bool contient(const Nom &nom) const
Definition Nom.h:86
friend class Entree
Definition Objet_U.h:76
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
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
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52