Explorar el Código

Starting inhomogeneous bdry conditions.

iss2
Trevor Irons hace 8 años
padre
commit
3b250886e3
Se han modificado 3 ficheros con 15 adiciones y 6 borrados
  1. 3
    3
      examples/borehole/sphere.geo
  2. 2
    2
      examples/borehole/sphereBox.geo
  3. 10
    1
      src/FEM4EllipticPDE.cpp

+ 3
- 3
examples/borehole/sphere.geo Ver fichero

@@ -8,10 +8,10 @@
8 8
  */
9 9
 
10 10
 radius = 2.25;     // Radius of the damn thing
11
-lc = 15*radius;     //  0.25;   // Target element size
11
+lc = radius/6;     //  0.25;   // Target element size
12 12
 
13 13
 // Total Solution Space
14
-Box = 100*radius; // The down side of potential
14
+Box = 12*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/10; ///10;
22
+cellSize=radius/6; ///10;
23 23
 dd = 0 ; //  1e-5; //cellSize; // .01;
24 24
 pio2=Pi/2;
25 25
 

+ 2
- 2
examples/borehole/sphereBox.geo Ver fichero

@@ -11,10 +11,10 @@ D0 = 10;          // Top of magnet
11 11
 D1 = 11;          // Bottom of magnet
12 12
 radius = 2.25;     // Radius of the damn thing
13 13
 
14
-lc = 10*radius;   //  0.25;   // Target element size
14
+lc = 2*radius;   //  0.25;   // Target element size
15 15
 
16 16
 // Total Solution Space
17
-Box = 100*radius; // The down side of potential
17
+Box = 12*radius; // The down side of potential
18 18
 X0 = -Box;
19 19
 X1 =  Box;
20 20
 Y0 = -Box;

+ 10
- 1
src/FEM4EllipticPDE.cpp Ver fichero

@@ -309,6 +309,7 @@ namespace Lemma {
309 309
                 ID[3] = Ids->GetId(3);
310 310
 
311 311
             Real sigma_bar(0);
312
+            /*
312 313
             if (GCell) {
313 314
                 sigma_bar = vtkGrid->GetCellData()->GetScalars("G")->GetTuple1(ic);
314 315
             } else {
@@ -318,7 +319,15 @@ namespace Lemma {
318 319
                 sigma_bar += vtkGrid->GetPointData()->GetScalars("G")->GetTuple1(ID[3]);
319 320
                 sigma_bar /= 4.;
320 321
             }
321
-            sigma_bar = 1.;
322
+            */
323
+            Real xc = C.col(1).array().mean();
324
+            Real yc = C.col(2).array().mean();
325
+            Real zc = C.col(3).array().mean();
326
+            if ( xc >= 2.5 && xc <= 5. && yc>=2.5 && yc <= 5.) {
327
+                sigma_bar = 0.;
328
+            } else {
329
+                sigma_bar = 1.;
330
+            }
322 331
 
323 332
             for (int ii=0; ii<4; ++ii) {
324 333
                 for (int jj=0; jj<4; ++jj) {

Loading…
Cancelar
Guardar