I understand my mistake now: there are extra hanging nodes constraints in 
the constraint matrix with (hanging nod constraints + PBC) compared to the 
constraint matrix with only hanging node constraints.
That is why the minimal example fails.

Sambit

On Wednesday, April 11, 2018 at 1:00:25 PM UTC-5, Sambit Das wrote:
>
>
>>> true, but I don't see why you would have the same norms if you 
>> distribute with constraints from hanging nodes only or constraints from 
>> hanging nodes+ PBC.
>> I think we can agree that the two ConstraintMatrix objects should be 
>> different as in the case of PBC you additionally need to make sure that FE 
>> space on the refined boundary matches that on the opposite, non-refined 
>> side. 
>>
>
> Yes I agree the ConstraintMatrix objects are different but the 
> coefficients (a_{ij}) of the hanging node constraint equations 
>
> x_{i} = a_{ij} x_{j}
>
>  would be the same in both cases, only x_{j}'s would be different in both 
> cases. Now x_{j}'s are nodes without any constraints which are set to the 
> correct values explicitly in both cases:
>
>     if(!constraints.is_constrained(globalDofIndex))
>        vec1[globalDofIndex]=nodalCoor.norm();
>
>     if(!onlyHangingNodeConstraints.is_constrained(globalDofIndex))
>        vec2[globalDofIndex]=nodalCoor.norm();
>
> So the hanging nodes in both cases should have the same value after 
> calling distribute. 
>  
>  
>
>> If you suspect that there is a bug in constraints, you could check this 
>> by simply choosing some more-or-less random vector, distribute and 
>> plot-over-line in Paraview / Visit. 
>> More cumbersome comparison would be to evaluate random field at the 
>> opposite points.
>> You can use FEField function and then choose   L/2-\delta  and 
>> -L/2+\delta   with \delta = 1e-8 or so for X coordinate and then 
>> whatever you want to Y/Z. This should give you the same value anywhere on 
>> the two periodically matching points for a random input vector after 
>> constraints are distributed.
>>
>>  I will try doing this. 
>
> Best,
> Sambit
>

-- 
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