Browse Source

More work towards non-homogeneous dirichlet.

iss2
Trevor Irons 9 years ago
parent
commit
963146c159

+ 2
- 0
examples/FEM4EllipticPDE_bhmag.cpp View File

@@ -86,6 +86,8 @@ Real Magnet(const Real& x, const Real& y, const Real& z);
86 86
 
87 87
 int main(int argc, char**argv) {
88 88
 
89
+    Eigen::initParallel();
90
+
89 91
     if (argc < 4) {
90 92
         std::cout << "usage: ./utFEMEllipticPDE_bhmag  <g.vtu>  <mesh.vtu>  <results.vtu>" << std::endl;
91 93
         //std::cout << "usage: ./utFEMEllipticPDE_bhmag   <mesh.vtu>  <results.vtu>" << std::endl;

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

@@ -8,10 +8,10 @@
8 8
  */
9 9
 
10 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 13
 // Total Solution Space
14
-Box = 12*radius; // The down side of potential
14
+Box = 6*radius; // The down side of potential
15 15
 X0 = -Box;
16 16
 X1 =  Box;
17 17
 Y0 = -Box;
@@ -19,7 +19,7 @@ Y1 =  Box;
19 19
 Z0 = -Box;
20 20
 Z1 =  Box;
21 21
 
22
-cellSize=radius/6; ///10;
22
+cellSize=radius/11; ///10;
23 23
 dd = 0 ; //  1e-5; //cellSize; // .01;
24 24
 pio2=Pi/2;
25 25
 

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

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

+ 6
- 1
src/FEM4EllipticPDE.cpp View File

@@ -48,7 +48,7 @@ namespace Lemma {
48 48
 	// ====================  LIFECYCLE     =======================
49 49
 
50 50
 	FEM4EllipticPDE::FEM4EllipticPDE(const std::string&name) :
51
-			LemmaObject(name), BndryH(1000), BndrySigma(1000),
51
+			LemmaObject(name), BndryH(10), BndrySigma(10),
52 52
             vtkSigma(NULL), vtkG(NULL), vtkGrid(NULL), gFcn3(NULL) {
53 53
 	}
54 54
 
@@ -320,6 +320,8 @@ namespace Lemma {
320 320
                 sigma_bar /= 4.;
321 321
             }
322 322
             */
323
+
324
+            // TEST VOID IN SIGMA!! TODO DON"T KEEP THIS
323 325
             Real xc = C.col(1).array().mean();
324 326
             Real yc = C.col(2).array().mean();
325 327
             Real zc = C.col(3).array().mean();
@@ -329,6 +331,9 @@ namespace Lemma {
329 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 337
             for (int ii=0; ii<4; ++ii) {
333 338
                 for (int jj=0; jj<4; ++jj) {
334 339
                     /* homogeneous Dirichlet boundary */

Loading…
Cancel
Save