# abt: L1 and L2 norm in FVM

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 28, 2007, 17:37 abt: L1 and L2 norm in FVM #1 jinwon parkq Guest   Posts: n/a Sponsored Links I wonder if the L1 and L2norm in fvm is the same as in fem. How do I compute L1 or L2 norm in FVM? Is it same as in fdm? As far as I know, in fem, L2 norm is computed by the sum of ABS(exact(i)-numerical(i))*mesh size and divided it by the number of element. How can I compute the L2 norm in fvm? Please teach me.

 July 29, 2007, 05:04 Re: abt: L1 and L2 norm in FVM #2 ganesh Guest   Posts: n/a Dear Jinwon, The norm of error can be defined in numerous ways. Specifically, a suitable error norm that works for both regular and irregular grids is to use the following area(or volume) weighted norm, implemented as : norm = 0.0 totvol = 0.0 DO i=1,nx norm = norm +(abs(ue(0,i,1)-u0(i,1)))*volume(i) totvol = totvol + volume(i) END DO norm = norm/totvol It is easy to see that for regular grids where the cell volumes are identical this reduces to \sigma(abs(error(i))/nx, which is the discrete L1 norm of error. Hope this helps, Regards, Ganesh

 July 29, 2007, 18:26 Re: abt: L1 and L2 norm in FVM #3 jinwon Guest   Posts: n/a Yes. Thanks for your kindness. However, I have another question. In fact, for norm, the total volume is constant so that we can not imply the effect of the grids density. How about the total number of cells? From your comments, I realized that the difference between L2 and L1 is just the divider. It is the total volume for L2 while the total number for L1. Is it right? My understanding is just it. Anyway, I'd like to say thanks again.

 July 30, 2007, 01:31 Re: abt: L1 and L2 norm in FVM #4 ganesh Guest   Posts: n/a Dear Jinwon, "In fact, for norm, the total volume is constant so that we can not imply the effect of the grids density" In my earlier post, you can see that the numerator has the error difference multiplied by the cell volume, and then the product is summed up. The denominator, will remain constant with mesh refinement, bu the numerator won't, thereby accounting for the mesh density. "It is the total volume for L2 while the total number for L1" Sorry if I have not conveyed my thoughts correctly, but what I have written is more like and L1-norm, and the L2-norm is not described. When you consider the volume weighted norm for a regular mesh with all volumes the same, you get the norm as absolute value of the error divided by the number of cells, much as you have asked in this post. The L2 norm is different because it is defined as the sqrt(sum of squares of error/num_of_cells), as against the L1- norm defined by sum(abs(error))/num_of_cells. Note that as mentioned earlier, this definition of L1-norm of error matches with the volume weighted norm on regular meshes. On irregular meshes, the number of cells alone cannot account for the error levels correctly, and you could be lead to misleading conclusions, which is where the more generalised volume weighted norm comes into play. For more details, please refer to the following paper. Sun, M., Takayama., K., Error localization in solution-adaptive grid", Journal of Computational Physics, Volume 190, pp. 346--350, 2003. Hope this helps Regards, Ganesh

 July 30, 2007, 03:00 Re: abt: L1 and L2 norm in FVM #5 jinwon Guest   Posts: n/a Thanks again. Your commenting is great.

 July 30, 2007, 18:19 Re: abt: L1 and L2 norm in FVM #6 jinwon Guest   Posts: n/a Dear ganesh. I read the paper you recommended. The paper mainly concerned about the error assessment on an adaptive grids. I am using the uniform grids. In this case, the L1 norm is the same as that in that paper. I mean that DO i=0,nx norm=norm+ABS(error)*dx ENDDO L1norm=norm/nx How about above for an uniform grid?

 July 31, 2007, 00:59 Re: abt: L1 and L2 norm in FVM #7 ganesh Guest   Posts: n/a Dear Jinwon, Nice to know that my reply was of some use to you. And yes, Sun's paper talks of error analysis on adaptive grids, and the comments in the paper are true of irregular meshes as well. For regular or uniform meshes, the volume weighted norm reduces to just sum(abs(error))/num_of_cells, as you have mentioned in your post. Thus, while working with a regular mesh, your definition as above is perfectly correct. The volume weighted norm becomes prominent when you go for adaptive meshes or irregular meshes. Regards, Ganesh

 July 31, 2007, 09:52 Re: abt: L1 and L2 norm in FVM #8 jinwon Guest   Posts: n/a Thanks for answering. My question was whether L1=sum(abs(error)*dx)/nx or L1=sum(abs(error))/nx. The reason I am asking is that the relative magnitude of L1 was large. Depending on the variables in the field, the error value varies with it. For example, when the initial pressures in 1d euler flow were 1000GPa and 100MPa, the L1 norm for pressure becomes extremely large in the order of 10^1 or 10^2. In that case, I wonder if the L1 norm can be normalized. Thanks in advance. You are the best replier in this community.

 August 1, 2007, 01:45 Re: abt: L1 and L2 norm in FVM #9 ganesh Guest   Posts: n/a Dear Jinwon, Regarding the magnitude of the L1 norm, that should not be a cause of serious concern. The important point to note is that the error norm must decrease with grid refinement; if your error is E for a grid with nx points, the error must be lesser than E, for a grid with 2*nx points. In fact, for a uniform grid the error should be E/2^p, where p is the order of accuracy of the discretisation scheme. The magnitude of the error norm must not be looked at in an absolute sense, but in a relative sense, in terms of the rate of decrease with progressive refinement. In fact, if you make use of lower pressure values for the euler case, but still hold the pressure ratio across the diaphragm same, you will have lower error magnitudes, but the error norm will still decrease at the same rate with mesh refinement. And the definition of the L1 norm of error, is L1=sum(abs(error))/nx. Hope this clarifies my post Regards, Ganesh P.S.: It is nice to know that I am able to convey my ideas quite clearly and they are of some help to you.

 August 1, 2007, 14:36 Re: abt: L1 and L2 norm in FVM #10 jinwon park Guest   Posts: n/a Your comments are perfect. It's pretty a good thing to share this subject with you. Jinwon

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules