/* * Arithmetics Tensor_sym * * (see file tensor.h for documentation) * */ /* * Copyright (c) 2004 Eric Gourgoulhon & Jerome Novak * * Copyright (c) 1999-2001 Philippe Grandclement (for preceding class Tenseur) * * 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 tensor_sym_arithm_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tensor/tensor_sym_arithm.C,v 1.3 2014/10/13 08:53:44 j_novak Exp $" ; /* * $Id: tensor_sym_arithm.C,v 1.3 2014/10/13 08:53:44 j_novak Exp $ * $Log: tensor_sym_arithm.C,v $ * Revision 1.3 2014/10/13 08:53:44 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.2 2014/10/06 15:13:20 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.1 2004/01/08 09:22:40 e_gourgoulhon * First version. * * * $Header: /cvsroot/Lorene/C++/Source/Tensor/tensor_sym_arithm.C,v 1.3 2014/10/13 08:53:44 j_novak Exp $ * */ // Headers C #include #include #include // Headers Lorene #include "tensor.h" //********************// // OPERATEURS UNAIRES // //********************// namespace Lorene { Tensor_sym operator+(const Tensor_sym & t) { return t ; } Tensor_sym operator-(const Tensor_sym & tt) { Tensor_sym res(tt.get_mp(), tt.get_valence(), tt.get_index_type(), *(tt.get_triad()), tt.sym_index1(), tt.sym_index2()) ; for (int ic=0 ; ic