fit+weight

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Misc >

fit+weight

Previous pageReturn to chapter overviewNext page

{ FIT+WEIGHT.PDE  

 

 This test shows the use of spatially-varying weights in the FIT function.

 

 There are no variables or equations here, just a domain and some tabular

 data which is FIT in different ways.

 

 The weight declared in the FIT statement is effectively the square of the

 spatial distance over which variations are smoothed.

 

}  

 

title 'Test Variable-Weight FIT'  

 

definitions  

   u = table('table.tbl')  

 

 

boundaries  

  region 1  

    start(0,10)  

    line to (0,0) to (10,0) to (10,10) to close  

 

plots  

    grid(x,y)  

    surface(u)  

    contour(u)  

    contour(fit(u))   as 'unweighted'  

    contour(fit(u,0.2))   as 'constant weight'  

    contour(fit(u,0.2*(x-5)^2)) as 'side-weights'  

    contour(fit(u,0.5*x)) as 'right-side weight'  

 

    contour(dx(u))  

    surface(dx(u))  

    contour(fit(dx(u)))

    contour(fit(dx(u),0.5))  

    surface(fit(dx(u),0.5))  

 

end