On 8/17/21 3:47 AM, Hermes Sampedro wrote:
>
> I am working with step-29 and I would like to compute the solution for
> different frequency values (omega). For now, I am implementing a loop that
> updates /omega/, do the assemble and solve it. However, the simulations are
> slow due to the assembling in every loop iteration. Is there any other way to
> update the value in a more efficient way? Is there any other step example that
> works with that?
The matrix depends on the frequency, so you somehow have to re-build it for
every frequency you consider. On the other hand, it is of the form
A = A1 + omega*A2
if I remember correctly, and so you could pre-compute A1 and A2 and then add
them together with the factor omega. This is how step-26 builds the system
matrix, for example. It avoids the repeated assembly of the matrix.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/