[deal.II] MGTransferGlobalCoarsening with Nedelec element

2023-11-14 Thread Ce Qin
Dear all,

I want to implement a Multigrid solver with global coarsening for Maxwell's
equations.
However, upon reviewing the documentation for MGTransferMF, it appears that
non-primitive elements are not currently supported. Is there any way to
implement
global coarsening MG solver with the Nedelec element?

Thanks in advance.

Best regards,
Ce Qin

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CA%2Bg8s4vF-0opZZLnrrfO4G8EKK3mS1p1%3D__%3Dxwj2ZNGmcyEEAA%40mail.gmail.com.


Re: [deal.II] Importing nodal BCs and accessing vertices

2023-11-14 Thread Wolfgang Bangerth

On 11/14/23 16:25, Alex Quinlan wrote:


I'm curious what your thoughts are on this approach.  I imagine it could have 
an advantage in some situations, depending on the size of the mesh and the 
number of constraints to be added.


I have not done any speed testing on this yet, tho.  Do you think it would be 
looking into?  Or do you see some fatal flaw with this approach?


Alex:
the general approach most professional programmers will ascribe to is to write 
a version of the code that is intelligible and easy to maintain. Only then do 
you worry about speed. If the code in question is fast enough (say at most of 
few percent up to 20% of the program's run time -- as measured with a class 
such as TimerOutput), then it's not worth worrying about it.


So the questions you're asking are premature. Make the code work what it is 
you want it to do, and then you can think about its performance.


Best
 W.

--

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


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d1a3c21c-5c34-a138-5290-0d9a70576343%40colostate.edu.


Re: [deal.II] Importing nodal BCs and accessing vertices

2023-11-14 Thread Alex Quinlan
Hi Wolfgang,

I've come back to this question after discovering some Grid tools.  I am 
now assessing GridTools::find_closest_vertex and 
GridTools::find_active_cell_around_point

const Point<3> pt1(0.0, 15.0,  8.20754);
std::vector  marked_vertices(triangulation.n_vertices(), true);

// Find the vertex closest to the point
unsigned int closest_v1 = GridTools::find_closest_vertex( dof_handler, pt1);

// Mark the vertex for a faster cell search
marked_vertices[closest_v1] = true;

// Find the cell containing the point (or a cell containing, if there are 
multiple)
auto cell_and_ref_point = GridTools::find_active_cell_around_point(
  dof_handler,pt1,  marked_vertices, 1.e-4);

//  Search the vertices, then apply constraints
  for (unsigned int v = 0; vn_vertices() ; v++)  // 
might be able to use 'vertex_iterator'
 if (cell_and_ref_point->vertex(v).distance(load1) < 1.e-4)

constraints.add_line(cell_and_ref_point->vertex_dof_index(v,0, 
cell_and_ref_point->active_fe_index() ));

I'm curious what your thoughts are on this approach.  I imagine it could 
have an advantage in some situations, depending on the size of the mesh and 
the number of constraints to be added.

I have not done any speed testing on this yet, tho.  Do you think it would 
be looking into?  Or do you see some fatal flaw with this approach?

Thanks,
Alex

On Wednesday, January 18, 2023 at 8:31:11 AM UTC-5 Alex Quinlan wrote:

> Thanks Wolfgang.  I appreciate the feedback.  I'll see if I can implement 
> some of the cost-saving tips that you suggested.
>
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/ce083242-20b0-4091-b93a-142ddcc2534bn%40googlegroups.com.


Re: [deal.II] how to treat the intersection point at the first and second kined bcs

2023-11-14 Thread Daniel Arndt
Dirichlet boundary conditions are normally enforced strongly while Neumann
boundary conditions are enforced weakly.
Thus, when interpolating the Dirichlet boundary conditions on the
respective boundary you would set the degrees of freedom accordingly
while the Neumann boundary conditions are part of the weak formulation.

Best,
Daniel

On Mon, Nov 13, 2023 at 11:20 PM ztdepyahoo  wrote:

> I mean one boundary has the first kind bc, while the second has neumann
> bc.  so What is the bc for the intersection nodes.
>
> ztdepyahoo
> ztdepya...@gmail.com
>
> 
>  Replied Message 
> From ztdep...@gmail.com 
> Date 11/13/2023 13:48
> To deal.II User Group 
> Subject [deal.II] how to treat the intersection point at the first and
> second kined bcs
> Since the two kinds of bc has one common nodes. I want to know which one
> is impelented in idealii.
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/7T3v6ddmVa0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/1add8537-743b-4b7e-bf50-96000b03f2e3n%40googlegroups.com
> 
> .
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/D9FD7D20-38AC-480D-B980-3ECC4ACEF267%40gmail.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWbKyLrivRTVtk3gkNtEzJEY9T5okRCctsaB6BaBkkPsJew%40mail.gmail.com.