TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
MorEqn.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 <Equation_base.h>
17#include <MorEqn.h>
18#include <Motcle.h>
19
20// XD mor_eqn objet_u mor_eqn INHERITS_BRACE Class of equation pieces (morceaux d\'equation).
21/*! @brief Associates an equation with the object.
22 *
23 * Sets the MorEqn::mon_equation member with the object
24 * passed as parameter.
25 *
26 * @param (Equation_base& eqn) the equation with which we want to associate
27 */
29{
30 mon_equation=eqn;
31}
32
33// Calculation of values related to a piece of equation (Operators, ...) for post-processing
34//
35void MorEqn::calculer_pour_post(Champ_base& espace_stockage,const Nom& option, int comp) const
36{
37 Cerr<<"The method calculer_pour_post(...) is currently not coded"<<finl;
38 Cerr<<"for the piece of the regarded equation and option chosen"<<finl;
39 Cerr<<"Contact TRUST support for the coding of this method"<<finl;
41}
42
44{
45 Cerr<<"MorEqn : the method get_localisation_pour_post is not coded"<<finl;
47 throw;
48}
49
51{
52 const Objet_U *obj = dynamic_cast<const Objet_U *>(this);
53 if (!obj) abort(); //we're not even an Objet_U ?
54 Cerr << obj->que_suis_je() << " is not compatible with " << mon_equation->que_suis_je() <<"!" << finl;
56}
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Equation_base The role of an equation is the calculation of one or more fields....
void associer_eqn(const Equation_base &)
Associates an equation with the object.
Definition MorEqn.cpp:28
virtual void check_multiphase_compatibility() const
Definition MorEqn.cpp:50
virtual Motcle get_localisation_pour_post(const Nom &option) const
Definition MorEqn.cpp:43
virtual void calculer_pour_post(Champ_base &espace_stockage, const Nom &option, int comp) const
Definition MorEqn.cpp:35
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466