To add to Wolfgang’s comment, you can have a look at the 
compute_edge_projection_l2() function 
<https://github.com/dealii/dealii/blob/981214b60b491f465dd8cf04e24989a2d806229c/include/deal.II/numerics/vector_tools_boundary.templates.h#L2100-L2388>
 that forms a part of the function that computes curl-conforming boundary 
conditions. You might be able to gain some inspiration from there? The 
associated paper 
<https://github.com/dealii/dealii/blob/981214b60b491f465dd8cf04e24989a2d806229c/include/deal.II/numerics/vector_tools_boundary.templates.h#L2934-L2939>
 that explains the method that’s being implemented is 

// See, for example, section 4.2 of:
// Electromagnetic scattering simulation using an H (curl) conforming hp-
// finite element method in three dimensions, PD Ledger, K Morgan, O
// Hassan, Int. J. Num. Meth. Fluids, Volume 53, Issue 8, pages
// 1267-1296, 20 March 2007:
// http://onlinelibrary.wiley.com/doi/10.1002/fld.1223/abstract 
<http://onlinelibrary.wiley.com/doi/10.1002/fld.1223/abstract>

Best,
Jean-Paul

> On 16. Apr 2021, at 22:26, Wolfgang Bangerth <[email protected]> wrote:
> 
> On 4/16/21 11:36 AM, John Smith wrote:
>> However, the FE_Nedelec is different. It implements edge elements. They are 
>> vector-based. That is, functions are represented by a superposition of 
>> vector-valued shape functions:
>> \vec{A} = \sum u_i vec{N}_i .
>> Therefore, the output of the "value" method in “class CustomFunction : 
>> public Function” must be vector-valued. Three components in a 
>> three-dimensional space.  Otherwise, there is no point in interpolation.
>> This kind of vectorial approximations is a bread-and-butter topic in 
>> magnetics. See, for example, equation (7) in:
>> https://ieeexplore.ieee.org/document/497322 
>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fieeexplore.ieee.org%2Fdocument%2F497322&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cf7f578c8c6fc44890c3308d900fe30ef%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C1%7C637541914012798794%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tJVhiTO272UFKlS0mWzTCrVp1VzPV3zbr2I16KxHkFI%3D&reserved=0>
>> In short, the source, i.e the current vector potential, must be projected on 
>> the space spanned by the vector-valued shape functions. Otherwise, the 
>> simulation is numerically unstable. The last, from my experience, is 
>> definitely true.
> 
> I think you already found your solution, but just for clarity: When we use 
> the term "interpolation", we typically ask for (scalar) coefficients U_i so 
> that
> 
>  u_h(x_j) = sum U_i \phi_i(x_j)  =  g(x_j)
> 
> where g is given and x_j are the node points. The problem is that for the 
> Nedelec element, this is not always possible: Not all possible vectors g(x_j) 
> can be represented. This makes sense because if you have N node points in 3d, 
> then you have N scalar coefficients U_i, but you have 3N components of the 
> values g(x_j).
> 
> One way to deal with this is to associate a vector, let's say y_j with every 
> node point x_j, and require that
> 
>  y_j \cdot u_h(x_j) = sum U_i y_j \cdot \phi_i(x_j)  =  y_j \cdot g(x_j)
> 
> These y_j could, for example, be the tangential direction associated with the 
> shape function phi_j. One *could* call this a variation of the term 
> "interpolation", but it is not what VectorTools::interpolate() implements. It 
> would probably not be terribly difficult to implement this kind of function, 
> however!
> 
> Best
> W.
> 
> 
> 
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 [email protected]
>                           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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/567f6646-df23-8c97-f210-87fd5a74e3ae%40colostate.edu.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/DDD82757-089D-4391-A367-5464AA304081%40gmail.com.

Reply via email to