Hi Lucas,

So it sounds as if you've already worked out what's happening here. We 
consider 3 cases, namely what to do for newton iteration equal to 0, equal 
to 1, and greater than 1.

For iteration == 0 and iteration == 1, the early return on line 2468 
<https://github.com/dealii/dealii/blob/master/examples/step-44/step-44.cc?utf8=%E2%9C%93#L2468>
 
is not satisfied and we have to build some dirichlet constraints. Which 
constraints are build is governed by the iteration number: if it is equal 
to zero, then apply_dirichlet_BC 
<https://github.com/dealii/dealii/blob/master/examples/step-44/step-44.cc?utf8=%E2%9C%93#L2471>
 
is set true and we build non-homogeneous constraints (the "if" case). On 
the next visit to this function (iteration == 1) this flag is set to false 
and we build only homogeneous constraints (the "else" case). At subsequent 
iterations we use the early return that I previously mentioned to make no 
further changes to the existing constraint matrix. This is because it is 
already filled with the homogeneous constraints, which is what we want for 
all newton iterations > 0.

Does this make sense?

Regards,
Jean-Paul

On Monday, August 28, 2017 at 4:14:31 PM UTC+2, Lucas Campos wrote:
>
> > This calculation does not happen anyway, because of the early return in 
> line 2466. 
>
> Just a minor correction for the previous sentence: The guard on line 2466 
> will be true only on the second iterations. The else paths will still be 
> taken at least once.
>
> On Monday, 28 August 2017 16:02:01 UTC+2, Lucas Campos wrote:
>>
>> Dear all,
>>
>> First of all, thanks for the great library! I spent the last few days 
>> reading your (very!) extensive 
>> documentation and I think it will be really useful for me in the near 
>> future. 
>>
>> Right now I am struggling a bit on understanding some things on step-44. 
>> Most pressing right 
>> now is that, in Section Solid::make_constraints of the tutorials, we 
>> have 
>>
>> > However, since we are dealing with an iterative Newton method, it 
>> should be noted 
>> > that any displacement constraints should only be specified at the 
>> zeroth iteration 
>> > and subsequently no additional contributions are to be made since the 
>> constraints 
>> > are already exactly satisfied.
>>
>> However, reading the code underneath, the code under the if-else blocks 
>> are the same (around 
>> line 2490 of step-44.cc). That is to say, we would run the same 
>> computation whether the condition 
>> is true or false. This calculation does not happen anyway, because of the 
>> early return in line 2466. 
>> If we disregard this early return, would this code be wrong, or is there 
>> something I am not seeing?
>>
>> Bests,
>> Lucas 
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to