ope_sec_order_non_dege.C

00001 /*
00002  *   Copyright (c) 2003 Philippe Grandclement
00003  *
00004  *   This file is part of LORENE.
00005  *
00006  *   LORENE is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License version 2
00008  *   as published by the Free Software Foundation.
00009  *
00010  *   LORENE is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with LORENE; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  */
00020 
00021 char ope_sec_order_non_dege_C[] = "$Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_sec_order/ope_sec_order_non_dege.C,v 1.1 2004/06/22 12:43:58 p_grandclement Exp $" ;
00022 
00023 /*
00024  * $Id: ope_sec_order_non_dege.C,v 1.1 2004/06/22 12:43:58 p_grandclement Exp $
00025  * $Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_sec_order/ope_sec_order_non_dege.C,v 1.1 2004/06/22 12:43:58 p_grandclement Exp $
00026  *
00027  */
00028 #include <math.h>
00029 #include <stdlib.h>
00030 
00031 #include "proto.h"
00032 #include "ope_elementary.h"
00033 
00034         //-------------------
00035            //-- Pas prevu   ----
00036           //-------------------
00037 
00038 Matrice _sec_order_non_dege_pas_prevu (const Matrice& so) {
00039   cout << "Sec_order non dege : not implemented" << endl ;
00040   abort() ;
00041   exit(-1) ;
00042   return so;
00043 }
00044 
00045         //-------------------
00046            //--  R_CHEB   ------
00047           //-------------------
00048 
00049 Matrice _sec_order_non_dege_r_cheb (const Matrice& source) {
00050 
00051   int n = source.get_dim(0) ;
00052   int non_dege = 2 ;
00053   
00054   Matrice res(n-non_dege, n-non_dege) ;
00055   res.set_etat_qcq() ;
00056   for (int i=0 ; i<n-non_dege ; i++)
00057     for (int j=0 ; j<n-non_dege ; j++)
00058       res.set(i, j) = source(i, j+non_dege) ;
00059   
00060   res.set_band (2,2) ;
00061   res.set_lu() ;
00062   return res ;
00063 } 
00064 
00065 
00066 void Ope_sec_order::do_non_dege() const {
00067   if (ope_cl == 0x0)
00068     do_ope_cl() ;
00069   
00070   if (non_dege != 0x0)
00071     delete non_dege ;
00072   
00073   // Routines de derivation
00074   static Matrice (*sec_order_non_dege[MAX_BASE])(const Matrice&);
00075   static int nap = 0 ;
00076   
00077   // Premier appel
00078   if (nap==0) {
00079     nap = 1 ;
00080     for (int i=0 ; i<MAX_BASE ; i++) {
00081       sec_order_non_dege[i] = _sec_order_non_dege_pas_prevu ;
00082     }
00083     // Les routines existantes
00084     sec_order_non_dege[R_CHEB >> TRA_R] = _sec_order_non_dege_r_cheb ;
00085   }
00086   non_dege = new Matrice(sec_order_non_dege[base_r](*ope_cl)) ;
00087 }

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