Yes. Let me go from my basic idea when setting up my source term. First, I create a computational domain such that a source can be placed exactly on an edge. It is always possible to do with unstructured meshes. Then I go through each element and check if its edge overlap the source. If it does then I will assign a source moment to the edge. My problem now is to find out if any edge of an element is overlapped by the my source.
I thought about finding the position of the degree of freedom in a cell (in real co-ordinate) and check if its real position is my source position. Thus, I sent a question about this. I have checked my codes and saw that \varphi_i(x) were a vector at quadrature point x for the i_th degree of freedom. It determines the direction of my vector field on the i_th degree of freedom in reference cell. So, I set Js(x) is a vector of the same size to compute the right hand side. I think there is no problem for the FE_NedelecSZ element. My code still run but it do not give me an exact solution compared with analytic one because it is not true if I set the same Js(x) for every dof in a cell containing the source point. I also tried to use FE_NedelecSZ<dim>(order) with different order. And I saw that no matter how I change the order value, the functions fe.n_dofs_per_quad() and fe.n_dofs_per_hex() returned 0. The number of dofs was unchanged and was equal to fe.n_dofs_per_line(). Does this mean that there is no face and cell dof? Do I need to use hp::DoFHandler to get the higher order dofs for calculation? Thank you very much. Best, Kien Vào Th 4, 20 thg 2, 2019 vào lúc 07:44 Wolfgang Bangerth < [email protected]> đã viết: > On 2/19/19 12:03 AM, Phạm Ngọc Kiên wrote: > > I currently try to solve the electromagnetics problem, followed by the > > research of Ross Kynch. > > My goal is to compute the right hand side for the problem: > > curl curl E + i*omega*mu*sigma*E = - Js > > I only want to set the Js term here to be none zero, for example to be > > 1, at a given degree of freedom (i.e. at source position), and 0 > > everywhere else. > > Thus, I need to write the codes to query if a degree of freedom is at > > source position. > > As you mentioned, now I think that I need to check if the source point > > is on an edge when assembling the right hand side vector. > > Could you please tell me help me about this? > > The term you are trying to add (Js) is a right hand side term to the > equation. So you need to compute the vector > > F_i = - \int_Omega \varphi_i(x) Js(x) dx > > for which you only need to be able to evaluate Js(x) and \varphi_i(x) at > quadrature points x, but not a specific support points. This is no > problem for the FE_NedelecSZ element. Can you explain why this does not > work for you? > > 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]. > For more options, visit https://groups.google.com/d/optout. > -- 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]. For more options, visit https://groups.google.com/d/optout.
