Reputation
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
6 14
Newest
 Yearling
Impact
~15k people reached

Feb
2
comment How Simplify and Assume can be combined on matrix products?
So, how this works in practice. I mean can you revise my above code so as to keep the commutativity while simplifying the Taylor expansion?
Feb
2
accepted How to use Compile for accelerating matrix multiplications?
Feb
2
accepted How to use adaptive precision in matrix computations?
Feb
2
accepted How to speed up filling a matrix as much as possible in a loop?
Feb
2
accepted How to extract and compute on the diagonal entities of a sparse matrix very fast?
Feb
2
comment How can we draw a stencil for discretization of PDEs?
I would like to show the indices, i, j, k and the step-sizes along the three dimensions x,y,z. Furthermore, it would be of interest if e.g. the nine central nodes are colorized with black color and the other nodes are empty.
Feb
2
asked How can we draw a stencil for discretization of PDEs?
Jan
26
awarded  Scholar
Jan
26
accepted Computing the logarithmic spectral norm rapidly
Jan
26
comment Computing the logarithmic spectral norm rapidly
Great. Thank you so much.
Jan
25
comment Computing the logarithmic spectral norm rapidly
Wow. It gives correct results, but may you please let us know where are "the limit" or "the identity matrix" (which are in the mathematical definition) are?
Jan
25
asked Computing the logarithmic spectral norm rapidly
Jan
20
comment How to speed up filling a matrix as much as possible in a loop?
Yes, the cost of calculating the function is the dominant one. But, when the size of the system becomes large, computing the function evaluations and then filling the matrix becomes slow again. I am trying to solve a discretization nonlinear system resulting from a PDE with the above approach. But for large sizes, it is slow. Maybe, it would be better to incorporate the notion of sparsity in your nice answer.
Jan
19
comment How to speed up filling a matrix as much as possible in a loop?
I have a related observation. For large systems ($n>200$), once again filling the matrix is slow. Do you have any ideas to fill the matrix for sparse cases also too fast?
Jan
18
comment Constructing the coefficient matrix in discretization of a PDE
By theoretical, I mean to have the entries of matrix $A$ in a symbolic way so as to find some region of stability based on the involved step sizes hx and hy along the two spatial directions. I believe that MMA could do that, however I am stuck in filling the matrix $A$ with the above piece of code! I obtained the general discretized formula as you may kindly see above, but I do not know how to deal with the doubled dimensions, i.e., $mn\times mn$. Maybe a reordering of the indices or a Kronecker product could produce the final coefficient matrix for some ordinary values $m=n=6$.
Jan
18
comment Constructing the coefficient matrix in discretization of a PDE
Thanks for the comments. They are very useful. Currently, $F$ is nonlinear and I just wish to apply the method of lines. That is why I am using the finite difference scheme. I know that NDSolve`FiniteDifferenceDerivative is really great, but it is hard to extract the matrices with theoretical entries from it. I mean, that is excellent for numerics. However, if you have some worked examples in 2D case, please put them here. Maybe, they could help more.
Jan
18
revised Constructing the coefficient matrix in discretization of a PDE
edited tags
Jan
18
comment Constructing the coefficient matrix in discretization of a PDE
I think the matrix $A$ is going to be a block tri-diagonal matrix.
Jan
18
asked Constructing the coefficient matrix in discretization of a PDE
Jan
14
comment How to speed up filling a matrix as much as possible in a loop?
Wow, your answer is unbelievable. It works perfectly and speed up the process of filling the matrix. Thanks a lot.