Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
abc7b56
add some missing tests for samurai::cell
Feb 15, 2024
88d0e8a
add tests for MRmesh
Feb 18, 2024
bd4c869
fix SFC computation for hilbert + interface
Mar 6, 2024
05dc1bb
add unit test for sfc key computation
Mar 6, 2024
2c9f36d
add unit tests
Mar 9, 2024
0ca6744
add mesh remove test
Mar 11, 2024
702fd44
update statistisque module
Mar 21, 2024
e9f6ab5
add load balancing base class + some usefull functions
Mar 21, 2024
2a012ad
add load balancing derived class for SFC
Mar 21, 2024
a5d13ba
add mrmesh constructeur for ca_type
Mar 21, 2024
1fdb5a1
remove load balancing from mesh class + add merge & remove functions
Mar 21, 2024
a184e83
add gravity base load balancing for cells
Mar 21, 2024
2c4a867
add graph based with interface propagation load balancing class
Mar 21, 2024
ad3cbfa
add load balancing demo
Mar 21, 2024
d36577c
add some unit test for load balancing function
Mar 21, 2024
f195e64
add script parse stats file
Mar 22, 2024
e08af7c
add load balancing demos
Mar 22, 2024
086b868
add unit test files
Apr 2, 2024
0ad4dab
remove cout
Apr 2, 2024
8ef2f37
fix unused warning
Apr 2, 2024
d0d76c6
update load balancing demo
Apr 2, 2024
6857303
add void load balancing class for demo
Apr 4, 2024
2aa4f33
add getName() funcitons
Apr 4, 2024
875800f
clean demo code for load balancing
Apr 4, 2024
fab9958
remove useless class SFC_LoadBalancer_cells
Apr 4, 2024
9312f9e
fix warnings
Apr 10, 2024
2a8baf4
remove define
Apr 10, 2024
55fc071
fix warning and remove old function
Apr 10, 2024
020b530
fix warnings
Apr 10, 2024
b319761
fix warnings
Apr 10, 2024
ee3b1d0
fxi read stats scripts
Apr 10, 2024
d80d6ad
fix load balancing sfc transfer rate
Apr 10, 2024
b9d80eb
fix warning
Apr 10, 2024
8136420
fix warnings
Apr 12, 2024
f82cce5
fix warnings
Apr 12, 2024
fbf90ae
fix partition mesh with 1 mpi
Apr 17, 2024
a49af14
fix libdeps error in cmake
Apr 17, 2024
76b2047
add load balancing in advection 2D demo + fix new interface bc
Apr 17, 2024
81c2170
fix bc and conv interface
Apr 17, 2024
df98cb2
extract merge / remove CA from Mesh from mesh file to load balance file
Apr 17, 2024
625c4cf
fix SFC load balance
Apr 17, 2024
74f7b62
add mesh constructor with mpi neighbourhood
Apr 17, 2024
e705e25
return new mesh from load balancing with sfc
Apr 17, 2024
9fc92a9
fix update neighbour in constructor
Apr 18, 2024
a5b3764
update load balancing SFC with data exchange
Apr 18, 2024
7af599b
clang format
Apr 18, 2024
86c8089
update advection with dynamic load balancing
Apr 18, 2024
f9a7953
clang format
Apr 23, 2024
f9a4dca
fix mpi for unit tests
Apr 23, 2024
0d231e3
clang format
Apr 23, 2024
a2ee1a7
fix bug template parameter to keep number of ghosts in config
Apr 25, 2024
ceb78eb
update unit test mrmesh
Apr 25, 2024
bc8438b
fix: MPI (#199)
gouarin May 2, 2024
6e65799
remove load balancing from mesh class + add merge & remove functions
Mar 21, 2024
317c212
fix warnings
Apr 10, 2024
b791f24
fix update neighbour in constructor
Apr 18, 2024
30eac01
remove check nan
May 2, 2024
b2da43a
remove useless argument
May 2, 2024
c676532
add mrmesh tests
May 2, 2024
b1d5805
fix example with load balancing
May 2, 2024
6170114
fix load balance diffusion gravity
May 3, 2024
acf313e
update load balance sfc
May 3, 2024
0816dff
fix return value for interface propagation
May 6, 2024
bcf3194
fix interval propagation
May 6, 2024
df23304
fix: discover neighbour after field update
May 6, 2024
e8e2164
remove discover for SFC
May 6, 2024
54dad07
undo partition_mesh all processes as neighbours
May 7, 2024
13894db
fix gravity based to take load evolution into account
May 7, 2024
7e712c8
add new LB algorithm based on field
May 7, 2024
7a3faf4
fix +1 in logical coord
May 7, 2024
ea54538
test new version LB
May 7, 2024
23f8cd8
fix unit test load balancing
May 7, 2024
9d03b68
fix load balancing dim parameter + weight for bayrcenter
May 7, 2024
15681f5
update new load balancing strategy
May 7, 2024
5d75d93
add new strategy for test in demo
May 7, 2024
8949be5
ifx missing libdeps in cmake
May 7, 2024
576e0ec
fix assert
May 14, 2024
2d5ea88
load balacing interface propagation with local field
May 14, 2024
9ebb472
fix diffusion load balancing with field by removing diagonal exchanges
May 14, 2024
9b5998d
load balancing thresold + cmptInterfaceUniform
May 16, 2024
29c8501
update interface prop strategy
May 16, 2024
4919941
fix global min/max for interface uniform
May 16, 2024
87b3dae
fix load balancing base interface
May 17, 2024
4abe998
fix laod blancing diffusion
May 17, 2024
89e7133
update advection 2d test
May 17, 2024
f01d2ca
fix load balancing crash
May 21, 2024
a50eb0e
FIX bug max level for archive in serizalize
May 22, 2024
0e100d0
remove fix crash
May 22, 2024
c10b546
remove useless constructor
May 29, 2024
7d3458f
update load balancer with reordering + update field using all to all …
May 29, 2024
40a3207
try fix interface prop lb
May 29, 2024
2735358
update SFC load balancing
May 29, 2024
02300cc
fix load balancing with SFC
May 30, 2024
cfd11ca
add ordering function to others lb strategy
May 30, 2024
5dab244
fix MPI comm in SFC
Jun 3, 2024
697101d
Add functions to compute the number of intervals in CellArray
gouarin May 31, 2024
0f00164
Add get_interval_location function in CellArray which return the inde…
gouarin May 31, 2024
be51e15
Refactor Mesh_base class to include MPI neighborhood information as c…
gouarin May 31, 2024
cdce539
start adding metis and scotch for load balancing
gouarin May 31, 2024
15b056e
fix warnings
Jun 3, 2024
38d5d68
fix warnings
Jun 3, 2024
173aee3
fix missings refs
Jun 3, 2024
ac604c1
updarte demo adv
Jun 3, 2024
85d842a
fix warnings
Jun 3, 2024
0abf0e7
fix warnings
Jun 3, 2024
8747a0f
fix init advection for 3D tests
Jun 3, 2024
dc1414b
add update mesh & change return object for LB to be a field with rank
Jun 5, 2024
30909e9
clean code and fix wrning
Jun 5, 2024
ff2f5d4
update reordoring to use update_mesh
Jun 6, 2024
024256d
update reordering
Jun 6, 2024
94cc599
clean code - use of update_mesh in reordering
Jun 7, 2024
247fcbc
remove useless
Jun 7, 2024
7eb6a0c
update timer, add ncalls
Jun 7, 2024
6d8a13d
remove petsc from linear conveciton - unused
Jun 10, 2024
5f36c9f
update linear convection with load balancing
Jun 10, 2024
158db8f
fix field type in linear conv + return val for lb cell
Jun 10, 2024
3b697fe
add timers to samurai init
Jun 11, 2024
f7de172
const + fix comment
Jun 11, 2024
f657530
fix warnings
Jun 11, 2024
0342ac2
try fix LB cells
Jun 11, 2024
f0b02d8
fix interface prop to use flags field
Jun 11, 2024
6706f96
fix linear conv to use times in samurai init
Jun 11, 2024
15d03d1
fix dim type + set access to derived class to logs
Jun 11, 2024
7f7f09a
fix dim type
Jun 11, 2024
bfe3217
getStencilToNeighbour as function to allow multiple stencil instead o…
Jun 11, 2024
06d2128
fix dim type
Jun 11, 2024
98a2cb7
fix dim
Jun 11, 2024
41e64e1
fix warning
Jun 11, 2024
557a5ae
fix warning
Jun 11, 2024
4fe5efc
fix warning
Jun 11, 2024
c33a5a4
add timer for init
Jun 11, 2024
16ebe25
fix warning
Jun 11, 2024
158b9df
fix diffusion by splitting dirs
Jun 11, 2024
cb910a7
add timers
Jun 11, 2024
70b2ff9
try fix loadbalancing strategy based on geo dist
Jun 12, 2024
f91c07f
fix missing include for tests + add celLExists + add unit test
Jun 13, 2024
ca03f84
fix compile error
Jun 13, 2024
af040e1
add new load balancing strategy squelette
Jun 13, 2024
93a8c4c
fix MPI lock with update_mesh
Jun 14, 2024
f9af480
add empty() to cellList
Jun 14, 2024
ced6f23
update LBM demo
Jun 14, 2024
e43083b
fix missing link libraries for lbm
Jun 14, 2024
77f5892
uncomment lbm in cmake
Jun 14, 2024
c7bddb2
add more load balancing strategy in LBM demo
Jun 14, 2024
42a0eeb
update timer in lbm demo
Jun 14, 2024
678a4e2
add weigh for SFC load balancing
Jul 9, 2024
e7c6e60
fix assert
Jul 9, 2024
2cc2123
add unbalance boolean criteria to trigger load balancing
Jul 10, 2024
868b25d
update sfc w require_loadbalancing
Jul 11, 2024
5d663b9
fix const compite error
Jul 12, 2024
855daec
update diff LB
Jul 12, 2024
04bb980
update intro + config
Jul 22, 2024
0de0541
test different cell weights
Jul 22, 2024
96fe005
fix: add missing func to update new lb auto trigger
Jul 22, 2024
d750d4c
fix void load balancer
Jul 24, 2024
22e3603
add test with ponio
Jul 24, 2024
c4b5d20
fix warning
Jul 25, 2024
42c5216
fix warning
Jul 25, 2024
be71678
impl new approach
Jul 25, 2024
7c935dc
fix new name for LB
Jul 25, 2024
b4ebc2b
fix: Rebase working in single
sbstndb Feb 25, 2025
653109b
Remove useless MPI stuff
sbstndb Feb 26, 2025
a43b6ed
Undo unwanted commit
sbstndb Feb 26, 2025
d328e2b
Remove Stuff
sbstndb Feb 26, 2025
86f93b6
feat: new set algebra (#275)
gouarin Mar 3, 2025
7148b75
chore: update pre-commit (#276)
gouarin Mar 4, 2025
5dc6568
feat: min and max level can be changed (#277)
gouarin Mar 4, 2025
2bdaf5e
perf: minor improvement in algebra of sets (#279)
gouarin Mar 5, 2025
8e0beae
feat: restart (#278)
gouarin Mar 6, 2025
9d6643e
chore(master): release 0.22.0 (#280)
gouarin Mar 6, 2025
54372e1
fix: remove include (#281)
gouarin Mar 7, 2025
c1cb005
docs: update copyright (#282)
gouarin Mar 7, 2025
636ae4b
docs: fix samurai version in the documentation (#284)
gouarin Mar 11, 2025
9bc6a06
build: cmake correction (#285)
sbstndb Mar 11, 2025
2d904ce
perf: replaced CellList by CellArray in update_field_mr (#283)
alexandrehoffmann Mar 12, 2025
52d74ae
perf: Avoid multiple serialization (#287)
sbstndb Mar 14, 2025
a3159bc
fix: Update level_cell_array.hpp (#286)
alexandrehoffmann Mar 14, 2025
4e79116
style: change Field::size into Field::n_comp (#289)
kivvix Mar 18, 2025
2c70029
fix: Python script to read MPI meshes (#294)
gouarin Mar 20, 2025
4a1f299
fix: Repare MPI in 1D (#293)
sbstndb Mar 26, 2025
4ab1117
fix: Fix `enable_max_level_flux` for prediction 0 (#298)
pmatalon Mar 26, 2025
76ef24d
perf: changing graduation to a cell-based algorithm (#299)
alexandrehoffmann Apr 4, 2025
7470b6d
build: update googletest and benchmark versions (#304)
gouarin Apr 7, 2025
1b3c080
feat: add ScalarField and VectorField (#297)
kivvix Apr 15, 2025
a84f0cf
fix: enforce xtensor version (#310)
sbstndb Apr 16, 2025
7ed02c0
feat: add copy functions xtensor <-> Petsc Vec (#309)
pmatalon Apr 16, 2025
ec489f7
feat: LevelCellArray with origin point (#312)
pmatalon Apr 17, 2025
b5ccb11
chore(master): release 0.23.0 (#313)
gouarin Apr 18, 2025
ac7a907
refactor: remove unnecessary boolean template parameter in `update_ta…
alexandrehoffmann Apr 24, 2025
c9ec476
perf: Avoid useless MPI send (#307)
sbstndb Apr 24, 2025
675299f
fix: remove warning (#319)
sbstndb Apr 25, 2025
a8f1117
perf: Naive neighbourhood (#318)
sbstndb Apr 25, 2025
af6b765
feat: prevent level jumps near the boundary (#320)
pmatalon May 2, 2025
5b7f40b
fix: remove conflict
sbstndb May 5, 2025
868748c
Merge branch 'master' into rebase_new
sbstndb May 5, 2025
a060a3f
fix: precommit
sbstndb May 5, 2025
fa3ae3d
fix: remove double def
sbstndb May 5, 2025
1f4fac5
new commit
sbstndb May 5, 2025
3944fe4
new commit
sbstndb May 5, 2025
00dfa8d
feat: add load balancing
sbstndb May 6, 2025
d30df2b
fix: some fix and improvements
sbstndb May 6, 2025
f01ee95
fix: now it works with 2 ranks
sbstndb May 6, 2025
d882b6b
fix: Load balancing now works with n ranks
sbstndb May 6, 2025
bbf4038
feat: remove bloated logs
sbstndb May 6, 2025
7402d39
feat: reduce diffusion iteration
sbstndb May 7, 2025
2ece9ec
New commit
sbstndb May 8, 2025
798bc6e
clean code
sbstndb May 8, 2025
bb7c284
fix
sbstndb May 8, 2025
53b5ff0
fix: clean
sbstndb May 8, 2025
f332936
fix: clean
sbstndb May 8, 2025
c8ac7f6
fix: clean
sbstndb May 8, 2025
ce7c101
fix: clean
sbstndb May 8, 2025
57b6ce7
fix: improvements
sbstndb May 12, 2025
4a079f3
fix: remove useless include
sbstndb May 12, 2025
251adb9
fix: remove files
sbstndb May 12, 2025
f78965e
fix: remove folder
sbstndb May 12, 2025
6cb8d4f
Update CMakeLists.txt
sbstndb May 12, 2025
df2971a
Update advection_2d.cpp
sbstndb May 12, 2025
479999c
Update burgers.cpp
sbstndb May 12, 2025
8b1c6c1
Update linear_convection.cpp
sbstndb May 12, 2025
12fc7d0
Update linear_convection.cpp
sbstndb May 12, 2025
a56c048
Update advection_2d.cpp
sbstndb May 12, 2025
0d4eb7b
Update test_cell.cpp
sbstndb May 12, 2025
6840efe
fix: remove tests
sbstndb May 12, 2025
ad5d6dc
Update advection_2d.cpp
sbstndb May 12, 2025
c87497e
Update advection_2d.cpp
sbstndb May 12, 2025
6f0a38b
Update linear_convection.cpp
sbstndb May 12, 2025
a3fedac
fix: remove files
sbstndb May 12, 2025
045a6a7
fix: remove useless code
sbstndb May 12, 2025
566f82d
fix: remove useless code
sbstndb May 12, 2025
863ac70
fix: remove useless code
sbstndb May 12, 2025
9b4c05e
fix: remove useless code
sbstndb May 12, 2025
0f56b34
fix: minir changes
sbstndb May 12, 2025
2b850f9
fix: remove useless code
sbstndb May 12, 2025
f156d72
remove unused code
sbstndb May 12, 2025
684852e
remove useless code
sbstndb May 12, 2025
b0cb6ad
cancel loic modif
sbstndb May 12, 2025
4b9306f
fix: remove unused code
sbstndb May 12, 2025
76575a6
fix: minor changes
sbstndb May 12, 2025
58bfc40
fix: minor changes
sbstndb May 12, 2025
d0e069f
fix: undo strafella modif
sbstndb May 12, 2025
a7e2948
fix:
sbstndb May 12, 2025
e9e6bc2
fix: codacy
sbstndb May 12, 2025
4f8b40a
fix: codacy
sbstndb May 12, 2025
e52867c
fix: codacy
sbstndb May 12, 2025
d1fc446
fix: add MPI flags
sbstndb May 12, 2025
1bdd07c
fix: remove useless code
sbstndb May 14, 2025
378fb38
perf: improve comm pattern
sbstndb May 14, 2025
cd529a2
fix: remove print
sbstndb May 14, 2025
0ae3e7b
fix: add def
sbstndb Jul 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions demos/FiniteVolume/advection_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include <samurai/stencil_field.hpp>
#include <samurai/subset/node.hpp>

#include <samurai/load_balancing.hpp>
#include <samurai/load_balancing_diffusion.hpp>

#include <filesystem>
namespace fs = std::filesystem;

Expand Down Expand Up @@ -149,18 +152,24 @@ void save(const fs::path& path, const std::string& filename, const Field& u, con
auto mesh = u.mesh();
auto level_ = samurai::make_scalar_field<std::size_t>("level", mesh);

auto domain_ = samurai::make_scalar_field<int>("domain", mesh);

if (!fs::exists(path))
{
fs::create_directory(path);
}

int mrank = 0;

samurai::for_each_cell(mesh,
[&](const auto& cell)
{
level_[cell] = cell.level;
level_[cell] = cell.level;
domain_[cell] = mrank;
});
#ifdef SAMURAI_WITH_MPI
mpi::communicator world;
mrank = world.rank();
samurai::save(path, fmt::format("{}_size_{}{}", filename, world.size(), suffix), mesh, u, level_);
#else
samurai::save(path, fmt::format("{}{}", filename, suffix), mesh, u, level_);
Expand Down Expand Up @@ -194,9 +203,10 @@ int main(int argc, char* argv[])
bool correction = false;

// Output parameters
fs::path path = fs::current_path();
std::string filename = "FV_advection_2d";
std::size_t nfiles = 1;
fs::path path = fs::current_path();
std::string filename = "FV_advection_2d";
std::size_t nfiles = 1;
std::size_t nt_loadbalance = 10; // nombre d'iteration entre les equilibrages

app.add_option("--min-corner", min_corner, "The min corner of the box")->capture_default_str()->group("Simulation parameters");
app.add_option("--max-corner", max_corner, "The max corner of the box")->capture_default_str()->group("Simulation parameters");
Expand All @@ -207,6 +217,9 @@ int main(int argc, char* argv[])
app.add_option("--restart-file", restart_file, "Restart file")->capture_default_str()->group("Simulation parameters");
app.add_option("--min-level", min_level, "Minimum level of the multiresolution")->capture_default_str()->group("Multiresolution");
app.add_option("--max-level", max_level, "Maximum level of the multiresolution")->capture_default_str()->group("Multiresolution");
#ifdef SAMURAI_WITH_MPI
app.add_option("--nt-loadbalance", nt_loadbalance, "Maximum level of the multiresolution")->capture_default_str()->group("Multiresolution");
#endif
app.add_option("--mr-eps", mr_epsilon, "The epsilon used by the multiresolution to adapt the mesh")
->capture_default_str()
->group("Multiresolution");
Expand Down Expand Up @@ -251,8 +264,19 @@ int main(int argc, char* argv[])
std::size_t nsave = 1;
std::size_t nt = 0;

#ifdef SAMURAI_WITH_MPI
Load_balancing::Diffusion balancer;
#endif

while (t != Tf)
{
#ifdef SAMURAI_WITH_MPI
if (((nt % nt_loadbalance == 0) && nt > 1) || nt == 1)
{
balancer.load_balance(mesh, u);
}
#endif

MRadaptation(mr_epsilon, mr_regularity);

t += dt;
Expand Down
18 changes: 18 additions & 0 deletions demos/FiniteVolume/burgers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include <samurai/samurai.hpp>
#include <samurai/schemes/fv.hpp>

#include <samurai/load_balancing.hpp>
#include <samurai/load_balancing_diffusion.hpp>

#include <filesystem>
namespace fs = std::filesystem;

Expand Down Expand Up @@ -85,6 +88,10 @@ int main_dim(int argc, char* argv[])
std::string filename = "burgers_" + std::to_string(dim) + "D";
std::size_t nfiles = 50;

#if SAMURAI_WITH_MPI
std::size_t nt_loadbalance = 10; // nombre d'iteration entre les equilibrages
#endif

app.add_option("--left", left_box, "The left border of the box")->capture_default_str()->group("Simulation parameters");
app.add_option("--right", right_box, "The right border of the box")->capture_default_str()->group("Simulation parameters");
app.add_option("--init-sol", init_sol, "Initial solution: hat/linear/bands")->capture_default_str()->group("Simulation parameters");
Expand Down Expand Up @@ -120,6 +127,10 @@ int main_dim(int argc, char* argv[])
Box box(box_corner1, box_corner2);
samurai::MRMesh<Config> mesh;

#ifdef SAMURAI_WITH_MPI
Load_balancing::Diffusion balancer;
#endif

auto u = samurai::make_vector_field<n_comp>("u", mesh);
auto u1 = samurai::make_vector_field<n_comp>("u1", mesh);
auto u2 = samurai::make_vector_field<n_comp>("u2", mesh);
Expand Down Expand Up @@ -247,6 +258,13 @@ int main_dim(int argc, char* argv[])

while (t != Tf)
{
#ifdef SAMURAI_WITH_MPI
if ((nt % nt_loadbalance == 0) && nt > 1)
{
balancer.load_balance(mesh, u);
}
#endif

// Move to next timestep
t += dt;
if (t > Tf)
Expand Down
22 changes: 19 additions & 3 deletions demos/FiniteVolume/linear_convection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include <samurai/samurai.hpp>
#include <samurai/schemes/fv.hpp>

#include <samurai/load_balancing.hpp>
#include <samurai/load_balancing_diffusion.hpp>

#include <filesystem>
namespace fs = std::filesystem;

Expand Down Expand Up @@ -46,7 +49,6 @@ int main(int argc, char* argv[])
//--------------------//
// Program parameters //
//--------------------//

// Simulation parameters
double left_box = -1;
double right_box = 1;
Expand All @@ -68,7 +70,9 @@ int main(int argc, char* argv[])
fs::path path = fs::current_path();
std::string filename = "linear_convection_" + std::to_string(dim) + "D";
std::size_t nfiles = 0;

#ifdef SAMURAI_WITH_MPI
std::size_t nt_loadbalance = 10;
#endif
app.add_option("--left", left_box, "The left border of the box")->capture_default_str()->group("Simulation parameters");
app.add_option("--right", right_box, "The right border of the box")->capture_default_str()->group("Simulation parameters");
app.add_option("--Ti", t, "Initial time")->capture_default_str()->group("Simulation parameters");
Expand All @@ -78,6 +82,9 @@ int main(int argc, char* argv[])
app.add_option("--cfl", cfl, "The CFL")->capture_default_str()->group("Simulation parameters");
app.add_option("--min-level", min_level, "Minimum level of the multiresolution")->capture_default_str()->group("Multiresolution");
app.add_option("--max-level", max_level, "Maximum level of the multiresolution")->capture_default_str()->group("Multiresolution");
#ifdef SAMURAI_WITH_MPI
app.add_option("--nt-loadbalance", nt_loadbalance, "Maximum level of the multiresolution")->capture_default_str()->group("Multiresolution");
#endif
app.add_option("--mr-eps", mr_epsilon, "The epsilon used by the multiresolution to adapt the mesh")
->capture_default_str()
->group("Multiresolution");
Expand Down Expand Up @@ -150,6 +157,10 @@ int main(int argc, char* argv[])
}
auto conv = samurai::make_convection_weno5<decltype(u)>(velocity);

#ifdef SAMURAI_WITH_MPI
Load_balancing::Diffusion balancer;
#endif

//--------------------//
// Time iteration //
//--------------------//
Expand All @@ -174,6 +185,12 @@ int main(int argc, char* argv[])
}
while (t != Tf)
{
#ifdef SAMURAI_WITH_MPI
if (nt % nt_loadbalance == 0 && nt > 1)
{
balancer.load_balance(mesh, u);
}
#endif
// Move to next timestep
t += dt;
if (t > Tf)
Expand All @@ -182,7 +199,6 @@ int main(int argc, char* argv[])
t = Tf;
}
std::cout << fmt::format("iteration {}: t = {:.2f}, dt = {}", nt++, t, dt) << std::flush;

// Mesh adaptation
MRadaptation(mr_epsilon, mr_regularity);
samurai::update_ghost_mr(u);
Expand Down
Loading
Loading