瀏覽代碼

try forces

Konstantin Ladutenko 6 年之前
父節點
當前提交
21c590e9ec
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      examples/force-quad.py

+ 8 - 4
examples/force-quad.py

@@ -50,7 +50,7 @@ WL = 550
 x[0] = 2.0*np.pi*core_r/WL#/4.0*3.0
 m[0] = index_Ag/nm
 
-R = x[0]*3.01
+R = x[0]*1.31
 
 comment='bulk-NP-WL'+str(WL)+WL_units
 
@@ -95,7 +95,11 @@ val = quadpy.sphere.integrate(
     [0.0, 0.0, 0.0], R,
     quadpy.sphere.Lebedev(quad_ord)
     )
-
-
-
+print(val)
+print("Random increase of integraion sphere radius...")
+val = quadpy.sphere.integrate(
+    force,
+    [0.0, 0.0, 0.0], R*2.718,
+    quadpy.sphere.Lebedev(quad_ord)
+    )
 print(val)