Dear Prof. Bangerth, Yes, I know that the source should be integral over the edge of a cell, not a single point on the cell. And I checked that if I take the integral over an edge of shape function I will get 1 * inverse of edge length. However, we actually do compute the source term over a cell when assembling the right hand side: F_i = \int_\Omega \phi_i(x) J(x) dx To compute it, we implement the Quadrature formula with its weights on unit cell rather than the weights on and edge. In my limited knowledge, I think that J(x) should be non-zero if x is on my source line, and be zero every where else in the cell. Should I set J(x) constant when computing F_i if dof i of the cell relates to the source?
Now I am considering an edge rather than a cell in the whole domain is the source. Could you please give me an idea? I would like to thank you very much for your answers. Best regards, Vào Th 4, 27 thg 3, 2019 vào lúc 22:25 Wolfgang Bangerth < [email protected]> đã viết: > On 3/27/19 2:52 AM, Phạm Ngọc Kiên wrote: > > > > My question for assembling the system is > > when I set the cell right hand side is none zero at a given dofs (source > > dofs), should I assemble the cell matrix at these dofs none zeros? > > Should both cell matrix (i,j) and cell right hand side (i) be zeros for > the > > dofs i , j which are not at the source dof? > > I don't think we quite understood what you are doing. Let's say your right > hand side function is J(x), then the right hand side vector should be > > F_i = \int_\Omega \phi_i(x) J(x) dx > > I *think* what you are describing is that your J(x) is actually a delta > function at a single point, which you call the "source dof". If that is > the > case, say that J(x) is a delta function located at x0, then you need to > compute > > F_i = \phi_i(x0) > > which may or may not be equal to one -- in any case, making the assumption > that a shape function has a particular value at a particular point is a > bad > idea, and the right approach is to evaluate it at that point to get its > value. > > It is worth pointing out that while the description of source located at > individual points is often used, it is not a physically correct > description. > No sources are point sources. A physically correct description would use > distributed sources (which leads to integrals that are not approximated by > point values), and as you are discovering, using the "simplification" of > describing sources as point sources actually makes all sorts of things > more > complicated in finite element codes. > > Does this make sense? > > 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.
