Open TTitscher opened 6 years ago
As pointed out by @joergfunger, the evaluation of the residual does not help the solver to actually solve the mixed problem. So the above options are pointless and we need something like a preconditioner. Some quick ideas:
The above mentioned procedure (just take the norm of each individual residual) works generally well for the implicit problems with direct solvers, because they are very robust with respect to the condition number of the matrix. For iterative solvers or when using an explicit time integration scheme, we should use a preconditioner. There are many preconditioners available that differ in the complexity of their computation and the benefit with respect to the condition number of the problem, but almost all (apart from the very simple one that applies a constant scaling factor for each dof type) work on the global matrices (or some part of it), thus I would suggest to put this into into the assembler, either at the element matrix level before inserting the matrix into the global matrix or by applying this after the matrix has been assembled.
Problem
In monolithic multi-physics problems, different dof types may correspond to different dimensions. This may result in different magnitudes of the residual function. Imagine, we calculate in SI base units an one residual is in the order of
1e5 [Newton]
and another one in1e-8 [Volt]
. Both differ in many orders of magnitude and should not be evaluated with the same tolerance.Solution
One idea based on the current implementation:
R
vector, asor as in
oldNuTo
DofContainer<double>
to store the tolerancesNorm(R)
asDofContainer<double>
DofVector<double>::Norm()
bool operator<(const DofContainer<double>& lhs, const DofContainer<double>& rhs)
DofContainer
now has to know its dofs (not implemented currently)DofContainer<double>
to collect the methodsIn the end, I do not care about the details. But I think this is an essential feature.