/* * Methods for making calculations with Godunov-type arrays. * * See the file tbl_val.h for documentation * */ /* * Copyright (c) 2001 Jerome Novak * * This file is part of LORENE. * * LORENE is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * LORENE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with LORENE; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ char ARITHM_TBL_VAL_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valencia/arithm_tbl_val.C,v 1.5 2014/10/13 08:53:48 j_novak Exp $" ; /* * $Id: arithm_tbl_val.C,v 1.5 2014/10/13 08:53:48 j_novak Exp $ * $Log: arithm_tbl_val.C,v $ * Revision 1.5 2014/10/13 08:53:48 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.4 2003/10/02 07:00:19 e_gourgoulhon * Changed the = signs in some assert's to == * * Revision 1.3 2002/11/12 10:03:54 j_novak * The method "Tbl_val::get_gval" has been changed to "get_grid". * * Revision 1.2 2002/10/16 14:37:15 j_novak * Reorganization of #include instructions of standard C++, in order to * use experimental version 3 of gcc. * * Revision 1.1 2001/11/22 13:41:54 j_novak * Added all source files for manipulating Valencia type objects and making * interpolations to and from Meudon grids. * * * $Header: /cvsroot/Lorene/C++/Source/Valencia/arithm_tbl_val.C,v 1.5 2014/10/13 08:53:48 j_novak Exp $ * */ // headers Lorene #include "tbl_val.h" //********************// // OPERATEURS UNAIRES // //********************// // + Tbl_val // ----- namespace Lorene { Tbl_val operator+(const Tbl_val& t1) { // Protection assert(t1.get_etat() != ETATNONDEF) ; return t1 ; } // - Tbl_val // ----- Tbl_val operator-(const Tbl_val& t1) { // Protection assert(t1.get_etat() != ETATNONDEF) ; // Cas particulier if (t1.get_etat() == ETATZERO) { return t1 ; } // Cas general Tbl_val r(t1.get_grille()) ; // Tbl_val resultat r.set_etat_qcq() ; for (int i=0 ; i