for (unsigned int q_point=0; q_point<n_q_points; ++q_point){Point<dim> p = fe_values.quadrature_point (q_point);for (unsigned int i=0; i<dofs_per_cell; ++i){printf("%i %f %f %f\n",i,fe_views.curl(i,q_point)[0],fe_views.curl(i,q_point)[1],fe_views.curl(i,q_point)[2]);for (unsigned int j=0; j<dofs_per_cell; ++j){cell_matrix(i,j) += 795774.881*(fe_views.curl(i,q_point)*fe_views.curl(j,q_point))*fe_values.JxW(q_point);}if(p[0]<0.55&&p[0]>0.45&&p[1]<0.05&&p[1]>(-0.05)&&p[2]>-0.25&&p[2]<0.25){cell_rhs(i) += 10000*(fe_values.shape_value_component(i,q_point,2));}}}
This is executed on an cube [-1,1]^3. The problem is, that this equation system does not converge. I tried many things like chaning the values of the parameters and so on
- Our in house software uses "2nd order edge elements" and i am not quite sure if i'm they are equal to the FE_RaviartThomas<3> elements.
The shape functions of our edge elements are defined in that way, that the line-integral on one edge is 1 and 0 on all other edges. We have 36 edges in total.
For example, the shape function of our 22nd enge is: (1/4)*(1-z^2)*(1-x^2)*grad(y)
Beside the possibility that the numbering of the edges is different, is the RaviartThomas element the right one?
- I want to implement the following functional
Matrix: A_ij = integral ( curl(N_i)*curl (v N_j) )
RHS: b_i = integral( N_i*J )
This has probably two reasons. First, try with FE_Nedelec, then things should improve. Second, your problem is not uniquely solvable, since the null space of your matrix is quite large.This is executed on an cube [-1,1]^3. The problem is, that this equation system does not converge. I tried many things like chaning the values of the parameters and so on
Dear all,
As an elaboration of Markus' answer, the curl-curl system indeed has no unique solution, since all gradients of functions in H1 have zero curl.
If any of this is new to you, I strongly recommend browsing through the book by Peter Monk. It has all the relevant information on finite elements for Maxwell equations.
Best,
Guido
--