2import sys, string, os, time
4import matplotlib.pyplot
as plt
5from matplotlib
import cm
6plt.rcParams[
'text.usetex'] =
True
7sys.path.append(
"../../python")
8from modlibUtils
import *
9sys.path.append(
"../../build/tools/pyMoDELib")
15materialFile=
"../../Library/Materials/W.txt"
16mat=pyMoDELib.PolycrystallineMaterialBase(materialFile,300)
18P0=np.array([0.0,0.0,0.0])
19P1=np.array([1.0,0.0,0.0])
20b=np.array([1.0,0.0,0.0])
21x=np.array([1.0,1.0,1.0])
22ss=pyMoDELib.StressStraight(mat,P0,P1,b,0.0)
23start_time = time.perf_counter()
24for i
in range(0,10000000):
26end_time = time.perf_counter()
27execution_time = end_time - start_time
28print(f
"Execution time: {execution_time} seconds")