Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Code suggestions

Co-authored-by: Olivier Guévremont <guevremont.o@gmail.com>
Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 16, 2024
1 parent 1782b06 commit fa2298a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ The sluice gate which prevents the particle from floating is made of a 3D surfac
set Function expression = 0 ; if(t>0.5,if(t<0.7,1,0),0) ; 0
end
subsection angular velocity
set Function expression = 0 ; 0 ; 0
set Function expression = 0 ; 0 ; 0
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion doc/source/parameters/dem/dem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Insertion information including the dimensions of the insertion box, insertion f
The``mesh`` section defines the simulation triangulation and refinements.
In the ``DEM boundary conditions`` section, boundaries can be defined as outlets or they can get periodicity, rotation or translation.
In the ``floating walls`` section, hyperplanes can be added to the simulation domain.
In the ``solid objects`` section, surface meshes can defined and their motion can be controled.
In the ``solid objects`` section, surface meshes can defined and their motion can be controlled.

.. toctree::
:maxdepth: 1
Expand Down
4 changes: 2 additions & 2 deletions doc/source/parameters/dem/solid_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Solid Objects
=============================

Solid objects are finite auxiliary objects that can be stationary or in motion. Rotating impellers, sliding surfaces, and finite stoppers are examples of solid objects. The main differences between them and floating walls are:
1. floating wall is a plan, while a solid object can be either a volume or a surface
1. floating wall is a plane, while a solid object can be either a volume or a surface
2. floating wall is infinite, while solid object is finite
3. floating wall is stationary while solid object may be stationary or moving.

Expand Down Expand Up @@ -45,7 +45,7 @@ This subsection explains the solid objects information. First of all, the ``numb
* The ``number of solids`` parameter defines the total number of solid surfaces used during the simulation.

* For each solid object, we need a separate subsections (for instance ``subsection solid object 0``) in which the information of the solid surface 0 (``type``, ``file name``, ``initial refinement``, ``initial translation``, ``initial rotation axis``, ``initial rotation angle`` ) is defined. Each component of the ``initial translation`` and of the ``initial rotation axis`` parameters represent the ``x``, ``y`` and ``z`` axis. The rotation is apply before the translation.
* For each solid object, we need a separate subsections (for instance ``subsection solid object 0``) in which the information of the solid surface 0 (``type``, ``file name``, ``initial refinement``, ``initial translation``, ``initial rotation axis``, ``initial rotation angle``) is defined. Each component of the ``initial translation`` and of the ``initial rotation axis`` parameters represent the ``x``, ``y`` and ``z`` axes. The rotation is applied before the translation.

* In the subsection ``translational velocity``, we define the translational velocity function of the solid object.

Expand Down
2 changes: 1 addition & 1 deletion examples/dem/3d-dam-break/granular-dam-break-H-40cm.prm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ subsection solid objects
set Function expression = 0 ; if(t>0.5,if(t<1.5,2,0),0) ; 0
end
subsection angular velocity
set Function expression = 0 ; 0 ; 0
set Function expression = 0 ; 0 ; 0
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion examples/dem/3d-dam-break/granular-dam-break.prm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ subsection solid objects
set Function expression = 0 ; if(t>0.5,if(t<0.7,1,0),0) ; 0
end
subsection angular velocity
set Function expression = 0 ; 0 ; 0
set Function expression = 0 ; 0 ; 0
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions include/core/solid_objects_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ namespace Parameters
prm.declare_entry("number of solids",
"0",
Patterns::Integer(),
"Number of solid object");
"Number of solid surfaces");

for (unsigned int i_solid = 0; i_solid < max_number_of_solids;
++i_solid)
Expand All @@ -466,7 +466,7 @@ namespace Parameters
prm.declare_entry("number of solids",
"0",
Patterns::Integer(),
"Number of solid object");
"Number of solid volumes");

for (unsigned int i_solid = 0; i_solid < max_number_of_solids;
++i_solid)
Expand Down
8 changes: 2 additions & 6 deletions include/dem/data_containers.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,13 @@ namespace DEM
std::vector<typename Triangulation<dim>::active_cell_iterator>>
cells_neighbor_list;

// [[(cell iterator, cell iterator)]]
// First cell iterator is for the background triangulation, second cell
// iterator is for the solid surfaces.
// [[(background cell iterator, solid surface cell iterator)]]
typedef std::vector<std::vector<
std::pair<typename Triangulation<dim>::active_cell_iterator,
typename Triangulation<dim - 1, dim>::active_cell_iterator>>>
solid_surfaces_mesh_information;

// [[(cell iterator, cell iterator)]]
// First cell iterator is for the background triangulation, second cell
// iterator is for the solid volumes.
// [[(background cell iterator, solid volume cell iterator)]]
typedef std::vector<std::vector<
std::pair<typename Triangulation<dim>::active_cell_iterator,
typename Triangulation<dim, dim>::active_cell_iterator>>>
Expand Down
2 changes: 1 addition & 1 deletion source/core/solid_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ SolidBase<dim, spacedim>::setup_triangulation(const bool restart)
else
{ // Grid creation
GridIn<dim, spacedim> grid_in;
// Attach triangulation to the griread_d
// Attach triangulation to the grid
grid_in.attach_triangulation(*solid_tria);
// Read input gmsh file
std::ifstream input_file(param->solid_mesh.file_name);
Expand Down
1 change: 0 additions & 1 deletion tests/dem/volume_solid_object_displacement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/

// Deal.II

#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_tools.h>

Expand Down

0 comments on commit fa2298a

Please sign in to comment.