Skip to content

Commit

Permalink
Remove gear3 integrator (#1221)
Browse files Browse the repository at this point in the history
Description
The Gear3 integrator was not used anywhere in the code in any example or in any tests. This integrator never gave good performance and was actually not tested for years. I believe it is now time to fully delete it. I want to work on adding new integrators this year and this will require some more unification. I want to start by cleaning things before adding new things.

Testing
There were actually no test for gear3...

Documentation
I adapted the documentation but the gear3 integrator was never mentioned in the documentation.
  • Loading branch information
blaisb authored Aug 5, 2024
1 parent 75f686b commit c32cbf7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 253 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to the Lethe project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Master] - 2024-08-05

### Removed

- MINOR Removed the gear3 DEM integrator. It was never used, it did not possess any unit test and it was not even clear if it still worked. [#1221](https://github.com/chaos-polymtl/lethe/pull/1211)

## [Master] - 2024-08-01

### Added
Expand Down
3 changes: 1 addition & 2 deletions include/core/parameters_lagrangian.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ namespace Parameters
enum class IntegrationMethod
{
velocity_verlet,
explicit_euler,
gear3
explicit_euler
} integration_method;

// Disable particle contacts to optimize performance
Expand Down
125 changes: 0 additions & 125 deletions include/dem/gear3_integrator.h

This file was deleted.

13 changes: 5 additions & 8 deletions source/core/parameters_lagrangian.cc
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,11 @@ namespace Parameters
"Choosing rolling resistance torque model"
"Choices are <no_resistance|constant_resistance|viscous_resistance>.");

prm.declare_entry(
"integration method",
"velocity_verlet",
Patterns::Selection("velocity_verlet|explicit_euler|gear3"),
"Choosing integration method"
"Choices are <velocity_verlet|explicit_euler|gear3>.");
prm.declare_entry("integration method",
"velocity_verlet",
Patterns::Selection("velocity_verlet|explicit_euler"),
"Choosing integration method"
"Choices are <velocity_verlet|explicit_euler>.");

prm.enter_subsection("adaptive sparse contacts");
{
Expand Down Expand Up @@ -912,8 +911,6 @@ namespace Parameters
integration_method = IntegrationMethod::velocity_verlet;
else if (integration == "explicit_euler")
integration_method = IntegrationMethod::explicit_euler;
else if (integration == "gear3")
integration_method = IntegrationMethod::gear3;
else
{
throw(std::runtime_error("Invalid integration method "));
Expand Down
2 changes: 0 additions & 2 deletions source/dem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ add_library(lethe-dem
find_cell_neighbors.cc
find_contact_detection_step.cc
force_chains_visualization.cc
gear3_integrator.cc
grid_motion.cc
input_parameter_inspection.cc
insertion.cc
Expand Down Expand Up @@ -63,7 +62,6 @@ add_library(lethe-dem
../../include/dem/find_cell_neighbors.h
../../include/dem/find_contact_detection_step.h
../../include/dem/force_chains_visualization.h
../../include/dem/gear3_integrator.h
../../include/dem/grid_motion.h
../../include/dem/input_parameter_inspection.h
../../include/dem/insertion.h
Expand Down
3 changes: 0 additions & 3 deletions source/dem/dem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <dem/distributions.h>
#include <dem/explicit_euler_integrator.h>
#include <dem/find_contact_detection_step.h>
#include <dem/gear3_integrator.h>
#include <dem/input_parameter_inspection.h>
#include <dem/insertion_file.h>
#include <dem/insertion_list.h>
Expand Down Expand Up @@ -314,8 +313,6 @@ DEMSolver<dim>::set_integrator_type()
return std::make_shared<VelocityVerletIntegrator<dim>>();
case ModelParameters::IntegrationMethod::explicit_euler:
return std::make_shared<ExplicitEulerIntegrator<dim>>();
case ModelParameters::IntegrationMethod::gear3:
return std::make_shared<Gear3Integrator<dim>>();
default:
throw(std::runtime_error("Invalid integration method."));
}
Expand Down
110 changes: 0 additions & 110 deletions source/dem/gear3_integrator.cc

This file was deleted.

3 changes: 0 additions & 3 deletions source/fem-dem/cfd_dem_coupling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <core/solutions_output.h>

#include <dem/explicit_euler_integrator.h>
#include <dem/gear3_integrator.h>
#include <dem/post_processing.h>
#include <dem/set_particle_particle_contact_force_model.h>
#include <dem/set_particle_wall_contact_force_model.h>
Expand Down Expand Up @@ -200,8 +199,6 @@ CFDDEMSolver<dim>::set_integrator_type()
return std::make_shared<VelocityVerletIntegrator<dim>>();
case ModelParameters::IntegrationMethod::explicit_euler:
return std::make_shared<ExplicitEulerIntegrator<dim>>();
case ModelParameters::IntegrationMethod::gear3:
return std::make_shared<Gear3Integrator<dim>>();
default:
throw(std::runtime_error("Invalid integration method."));
}
Expand Down

0 comments on commit c32cbf7

Please sign in to comment.