Hi,

I'm starting to use the NedelecSZ element to simulate the maxwell equations 
in the frequency/harmonic domain. I started to simulate the resonant modes 
of a cube that has metallic boundaries. The boundary condition for a metal 
is n x E = 0. That means that the tangential components of the electrical 
field are zero.

If I try to use the following code:

-------------------------------------------------------- 
constraints.clear();                                                        
                                                                            
                                                       
constraints.reinit(locally_relevant_dofs);                                  
                                                                            
                                                       
DoFTools::make_hanging_node_constraints(dof_handler, constraints); 
VectorTools::interpolate_boundary_values(1, ZeroFunction<dim, 
number>(components), constraints, ComponentMask({false, true, true}));
-------------------------------------------------------- 

I obtain the following error:

--------------------------------------------------------                    
                                                                            
                                                             
An error occurred in line <2967> of file 
</opt/src/dealii/include/deal.II/numerics/vector_tools.templates.h> in 
function                                                                    
                         
    void 
dealii::VectorTools::internal::do_interpolate_boundary_values(const 
M_or_MC<dim, spacedim> &, const DoFHandlerType<dim, spacedim> &, const 
std::map<types::boundary_id, const Function<spacedim, number> *> 
&, std::map<types::global_dof_index, number> &, const dealii::ComponentMask 
&) [dim = 3, spacedim = 3, number = std::complex<double>, DoFHandlerType = 
DoFHandler, M_or_MC = Mapping]                                
The violated condition was:                                                
                                                                            
                                                              
    cell->get_fe().is_primitive(i)                                          
                                                                            
                                                             
Additional information:                                                    
                                                                            
                                                              
    This function can only deal with requested boundary values that 
correspond to primitive (scalar) base elements. You may want to look up in 
the deal.II glossary what the term 'primitive' means.                 
                                                                            
                                                                            
                                                             
There are alternative boundary value interpolation functions in namespace 
'VectorTools' that you can use for non-primitive finite elements.
--------------------------------------------------------     

How can I set the boundary condition n x E = 0 for the NedelecSZ element in 
3D?

Thanks!
Daniel

-- 
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/b8f5a4c9-0a81-4764-8ce5-1161cb811f65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to