Debian Codegraph @

School05/Thursday/monopole.h

raw symbols SCIP
1 #ifndef __MONOPOLE_H_
2 #define __MONOPOLE_H_
3
4 #include "map.h"
5 #include "scalar.h"
6
7 using namespace Lorene ;
8
9 class Monopole {
10
11 protected:
12 const Map_af& mp ; /// Mapping
13
14 // radius
15 Scalar radius ; /// Scalar containing the radius
16 int nz ; ///Number of domains
17
18 // DATA :
19 double beta ; /// beta parameter
20
21 Scalar big_W ; /// Function W
22 Scalar small_w ; /// Representation of W in terms of w
23
24 Scalar big_H ; /// Function H
25 Scalar small_h ; /// Representation of h in terms of h;
26
27 // Constructors destructor
28 public:
29 explicit Monopole (const Map_af&, double) ; /// Standard constructor
30 Monopole (const Monopole&) ; /// Constructor by copy
31
32 virtual ~Monopole() ; /// Destructor
33
34 // Assigment
35 public:
36 void operator= (const Monopole&) ; /// Assignment to another monopole
37
38 // Accessor :
39 public:
40 const Map_af& get_mp() const {return mp ;} ; /// Return the mapping
41
42 Scalar get_big_W() const {return big_W ;} ; /// Return the field W
43
44 Scalar get_small_w() const {return small_w ;} ; /// Return the field w
45
46 Scalar get_big_H() const {return big_H ;} ; /// Return the field H
47
48 Scalar get_small_h() const {return small_h ;} ; /// Return the field h
49
50 // The numerical methods (at last) :
51 public:
52 void init_big_W() ; /// Initialize big W to an initial guess
53
54 void init_big_H() ; /// Initialize big H to an initial guess
55
56 /*
57 * Computes the auxiliary variable w.
58 */
59 void do_small_w() ;
60
61 /*
62 * Computes big_W from small_w
63 */
64 void do_big_W() ;
65
66 /*
67 * Computes the auxiliary variable h.
68 */
69 void do_small_h() ;
70
71 /*
72 * Computes big_H from small_h
73 */
74 void do_big_H() ;
75
76 /*
77 * Compute the source of the equation for W , using either the small_w version
78 * or the W one, depending on the region
79 */
80
81 Scalar compute_source_W() const ;
82
83 /*
84 * Compute the source of the equation for H , using either the small_h version
85 * or the H one, depending on the region
86 */
87
88 Scalar compute_source_H() const ;
89
90 public:
91 /**
92 * Solve the system by iteration :
93 * prec : required precision.
94 * itemax : number of iterations.
95 * relax : relaxation parameter
96 * returns the actual number of iterations performed
97 **/
98 int solve_config (double prec = 1e-10, int itemax= 200, double relax=0.5) ;
99
100
101 double give_a () const ; /// Computes a
102 double give_b() const ; /// Computes b
103 } ;
104
105 # endif