LORENE
map_et_resize_extr.C
1/*
2 * Method of the class Map_et to compute the rescale of the outermost domain
3 * in the case of non-compactified external domain.
4 *
5 * (see file map.h for documentation).
6 *
7 */
8
9/*
10 * Copyright (c) 2004 Keisuke Taniguchi
11 *
12 * This file is part of LORENE.
13 *
14 * LORENE is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2
16 * as published by the Free Software Foundation.
17 *
18 * LORENE is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with LORENE; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 */
28
29char map_et_resize_extr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_et_resize_extr.C,v 1.3 2014/10/13 08:53:05 j_novak Exp $" ;
30
31/*
32 * $Id: map_et_resize_extr.C,v 1.3 2014/10/13 08:53:05 j_novak Exp $
33 * $Log: map_et_resize_extr.C,v $
34 * Revision 1.3 2014/10/13 08:53:05 j_novak
35 * Lorene classes and functions now belong to the namespace Lorene.
36 *
37 * Revision 1.2 2014/10/06 15:13:13 j_novak
38 * Modified #include directives to use c++ syntax.
39 *
40 * Revision 1.1 2004/11/30 20:54:24 k_taniguchi
41 * *** empty log message ***
42 *
43 *
44 * $Header: /cvsroot/Lorene/C++/Source/Map/map_et_resize_extr.C,v 1.3 2014/10/13 08:53:05 j_novak Exp $
45 *
46 */
47
48// C headers
49#include <cassert>
50
51// Lorene headers
52#include "map.h"
53
54namespace Lorene {
55void Map_et::resize_extr(double lambda) {
56
57 // Protections
58 // -----------
59 int l = mg->get_nzone() - 1 ;
60
61 if (mg->get_type_r(l) != FIN) {
62 cout << "Map_et::resize_extr can be applied only to a shell !"
63 << endl ;
64 abort() ;
65 }
66
67 // Assertion
68 // ---------
69 assert(mg->get_nzone() >= 3) ; // The outermost domain should be
70 // a spherical shell in this method.
71
72 // New values of alpha and beta in the outermost domain :
73 // ----------------------------------------------------
74 double n_alpha = 0.5 * ( (lambda + 1.) * alpha[l]
75 + (lambda - 1.) * beta[l] ) ;
76
77 double n_beta = 0.5 * ( (lambda - 1.) * alpha[l]
78 + (lambda + 1.) * beta[l] ) ;
79
80 alpha[l] = n_alpha ;
81 beta[l] = n_beta ;
82
83 // The coords are no longer up to date :
84 reset_coord() ;
85
86}
87}
void resize_extr(double lambda)
Rescales the outer boundary of the outermost domain in the case of non-compactified external domain.
double * beta
Array (size: mg->nzone ) of the values of in each domain.
Definition map.h:2760
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition map.h:2758
virtual void reset_coord()
Resets all the member Coords.
Definition map_et.C:628
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
Definition map.h:676
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Definition grilles.h:474
Lorene prototypes.
Definition app_hor.h:64