File: map_et_radius.C

package info (click to toggle)
lorene 0.0.0~cvs20161116%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 26,444 kB
  • ctags: 13,953
  • sloc: cpp: 212,946; fortran: 21,645; makefile: 1,750; sh: 4
file content (661 lines) | stat: -rw-r--r-- 16,915 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
/*
 *  Methods of the class Map_et relative to the function
 *	    r = R_l(xi, theta', phi')
 */

/*
 *   Copyright (c) 1999-2001 Eric Gourgoulhon
 *
 *   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 map_et_radius_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_et_radius.C,v 1.6 2014/10/13 08:53:05 j_novak Exp $" ;

/*
 * $Id: map_et_radius.C,v 1.6 2014/10/13 08:53:05 j_novak Exp $
 * $Log: map_et_radius.C,v $
 * Revision 1.6  2014/10/13 08:53:05  j_novak
 * Lorene classes and functions now belong to the namespace Lorene.
 *
 * Revision 1.5  2013/06/05 15:10:42  j_novak
 * Suppression of FINJAC sampling in r. This Jacobi(0,2) base is now
 * available by setting colloc_r to BASE_JAC02 in the Mg3d constructor.
 *
 * Revision 1.4  2008/08/27 08:49:16  jl_cornou
 * Added R_JACO02 case
 *
 * Revision 1.3  2004/01/26 16:58:35  j_novak
 * Added initialization to avoid compiler warning.
 *
 * Revision 1.2  2003/12/19 16:21:43  j_novak
 * Shadow hunt
 *
 * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
 * LORENE
 *
 * Revision 1.5  2000/10/20  13:14:47  eric
 * Map_et::val_lx : la valeur par defaut de precis est desormais 1e-14
 *  (et non plus 1e-15).
 *
 * Revision 1.4  2000/01/04  13:05:47  eric
 * \Corrections dans val_lx et val_lx_jk : initialisation de ftp/gtp
 *  par double(0) dans les cas ou il ne sont pas calcules.
 *
 * Revision 1.3  1999/12/17  11:03:36  eric
 * Fonctions val_r_jk et val_lx_jk operationnelles.
 *
 * Revision 1.2  1999/12/17  09:29:22  eric
 * val_lx : initialisation de niter a 0.
 *
 * Revision 1.1  1999/12/16  14:19:39  eric
 * Initial revision
 *
 *
 * $Header: /cvsroot/Lorene/C++/Source/Map/map_et_radius.C,v 1.6 2014/10/13 08:53:05 j_novak Exp $
 *
 */


// Headers Lorene
#include "map.h"
#include "param.h"
#include "nbr_spx.h"
#include "utilitaires.h"

// Local prototypes
namespace Lorene {
double fonc_invr_map_et_noyau(double, const Param&) ; 
double fonc_invr_map_et_coq(double, const Param&) ; 
double fonc_invr_map_et_zec(double, const Param&) ; 

			//------------------------------// 
			//	    val_r		//
			//------------------------------// 

 
double Map_et::val_r(int l, double xi, double theta, double pphi) const {

    assert( l>=0 ) ; 
    assert( l<mg->get_nzone() ) ; 
    
    double resu ; 
    double ftp = ff.val_point(l, 0, theta, pphi) ; // value of F_l(theta,phi)

    switch( mg->get_type_r(l) ) {

	case RARE: {
	    double gtp = gg.val_point(l, 0, theta, pphi) ; 
	    double xi_2 = xi * xi ; 
	    double xi_3 = xi * xi_2 ;
	    double a = xi_2 * xi_2 * (3. - 2.*xi_2) ;
	    double b =  ( 2.5  - 1.5 * xi_2 ) * xi_3 ;
	    resu = alpha[l] * ( xi + a * ftp + b * gtp ) + beta[l] ;
	    break ;
	}

	case FIN: {
	    double gtp = gg.val_point(l, 0, theta, pphi) ; 
	    double xm1 = xi - 1. ; 
	    double xp1 = xi + 1. ; 
	    double a = 0.25* xm1 * xm1 * (xi + 2.) ;
	    double b = 0.25* xp1 * xp1 * (2. - xi) ;
	    resu = alpha[l] * ( xi + a * ftp + b * gtp ) + beta[l] ;
	    break ;
	}
	
	case UNSURR: {
	    double xm1 = xi - 1. ; 
	    double a = 0.25* xm1 * xm1 * (xi + 2.) ;
	    resu = double(1) / ( alpha[l] * ( xi + a * ftp ) + beta[l] ) ;
	    break ;
	}

	default: {
	    cout << "Map_et::val_r: unknown type_r ! " << endl ;
	    abort () ;
	}	   
    }
             
    return resu ;    
}
			
