make hanging node constraint for locally refined mesh

37 views
Skip to first unread message

Phạm Ngọc Kiên

unread,
May 26, 2020, 3:34:55 AM5/26/20
to deal.II User Group
Dear all,
When I try to create a locally refined mesh by the following codes:
 GridGenerator::hyper_cube(triangulation, 0, 1);
            Point<dim> center (0.5, 0.5, 0.5);
            triangulation.refine_global(5);
            for (auto cell : triangulation.active_cell_iterators()) {
                if (cell->is_locally_owned()) {
               
                    if (cell->point_inside(center)){
                        cell->set_refine_flag();
                    }
                }
            }
triangulation.execute_coarsening_and_refinement();

The library return this error 
  const dealii::FullMatrix<double>& dealii::FiniteElement<<anonymous>, <anonymous> >::constraints(const dealii::internal::SubfaceCase<dim>&) const [with int dim = 3; int spacedim = 3]
The violated condition was:
    (this->dofs_per_face == 0) || (interface_constraints.m() != 0)
Additional information:
    The finite element for which you try to obtain hanging node constraints does not appear to implement them.

Does this error comes from the AffineConstraints when I try to implement the DoFTools::make_hanging_node_constraints?

Could you please help me to overcome this error?

Thank you very much.

Best regards,
Kien

Wolfgang Bangerth

unread,
May 26, 2020, 4:42:24 PM5/26/20
to dea...@googlegroups.com
On 5/26/20 1:34 AM, Phạm Ngọc Kiên wrote:
> /*  const dealii::FullMatrix<double>& dealii::FiniteElement<<anonymous>,
> <anonymous> >::constraints(const dealii::internal::SubfaceCase<dim>&) const
> [with int dim = 3; int spacedim = 3]
> The violated condition was:
>     (this->dofs_per_face == 0) || (interface_constraints.m() != 0)
> Additional information:
>     The finite element for which you try to obtain hanging node constraints
> does not appear to implement them.*/
> /*
> */
> Does this error comes from the AffineConstraints when I try to implement the
> DoFTools::make_hanging_node_constraints?
>
> Could you please help me to overcome this error?

Well, the error message says pretty clearly what is happening: The element you
use does not provide hanging node information. What element are you using?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Phạm Ngọc Kiên

unread,
May 26, 2020, 9:30:58 PM5/26/20
to dea...@googlegroups.com
Dear Prof. Wolfgang Bangerth,

I used FE_NedelecSZ element.

Thus, the conforming FE_Nedelec and FE_NedelecSZ can only work with the conforming mesh. The non-conforming mesh, which has hanging nodes, does not work with these elements.

Thank you very much.

Yours sincerely,
Kien

Vào Th 4, 27 thg 5, 2020 vào lúc 05:42 Wolfgang Bangerth <bang...@colostate.edu> đã viết:
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/fc63875b-df35-eb80-02cd-c503ca81d82e%40colostate.edu.

Wolfgang Bangerth

unread,
May 26, 2020, 11:58:20 PM5/26/20
to dea...@googlegroups.com
On 5/26/20 7:30 PM, Phạm Ngọc Kiên wrote:
>
> Thus, the conforming FE_Nedelec and FE_NedelecSZ can only work with the
> conforming mesh. The non-conforming mesh, which has hanging nodes, does not
> work with these elements.

The FE_NedelecSZ element doesnt, but FE_Nedelec does work with hanging nodes.

Phạm Ngọc Kiên

unread,
May 27, 2020, 12:32:27 AM5/27/20
to dea...@googlegroups.com
Dear Prof. Wolfgang Bangerth,

Thank you very much.

I will change the codes as your guidance.

Yours sincerely,
Kien

Vào Th 4, 27 thg 5, 2020 vào lúc 12:58 Wolfgang Bangerth <bang...@colostate.edu> đã viết:
--
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+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages