Skip to content

Commit 8933903

Browse files
authored
Rename all GLS Navier Stokes files using Fluid Dynamics prefix (#1236)
Description This PR changes the name of the main class and the name of the files related to the lethe-fluid application. Is the sixth PR of a series of PRs that aim to rename all the Navier Stokes solvers of Lethe using the prefix FluidDynamics and removing GLS. Testing All the existent tests pass without any change. Former-commit-id: aac4183
1 parent 8b720e9 commit 8933903

18 files changed

+92
-83
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to the Lethe project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## [Master] - 2024-08-09
7+
8+
### Changed
9+
10+
- MINOR Renamed the main file related to the `lethe-fluid` application: `gls_navier_stokes` to `fluid_dynamics_matrix_based`. The name of the `GLSNavierStokesSolver` class was changed to `FluidDynamicsMatrixBased`. [#1236](https://github.com/chaos-polymtl/lethe/pull/1236)
11+
612
## [Master] - 2024-08-07
713

814
### Changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ because it
104104
but the `lethe-fluid` application
105105
[links only to `lethe-solvers`](applications/lethe-fluid/CMakeLists.txt)
106106
because it
107-
[includes only solvers headers](applications/lethe-fluid/gls_navier_stokes.cc),
107+
[includes only solvers headers](applications/lethe-fluid/fluid_dynamics_matrix_based.cc),
108108
and `lethe-core` is a transitive dependency of `lethe-solvers`.
109109

110110
## Dependencies between Lethe's libraries
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
add_executable(lethe-fluid gls_navier_stokes.cc)
1+
add_executable(lethe-fluid fluid_dynamics_matrix_based.cc)
22
deal_ii_setup_target(lethe-fluid)
33
target_link_libraries(lethe-fluid lethe-solvers)

applications/lethe-fluid/gls_navier_stokes.cc renamed to applications/lethe-fluid/fluid_dynamics_matrix_based.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* ---------------------------------------------------------------------
1515
*/
1616

17-
#include "solvers/gls_navier_stokes.h"
17+
#include "solvers/fluid_dynamics_matrix_based.h"
1818

1919
int
2020
main(int argc, char *argv[])
@@ -48,7 +48,7 @@ main(int argc, char *argv[])
4848
"lethe-fluid",
4949
"lethe-fluid-nitsche"));
5050

51-
GLSNavierStokesSolver<2> problem(NSparam);
51+
FluidDynamicsMatrixBased<2> problem(NSparam);
5252
problem.solve();
5353
}
5454

@@ -66,7 +66,7 @@ main(int argc, char *argv[])
6666
"lethe-fluid",
6767
"lethe-fluid-nitsche"));
6868

69-
GLSNavierStokesSolver<3> problem(NSparam);
69+
FluidDynamicsMatrixBased<3> problem(NSparam);
7070
problem.solve();
7171
}
7272
else

contrib/utilities/automatic_launch/launch_lethe.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
#SBATCH --output=%x-%j.out
99

1010
source $HOME/.dealii
11-
srun $HOME/lethe/inst/bin/gls_navier_stokes_2d cylinder.prm
11+
srun $HOME/lethe/inst/bin/lethe-fluid cylinder.prm

contrib/utilities/automatic_launch/launch_lethe_locally.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# User input
1010
CASE_PREFIX = 'cylinder_u_'
1111
PRM_FILE = 'cylinder.prm'
12-
LETHE_EXEC = 'gls_navier_stokes_2d'
12+
LETHE_EXEC = 'lethe-fluid'
1313

1414
for root, directories, files in os.walk(PATH):
1515

