901 reputation
715
bio website
location Universidade de São Paulo, Brazil
age 29
visits member for 2 years, 10 months
seen Mar 24 at 18:13

I am currently a post-doc at the Physics department at the University of Sao Paulo. My interests are in Statistical Physics, stochastic processes and magnetism. More importantly, I really value simple and solid explanations to important problems in any science.


Aug
1
comment Converting other C++ classes to MTensor in LibraryLink
@LeonidShifrin I'm sorry Mr. Shifrin. I am still learning about LibraryLink and most of what you said I did not understand. Say I have a 2x2 matrix a[i][j]. Then what I want is to define a 2x2 MTensor m such that m[i][j]=a[i][j]. Hopefully, it would be nice to do this without a double for loop with m[i][j]=a[i][j].
Jul
31
comment Converting other C++ classes to MTensor in LibraryLink
@LeonidShifrin I have edited the question with a situation where it is possible to access the data via a pointer. In that case, a simple solution exists?
Jul
31
revised Converting other C++ classes to MTensor in LibraryLink
added 290 characters in body
Jul
31
asked Converting other C++ classes to MTensor in LibraryLink
Jul
27
comment Efficient Langevin Equation Solver
@acl I am not sure how to do this. But I note that it depends strongly on the choice of parameters and, since the equations are non-linear, I am not sure a closed form solution for this has been found.
Jul
27
comment Methods to speed up numerical NDSolve, NIntegrate,
@ruebenko Ok, sure thing! :)
Jul
27
awarded  Editor
Jul
27
accepted Efficient Langevin Equation Solver
Jul
27
revised Efficient Langevin Equation Solver
Included some nice code from ACL and two implementations for vector systems.
Jul
27
awarded  Teacher
Jul
27
answered Methods to speed up numerical NDSolve, NIntegrate,
Jul
26
comment Efficient Langevin Equation Solver
I just tried running an index through through the NestList with pre-generated RandomVariate; apparently it is slower.
Jul
26
awarded  Commentator
Jul
26
comment Efficient Langevin Equation Solver
acl, your timing is the same as mine i Think. In the first one you compute two simulations (data1 and data2) and in the second one you compute only one. Both have similar run times, and given the simplicity of NestList + the ability to accept any function, I don't really see much advantage.
Jul
26
comment Efficient Langevin Equation Solver
I don't think so. This only generates the random numbers once. $r$ must be re-computed within each iteration. Ideally this would be done with r = RandomVariate[NormalDistribution[0,s],{m,n}]. But then you can't really nest this matrix; or at least I don't really know how.
Jul
26
comment Efficient Langevin Equation Solver
Hi Jagra. I thought about using a single RandomVariate. But I couldn't really figure out how to efficiently Nest that.
Jul
26
awarded  Nice Question
Jul
26
asked Efficient Langevin Equation Solver
Jul
23
awarded  Nice Question
Jul
23
awarded  Supporter