Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImplicitSolve in Time dependent operator with Partial Assembly #4261

Open
lmolin3 opened this issue Apr 23, 2024 · 0 comments
Open

ImplicitSolve in Time dependent operator with Partial Assembly #4261

lmolin3 opened this issue Apr 23, 2024 · 0 comments

Comments

@lmolin3
Copy link

lmolin3 commented Apr 23, 2024

Hi,
I've a working version of a Heat transfer solver extending ex16.
For now I'm using AssemblyLevel::LEGACY , but I made most of the changes required to include partial assembly (set assembly level, use supported preconditioners, include ConstrainedOperator for essential bcs, etc...).

I was wondering what would you suggest doing to adapt the code in the ImplicitSolve?
The operator is the same as ex16 plus a mass for the robin bcs T= M + dt K + dt RobinMass.
In all the examples I saw the operator T is always computed from the original assembled matrices, which in my case looks like:

{
               current_dt = dt;
               T = Add(1.0, *Mmat, 1.0, *Mmat_e); // T = M
               if (bcs->GetRobinBcs().size() > 0) // T = M + dt RobinMass
               {
                  auto tmp = ParAdd(Kmat, RobinMassmat);
                  T->Add(current_dt, *tmp);
                  delete tmp;
                  tmp = nullptr;
               }
               else
               {
                  T->Add(current_dt, *Kmat);
               }

               T_e = T->EliminateRowsCols(ess_tdof_list);
               T_solver.SetOperator(*T);
            }

I see that in ex9 Implicit time integration is not supported with partial assembly.

I thought about creating an Operator for du_dt = M^{-1}[-K(u + dtdu_dt) -RobinMass(u + dt*du_dt)] and solve inside the ImplicitSolve with a NewtonSolver, but even in that case the overloaded GetGradient would require access to the matrices M, K, RobinMass.

Thanks,
Leo

@lmolin3 lmolin3 changed the title ImplicitSolve in ODESolver with Partial Assembly ImplicitSolve in Time dependent operator with Partial Assembly Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant