connection_flat.C

00001 /*
00002  *  Methods of class Connection_flat.
00003  *
00004  *  (see file connection.h for documentation)
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2003 Eric Gourgoulhon & Jerome Novak
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License version 2
00015  *   as published by the Free Software Foundation.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 char connection_flat_C[] = "$Header: /cvsroot/Lorene/C++/Source/Connection/connection_flat.C,v 1.4 2003/12/30 22:59:35 e_gourgoulhon Exp $" ;
00029 
00030 /*
00031  * $Id: connection_flat.C,v 1.4 2003/12/30 22:59:35 e_gourgoulhon Exp $
00032  * $Log: connection_flat.C,v $
00033  * Revision 1.4  2003/12/30 22:59:35  e_gourgoulhon
00034  * Suppressed method fait_ricci() (the computation of the Ricci is
00035  * now devoted to the virtual method ricci()).
00036  *
00037  * Revision 1.3  2003/10/11 14:39:50  e_gourgoulhon
00038  * Suppressed declaration of unusued arguments in some methods.
00039  *
00040  * Revision 1.2  2003/10/01 15:42:49  e_gourgoulhon
00041  * still ongoing...
00042  *
00043  * Revision 1.1  2003/09/29 21:13:08  e_gourgoulhon
00044  * First version --- not ready yet.
00045  *
00046  *
00047  *
00048  *
00049  * $Header: /cvsroot/Lorene/C++/Source/Connection/connection_flat.C,v 1.4 2003/12/30 22:59:35 e_gourgoulhon Exp $
00050  *
00051  */
00052 
00053 // C++ headers
00054 #include "headcpp.h"
00055 
00056 // C headers
00057 #include <stdlib.h>
00058 
00059 // Lorene headers
00060 #include "connection.h"
00061 
00062 
00063                 //---------------------------//
00064         //      Constructors         //
00065                 //---------------------------//
00066 
00067 
00068 // Constructor for derived classes
00069 
00070 Connection_flat::Connection_flat(const Map& mpi, const Base_vect& bi) 
00071     : Connection(mpi, bi) {
00072 
00073     assoc_metric = true ;
00074     
00075     delta.set_etat_zero() ; 
00076 
00077 }       
00078 
00079 // Copy constructor
00080 Connection_flat::Connection_flat(const Connection_flat& ci) 
00081     : Connection(ci) {
00082 
00083 }       
00084 
00085     
00086                 //------------------------//
00087         //      Destructor        //
00088                 //------------------------//
00089 
00090 Connection_flat::~Connection_flat(){
00091 
00092 }
00093 
00094 
00095 
00096             //-----------------------------//
00097                 //     Mutators / assignment   //
00098             //-----------------------------//
00099 
00100 void Connection_flat::operator=(const Connection_flat& ) {
00101     
00102     cout << "Connection_flat::operator= : not implemented yet !" << endl ; 
00103     abort() ; 
00104 
00105 }   
00106 
00107 
00108 
00109             //-----------------------------//
00110             //    Computational methods    //
00111             //-----------------------------//
00112 
00113 
00114 const Tensor& Connection_flat::ricci() const {
00115 
00116     if (p_ricci == 0x0) {  // a new computation is necessary
00117 
00118     p_ricci = new Sym_tensor(*mp, COV, *triad) ;    
00119     p_ricci->set_etat_zero() ; 
00120     }
00121     
00122     return *p_ricci ; 
00123     
00124 }
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 

Generated on Tue Feb 7 01:35:15 2012 for LORENE by  doxygen 1.4.6