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
29
30
31/*
32 * $Id: map_et_resize_extr.C,v 1.4 2016/12/05 16:17:58 j_novak Exp $
33 * $Log: map_et_resize_extr.C,v $
34 * Revision 1.4 2016/12/05 16:17:58 j_novak
35 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
36 *
37 * Revision 1.3 2014/10/13 08:53:05 j_novak
38 * Lorene classes and functions now belong to the namespace Lorene.
39 *
40 * Revision 1.2 2014/10/06 15:13:13 j_novak
41 * Modified #include directives to use c++ syntax.
42 *
43 * Revision 1.1 2004/11/30 20:54:24 k_taniguchi
44 * *** empty log message ***
45 *
46 *
47 * $Header: /cvsroot/Lorene/C++/Source/Map/map_et_resize_extr.C,v 1.4 2016/12/05 16:17:58 j_novak Exp $
48 *
49 */
50
51// C headers
52#include <cassert>
53
54// Lorene headers
55#include "map.h"
56
57namespace Lorene {
58void Map_et::resize_extr(double lambda) {
59
60 // Protections
61 // -----------
62 int l = mg->get_nzone() - 1 ;
63
64 if (mg->get_type_r(l) != FIN) {
65 cout << "Map_et::resize_extr can be applied only to a shell !"
66 << endl ;
67 abort() ;
68 }
69
70 // Assertion
71 // ---------
72 assert(mg->get_nzone() >= 3) ; // The outermost domain should be
73 // a spherical shell in this method.
74
75 // New values of alpha and beta in the outermost domain :
76 // ----------------------------------------------------
77 double n_alpha = 0.5 * ( (lambda + 1.) * alpha[l]
78 + (lambda - 1.) * beta[l] ) ;
79
80 double n_beta = 0.5 * ( (lambda - 1.) * alpha[l]
81 + (lambda + 1.) * beta[l] ) ;
82
83 alpha[l] = n_alpha ;
84 beta[l] = n_beta ;
85
86 // The coords are no longer up to date :
87 reset_coord() ;
88
89}
90}
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:2778
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition map.h:2776
virtual void reset_coord()
Resets all the member Coords.
Definition map_et.C:651
Lorene prototypes.
Definition app_hor.h:67