Skip to content

ImplicitSolve in Time dependent operator with Partial Assembly #4261

Closed as not planned
@lmolin3

Description

@lmolin3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions