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.

Reply via email to