/* * Copyright (c) 2001 Philippe Grandclement * * 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 cmp_raccord_externe_C[] = "$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_raccord_externe.C,v 1.4 2014/10/13 08:52:48 j_novak Exp $" ; /* * $Id: cmp_raccord_externe.C,v 1.4 2014/10/13 08:52:48 j_novak Exp $ * $Log: cmp_raccord_externe.C,v $ * Revision 1.4 2014/10/13 08:52:48 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.3 2014/10/06 15:13:04 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.2 2003/10/03 15:58:45 j_novak * Cleaning of some headers * * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon * LORENE * * Revision 2.2 2001/10/10 13:53:27 eric * Modif Joachim: sqrt(2) --> sqrt(double(2)) * * Revision 2.1 2001/04/02 12:16:39 phil * *** empty log message *** * * Revision 2.0 2001/03/30 13:37:32 phil * *** empty log message *** * * * $Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_raccord_externe.C,v 1.4 2014/10/13 08:52:48 j_novak Exp $ * */ //standard #include #include // LORENE #include "matrice.h" #include "cmp.h" #include "proto.h" // Calcul des Cnp namespace Lorene { int cnp (int n, int p) { assert (p<=n) ; if ((p==0) || (p==n)) return 1 ; else { int fact_un = 1 ; for (int conte=n ; conte >n-p ; conte --) fact_un *= conte ; int fact_deux = 1 ; for (int conte = 1 ; conteget_mg()->get_nzone()-2 ; int nt = mp->get_mg()->get_nt(zone) ; int np = mp->get_mg()->get_np(zone) ; int nr = mp->get_mg()->get_nr(zone) ; // Le mapping doit etre affine : const Map_af* map = dynamic_cast(mp) ; if (map == 0x0) { cout << "Le mapping doit etre affine" << endl ; abort() ; } // Mappinhg en r double alpha = map->get_alpha()[zone] ; double beta = map->get_beta()[zone] ; // Mapping en 1/r double new_alpha = -alpha/(beta*beta-alpha*alpha) ; double new_beta = beta/(beta*beta-alpha*alpha) ; // Mapping dans la zec : double alpha_zec = map->get_alpha()[zone+1] ; // Maintenant on construit les matrices de passage : // Celle de ksi a T Matrice tksi (nbre, nbre) ; tksi.set_etat_qcq() ; // Premier polynome tksi.set(0, 0) = sqrt(double(2)) ; for (int i=1 ; iset_etat_qcq() ; va.c_cf->t[zone+1]->set_etat_qcq() ; for (int k=0 ; kset(zone+1, k, j, i) = coef_zec(k, j, i) ; set_dzpuis(power) ; va.ylm_i() ; delete[] auxi ; delete [] dege ; delete [] ti ; delete [] coloc ; } }