00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 char division_xpun_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/division_xpun.C,v 1.2 2003/10/03 15:58:49 j_novak Exp $" ;
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #include <stdlib.h>
00050
00051
00052 #include "cmp.h"
00053 #include "proto.h"
00054
00055 Cmp division_xpun (const Cmp& source, int num_front) {
00056
00057 assert (source.get_etat() != ETATNONDEF) ;
00058 Cmp resultat (source) ;
00059
00060 if (resultat.get_etat() == ETATZERO)
00061 return resultat ;
00062 else {
00063 resultat.va.coef() ;
00064 resultat.va.set_etat_cf_qcq() ;
00065 int base_r = source.va.base.b[num_front+1] & MSQ_R ;
00066
00067 int nr = source.get_mp()->get_mg()->get_nr(num_front+1) ;
00068 double* coef = new double[nr] ;
00069
00070 for (int k=0 ; k<source.get_mp()->get_mg()->get_np(num_front+1)+1 ; k++)
00071 if (k != 1)
00072 for (int j=0 ; j<source.get_mp()->get_mg()->get_nt(num_front) ; j++) {
00073 for (int i=0 ; i<nr ; i++)
00074 coef[i] = (*resultat.va.c_cf)(num_front+1, k, j, i) ;
00075 sxpun_1d (nr, &coef, base_r) ;
00076 for (int i=0 ; i<nr ; i++)
00077 resultat.va.c_cf->set(num_front+1, k, j, i) = coef[i] ;
00078 }
00079
00080 delete [] coef ;
00081 return resultat ;
00082 }
00083 }