			//------------------------------// 
			//	    val_lx		//
			//------------------------------// 

//-------------------------------
// Version with default precision 
//-------------------------------

void Map_et::val_lx(double rr, double theta, double pphi,  
			    int& lz, double& xi) const {

    int nitermax = 100 ;    // Maximum number of iteration in the secant method
    int niter ; 
    double precis = 1e-14 ; // Absolute precision in the secant method
    
    Param par ; 
    par.add_int(nitermax) ;	
    par.add_int_mod(niter) ; 
    par.add_double(precis) ; 

    // Call of the version with precision parameters
    
    val_lx(rr, theta, pphi, par, lz, xi) ;

}


//---------------------------------
// Version with specified precision 
//---------------------------------

void Map_et::val_lx(double rr, double theta, double pphi,
		    const Param& par, int& lz, double& xi) const {
			   
    int nz = mg->get_nzone() ;

    // Precision in the secant method :
    // ------------------------------
    
    int nitermax = par.get_int() ; 
    int& niter = par.get_int_mod() ; 
    niter = 0 ;	    // initialisation 
    double precis = par.get_double() ; 
    
    // Particular case of r = infinity
    //--------------------------------
    if (rr == __infinity) { 
	if ( (mg->get_type_r(nz-1) == UNSURR) && 
	     (alpha[nz-1] == - beta[nz-1]) ) {
	    lz = nz - 1 ; 
	    xi = 1 ;		 
	}
	else {
	    cout.precision(16);
	    cout.setf(ios::showpoint);
	    cout << "Map_et::val_lx: the domain containing r = " << rr <<
		 " has not been found ! " 
	      << endl ;
	    abort () ;
	}
	return ; 
    }
    

    // In which domain is located r ? 
    // ----------------------------
    lz = - 1 ;
    double rmax = 0. ; 
    double ftp = double(0) ; 
    double gtp = double(0) ; 
    for (int l=0; l<nz; l++) {
		
	switch( mg->get_type_r(l) ) {

	case RARE: {
	    ftp = ff.val_point(l, 0, theta, pphi) ; // value of F_l(theta,phi)
	    gtp = gg.val_point(l, 0, theta, pphi) ; // value of G_l(theta,phi)
	    rmax = alpha[l] * ( double(1) + ftp + gtp ) + beta[l] ;
	    break ;
	}
	
	case FIN: {
	    ftp = double(0) ; 
	    gtp = gg.val_point(l, 0, theta, pphi) ; 
	    rmax = alpha[l] * ( double(1) + gtp ) + beta[l] ;
	    break ;
	}
	
	case UNSURR: {
	    ftp = double(0) ; 
	    gtp = double(0) ; 
	    rmax = double(1) / ( alpha[l] + beta[l] ) ; 
	    break ;
	}

	default: {
	    cout << "Map_et::val_lx: unknown type_r ! " << endl ;
	    abort() ;
	}	   
	}   // end of switch on type_r


	if ( rr <= rmax + 1.e-14 ) { 
	    lz = l ;
	    if (ftp == double(0)) ftp = ff.val_point(l, 0, theta, pphi) ;
	    if (gtp == double(0)) gtp = gg.val_point(l, 0, theta, pphi) ;
	    break ; 
	}	
    }		// End of loop onto the domains
    
    if (lz == -1) {		    // The domain has not been found
	cout.precision(16);
	cout.setf(ios::showpoint);
	cout << "Map_et::val_lx: the domain containing r = " << rr <<
		 " has not been found ! " 
	      << endl ;
	for (int l=0; l<nz; l++) {
	    ftp = ff.val_point(l, 0, theta, pphi) ;
	    gtp = gg.val_point(l, 0, theta, pphi) ; 
	    switch( mg->get_type_r(l) ) {
		case RARE: {
		    rmax = alpha[l] * ( double(1) + ftp + gtp ) + beta[l] ;
		    break ;
		}
		case FIN: {
		    rmax = alpha[l] * ( double(1) + gtp ) + beta[l] ;
		    break ;
		}
		case UNSURR: {
		    rmax = double(1) / ( alpha[l] + beta[l] ) ; 
		    break ;
		}
		default: {
		    cout << "Map_et::val_lx: unknown type_r ! " << endl ;
		    abort () ;
		}	   
	    }   // end of switch on type_r

	    cout << "domain: " << l << " theta = " << theta << " phi = " 
		 << pphi << " :  rmax = " << rmax << endl ; 
	}
	abort() ;
    }

    // Computation of xi
    // ----------------- 

    if ( (rr >= rmax) && ( rr <= rmax + 1.e-14) ) {
	xi = double(1) ; 
    }
    else {

    // Search of xi by the secant method
    // ---------------------------------

    Param parzerosec ;
    parzerosec.add_double(rr, 0) ; 
    parzerosec.add_double(ftp, 1) ; 
    parzerosec.add_double(gtp, 2) ; 
    parzerosec.add_double(alpha[lz], 3) ; 
    parzerosec.add_double(beta[lz], 4) ; 


    switch( mg->get_type_r(lz) ) {

	case RARE: {
	    if ( (ff.get_etat()==ETATZERO) && (gg.get_etat()==ETATZERO) ) {
		xi = ( rr - beta[lz] ) / alpha[lz]  ;
	    }
	    else {
		double xmin = 0 ; 
		double xmax = 1 ; 
		xi = zerosec(fonc_invr_map_et_noyau, parzerosec, xmin, xmax, 
			     precis, nitermax, niter) ;
	    }
	    break ;
	}
	
	case FIN: {
	    if ( (ff.get_etat()==ETATZERO) && (gg.get_etat()==ETATZERO) ) {
		xi = ( rr - beta[lz] ) / alpha[lz]  ;
	    }
	    else {
		double xmin = -1 ; 
		double xmax = 1 ; 
		xi = zerosec(fonc_invr_map_et_coq, parzerosec, xmin, xmax, 
			     precis, nitermax, niter) ;
	    }
	    break ;
	}
	
	case UNSURR: {
	    if ( (ff.get_etat()==ETATZERO) ) {
		xi = ( double(1)/rr - beta[lz] ) / alpha[lz]  ;
	    }
	    else {
		assert(ff.get_etat()==ETATQCQ) ; 
		if ( ff.c->t[lz]->get_etat() == ETATZERO) {
		    xi = ( double(1) / rr - beta[lz] ) / alpha[lz]  ;
		}
		else {
		    double xmin = -1 ; 
		    double xmax = 1 ; 
		    xi = zerosec(fonc_invr_map_et_zec, parzerosec, xmin, xmax, 
			     precis, nitermax, niter) ;
		} 
	    }
	    break ;
	}

	default: {
	    cout << "Map_et::val_lx: unknown type_r ! " << endl ;
	    abort () ;
	}	   
    }
    
    
    } // End of search by the secant method

} 




