TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Matrice_Morse_Diag.cpp
1/****************************************************************************
2* Copyright (c) 2022, 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 <Matrice_Morse_Diag.h>
17
18Implemente_instanciable_sans_constructeur(Matrice_Morse_Diag,"Matrice_Morse_Diag",Matrice_Morse_Sym);
19
20/*! @brief Writes the three arrays of the Morse storage structure to an output stream.
21 *
22 * @param (Sortie& s) an output stream
23 * @return (Sortie& s) the modified output stream
24 */
26{
27 return Matrice_Morse::printOn(s);
28}
29
30
31/*! @brief NOT IMPLEMENTED
32 *
33 * @param (Entree& s) an input stream
34 * @return (Entree& s) the input stream
35 * @throws NOT IMPLEMENTED
36 */
38{
39 return Matrice_Morse::readOn(s) ;
40}
41
42/*! @brief The purpose of this matrix is only to compute the diagonal.
43 *
44 */
45DoubleVect& Matrice_Morse_Diag::ajouter_multvect_(const DoubleVect& x, DoubleVect& y) const
46{
48}
49
50/*! @brief The purpose of this matrix is only to compute the diagonal.
51 *
52 */
53DoubleVect& Matrice_Morse_Diag::ajouter_multvectT_(const DoubleVect& x, DoubleVect& y) const
54{
55 Cerr<<" not implemented "<<finl;
56 exit();
57 return y;
58}
59/*! @brief The purpose of this matrix is only to compute the diagonal.
60 *
61 */
62DoubleTab& Matrice_Morse_Diag::ajouter_multTab_(const DoubleTab& x, DoubleTab& y) const
63{
64 Cerr<<" not implemented "<<finl;
65 exit();
66 return y;
67}
68
70{
71 IntTab indice(nb_case_tot,2);
72 for( int c=0; c<nb_case_tot; c++) indice(c,0)=indice(c,1)=c;
73 dimensionner( nb_case_tot, 0);
74 dimensionner(indice);
75}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Matrice_Morse_Diag class - Represents a sparse symmetric matrix M stored in Morse format.
DoubleTab & ajouter_multTab_(const DoubleTab &, DoubleTab &) const override
The purpose of this matrix is only to compute the diagonal.
DoubleVect & ajouter_multvectT_(const DoubleVect &, DoubleVect &) const override
The purpose of this matrix is only to compute the diagonal.
DoubleVect & ajouter_multvect_(const DoubleVect &x, DoubleVect &y) const override
The purpose of this matrix is only to compute the diagonal.
Matrice_Morse_Sym class - Represents a sparse symmetric matrix M stored in Morse format.
void dimensionner(int n, _SIZE_ nnz)
Size the matrix with n lines and n columns and nnz zero-values coefficients.
DoubleVect & ajouter_multvect_(const DoubleVect &, DoubleVect &) const override
Operation de multiplication-accumulation (saxpy) matrice vecteur.
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