Skip to content

Commit

Permalink
Rename all GLS Navier Stokes files using Fluid Dynamics prefix (#1236)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lpsaavedra authored Aug 9, 2024
1 parent d711d1f commit aac4183
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 83 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-09

### Changed

- 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)

## [Master] - 2024-08-07

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ because it
but the `lethe-fluid` application
[links only to `lethe-solvers`](applications/lethe-fluid/CMakeLists.txt)
because it
[includes only solvers headers](applications/lethe-fluid/gls_navier_stokes.cc),
[includes only solvers headers](applications/lethe-fluid/fluid_dynamics_matrix_based.cc),
and `lethe-core` is a transitive dependency of `lethe-solvers`.

## Dependencies between Lethe's libraries
Expand Down
2 changes: 1 addition & 1 deletion applications/lethe-fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_executable(lethe-fluid gls_navier_stokes.cc)
add_executable(lethe-fluid fluid_dynamics_matrix_based.cc)
deal_ii_setup_target(lethe-fluid)
target_link_libraries(lethe-fluid lethe-solvers)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* ---------------------------------------------------------------------
*/

#include "solvers/gls_navier_stokes.h"
#include "solvers/fluid_dynamics_matrix_based.h"

int
main(int argc, char *argv[])
Expand Down Expand Up @@ -48,7 +48,7 @@ main(int argc, char *argv[])
"lethe-fluid",
"lethe-fluid-nitsche"));

GLSNavierStokesSolver<2> problem(NSparam);
FluidDynamicsMatrixBased<2> problem(NSparam);
problem.solve();
}

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

GLSNavierStokesSolver<3> problem(NSparam);
FluidDynamicsMatrixBased<3> problem(NSparam);
problem.solve();
}
else
Expand Down
2 changes: 1 addition & 1 deletion contrib/utilities/automatic_launch/launch_lethe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
#SBATCH --output=%x-%j.out