			//------------------------------// 
			//	    val_r_jk		//
			//------------------------------// 

 
double Map_et::val_r_jk(int l, double xi, int j, int k) const {

    assert( l>=0 ) ; 
    assert( l<mg->get_nzone() ) ; 
    
    double resu ; 
    double ftp = ff(l, k, j, 0) ; // value of F_l(theta_j, phi_k)

    switch( mg->get_type_r(l) ) {

	case RARE: {
	    double gtp = gg(l, k, j, 0) ; // value of G_l(theta_j, phi_k)
	    double xi_2 = xi * xi ; 
	    double xi_3 = xi * xi_2 ;
	    double a = xi_2 * xi_2 * (3. - 2.*xi_2) ;
	    double b =  ( 2.5  - 1.5 * xi_2 ) * xi_3 ;
	    resu = alpha[l] * ( xi + a * ftp + b * gtp ) + beta[l] ;
	    break ;
	}
	
	case FIN: {
	    double gtp = gg(l, k, j, 0) ; // value of G_l(theta_j, phi_k)
	    double xm1 = xi - 1. ; 
	    double xp1 = xi + 1. ; 
	    double a = 0.25* xm1 * xm1 * (xi + 2.) ;
	    double b = 0.25* xp1 * xp1 * (2. - xi) ;
	    resu = alpha[l] * ( xi + a * ftp + b * gtp ) + beta[l] ;
	    break ;
	}

	case UNSURR: {
	    double xm1 = xi - 1. ; 
	    double a = 0.25* xm1 * xm1 * (xi + 2.) ;
	    resu = double(1) / ( alpha[l] * ( xi + a * ftp ) + beta[l] ) ;
	    break ;
	}

	default: {
	    cout << "Map_et::val_r_jk: unknown type_r ! " << endl ;
	    abort () ;
	}	   
    }
             
    return resu ;    

}
			
