lump

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Misc >

lump

Previous pageReturn to chapter overviewNext page

{ LUMP.PDE  

 

 This example illustrates use of the LUMP function.

 

 LUMP(F) saves an averaged value of F in each mesh cell, and returns the same

 value for any position within the cell.

 

 Notice that LUMP(F) is NOT the same as the "lumped parameters" frequently referred to  

 in finite element literature.

 

LUMP(f) is syntactically like SAVE(f), in that it stores a representation of

 its argument for later use.

 

}  

title 'LUMP test'  

 

select  

   contourgrid=400 { use a very dense plot grid to show lump structure }  

   threads=1

 

Variables  

   u  

 

definitions  

   k = 2  

   u0 = 1+x^2+y^2  

   s = u0 - 4*k  

   lumps = lump(s)       { Used in a definition }  

 

Initial values  

   u = 1  

 

equations  

   U: u - div(K*grad(u))  = s  

 

boundaries  

  Region 1  

      start(-1,-1)  

          value(u)=u0  

      line to (1,-1) to (1,1) to (-1,1) to close  

 

monitors  

  contour(u)  

 

plots  

  grid(x,y)  

  contour(u)  

  contour(s)  

  contour(lump(s))   as "Lumped Source - Direct Reference"  

  contour(lumps) as "Lumped Source - Defined Parameter"  

 

end