Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
At the moment I could solve it by implementing an adaptive step size, from 0.1 to 0.25 to 0.5, then the problem does not arise and the solution converges fast enough. Still I noted that when using other values for the maximal and minimal grid density I again get the problem with the non-converg

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
If I understand you correctly: I should either recheck my matrix assembly, or test a smaller step when my solution stalls, even though that goes against my understanding of the Newton method (step size increases)? I noted that (when stalling) my residual value was approximately half the l2-norm

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
Step-15 uses a fixed alpha = 0.1, but in the suggestions it is proposed to increase alpha to 1, when suitable in order to increase convergence. I am also using a fixed alpha of 0.1 at the moment, thus it will never go to zero. Am Freitag, 6. Oktober 2017 15:27:40 UTC+2 schrieb Wolfgang Bangerth

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread Wolfgang Bangerth
On 10/06/2017 07:20 AM, 'Maxi Miller' via deal.II User Group wrote: Isn't that basically the method done in step-15 and step-33 (line search)? But why should my step length (I assume it is alpha) go to zero? Or is it the newton-update (which also should go to zero, when being close to the soluti

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
Isn't that basically the method done in step-15 and step-33 (line search)? But why should my step length (I assume it is alpha) go to zero? Or is it the newton-update (which also should go to zero, when being close to the solution)? Am Freitag, 6. Oktober 2017 15:13:08 UTC+2 schrieb Wolfgang Ba

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread Wolfgang Bangerth
Currentl2 norm is0.003245 Residual:0.001620 Currentl2 norm is0.003245 Residual:0.001620 | with the l2-norm as the l2-norm of the RHS, and the residual calculated as shown above. Do you do a line search? Is your step length going to zero? Best W. -- ---

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
Short update: Changing the threshold from 1e-6 to 1e-8 did not change anything, it still loops at the same values as final values. Am Freitag, 6. Oktober 2017 11:56:59 UTC+2 schrieb Maxi Miller: > > Concerning the first point: > Currently I am controlling the solver as in > SolverControl

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
Concerning the first point: Currently I am controlling the solver as in SolverControl solver_control (dof_handler.n_dofs(), (system_rhs.l2_norm() > 0) ? 1e-6 * system_rhs.l2_norm() : 1e-6); Is your suggestion to decrease that threshold? Concerning the

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-06 Thread 'Maxi Miller' via deal.II User Group
Unfortunately that was not the reason for my problem (even though it was a nice addition). My current program output is Refined mesh 23 Refining mesh Adding boundary conditions Calculating initial residual Initial Residual: 0.001626 Current l2 norm is 0.003256 Residual: 0.

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread Andrew McBride
I’m a bit confused by what you are asking. The entries in the residual vector corresponding to constrained dofs will converge to a non-zero number. Those corresponding to unconstrained dofs should converge to zero. As is stated in step-15 … we have to set to zero the elements of the residual ve

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread 'Maxi Miller' via deal.II User Group
Compared to the target value? Depending on the values between ~1e-6 and 2e-3, but it can be larger, too. I will check the latter function and compare it to the current solution, but I thought by using ZeroFunction as boundary condition that then all boundary_dofs are set to zero. Am Donnerstag,

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread Timo Heister
> Isn't the 'distribute'-line doing exactly that? Or is that a mistake? No, set_zero() will set the entries to zero, distribute() will set them to their correct nonzero entry. Also, how small are the errors that you are getting when it levels off? -- Timo Heister http://www.math.clemson.edu/~he

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread 'Maxi Miller' via deal.II User Group
Isn't the 'distribute'-line doing exactly that? Or is that a mistake? Am Donnerstag, 5. Oktober 2017 18:24:58 UTC+2 schrieb mac: > > I’m referring specifically to a line similar to the following where all > entries in the residual associated with constrained dofs are zeroed: > > for (unsigned int

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread Andrew McBride
I’m referring specifically to a line similar to the following where all entries in the residual associated with constrained dofs are zeroed: for (unsigned int i=0; ihttp://www.dealii.org/developer/doxygen/deal.II/classDoFHandler.html#a54e7270f2ba6206604f794114b39a2aa>(); ++i) if (boundary_dofs

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread 'Maxi Miller' via deal.II User Group
I assume so. My approach to ensure that is: I create a ConstraintMatrix called "Newton_constraints", initialize it as following: newton_constraints.clear(); newton_constraints.reinit(solution_relevant_partitioning); DoFTools::make_hanging_node_constraints(dof_handler, newton_constraints); VectorT

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread Andrew McBride
Are you ensuring that the entries in F(U) associated with the constrained dofs are set to zero? As shown in http://www.dealii.org/developer/doxygen/deal.II/step_15.html#MinimalSurfaceProblemcompute_residual

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread 'Maxi Miller' via deal.II User Group
Yes, I forgot to clarify. I am calculating the l2-norm of the right hand side, i.e. which contains F(U) (when staying in the terminology of step-15). According to my knowledge that should go to zero, after that is the whole goal of the Newton iteration (if my understanding of the method is corr

Re: [deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread Wolfgang Bangerth
On 10/05/2017 08:52 AM, 'Maxi Miller' via deal.II User Group wrote: Having a nonlinear, time-dependent heat equation, I tried to implement it as in step-15 and in step-33. Everytime my l2-value goes below a certain threshold, The l2 norm of what? The solution? The residual? I make one step i

[deal.II] L2-norm gets decreased to certain value, but stays above threshold

2017-10-05 Thread 'Maxi Miller' via deal.II User Group
Having a nonlinear, time-dependent heat equation, I tried to implement it as in step-15 and in step-33. Everytime my l2-value goes below a certain threshold, I make one step in time (or I refine the mesh). At the beginning the L2-value goes down rather fast, but later it slows down, and even sto