Description
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