Debian Codegraph @

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