Browse Source

More work towards non-homogeneous dirichlet.

iss2
Trevor Irons 8 years ago
parent
commit
963146c159

+ 2
- 0
examples/FEM4EllipticPDE_bhmag.cpp View File

86
 
86
 
87
 int main(int argc, char**argv) {
87
 int main(int argc, char**argv) {
88
 
88
 
89
+    Eigen::initParallel();
90
+
89
     if (argc < 4) {
91
     if (argc < 4) {
90
         std::cout << "usage: ./utFEMEllipticPDE_bhmag  <g.vtu>  <mesh.vtu>  <results.vtu>" << std::endl;
92
         std::cout << "usage: ./utFEMEllipticPDE_bhmag  <g.vtu>  <mesh.vtu>  <results.vtu>" << std::endl;
91
         //std::cout << "usage: ./utFEMEllipticPDE_bhmag   <mesh.vtu>  <results.vtu>" << std::endl;
93
         //std::cout << "usage: ./utFEMEllipticPDE_bhmag   <mesh.vtu>  <results.vtu>" << std::endl;

+ 3
- 3
examples/borehole/sphere.geo View File

8
  */
8
  */
9
 
9
 
10
 radius = 2.25;     // Radius of the damn thing
10
 radius = 2.25;     // Radius of the damn thing
11
-lc = radius/6;     //  0.25;   // Target element size
11
+lc = radius/11;     //  0.25;   // Target element size
12
 
12
 
13
 // Total Solution Space
13
 // Total Solution Space
14
-Box = 12*radius; // The down side of potential
14
+Box = 6*radius; // The down side of potential
15
 X0 = -Box;
15
 X0 = -Box;
16
 X1 =  Box;
16
 X1 =  Box;
17
 Y0 = -Box;
17
 Y0 = -Box;
19
 Z0 = -Box;
19
 Z0 = -Box;
20
 Z1 =  Box;
20
 Z1 =  Box;
21
 
21
 
22
-cellSize=radius/6; ///10;
22
+cellSize=radius/11; ///10;
23
 dd = 0 ; //  1e-5; //cellSize; // .01;
23
 dd = 0 ; //  1e-5; //cellSize; // .01;
24
 pio2=Pi/2;
24
 pio2=Pi/2;
25
 
25
 

+ 1
- 1
examples/borehole/sphereBox.geo View File

14
 lc = 2*radius;   //  0.25;   // Target element size
14
 lc = 2*radius;   //  0.25;   // Target element size
15
 
15
 
16
 // Total Solution Space
16
 // Total Solution Space
17
-Box = 12*radius; // The down side of potential
17
+Box = 6*radius; // The down side of potential
18
 X0 = -Box;
18
 X0 = -Box;
19
 X1 =  Box;
19
 X1 =  Box;
20
 Y0 = -Box;
20
 Y0 = -Box;

+ 6
- 1
src/FEM4EllipticPDE.cpp View File

48
 	// ====================  LIFECYCLE     =======================
48
 	// ====================  LIFECYCLE     =======================
49
 
49
 
50
 	FEM4EllipticPDE::FEM4EllipticPDE(const std::string&name) :
50
 	FEM4EllipticPDE::FEM4EllipticPDE(const std::string&name) :
51
-			LemmaObject(name), BndryH(1000), BndrySigma(1000),
51
+			LemmaObject(name), BndryH(10), BndrySigma(10),
52
             vtkSigma(NULL), vtkG(NULL), vtkGrid(NULL), gFcn3(NULL) {
52
             vtkSigma(NULL), vtkG(NULL), vtkGrid(NULL), gFcn3(NULL) {
53
 	}
53
 	}
54
 
54
 
320
                 sigma_bar /= 4.;
320
                 sigma_bar /= 4.;
321
             }
321
             }
322
             */
322
             */
323
+
324
+            // TEST VOID IN SIGMA!! TODO DON"T KEEP THIS
323
             Real xc = C.col(1).array().mean();
325
             Real xc = C.col(1).array().mean();
324
             Real yc = C.col(2).array().mean();
326
             Real yc = C.col(2).array().mean();
325
             Real zc = C.col(3).array().mean();
327
             Real zc = C.col(3).array().mean();
329
                 sigma_bar = 1.;
331
                 sigma_bar = 1.;
330
             }
332
             }
331
 
333
 
334
+            auto W = VectorXr::Zero(4);
335
+            auto G = GradPhi.block<3,3>(1,1) * GradPhi.block<3,3>(1,1).transpose()*W;
336
+
332
             for (int ii=0; ii<4; ++ii) {
337
             for (int ii=0; ii<4; ++ii) {
333
                 for (int jj=0; jj<4; ++jj) {
338
                 for (int jj=0; jj<4; ++jj) {
334
                     /* homogeneous Dirichlet boundary */
339
                     /* homogeneous Dirichlet boundary */

Loading…
Cancel
Save