Dear Jean-Paul,

Thanks for your message. So if the periodicity condition is retained and
propagated when refined, I assume that I need to then only follow steps 4
and 5 to populate new constraintMatrix associated with periodic boundary
conditions of the refined mesh

i.e


4.Gather the periodic face pairs using GridTools::collect_periodic_faces(
<https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridTools.html#aaeadfc0053429f542fbfd48d192b94f0>
)(DoFHandler
<https://www.dealii.org/8.4.1/doxygen/deal.II/classDoFHandler.html>)

5.Populate the constraintMatrix for the refined mesh using
DoFTools::make_periodicity_constraints(matchedFacePairs,
constraintPeriodic)
<https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceDoFTools.html#a4562db8677b300aeec1e3dd50ad01562>


Am I missing anything here in populating constraintMatrix of the refined
mesh?


Regards

Phani



On Fri, Nov 10, 2017 at 3:55 AM, Jean-Paul Pelteret <[email protected]>
wrote:

> Dear Phani,
>
> The problem, as the error message suggests, is that you’re calling
> “triangulation.add_periodicity()” after you’ve performed some (global)
> refinement. You can only call this function on the coarsest mesh, and
> therefore you typically only need to do so once after you’ve created the
> initial mesh. So what you need to do is call this function before
> “triangulation.refine_global()”. Note that whatever internal information
> within the triangulation is set when informing it of  the periodicity
> condition is retained (and propagated consistently to the refined levels)
> when performing subsequent refinement.
>
> I hope that this helps.
>
> Kind regards,
> Jean-Paul
>
>
> On 10 Nov 2017, at 09:31, Phani Motamarri <[email protected]> wrote:
>
> Hello all,
>
> I have an existing triangulation and I have enforced periodic boundary
> conditions and created the relevant constraintMatrix using the following
> five steps just as in the manual:
>
>
>    1. Create a mesh
>    2. Gather the periodic faces using GridTools::collect_periodic_faces()
>    
> <https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridTools.html#aaeadfc0053429f542fbfd48d192b94f0>
>     (Triangulation
>    <https://www.dealii.org/8.4.1/doxygen/deal.II/classTriangulation.html>)
>    3. Add the periodicity information to the mesh using
>    parallel::distributed::Triangulation::add_periodicity()
>    
> <https://www.dealii.org/8.4.1/doxygen/deal.II/classparallel_1_1distributed_1_1Triangulation.html#a9539cda687eeb08c602bceac11807987>
>    4. Gather the periodic faces using GridTools::collect_periodic_faces()
>    
> <https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridTools.html#aaeadfc0053429f542fbfd48d192b94f0>
>     (DoFHandler
>    <https://www.dealii.org/8.4.1/doxygen/deal.II/classDoFHandler.html>)
>    5. Add periodicity constraints using DoFTools::make_
>    periodicity_constraints()
>    
> <https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceDoFTools.html#a4562db8677b300aeec1e3dd50ad01562>
>
>
> Now I performed a global refinement on this mesh and dofHandler gets
> updated to the new mesh and I need to solve a Poisson problem on the
> refined mesh with periodic boundary conditions. I am trying to follow
> exactly the above steps to create the constraintMatrix related to the
> periodic boundary conditions associated with the newly refined mesh.
> However, when I was trying to call the function "triangulation.add_
> periodicity()" using the refined triangulation object, it gives me an
> assertion error saying the "triangulation is refined" and exits the code in
> debug mode.
>
>  Infact the manual also says that
> "Before this function can be used the Triangulation
> <http://www.dealii.org/8.5.0/doxygen/deal.II/classparallel_1_1distributed_1_1Triangulation.html>
>  has
> to be initialized and must not be refined".
>
> Any suggestions would be helpful to set periodic boundary conditions for
> the refined mesh.
>
> Regards
> Phani
>
>
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to