Thanks a lot Chris and Kristoffer. It works now.
On Wednesday, 24 August 2016 14:29:52 UTC+10, Nguyen Vinh Phu wrote:
>
> Hello all,
>
> I am implementing a finite element solver in Julia. I have computed the
> stiffness matrix (as a sparse matrix K) and the force vector (F). I have
> some non z
Assuming you have the free dof numbers in d_free, the prescribed dofs in
d_pres, the values of the non zero DBC in a_pres the solution to the free
dofs a_free is:
a_free = K[d_free, d_free] \ (f[d_free] - K[d_free, d_pres] * a_pres)
It will probably be faster than what you are doing now
On
In Julia you use [] for dereference. So changes things to K[udofs,:]=0 .
Comments are #. Semicolins aren't necessary in scripts.
You might want to check out this page of the
manual: http://docs.julialang.org/en/release-0.4/manual/noteworthy-differences/
On Tuesday, August 23, 2016 at 9:29:52 PM