Debian Codegraph @

School05/Thursday/Sol_two_grids/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_W ; /// Mapping for W
13 const Map_af& mp_H ; /// Mapping for H
14
15 // Scalar radius
16 Scalar radius_on_W ;
17 Scalar radius_on_H ;
18 int nz_W ;
19 int nz_H ;
20
21 // DATA :
22 double beta ;
23
24 Scalar big_W ; /// Function W (spherical symetry ?)
25 Scalar small_w ; /// Representation of W in terms of w
26
27 Scalar big_H ; /// Function H
28 Scalar small_h ; /// Auxiliary variable close to r=0 ;
29
30 Scalar big_W_on_H ; /// Function W (spherical symetry ?)
31 Scalar small_w_on_H ; /// Representation of W in terms of w
32
33 Scalar big_H_on_W ; /// Function H
34 Scalar small_h_on_W ; /// Auxiliary variable close to r=0 ;
35
36 // Constructors destructor
37 public:
38 explicit Monopole (const Map_af&, const Map_af&, double) ;
39 /// Standard constructor
40 Monopole (const Monopole&) ; /// Constructor by copy
41 Monopole(const Map_af& , const Map_af&, FILE*) ; /// Constructor from a file
42
43 virtual ~Monopole() ; /// Destructor
44
45 // Assigment
46 public:
47 void operator= (const Monopole&) ; /// Assignment to another monopole
48
49 // Accessor :
50 public:
51 const Map_af& get_mp_on_W() const {return mp_W ;} ; /// Return the mapping
52 const Map_af& get_mp_on_H() const {return mp_H ;} ; /// Return the mapping
53
54 Scalar get_big_W() const {return big_W ;} ; /// Return the field
55 /*
56 * Return the w-representation of the field
57 */
58 Scalar get_small_w() const {return small_w ;} ;
59
60 Scalar get_big_H() const {return big_H ;} ; /// Return the field
61 /*
62 * Return the w-representation of the field
63 */
64 Scalar get_small_h() const {return small_h ;} ;
65
66 Scalar get_big_W_on_H() const {return big_W_on_H ;} ; /// Return the field
67 /*
68 * Return the w-representation of the field
69 */
70 Scalar get_small_w_on_H() const {return small_w_on_H ;} ;
71
72 Scalar get_big_H_on_W() const {return big_H_on_W ;} ; /// Return the field
73 /*
74 * Return the w-representation of the field
75 */
76 Scalar get_small_h_on_W() const {return small_h_on_W ;} ;
77
78 // Output :
79 public :
80 void sauve(FILE *) const ; /// Save to a file
81
82 // The numerical methods (at last) :
83 private:
84 void init_big_W() ; /// Initialize big W to an anzats
85
86 void init_big_H() ; /// Initialize big H to an anzats
87 /*
88 * Computes the auxiliary variable w. Outside the domain zone, we keep
89 * big_W
90 */
91 void do_small_w() ;
92
93 /*
94 * Computes big_W from small_w
95 */
96 void do_big_W() ;
97
98 /*
99 * Computes the auxiliary variable h. Outside the domain zone, we keep
100 * big_H
101 */
102 void do_small_h() ;
103
104 /*
105 * Computes big_H from small_h
106 */
107 void do_big_H() ;
108
109 /*
110 * Compute the source of the equation for W , using either the small_w version
111 * or the W one, depending on the region
112 */
113
114 Scalar compute_source_W() const ;
115
116 /*
117 * Compute the source of the equation for H , using either the small_h version
118 * or the H one, depending on the region
119 */
120
121 Scalar compute_source_H() const ;
122
123 public:
124 /**
125 * Solve system
126 *
127 **/
128 int solve_config (double, int, double) ;
129
130 double give_a () const ;
131 double give_b() const ;
132 Scalar density_on_W() const ;
133 Scalar density_on_H() const ;
134 double energy () const ;
135 } ;
136
137 #endif