On 9/5/24 11:55, Mark Simmons wrote:
my question is:
Is there a way that for the second variable y, that I only assemble the
system matrix once on the first time step and then use this matrix in
subsequent calculations? I have a proof that shows stability of this new
method but I am not sure how my matrix is being calculated.
Mark:
you only assemble the matrix where your code says to assemble the
matrix. So if your run() function is essentially of the form...
void MyProblem::run()
{
for (iteration=0; ...)
{
x.assemble();
x.solve();
y.assemble();
y.solve();
}
}
...then your code is assembling the y matrix in every iteration. If
that's not what you want, you need to change your code -- perhaps to
something like this:
void MyProblem::run()
{
y.assemble(); // do it once before the iteration
for (iteration=0; ...)
{
x.assemble();
x.solve();
// no assembly any more here
y.solve();
}
}
I will note that if you write "I am not sure how my matrix is being
calculated" then apparently you do not actually understand how your
program is working. This is not something we can help you with: *You*
are the author of your program, and *you* need to be confident that you
understand how your program works or how else can you be confident that
it is actually computing things that are correct?
Best
W.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/6633d6cc-8e3c-474c-bb73-96bb084f3291%40colostate.edu.