Marco Santia <marcodsantia(a)gmail.com> writes:
Hello I was wondering if there is a simple way to
extract a matrix
form for the RHS operator in maxwells equations. I was hoping to
experiment with the IMEX-RK routine but that requires a matrix form
the linear RHS operator. I found what I think may be an example of
that in '[thesis-experiments.git] / 2009-11-maxwell-spectrum /
max-spec.py’ but I just wanted to confirm with you that is indeed what
you were doing in the build_mat function. And just for the sake of me
really understanding, would you mind explaining a bit what exactly you
It looks like you are generating a 'unit vector’ for a given degree of
freedom (if we have a column vector of length N then we iterate over N
and say all entries of the column vector is 0 except for the current
iteration), plugging into your RHS function and then iterating. But
I’m not totally sure if i understand why that would work.
Thanks for the great code! very clean and fully featured
Hedge does not presently have the capability to assemble sparse matrices
for operators. What you found is a stopgap measure that will build
*dense* matrices very inefficiently. It'll work if you've got nothing
else, but it's obviously not practical to do this for problems that are
larger than 1000 DOFs or so.
It's possible to put this in as another backend (in fact, hedge had such
a backend at one point), but it's a fair amount of work to do so.