Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

definition of L1 norm on Step 9: 2D Laplace Equation #69

Closed
bharath-kamath705 opened this issue Apr 28, 2020 · 2 comments
Closed

definition of L1 norm on Step 9: 2D Laplace Equation #69

bharath-kamath705 opened this issue Apr 28, 2020 · 2 comments
Labels

Comments

@bharath-kamath705
Copy link

bharath-kamath705 commented Apr 28, 2020

According to the link below, the L1 norm of a matrix is calculated by summing up absolute values in each column, and then taking the maximum
https://en.wikipedia.org/wiki/Matrix_norm

The notebook for Step 9 calculates the norm by summing up the absolute values of all the elements in the matrix. Also the link provided to read up further on the L1 norm leads to the wiki page for L1 norm of a vector (which I understand is different from the L1 norm of a matrix)

@mesnardo
Copy link
Member

Hi @bharath-kamath705!
Step 9 of CFDPython solves the Laplace equation in a two-dimensional domain.
Numerically speaking, the variable p is the solution vector of the Laplace equation.
In this notebook, we use a 2D NumPy array to represent the solution vector, as it is easier to conceptualize the two-dimensional discretization and to visualize (with Matplotlib) the solution in the two-dimensional domain.
We can think of the variable p as a sequence of 1D arrays, where each array represents the solution along an horizontal gridline (starting from the bottom of the domain, up to the top).
Thus, using the definition of the L1-norm for a vector is appropriate here.

@labarba: To avoid the confusion, I think we should replace (in the notebook) "matrix" by "2D array" when talking about the variable p.

@bharath-kamath705
Copy link
Author

Thanks for clarifying :)

mesnardo added a commit to mesnardo/CFDPython that referenced this issue Apr 29, 2020
and reword description of the input parameters for functions `plot2D` and `laplace2d`.

See also issue barbagroup#69.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants