5,293 reputation
2959
bio website
location China
age
visits member for 2 years, 6 months
seen 13 mins ago

Feel free to correct the grammar mistakes in my posts.


Oct
16
revised Coupled Nonlinear Differential Equations Problem
improve the format
Oct
16
comment Using NDSolve to solve a system of coupled PDEs
Hello, welcome to Mathematica.SE! Then please show us the complete code sample, without the definition of V, L, etc. we can't reproduce your problem. BTW, InterpolatingFunction can't be transferred with a simple copy&paste even inside Mathematica. And you may want to have a look at this tool for your code formatting.
Oct
15
comment Smooth Peter de Jong attractor
I'd like to mention that, the "CompileOptions" set in $CCompiler will significantly influence the speed of the code in this case. For GCC, Mathematica uses "CompileOptions"->"-O2" by default, but when I changed it to "CompileOptions"->"-Ofast", I got a 2X speed-up! BTW, with my dual core old machine, your C++ code is even a little slower than the Mathematica code with -Ofast.
Oct
15
awarded  Electorate
Oct
14
comment Has this implementation of FDM touched the speed limit of Mathematica?
@RunnyKine More likely to be a defect of TDM-GCC, I think. Today I learned the basic syntax of C++ for several hours and rewrited the piece of code with it in order to find out if 12s touches the limit of my hardware. The result is, with optimization flag -O3 or -Ofast, the C++ version only costs about 8s in my computer: that's a 1.5X speedup just as you got. So the compiler failed to dig out all the potential of the code.
Oct
13
revised Has this implementation of FDM touched the speed limit of Mathematica?
added 2 characters in body
Oct
11
comment Has this implementation of FDM touched the speed limit of Mathematica?
@AlexeyBobrick No, it won't. ParallelDo isn't in the list, the result of CompilePrint also shows it's indeed not compiled.
Oct
11
revised Has this implementation of FDM touched the speed limit of Mathematica?
added 2 characters in body
Oct
11
comment Has this implementation of FDM touched the speed limit of Mathematica?
@RunnyKine With TDM-GCC 4.8.1, Vista 32bit, ez[[j]] = Compile`GetElement[ez, j]…… even makes the code a bit slower. The Compile`GetElement trick is really amazing, now the code only takes about 13s for steps = 10^7 in my computer, as fast as the Julia version (with the @inbounds macro added). And if I set "CompileOptions"->"-Ofast" when loading the compiler, the timing will reduce to about 12.3s!
Oct
10
comment C compiler options passed by Mathematica
Can it be an issue of compiler installation? Maybe quotation isn't used in some places when the compiler is installed, and it doesn't cause any problem when called from command line but does when called from Mathematica?
Oct
10
reviewed Approve Repeatedly randomly redrawing part of a random sample that matches a certain criterion
Oct
10
reviewed Approve How can I randomize order of elements in a list?
Oct
10
reviewed Approve How can I generate and randomly assign color to annular sectors?
Oct
10
awarded  Nice Question
Oct
10
awarded  Nice Question
Oct
10
reviewed Reject Deleting all characters in a string that do not belong to a small set of elements
Oct
10
reviewed Reject Deleting all characters in a string that do not belong to a small set of elements
Oct
10
comment Bad performance of LengthWhile?
Response from Wolfram company: ……Thank you for your message and the link of the post. I have filed a report on this performance issue of LengthWhile and thank you for bringing it to our attention.……
Oct
10
revised I failed to solve a set of one-dimension fluid mechanics PDEs with NDSolve
Just some tiny modification. When I asked this, I didn't know "@ " can only be used to in the comment and the person you want to call should be also occurred under that post. BTW DNA refers to http://mathematica.stackexchange.com/users/204/drn
Oct
10
comment C compiler options passed by Mathematica
"C:\Program is not recognized……" seems that the white space in the path isn't recognized correctly. I'm not sure about the reason. Did you forget to add double quotation marks somewhere?