			//------------------------------// 
			//	    val_lx_jk		//
			//------------------------------// 

void Map_et::val_lx_jk(double rr, int j, int k, const Param& par, 
			    int& lz, double& xi) const {
			   
    int nz = mg->get_nzone() ;

    // Precision in the secant method :
    // ------------------------------
    
    int nitermax = par.get_int() ; 
    int& niter = par.get_int_mod() ; 
    niter = 0 ;	    // initialisation 
    double precis = par.get_double() ; 
    
    // Particular case of r = infinity
    //--------------------------------
    if (rr == __infinity) { 
	if ( (mg->get_type_r(nz-1) == UNSURR) && 
	     (alpha[nz-1] == - beta[nz-1]) ) {
	    lz = nz - 1 ; 
	    xi = 1 ;		 
	}
	else {
	    cout.precision(16);
	    cout.setf(ios::showpoint);
	    cout << "Map_et::val_lx_jk: the domain containing r = " << rr <<
		 " has not been found ! " 
	      << endl ;
	    abort () ;
	}
	return ; 
    }
    

    // In which domain is located r ? 
    // ----------------------------
    lz = - 1 ;
    double rmax = 0 ; 
    double ftp = double(0) ; 
    double gtp = double(0) ; 
    for (int l=0; l<nz; l++) {
		
	switch( mg->get_type_r(l) ) {

	case RARE: {
	    ftp = ff(l, k, j, 0) ; // value of F_l(theta_j, phi_k)
	    gtp = gg(l, k, j, 0) ; // value of G_l(theta_j, phi_k)
	    rmax = alpha[l] * ( double(1) + ftp + gtp ) + beta[l] ;
	    break ;
	}
	
	case FIN: {
	    ftp = double(0) ; 
	    gtp = gg(l, k, j, 0) ; // value of G_l(theta_j, phi_k)
	    rmax = alpha[l] * ( double(1) + gtp ) + beta[l] ;
	    break ;
	}
	
	case UNSURR: {
	    ftp = double(0) ; 
	    gtp = double(0) ; 
	    rmax = double(1) / ( alpha[l] + beta[l] ) ; 
	    break ;
	}

	default: {
	    cout << "Map_et::val_lx_jk: unknown type_r ! " << endl ;
	    abort() ;
	}	   
	}   // end of switch on type_r


	if ( rr <= rmax + 1.e-14 ) { 
	    lz = l ;
	    if (ftp == double(0)) ftp = ff(l, k, j, 0) ;
	    if (gtp == double(0)) gtp = gg(l, k, j, 0) ;
	    break ; 
	}	
    }		// End of loop onto the domains
    
    if (lz == -1) {		    // The domain has not been found
	cout.precision(16);
	cout.setf(ios::showpoint);
	cout << "Map_et::val_lx_jk: the domain containing r = " << rr <<
		 " has not been found ! " 
	      << endl ;
	for (int l=0; l<nz; l++) {
	    ftp = ff(l, k, j, 0) ;
	    gtp = gg(l, k, j, 0) ; 
	    switch( mg->get_type_r(l) ) {
		case RARE: {
		    rmax = alpha[l] * ( double(1) + ftp + gtp ) + beta[l] ;
		    break ;
		}
		case FIN: {
		    rmax = alpha[l] * ( double(1) + gtp ) + beta[l] ;
		    break ;
		}
		case UNSURR: {
		    rmax = double(1) / ( alpha[l] + beta[l] ) ; 
		    break ;
		}
		default: {
		    cout << "Map_et::val_lx_jk: unknown type_r ! " << endl ;
		    abort () ;
		}	   
	    }   // end of switch on type_r

	    cout << "domain: " << l << "   j = " << j << "   k = " << k
		 << " :  rmax = " << rmax << endl ; 
	}
	abort() ;
    }

    // Computation of xi
    // ----------------- 

    if ( (rr >= rmax) && ( rr <= rmax + 1.e-14) ) {
	xi = double(1) ; 
    }
    else {

    // Search of xi by the secant method
    // ---------------------------------

    Param parzerosec ;
    parzerosec.add_double(rr, 0) ; 
    parzerosec.add_double(ftp, 1) ; 
    parzerosec.add_double(gtp, 2) ; 
    parzerosec.add_double(alpha[lz], 3) ; 
    parzerosec.add_double(beta[lz], 4) ; 


    switch( mg->get_type_r(lz) ) {

	case RARE: {
	    if ( (ff.get_etat()==ETATZERO) && (gg.get_etat()==ETATZERO) ) {
		xi = ( rr - beta[lz] ) / alpha[lz]  ;
	    }
	    else {
		double xmin = 0 ; 
		double xmax = 1 ; 
		xi = zerosec(fonc_invr_map_et_noyau, parzerosec, xmin, xmax, 
			     precis, nitermax, niter) ;
	    }
	    break ;
	}
	
	case FIN: {
	    if ( (ff.get_etat()==ETATZERO) && (gg.get_etat()==ETATZERO) ) {
		xi = ( rr - beta[lz] ) / alpha[lz]  ;
	    }
	    else {
		double xmin = -1 ; 
		double xmax = 1 ; 
		xi = zerosec(fonc_invr_map_et_coq, parzerosec, xmin, xmax, 
			     precis, nitermax, niter) ;
	    }
	    break ;
	}
	
	case UNSURR: {
	    if ( (ff.get_etat()==ETATZERO) ) {
		xi = ( double(1)/rr - beta[lz] ) / alpha[lz]  ;
	    }
	    else {
		assert(ff.get_etat()==ETATQCQ) ; 
		if ( ff.c->t[lz]->get_etat() == ETATZERO) {
		    xi = ( double(1) / rr - beta[lz] ) / alpha[lz]  ;
		}
		else {
		    double xmin = -1 ; 
		    double xmax = 1 ; 
		    xi = zerosec(fonc_invr_map_et_zec, parzerosec, xmin, xmax, 
			     precis, nitermax, niter) ;
		} 
	    }
	    break ;
	}

	default: {
	    cout << "Map_et::val_lx_jk: unknown type_r ! " << endl ;
	    abort () ;
	}	   
    }
    
    
    } // End of search by the secant method
} 


//=============================================================================//
//				Auxilary functions			       //
//=============================================================================//
	   
double fonc_invr_map_et_noyau(double x, const Param& par) {

    double r = par.get_double(0) ;
    double f = par.get_double(1) ;
    double g = par.get_double(2) ;
    double alp = par.get_double(3) ;
    double bet = par.get_double(4) ;
    double x_2 = x * x ; 
    double x_3 = x_2 * x ;
    double a = x_2 * x_2 * (3. - 2.*x_2) ;
    double b =  ( 2.5  - 1.5 * x_2 ) * x_3 ;
    
    return alp * ( x + a * f + b * g ) + bet - r ;
 
}

//****************************************************************************

double fonc_invr_map_et_coq(double x, const Param& par) {

    double r = par.get_double(0) ;
    double f = par.get_double(1) ;
    double g = par.get_double(2) ;
    double alp = par.get_double(3) ;
    double bet = par.get_double(4) ;
    double xm1 = x - 1. ;
    double xp1 = x + 1. ;
    double a = 0.25* xm1 * xm1 * (x + 2.) ;
    double b = 0.25* xp1 * xp1 * (2. - x) ;
    
    return alp * ( x + a * f + b * g ) + bet - r ;
 
}
	   
//****************************************************************************

double fonc_invr_map_et_zec(double x, const Param& par) {

    double r = par.get_double(0) ;
    double f = par.get_double(1) ;
    double alp = par.get_double(3) ;
    double bet = par.get_double(4) ;
    double xm1 = x - 1. ;
    double a = 0.25* xm1 * xm1 * (x + 2.) ;
    
    return alp * ( x + a * f ) + bet - double(1) / r ;
 
}

}