TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
interface_CALCULSI.cpp
1/****************************************************************************
2* Copyright (c) 2026, 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#include <TRUSTArray.h> // might include Kokkos, has to be put before arch_fort to avoid nasty re-define
16#include <interface_CALCULSI.h>
17#include <arch_fort.h>
18#include <LecFicDiffuse.h>
19#include <Param.h>
20extern "C" {
21#ifdef F77_Majuscule
22 int F77DECLARE(CALCULSI)(const integer* nbnn, const doublereal* co3d, const doublereal* poro, const integer* ip, const integer* npgau, const doublereal* xgau, const doublereal* frgau, const doublereal* dfrgau, const doublereal* poigau, doublereal* detj, const doublereal* cnorme, doublereal* si);
23#else
24 int F77DECLARE(calculsi)(const integer* nbnn, const doublereal* co3d, const doublereal* poro, const integer* ip, const integer* npgau, const doublereal* xgau, const doublereal* frgau, const doublereal* dfrgau, const doublereal* poigau, doublereal* detj, const doublereal* cnorme, doublereal* si);
25#endif
26}
27#ifndef F77_Majuscule
28inline int F77DECLARE(CALCULSI)(const integer* nbnn, const doublereal* co3d, const doublereal* poro, const integer* ip, const integer* npgau, const doublereal* xgau, const doublereal* frgau, const doublereal* dfrgau, const doublereal* poigau, doublereal* detj, const doublereal* cnorme, doublereal* si)
29{
30 return F77NAME(calculsi)( nbnn, co3d, poro, ip, npgau, xgau, frgau, dfrgau, poigau, detj, cnorme, si);
31}
32#endif
33
51
55
56void interface_CALCULSI::Compute(const int nbnn, const ArrOfDouble& co3d, const ArrOfDouble& poro, const int ip, const int npgau, const ArrOfDouble& xgau, const ArrOfDouble& frgau, const ArrOfDouble& dfrgau, const ArrOfDouble& poigau, ArrOfDouble& detj, const ArrOfDouble& cnorme, ArrOfDouble& si) const
57{
58 F77NAME(CALCULSI)(&nbnn, co3d.addr(), poro.addr(), &ip, &npgau, xgau.addr(), frgau.addr(), dfrgau.addr(), poigau.addr(), detj.addr(), cnorme.addr(), si.addr());
59}
61{
62 LecFicDiffuse entree(nom_fic);
63 Param param("interface_CALCULSI");
64 set_param(param);
65 param.read(entree);
66}
67
69{
70 Param param("interface_CALCULSI");
71 set_param(param);
72 param.print(os);
73}
74
76{
77}
78
79
Cette classe implemente les operateurs et les methodes virtuelles de la classe EFichier de la facon s...
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void print(Sortie &s) const
Print the current state of the registered parameters as a { ... } block.
Definition Param.cpp:135
int read(Entree &is, int with_acco=1)
Low-level entry point used by lire_avec_accolades_depuis.
Definition Param.cpp:62
Classe de base des flux de sortie.
Definition Sortie.h:52
_TYPE_ * addr()
void Compute(const int nbnn, const ArrOfDouble &co3d, const ArrOfDouble &poro, const int ip, const int npgau, const ArrOfDouble &xgau, const ArrOfDouble &frgau, const ArrOfDouble &dfrgau, const ArrOfDouble &poigau, ArrOfDouble &detj, const ArrOfDouble &cnorme, ArrOfDouble &si) const
void set_param(Param &) const
void init_from_file(const Nom &)