From 4e671346034ad2c7ff4a53ee9804e4c8d764270f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BChle=2C=20Laura=20Christine=20=28lakue103=29?= <laura.kuehle@uni-duesseldorf.de> Date: Fri, 24 Feb 2023 16:03:04 +0100 Subject: [PATCH] Renamed stiffness matrix to volume integral matrix. --- Snakefile | 2 +- scripts/tcd/Equation.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Snakefile b/Snakefile index 7a11ef2..6e79185 100644 --- a/Snakefile +++ b/Snakefile @@ -23,7 +23,7 @@ TODO: Contemplate allowing vector input for ICs TODO: Discuss how wavelet details should be plotted Urgent: -TODO: Rename stiffness matrix to volume integral matrix +TODO: Rename stiffness matrix to volume integral matrix -> Done TODO: Rename boundary matrix to flux matrix TODO: Change num_ghost_cells to be 1 for calc and 0 for other TODO: Move boundary condition to Mesh class diff --git a/scripts/tcd/Equation.py b/scripts/tcd/Equation.py index e0e7c21..afe266b 100644 --- a/scripts/tcd/Equation.py +++ b/scripts/tcd/Equation.py @@ -179,8 +179,8 @@ class LinearAdvection(Equation): Attributes ---------- - stiffness_matrix : ndarray - Stiffness matrix. + volume_integral_matrix : ndarray + Volume integral matrix. boundary_matrix : ndarray Boundary matrix. @@ -206,7 +206,7 @@ class LinearAdvection(Equation): degree_matrix = np.matmul(root_vector[:, np.newaxis], root_vector[:, np.newaxis].T) - # Set stiffness matrix + # Set volume integral matrix matrix = np.ones(matrix_shape) if self._wave_speed > 0: matrix[np.fromfunction( @@ -214,7 +214,7 @@ class LinearAdvection(Equation): else: matrix[np.fromfunction( lambda i, j: (j > i) & ((i+j) % 2 == 1), matrix_shape)] = -1.0 - self._stiffness_matrix = matrix * degree_matrix + self._volume_integral_matrix = matrix * degree_matrix # Set boundary matrix matrix = np.fromfunction(lambda i, j: (-1.0)**i, matrix_shape) \ @@ -326,7 +326,7 @@ class LinearAdvection(Equation): 2 * (self._boundary_matrix @ projection[:, self._mesh.num_ghost_cells-1: -self._mesh.num_ghost_cells-1] + - self._stiffness_matrix @ + self._volume_integral_matrix @ projection[:, self._mesh.num_ghost_cells: -self._mesh.num_ghost_cells]) else: @@ -334,7 +334,7 @@ class LinearAdvection(Equation): -self._mesh.num_ghost_cells] = \ 2 * (self._boundary_matrix @ projection[:, self._mesh.num_ghost_cells+1:] + - self._stiffness_matrix @ + self._volume_integral_matrix @ projection[:, self._mesh.num_ghost_cells: -self._mesh.num_ghost_cells]) -- GitLab