doc/doxygen/main.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
physics_solver:e -> navier_stokes_base:w [dir=back];
2424
physics_solver:e -> auxiliary_physics:w [dir=back];
2525
26-
navier_stokes_base_1 [label=<<B>GLSNavierStokesSolver</B> <br/>(lethe-fluid)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classGLSNavierStokesSolver.html", tooltip="GLSNavierStokesSolver"];
26+
navier_stokes_base_1 [label=<<B>FluidDynamicsMatrixBased</B> <br/>(lethe-fluid)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsMatrixBased.html", tooltip="FluidDynamicsMatrixBased"];
2727
navier_stokes_base_2 [label=<<B>FluidDynamicsBlock</B> <br/> (lethe-fluid-block)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsBlock.html", tooltip="FluidDynamicsBlock"];
2828
navier_stokes_base_3 [label=<<B>FluidDynamicsMatrixFree</B> <br/> (lethe-fluid-matrix-free)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsMatrixFree.html", tooltip="FluidDynamicsMatrixFree"];
2929

include/fem-dem/fluid_dynamics_sharp.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <core/shape.h>
2121
#include <core/vector.h>
2222

23-
#include <solvers/gls_navier_stokes.h>
23+
#include <solvers/fluid_dynamics_matrix_based.h>
2424

2525
#include <fem-dem/cfd_dem_simulation_parameters.h>
2626
#include <fem-dem/ib_particles_dem.h>
@@ -43,7 +43,7 @@ using namespace dealii;
4343
*/
4444

4545
template <int dim>
46-
class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
46+
class FluidDynamicsSharp : public FluidDynamicsMatrixBased<dim>
4747
{
4848
public:
4949
FluidDynamicsSharp(CFDDEMSimulationParameters<dim> &nsparam);
@@ -157,7 +157,7 @@ class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
157157
/*
158158
Modified version of assemble_matrix_and_rhs to include the presence of
159159
extra steps. For more detail see the same function in the
160-
gls_navier_stokes.h solver.
160+
fluid_dynamics_matrix_based.h solver.
161161
*/
162162

163163
virtual void
@@ -183,7 +183,7 @@ class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
183183
else
184184
generate_cut_cells_map();
185185
}
186-
this->GLSNavierStokesSolver<dim>::assemble_system_matrix();
186+
this->FluidDynamicsMatrixBased<dim>::assemble_system_matrix();
187187

188188
sharp_edge();
189189
}
@@ -197,12 +197,12 @@ class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
197197
*
198198
* Modified version of assemble_matrix_and_rhs to include the presence of
199199
* extra steps. For more detail see the same function in the
200-
* gls_navier_stokes.h solver.
200+
* fluid_dynamics_matrix_based.h solver.
201201
*/
202202
virtual void
203203
assemble_rhs()
204204
{
205-
this->GLSNavierStokesSolver<dim>::assemble_system_rhs();
205+
this->FluidDynamicsMatrixBased<dim>::assemble_system_rhs();
206206
}
207207

208208
/**

include/fem-dem/fluid_dynamics_vans.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <core/parameters.h>
2323
#include <core/time_integration_utilities.h>
2424

25-
#include <solvers/gls_navier_stokes.h>
25+
#include <solvers/fluid_dynamics_matrix_based.h>
2626
#include <solvers/postprocessing_cfd.h>
2727

2828
#include <dem/dem.h>
@@ -112,7 +112,7 @@ particle_sphere_intersection_3d(double r_particle,
112112
*/
113113

114114
template <int dim>
115-
class FluidDynamicsVANS : public GLSNavierStokesSolver<dim>
115+
class FluidDynamicsVANS : public FluidDynamicsMatrixBased<dim>
116116
{
117117
public:
118118
FluidDynamicsVANS(CFDDEMSimulationParameters<dim> &nsparam);

include/solvers/gls_navier_stokes.h renamed to include/solvers/fluid_dynamics_matrix_based.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
*
1414
* ---------------------------------------------------------------------*/
1515

16-
#ifndef lethe_gls_navier_stokes_h
17-
#define lethe_gls_navier_stokes_h
16+
#ifndef lethe_fluid_dynamics_matrix_based_h
17+
#define lethe_fluid_dynamics_matrix_based_h
1818

1919
#include <core/exceptions.h>
2020
#include <core/vector.h>
@@ -41,12 +41,12 @@ using namespace dealii;
4141
*/
4242

4343
template <int dim>
44-
class GLSNavierStokesSolver
44+
class FluidDynamicsMatrixBased
4545
: public NavierStokesBase<dim, GlobalVectorType, IndexSet>
4646
{
4747
public:
48-
GLSNavierStokesSolver(SimulationParameters<dim> &nsparam);
49-
~GLSNavierStokesSolver();
48+
FluidDynamicsMatrixBased(SimulationParameters<dim> &nsparam);
49+
~FluidDynamicsMatrixBased();
5050

5151
/**
5252
* @brief solve Solves the Navier-Stokes problem
@@ -130,7 +130,7 @@ class GLSNavierStokesSolver
130130
* @brief Define the zero constraints used to solved the problem that change
131131
* with other physics' solutions.
132132
*
133-
* It differs from GLSNavierStokesSolver::define_zero_constraints as it
133+
* It differs from FluidDynamicsMatrixBased::define_zero_constraints as it
134134
* changes in time depending on the physics' solutions. Currently, it is only
135135
* used to constraint solid with the temperature's evolution.
136136
*/

include/solvers/fluid_dynamics_nitsche.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <core/exceptions.h>
2121
#include <core/solid_base.h>
2222

23-
#include <solvers/gls_navier_stokes.h>
23+
#include <solvers/fluid_dynamics_matrix_based.h>
2424

2525
#include <deal.II/lac/trilinos_vector.h>
2626

@@ -38,7 +38,7 @@ using namespace dealii;
3838
*/
3939

4040
template <int dim, int spacedim = dim>
41-
class FluidDynamicsNitsche : public GLSNavierStokesSolver<spacedim>
41+
class FluidDynamicsNitsche : public FluidDynamicsMatrixBased<spacedim>
4242
{
4343
public:
4444
FluidDynamicsNitsche(SimulationParameters<spacedim> &nsparam);
@@ -112,7 +112,7 @@ class FluidDynamicsNitsche : public GLSNavierStokesSolver<spacedim>
112112
}
113113

114114
/**
115-
* @brief Same as in gls_navier_stokes, but calls assemble_nitsche_restriction() when global matrix and rhs are assembled
115+
* @brief Same as in fluid_dynamics_matrix_based, but calls assemble_nitsche_restriction() when global matrix and rhs are assembled
116116
*
117117
* @deprecated This function is to be deprecated when the new assembly mechanism
118118
* is integrated to this solver
@@ -121,7 +121,7 @@ class FluidDynamicsNitsche : public GLSNavierStokesSolver<spacedim>
121121
assemble_matrix_and_rhs();
122122

123123
/**
124-
* @brief Same as in gls_navier_stokes, but calls assemble_nitsche_restriction() when rhs is assembled
124+
* @brief Same as in fluid_dynamics_matrix_based, but calls assemble_nitsche_restriction() when rhs is assembled
125125
*
126126
* @deprecated This function is to be deprecated when the new assembly mechanism
127127
* is integrated to this solver

source/fem-dem/cfd_dem_coupling.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ CFDDEMSolver<dim>::postprocess_fd(bool first_iteration)
10231023
<< "---------------------------------------------------------------"
10241024
<< std::endl;
10251025

1026-
this->GLSNavierStokesSolver<dim>::postprocess_fd(first_iteration);
1026+
this->FluidDynamicsMatrixBased<dim>::postprocess_fd(first_iteration);
10271027

10281028
// Visualization
10291029
if (this->simulation_control->is_output_iteration())

source/fem-dem/fluid_dynamics_sharp.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
#include <deal.II/lac/full_matrix.h>
2323

24-
// Constructor for class GLSNavierStokesSolver
24+
// Constructor for class FluidDynamicsSharp
2525
template <int dim>
2626
FluidDynamicsSharp<dim>::FluidDynamicsSharp(
2727
CFDDEMSimulationParameters<dim> &p_nsparam)
28-
: GLSNavierStokesSolver<dim>(p_nsparam.cfd_parameters)
28+
: FluidDynamicsMatrixBased<dim>(p_nsparam.cfd_parameters)
2929
, cfd_dem_parameters(p_nsparam)
3030
, all_spheres(true)
3131
, combined_shapes()
@@ -4171,7 +4171,7 @@ template <int dim>
41714171
void
41724172
FluidDynamicsSharp<dim>::write_checkpoint()
41734173
{
4174-
this->GLSNavierStokesSolver<dim>::write_checkpoint();
4174+
this->FluidDynamicsMatrixBased<dim>::write_checkpoint();
41754175

41764176

41774177
// Write a table with all the relevant properties of the particle in a table.
@@ -4314,7 +4314,7 @@ template <int dim>
43144314
void
43154315
FluidDynamicsSharp<dim>::read_checkpoint()
43164316
{
4317-
this->GLSNavierStokesSolver<dim>::read_checkpoint();
4317+
this->FluidDynamicsMatrixBased<dim>::read_checkpoint();
43184318

43194319
TimerOutput::Scope t(this->computing_timer,
43204320
"Reset Sharp-Edge particle information");

source/fem-dem/fluid_dynamics_vans.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
template <int dim>
1313
FluidDynamicsVANS<dim>::FluidDynamicsVANS(
1414
CFDDEMSimulationParameters<dim> &nsparam)
15-
: GLSNavierStokesSolver<dim>(nsparam.cfd_parameters)
15+
: FluidDynamicsMatrixBased<dim>(nsparam.cfd_parameters)
1616
, cfd_dem_simulation_parameters(nsparam)
1717
, void_fraction_dof_handler(*this->triangulation)
1818
, fe_void_fraction(nsparam.cfd_parameters.fem_parameters.void_fraction_order)
@@ -57,7 +57,7 @@ template <int dim>
5757
void
5858
FluidDynamicsVANS<dim>::setup_dofs()
5959
{
60-
GLSNavierStokesSolver<dim>::setup_dofs();
60+
FluidDynamicsMatrixBased<dim>::setup_dofs();
6161

6262
void_fraction_dof_handler.distribute_dofs(fe_void_fraction);
6363
locally_owned_dofs_voidfraction =
@@ -172,7 +172,7 @@ FluidDynamicsVANS<dim>::finish_time_step_fd()
172172
// ensure that the checkpointed information is correct
173173
percolate_void_fraction();
174174

175-
GLSNavierStokesSolver<dim>::finish_time_step();
175+
FluidDynamicsMatrixBased<dim>::finish_time_step();
176176
}
177177

178178
template <int dim>

source/solvers/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ add_library(lethe-solvers
88
cahn_hilliard_scratch_data.cc
99
flow_control.cc
1010
fluid_dynamics_block.cc
11-
gls_navier_stokes.cc
11+
fluid_dynamics_matrix_based.cc
1212
fluid_dynamics_nitsche.cc
1313
heat_transfer.cc
1414
heat_transfer_assemblers.cc
@@ -48,7 +48,7 @@ add_library(lethe-solvers
4848
../../include/solvers/copy_data.h
4949
../../include/solvers/flow_control.h
5050
../../include/solvers/fluid_dynamics_block.h
51-
../../include/solvers/gls_navier_stokes.h
51+
../../include/solvers/fluid_dynamics_matrix_based.h
5252
../../include/solvers/fluid_dynamics_nitsche.h
5353
../../include/solvers/heat_transfer.h
5454
../../include/solvers/heat_transfer_assemblers.h

0 commit comments

Comments
 (0)