Skip to content

Commit abf938f

Browse files
Minor style modifications to avoid update_ghost_mr (implictly called) and using the new swap
1 parent fda861a commit abf938f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

1D_RIEMANN/test_configuration/All_topology_solver.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ void All_Topology_Solver<dim>::run(const std::size_t nfiles) {
576576
auto t = static_cast<Number>(t0);
577577
while(t != Tf) {
578578
// Compute time step
579-
samurai::update_ghost_mr(conserved_variables);
580579
auto Cons_Flux = Rusanov_flux(conserved_variables);
581580
auto NonCons_Flux = NonConservative_flux(conserved_variables);
582581
dt = std::min(Tf - t, cfl*dx/get_max_lambda());
@@ -588,7 +587,7 @@ void All_Topology_Solver<dim>::run(const std::size_t nfiles) {
588587

589588
// Apply the numerical scheme
590589
conserved_variables_np1 = conserved_variables - dt*Cons_Flux - dt*NonCons_Flux;
591-
std::swap(conserved_variables.array(), conserved_variables_np1.array());
590+
samurai::swap(conserved_variables, conserved_variables_np1);
592591

593592
// Save the results
594593
if(t >= static_cast<Number>(nsave + 1)*dt_save || t == Tf) {

2D_RIEMANN/test_configuration/All_topology_solver.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ void All_Topology_Solver<dim>::run(const std::size_t nfiles) {
582582
auto t = static_cast<Number>(t0);
583583
while(t != Tf) {
584584
// Compute time step
585-
samurai::update_ghost_mr(conserved_variables);
586585
auto Cons_Flux = Rusanov_flux(conserved_variables);
587586
auto NonCons_Flux = NonConservative_flux(conserved_variables);
588587
dt = std::min(Tf - t, cfl*dx/get_max_lambda());
@@ -594,7 +593,7 @@ void All_Topology_Solver<dim>::run(const std::size_t nfiles) {
594593

595594
// Apply the numerical scheme
596595
conserved_variables_np1 = conserved_variables - dt*Cons_Flux - dt*NonCons_Flux;
597-
std::swap(conserved_variables.array(), conserved_variables_np1.array());
596+
samurai::swap(conserved_variable, conserved_variables_np1);
598597

599598
// Save the results
600599
if(t >= static_cast<Number>(nsave + 1)*dt_save || t == Tf) {

0 commit comments

Comments
 (0)