source $HOME/.dealii
srun $HOME/lethe/inst/bin/gls_navier_stokes_2d cylinder.prm
srun $HOME/lethe/inst/bin/lethe-fluid cylinder.prm
2 changes: 1 addition & 1 deletion contrib/utilities/automatic_launch/launch_lethe_locally.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# User input
CASE_PREFIX = 'cylinder_u_'
PRM_FILE = 'cylinder.prm'
LETHE_EXEC = 'gls_navier_stokes_2d'
LETHE_EXEC = 'lethe-fluid'

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

Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
physics_solver:e -> navier_stokes_base:w [dir=back];
physics_solver:e -> auxiliary_physics:w [dir=back];
navier_stokes_base_1 [label=<<B>GLSNavierStokesSolver</B> <br/>(lethe-fluid)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classGLSNavierStokesSolver.html", tooltip="GLSNavierStokesSolver"];
navier_stokes_base_1 [label=<<B>FluidDynamicsMatrixBased</B> <br/>(lethe-fluid)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsMatrixBased.html", tooltip="FluidDynamicsMatrixBased"];
navier_stokes_base_2 [label=<<B>FluidDynamicsBlock</B> <br/> (lethe-fluid-block)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsBlock.html", tooltip="FluidDynamicsBlock"];
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"];
Expand Down
12 changes: 6 additions & 6 deletions include/fem-dem/fluid_dynamics_sharp.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <core/shape.h>
#include <core/vector.h>

#include <solvers/gls_navier_stokes.h>
#include <solvers/fluid_dynamics_matrix_based.h>

#include <fem-dem/cfd_dem_simulation_parameters.h>
#include <fem-dem/ib_particles_dem.h>
Expand All @@ -43,7 +43,7 @@ using namespace dealii;
*/

template <int dim>
class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
class FluidDynamicsSharp : public FluidDynamicsMatrixBased<dim>
{
public:
FluidDynamicsSharp(CFDDEMSimulationParameters<dim> &nsparam);
Expand Down Expand Up @@ -157,7 +157,7 @@ class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
/*
Modified version of assemble_matrix_and_rhs to include the presence of
extra steps. For more detail see the same function in the
gls_navier_stokes.h solver.
fluid_dynamics_matrix_based.h solver.
*/

virtual void
Expand All @@ -183,7 +183,7 @@ class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
else
generate_cut_cells_map();
}
this->GLSNavierStokesSolver<dim>::assemble_system_matrix();
this->FluidDynamicsMatrixBased<dim>::assemble_system_matrix();

sharp_edge();
}
Expand All @@ -197,12 +197,12 @@ class FluidDynamicsSharp : public GLSNavierStokesSolver<dim>
*
* Modified version of assemble_matrix_and_rhs to include the presence of
* extra steps. For more detail see the same function in the
* gls_navier_stokes.h solver.
* fluid_dynamics_matrix_based.h solver.
*/
virtual void
assemble_rhs()
{
this->GLSNavierStokesSolver<dim>::assemble_system_rhs();
this->FluidDynamicsMatrixBased<dim>::assemble_system_rhs();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions include/fem-dem/fluid_dynamics_vans.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <core/parameters.h>
#include <core/time_integration_utilities.h>

#include <solvers/gls_navier_stokes.h>
#include <solvers/fluid_dynamics_matrix_based.h>
#include <solvers/postprocessing_cfd.h>

#include <dem/dem.h>
Expand Down Expand Up @@ -112,7 +112,7 @@ particle_sphere_intersection_3d(double r_particle,
*/

template <int dim>
class FluidDynamicsVANS : public GLSNavierStokesSolver<dim>
class FluidDynamicsVANS : public FluidDynamicsMatrixBased<dim>
{
public:
FluidDynamicsVANS(CFDDEMSimulationParameters<dim> &nsparam);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*
* ---------------------------------------------------------------------*/

#ifndef lethe_gls_navier_stokes_h
#define lethe_gls_navier_stokes_h
#ifndef lethe_fluid_dynamics_matrix_based_h
#define lethe_fluid_dynamics_matrix_based_h

#include <core/exceptions.h>
#include <core/vector.h>
Expand All @@ -41,12 +41,12 @@ using namespace dealii;
*/

template <int dim>
class GLSNavierStokesSolver
class FluidDynamicsMatrixBased
: public NavierStokesBase<dim, GlobalVectorType, IndexSet>
{
public:
GLSNavierStokesSolver(SimulationParameters<dim> &nsparam);
~GLSNavierStokesSolver();
FluidDynamicsMatrixBased(SimulationParameters<dim> &nsparam);
~FluidDynamicsMatrixBased();

/**
* @brief solve Solves the Navier-Stokes problem
Expand Down Expand Up @@ -130,7 +130,7 @@ class GLSNavierStokesSolver
* @brief Define the zero constraints used to solved the problem that change
* with other physics' solutions.
*
* It differs from GLSNavierStokesSolver::define_zero_constraints as it
* It differs from FluidDynamicsMatrixBased::define_zero_constraints as it
* changes in time depending on the physics' solutions. Currently, it is only
* used to constraint solid with the temperature's evolution.
*/
Expand Down
8 changes: 4 additions & 4 deletions include/solvers/fluid_dynamics_nitsche.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <core/exceptions.h>
#include <core/solid_base.h>

#include <solvers/gls_navier_stokes.h>
#include <solvers/fluid_dynamics_matrix_based.h>

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

Expand All @@ -38,7 +38,7 @@ using namespace dealii;
*/

template <int dim, int spacedim = dim>
class FluidDynamicsNitsche : public GLSNavierStokesSolver<spacedim>
class FluidDynamicsNitsche : public FluidDynamicsMatrixBased<spacedim>
{
public:
FluidDynamicsNitsche(SimulationParameters<spacedim> &nsparam);
Expand Down Expand Up @@ -112,7 +112,7 @@ class FluidDynamicsNitsche : public GLSNavierStokesSolver<spacedim>
}

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

/**
* @brief Same as in gls_navier_stokes, but calls assemble_nitsche_restriction() when rhs is assembled
* @brief Same as in fluid_dynamics_matrix_based, but calls assemble_nitsche_restriction() when rhs is assembled
*
* @deprecated This function is to be deprecated when the new assembly mechanism
* is integrated to this solver
Expand Down
2 changes: 1 addition & 1 deletion source/fem-dem/cfd_dem_coupling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ CFDDEMSolver<dim>::postprocess_fd(bool first_iteration)
<< "---------------------------------------------------------------"
<< std::endl;

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

// Visualization
if (this->simulation_control->is_output_iteration())
Expand Down
8 changes: 4 additions & 4 deletions source/fem-dem/fluid_dynamics_sharp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

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

// Constructor for class GLSNavierStokesSolver
// Constructor for class FluidDynamicsSharp
template <int dim>
FluidDynamicsSharp<dim>::FluidDynamicsSharp(
CFDDEMSimulationParameters<dim> &p_nsparam)
: GLSNavierStokesSolver<dim>(p_nsparam.cfd_parameters)
: FluidDynamicsMatrixBased<dim>(p_nsparam.cfd_parameters)
, cfd_dem_parameters(p_nsparam)
, all_spheres(true)
, combined_shapes()
Expand Down Expand Up @@ -4171,7 +4171,7 @@ template <int dim>
void
FluidDynamicsSharp<dim>::write_checkpoint()
{
this->GLSNavierStokesSolver<dim>::write_checkpoint();
this->FluidDynamicsMatrixBased<dim>::write_checkpoint();


// Write a table with all the relevant properties of the particle in a table.
Expand Down Expand Up @@ -4314,7 +4314,7 @@ template <int dim>
void
FluidDynamicsSharp<dim>::read_checkpoint()
{
this->GLSNavierStokesSolver<dim>::read_checkpoint();
this->FluidDynamicsMatrixBased<dim>::read_checkpoint();

TimerOutput::Scope t(this->computing_timer,
"Reset Sharp-Edge particle information");
Expand Down
6 changes: 3 additions & 3 deletions source/fem-dem/fluid_dynamics_vans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
template <int dim>
FluidDynamicsVANS<dim>::FluidDynamicsVANS(
CFDDEMSimulationParameters<dim> &nsparam)
: GLSNavierStokesSolver<dim>(nsparam.cfd_parameters)
: FluidDynamicsMatrixBased<dim>(nsparam.cfd_parameters)
, cfd_dem_simulation_parameters(nsparam)
, void_fraction_dof_handler(*this->triangulation)
, fe_void_fraction(nsparam.cfd_parameters.fem_parameters.void_fraction_order)
Expand Down Expand Up @@ -57,7 +57,7 @@ template <int dim>
void
FluidDynamicsVANS<dim>::setup_dofs()
{
GLSNavierStokesSolver<dim>::setup_dofs();
FluidDynamicsMatrixBased<dim>::setup_dofs();

void_fraction_dof_handler.distribute_dofs(fe_void_fraction);
locally_owned_dofs_voidfraction =
Expand Down Expand Up @@ -172,7 +172,7 @@ FluidDynamicsVANS<dim>::finish_time_step_fd()
// ensure that the checkpointed information is correct
percolate_void_fraction();

GLSNavierStokesSolver<dim>::finish_time_step();
FluidDynamicsMatrixBased<dim>::finish_time_step();
}

template <int dim>
Expand Down
4 changes: 2 additions & 2 deletions source/solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_library(lethe-solvers
cahn_hilliard_scratch_data.cc
flow_control.cc
fluid_dynamics_block.cc
gls_navier_stokes.cc
fluid_dynamics_matrix_based.cc
fluid_dynamics_nitsche.cc
heat_transfer.cc
heat_transfer_assemblers.cc
Expand Down Expand Up @@ -48,7 +48,7 @@ add_library(lethe-solvers
../../include/solvers/copy_data.h
../../include/solvers/flow_control.h
../../include/solvers/fluid_dynamics_block.h
../../include/solvers/gls_navier_stokes.h
../../include/solvers/fluid_dynamics_matrix_based.h
../../include/solvers/fluid_dynamics_nitsche.h
../../include/solvers/heat_transfer.h
../../include/solvers/heat_transfer_assemblers.h
Expand Down
Loading

0 comments on commit aac4183

Please sign in to comment.