Screen snapshot from 0.3:
| | |_| | | | (_| | | Version 0.3.2+2 (2014-10-22 01:21 UTC)
_/ |\__'_|_|_|\__'_| | release-0.3/6babc84* (fork: 180 commits, 127 days)
|__/ | x86_64-w64-mingw32
julia> cd( "C:/Users/pkrysl/Documents/Research/Software folder/FEA software
folder/jfineale")
julia> include("run.jl")
elapsed time: 25.926594999 seconds (4718450148 bytes allocated, 4.67% gc
time)
elapsed time: 1.38183297 seconds (447862032 bytes allocated, 17.41% gc time)
elapsed time: 4.41040355 seconds (994818988 bytes allocated, 8.41% gc time)
elapsed time: 6.205788229 seconds (1033497984 bytes allocated, 3.36% gc
time)
elapsed time: 1.640335364 seconds (9178772 bytes allocated)
Total time elapsed = 47.15700006484985 [s]
Error =[9.898712337585991e-6]
true
Screen snapshot from 0.4:
| | |_| | | | (_| | | Version 0.4.0-dev+2070 (2014-12-11 10:19 UTC)
_/ |\__'_|_|_|\__'_| | Commit f2b5a11 (3 days old master)
|__/ | x86_64-w64-mingw32
julia> cd( "C:/Users/pkrysl/Documents/Research/Software folder/FEA software
folder/jfineale")
julia> include("run.jl")
elapsed time: 49.525998429 seconds (12776199732 bytes allocated, 9.74% gc
time)
elapsed time: 1.437797557 seconds (480349188 bytes allocated, 18.38% gc
time)
elapsed time: 3.891789679 seconds (994714084 bytes allocated, 10.87% gc
time)
elapsed time: 5.735681081 seconds (1020271524 bytes allocated, 3.69% gc
time)
elapsed time: 0.226641073 seconds (9742992 bytes allocated)
Total time elapsed = 70.69000005722046 [s]
Error =[9.898714081968407e-6]
true
Version 0.4 allocates three times as much memory in the first operation.
Most of the work in that operation is done in this loop
....
for j=1:npts # Loop over quadrature points
#FESetModule.Jacobianmatrix!(self.femmbase.fes, J, x,
gradNparams[j]); # calculate the Jacobian matrix
At_mul_B!(J, x, gradNparams[j]); # calculate the Jacobian matrix
Jac = FESetModule.Jacobianvolume(self.femmbase.fes,conn, Ns[j],
J, x);
FEMMBaseModule.getRm!(self.femmbase,Rm,Ns[j]'*x,J,labels[i]); #
Material orientation matrix
#gradN = gradNparams[j]/(Rm'*J); # gradient WRT material
coordinates
At_mul_B!(RmTJ, Rm, J); # local Jacobian matrix
gradN = gradNparams[j]/RmTJ; # gradient WRT material coordinates
# Ke = Ke + gradN*(kappa_bar*(Jac*w[j]))*gradN' ; #this product
is also implemented in steps below
# This is slightly faster than the vectorized code above:
for nx=1:Kedim
for kx=1:sdim
for px=1:sdim
for mx=1:Kedim
Ke[mx,nx] = Ke[mx,nx] +
gradN[mx,px]*((Jac*w[j])*kappa_bar[px,kx])*gradN[nx,kx]
end
end
end
end
end # Loop over quadrature points
...
Petr