Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-21 Thread Phạm Ngọc Kiên
Hi, The attachment is my small program that I created. My fe system have 24 dofs for both real and imaginary of 12 edges of a cell. No matter how I change the parameter "order" the number of dofs is unchanged. I think I have problem when constructing the object. I would like to thank you very much.

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-21 Thread Wolfgang Bangerth
On 2/20/19 7:01 PM, Phạm Ngọc Kiên wrote: > I tested in my codes using > > template > CSEM::CSEM() > ://mapping(1), > dof_handler(triangulation), > fe(FE_NedelecSZ(order),1,//(order), multiplicity > FE_NedelecSZ(order),1) {} > > When I changed the parameter order, I saw only the

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-20 Thread Phạm Ngọc Kiên
Dear Daniel, I think that I can address my problem with the source now after looking through the way we create dofs in FE_NedelecSZ. I tested in my codes using template CSEM::CSEM() ://mapping(1), dof_handler(triangulation), fe(FE_NedelecSZ(order), 1, //(order), multiplic

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-20 Thread Daniel Arndt
Kien, I am not quite sure I understand how the source term you want to use looks like. If you want to describe a point source, you should gave a look at https://www.dealii.org/developer/doxygen/deal.II/namespaceVectorTools.html#ac4ffc41e72e846029d04e7034de60d09. Be aware of the last paragraphs

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-19 Thread Phạm Ngọc Kiên
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 the

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-19 Thread Wolfgang Bangerth
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

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
Dear Prof. Wolfgang Bangerth, I would like to thank you very much. I am reading through the FE_NedelecSZ codes in Deal.II library. 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 +

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Wolfgang Bangerth
On 2/18/19 10:47 PM, Phạm Ngọc Kiên wrote: > > 2. I have tried some thing with the third method. And here-below is my code: > > Point p{0.5,0.5,0.5};//position in reference cell > Quadrature q(p); > FEValues fe_values_q(fe, q,update_quadrature_points); > fe_values_q.reinit(cell); > > //position

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
I am sorry as my question is not clear enough. What I mean is when we loop over all degree of freedom in a cell, for example, for (unsigned int i = 0; i < dofs_per_cell; ++i) { .. } Do we have any method to get the position of the i_th degree of freedom inside this loop? I would like to

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
Hi, I have tried with the methods described in the FAQ and figured out that: 1. As I used edge-based element (FE_NedelecSZ), I queried if my element had support points by *fe.has_support_points()*. As a consequence, it returned zero. The *FiniteElement::get_unit_support_points() *also returned an

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
Yes, thank you very much. I will dig deeper into this. Best, Pham Ngoc Kien Vào Th 3, 19 thg 2, 2019 vào lúc 11:23 Bruno Turcksin < bruno.turck...@gmail.com> đã viết: > Pham Ngoc Kien, > > Le lun. 18 févr. 2019 à 19:33, Phạm Ngọc Kiên > a écrit : > >> With the DoFTools::map_dofs_to_support_poi

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Bruno Turcksin
Pham Ngoc Kien, Le lun. 18 févr. 2019 à 19:33, Phạm Ngọc Kiên a écrit : > With the DoFTools::map_dofs_to_support_points() , I saw in the library > manual that it can be used with no edge elements or the like. > As my finite element is edge-based one, I wonder if this function work? > No the func

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
Hi Bruno, With the DoFTools::map_dofs_to_support_points() , I saw in the library manual that it can be used with no edge elements or the like. As my finite element is edge-based one, I wonder if this function work? I have check the function fe.has_support_points() in my code and it returned 0. That

[deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Bruno Turcksin
Hi, Take a look at this entry in the FAQ. Best, Bruno On Monday, February 18, 2019 at 12:20:48 AM UTC-5, Phạm Ngọc Kiên wrote: > > Dear colleagues, > I am working