Skip to content

Commit

Permalink
move variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mkstoyanov committed Feb 2, 2024
1 parent 1d23391 commit 8989148
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/coefficients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,6 @@ fk::matrix<P> generate_coefficients(
// need to consider various types of boundary conditions on left/right
// but we have a possible case of 1 cell, so left-most is also right-most

// get index for the last element (first is zero)
int const last = dim.get_degree() * (num_cells - 1);

apply_volume(0); // left-most cell
if (num_cells > 1) // if right-most is not left-most
apply_volume(num_cells - 1);
Expand All @@ -425,6 +422,9 @@ fk::matrix<P> generate_coefficients(
coeff_type == coefficient_type::div or
coeff_type == coefficient_type::penalty)
{
// get index for the last element (first is zero)
int const last = dim.get_degree() * (num_cells - 1);

P fluxL2 = 0.5 * g_dv_func(dim.domain_min, time);
P fluxR2 = 0.5 * g_dv_func(dim.domain_min + grid_spacing, time);

Expand Down

0 comments on commit 8989148

Please sign in to comment.