Skip to content
Snippets Groups Projects
Commit 927a0d3e authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Ensured that only ghost cells are changed for Dirichlet boundary.

parent 4fdb3c74
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ TODO: Discuss how wavelet details should be plotted
Urgent:
TODO: Mark Burgers' equation as inviscid -> Done
TODO: Make sure CFL number is absolute value -> Done
TODO: Make sure only ghost cells are limited for Dirichlet boundary
TODO: Make sure only ghost cells are limited for Dirichlet boundary -> Done
TODO: Move height adjustment and stretch factor into implicit solver function
TODO: Check correctness of implicit solver (with burgex.f)
TODO: Add Burgers class completely
......
......@@ -58,8 +58,8 @@ def dirichlet_boundary(projection: ndarray, config: dict) -> ndarray:
left_factor = config['left_factor']
right_factor = config['right_factor']
projection_values_left = [0 for i in range(polynomial_degree+1)]
projection_values_right = [0 for i in range(polynomial_degree+1)]
projection_values_left = [0 for _ in range(polynomial_degree+1)]
projection_values_right = [0 for _ in range(polynomial_degree+1)]
if final_time > 1:
projection_values_left[0] = -np.sqrt(2) / final_time
projection_values_right[0] = np.sqrt(2) / final_time
......@@ -67,8 +67,8 @@ def dirichlet_boundary(projection: ndarray, config: dict) -> ndarray:
projection_values_left[0] = np.sqrt(2) * left_factor
projection_values_right[0] = np.sqrt(2) * right_factor
projection[:, :num_ghost_cells+1] = np.repeat(projection_values_left)
projection[:, -num_ghost_cells-1:] = np.repeat(projection_values_right)
projection[:, :num_ghost_cells] = np.repeat(projection_values_left)
projection[:, -num_ghost_cells:] = np.repeat(projection_values_right)
# projection[:, 0] = projection_values_left
# projection[:, 1] = projection_values_left
# projection[:, -2] = projection_values_right
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment