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

Code assumes coords start at zero #1

Open
lionfish0 opened this issue Feb 25, 2022 · 0 comments
Open

Code assumes coords start at zero #1

lionfish0 opened this issue Feb 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@lionfish0
Copy link
Member

lionfish0 commented Feb 25, 2022

Found on line 36 in AdvectionDiffusionModel constructor:

        #coords is a D x (Nt,Nx,Ny) array of locations of the grid vertices.
        #TODO Maybe write more neatly...
        tt=np.linspace(0.0,self.boundary[1][0],self.resolution[0])
        xx=np.linspace(0.0,self.boundary[1][1],self.resolution[1])
        yy=np.linspace(0.0,self.boundary[1][2],self.resolution[2])
        self.coords=np.asarray(np.meshgrid(tt,xx,yy,indexing='ij'))

tt=np.linspace(0.0,self.boundary[1][0],self.resolution[0])

The linspace presumably shoundn't start at 0?

Need to write a unit test for boundary.

@lionfish0 lionfish0 added the bug Something isn't working label Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant