From de2a7b7e14652ed7770496315a386fa6ca13ee5a Mon Sep 17 00:00:00 2001
From: Laura Prieto Saavedra <40216050+lpsaavedra@users.noreply.github.com>
Date: Wed, 7 Aug 2024 13:55:25 -0400
Subject: [PATCH] Rename all Nitsche files using Fluid Dynamics prefix (#1228)
Description
This PR changes the name of the main class and the name of the files related to the lethe-fluid-nitsche application. Is the fourth 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.
---
CHANGELOG.md | 6 +++
.../lethe-fluid-nitsche/CMakeLists.txt | 2 +-
...er_stokes.cc => fluid_dynamics_nitsche.cc} | 6 +--
applications/lethe-fluid/gls_navier_stokes.cc | 8 ++--
doc/doxygen/main.h | 2 +-
...vier_stokes.h => fluid_dynamics_nitsche.h} | 8 ++--
source/solvers/CMakeLists.txt | 4 +-
...er_stokes.cc => fluid_dynamics_nitsche.cc} | 40 +++++++++----------
8 files changed, 41 insertions(+), 35 deletions(-)
rename applications/lethe-fluid-nitsche/{nitsche_navier_stokes.cc => fluid_dynamics_nitsche.cc} (93%)
rename include/solvers/{gls_nitsche_navier_stokes.h => fluid_dynamics_nitsche.h} (95%)
rename source/solvers/{gls_nitsche_navier_stokes.cc => fluid_dynamics_nitsche.cc} (96%)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5862fd49e..347cc91dc3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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-07
+
+### Changed
+
+- MINOR Renamed the main file related to the `lethe-fluid-nitsche` application: `gls_nitsche_navier_stokes` to `fluid_dynamics_nitsche`. The name of the `GLSNitscheNavierStokesSolver` class was changed to `FluidDynamicsNitsche`. [#1228](https://github.com/chaos-polymtl/lethe/pull/1228)
+
## [Master] - 2024-08-06
### Changed
diff --git a/applications/lethe-fluid-nitsche/CMakeLists.txt b/applications/lethe-fluid-nitsche/CMakeLists.txt
index 65cadd6470..7d061585e7 100644
--- a/applications/lethe-fluid-nitsche/CMakeLists.txt
+++ b/applications/lethe-fluid-nitsche/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_executable(lethe-fluid-nitsche nitsche_navier_stokes.cc)
+add_executable(lethe-fluid-nitsche fluid_dynamics_nitsche.cc)
deal_ii_setup_target(lethe-fluid-nitsche)
target_link_libraries(lethe-fluid-nitsche lethe-solvers)
diff --git a/applications/lethe-fluid-nitsche/nitsche_navier_stokes.cc b/applications/lethe-fluid-nitsche/fluid_dynamics_nitsche.cc
similarity index 93%
rename from applications/lethe-fluid-nitsche/nitsche_navier_stokes.cc
rename to applications/lethe-fluid-nitsche/fluid_dynamics_nitsche.cc
index 8869de7562..f34511f9bd 100644
--- a/applications/lethe-fluid-nitsche/nitsche_navier_stokes.cc
+++ b/applications/lethe-fluid-nitsche/fluid_dynamics_nitsche.cc
@@ -14,7 +14,7 @@
* ---------------------------------------------------------------------
*/
-#include "solvers/gls_nitsche_navier_stokes.h"
+#include "solvers/fluid_dynamics_nitsche.h"
int
main(int argc, char *argv[])
@@ -43,7 +43,7 @@ main(int argc, char *argv[])
prm.parse_input(argv[1]);
NSparam.parse(prm);
- GLSNitscheNavierStokesSolver<2> problem_22(NSparam);
+ FluidDynamicsNitsche<2> problem_22(NSparam);
problem_22.solve();
}
@@ -56,7 +56,7 @@ main(int argc, char *argv[])
prm.parse_input(argv[1]);
NSparam.parse(prm);
- GLSNitscheNavierStokesSolver<3> problem_33(NSparam);
+ FluidDynamicsNitsche<3> problem_33(NSparam);
problem_33.solve();
}
diff --git a/applications/lethe-fluid/gls_navier_stokes.cc b/applications/lethe-fluid/gls_navier_stokes.cc
index d5d22e618c..a878de00ec 100644
--- a/applications/lethe-fluid/gls_navier_stokes.cc
+++ b/applications/lethe-fluid/gls_navier_stokes.cc
@@ -45,8 +45,8 @@ main(int argc, char *argv[])
AssertThrow(NSparam.nitsche->number_solids == 0,
SolidWarning(NSparam.nitsche->number_solids,
- "gls_navier_stokes_2d",
- "gls_nitsche_navier_stokes_22"));
+ "lethe-fluid",
+ "lethe-fluid-nitsche"));
GLSNavierStokesSolver<2> problem(NSparam);
problem.solve();
@@ -63,8 +63,8 @@ main(int argc, char *argv[])
AssertThrow(NSparam.nitsche->number_solids == 0,
SolidWarning(NSparam.nitsche->number_solids,
- "gls_navier_stokes_2d",
- "gls_nitsche_navier_stokes_22"));
+ "lethe-fluid",
+ "lethe-fluid-nitsche"));
GLSNavierStokesSolver<3> problem(NSparam);
problem.solve();
diff --git a/doc/doxygen/main.h b/doc/doxygen/main.h
index 2d06590936..9dc50ff49e 100644
--- a/doc/doxygen/main.h
+++ b/doc/doxygen/main.h
@@ -43,7 +43,7 @@
navier_stokes_base_1_1 [label=<FluidDynamicsVANS
(lethe-fluid-vans)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsVANS.html", tooltip="FluidDynamicsVANS"];
navier_stokes_base_1_2 [label=<GLSSharpNavierStokesSolver
(lethe-fluid-sharp)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classGLSSharpNavierStokesSolver.html", tooltip="GLSSharpNavierStokesSolver"];
- navier_stokes_base_1_3 [label=<GLSNitscheNavierStokesSolver
(lethe-fluid-nitsche)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classGLSNitscheNavierStokesSolver.html", tooltip="GLSNitscheNavierStokesSolver"];
+ navier_stokes_base_1_3 [label=<FluidDynamicsNitsche
(lethe-fluid-nitsche)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsNitsche.html", tooltip="FluidDynamicsNitsche"];
navier_stokes_base_1:e -> navier_stokes_base_1_1:w [dir=back];
navier_stokes_base_1:e -> navier_stokes_base_1_2:w [dir=back];
diff --git a/include/solvers/gls_nitsche_navier_stokes.h b/include/solvers/fluid_dynamics_nitsche.h
similarity index 95%
rename from include/solvers/gls_nitsche_navier_stokes.h
rename to include/solvers/fluid_dynamics_nitsche.h
index 15ca961fd5..fc56ec9909 100644
--- a/include/solvers/gls_nitsche_navier_stokes.h
+++ b/include/solvers/fluid_dynamics_nitsche.h
@@ -14,8 +14,8 @@
* ---------------------------------------------------------------------
*/
-#ifndef lethe_gls_nitsche_navier_stokes_h
-#define lethe_gls_nitsche_navier_stokes_h
+#ifndef lethe_fluid_dynamics_nitsche_h
+#define lethe_fluid_dynamics_nitsche_h
#include
#include
@@ -38,10 +38,10 @@ using namespace dealii;
*/
template
-class GLSNitscheNavierStokesSolver : public GLSNavierStokesSolver
+class FluidDynamicsNitsche : public GLSNavierStokesSolver
{
public:
- GLSNitscheNavierStokesSolver(SimulationParameters &nsparam);
+ FluidDynamicsNitsche(SimulationParameters &nsparam);
virtual void
solve() override;
diff --git a/source/solvers/CMakeLists.txt b/source/solvers/CMakeLists.txt
index 4c502c2d0e..4446f5aaee 100644
--- a/source/solvers/CMakeLists.txt
+++ b/source/solvers/CMakeLists.txt
@@ -9,7 +9,7 @@ add_library(lethe-solvers
flow_control.cc
fluid_dynamics_block.cc
gls_navier_stokes.cc
- gls_nitsche_navier_stokes.cc
+ fluid_dynamics_nitsche.cc
heat_transfer.cc
heat_transfer_assemblers.cc
heat_transfer_scratch_data.cc
@@ -49,7 +49,7 @@ add_library(lethe-solvers
../../include/solvers/flow_control.h
../../include/solvers/fluid_dynamics_block.h
../../include/solvers/gls_navier_stokes.h
- ../../include/solvers/gls_nitsche_navier_stokes.h
+ ../../include/solvers/fluid_dynamics_nitsche.h
../../include/solvers/heat_transfer.h
../../include/solvers/heat_transfer_assemblers.h
../../include/solvers/heat_transfer_scratch_data.h
diff --git a/source/solvers/gls_nitsche_navier_stokes.cc b/source/solvers/fluid_dynamics_nitsche.cc
similarity index 96%
rename from source/solvers/gls_nitsche_navier_stokes.cc
rename to source/solvers/fluid_dynamics_nitsche.cc
index a58b976086..b974a5cd49 100644
--- a/source/solvers/gls_nitsche_navier_stokes.cc
+++ b/source/solvers/fluid_dynamics_nitsche.cc
@@ -21,7 +21,7 @@
#include
#include
-#include
+#include
#include
@@ -32,9 +32,9 @@
#include
#include
-// Constructor for class GLSNitscheNavierStokesSolver
+// Constructor for class FluidDynamicsNitsche
template
-GLSNitscheNavierStokesSolver::GLSNitscheNavierStokesSolver(
+FluidDynamicsNitsche::FluidDynamicsNitsche(
SimulationParameters &p_nsparam)
: GLSNavierStokesSolver(p_nsparam)
{
@@ -60,7 +60,7 @@ GLSNitscheNavierStokesSolver::GLSNitscheNavierStokesSolver(
template
template
void
-GLSNitscheNavierStokesSolver::assemble_nitsche_restriction()
+FluidDynamicsNitsche::assemble_nitsche_restriction()
{
TimerOutput::Scope t(this->computing_timer, "Nitsche assemble restriction");
@@ -238,7 +238,7 @@ GLSNitscheNavierStokesSolver::assemble_nitsche_restriction()
template <>
Tensor<1, 3>
-GLSNitscheNavierStokesSolver<2, 3>::calculate_forces_on_solid(
+FluidDynamicsNitsche<2, 3>::calculate_forces_on_solid(
const unsigned int i_solid)
{
std::shared_ptr> &solid_ph =
@@ -334,7 +334,7 @@ GLSNitscheNavierStokesSolver<2, 3>::calculate_forces_on_solid(
template
Tensor<1, spacedim>
-GLSNitscheNavierStokesSolver::calculate_forces_on_solid(
+FluidDynamicsNitsche::calculate_forces_on_solid(
const unsigned int i_solid)
{
std::shared_ptr> &solid_ph =
@@ -418,7 +418,7 @@ GLSNitscheNavierStokesSolver::calculate_forces_on_solid(
template
Tensor<1, 3>
-GLSNitscheNavierStokesSolver::calculate_torque_on_solid(
+FluidDynamicsNitsche::calculate_torque_on_solid(
const unsigned int i_solid)
{
std::shared_ptr> &solid_ph =
@@ -524,7 +524,7 @@ GLSNitscheNavierStokesSolver::calculate_torque_on_solid(
template
void
-GLSNitscheNavierStokesSolver::postprocess_solid_forces(
+FluidDynamicsNitsche::postprocess_solid_forces(
const unsigned int i_solid,
bool first_solid_forces)
{
@@ -608,7 +608,7 @@ GLSNitscheNavierStokesSolver::postprocess_solid_forces(
template
void
-GLSNitscheNavierStokesSolver::postprocess_solid_torques(
+FluidDynamicsNitsche::postprocess_solid_torques(
const unsigned int i_solid,
bool first_solid_torques)
{
@@ -691,7 +691,7 @@ GLSNitscheNavierStokesSolver::postprocess_solid_torques(
template
void
-GLSNitscheNavierStokesSolver::solve()
+FluidDynamicsNitsche::solve()
{
// Fluid setup
read_mesh_and_manifolds(
@@ -817,7 +817,7 @@ GLSNitscheNavierStokesSolver::solve()
template
void
-GLSNitscheNavierStokesSolver::output_solid_particles(
+FluidDynamicsNitsche::output_solid_particles(
const unsigned int i_solid)
{
std::shared_ptr> &particle_handler =
@@ -845,7 +845,7 @@ GLSNitscheNavierStokesSolver::output_solid_particles(
template
void
-GLSNitscheNavierStokesSolver::output_solid_triangulation(
+FluidDynamicsNitsche::output_solid_triangulation(
const unsigned int i_solid)
{
#if (DEAL_II_VERSION_MAJOR < 10 && DEAL_II_VERSION_MINOR < 4)
@@ -905,7 +905,7 @@ GLSNitscheNavierStokesSolver::output_solid_triangulation(
template
void
-GLSNitscheNavierStokesSolver::refine_mesh()
+FluidDynamicsNitsche::refine_mesh()
{
bool refinement_step;
if (this->simulation_parameters.mesh_adaptation.refinement_at_frequency)
@@ -946,7 +946,7 @@ GLSNitscheNavierStokesSolver::refine_mesh()
template
void
-GLSNitscheNavierStokesSolver::assemble_matrix_and_rhs()
+FluidDynamicsNitsche::assemble_matrix_and_rhs()
{
this->GLSNavierStokesSolver::assemble_system_matrix();
@@ -957,7 +957,7 @@ GLSNitscheNavierStokesSolver::assemble_matrix_and_rhs()
template
void
-GLSNitscheNavierStokesSolver::assemble_rhs()
+FluidDynamicsNitsche::assemble_rhs()
{
this->GLSNavierStokesSolver::assemble_system_rhs();
@@ -966,7 +966,7 @@ GLSNitscheNavierStokesSolver::assemble_rhs()
template
void
-GLSNitscheNavierStokesSolver::write_checkpoint()
+FluidDynamicsNitsche::write_checkpoint()
{
// Write solid base checkpoint
for (unsigned int i_solid = 0; i_solid < solids.size(); ++i_solid)
@@ -1007,7 +1007,7 @@ GLSNitscheNavierStokesSolver::write_checkpoint()
template
void
-GLSNitscheNavierStokesSolver::read_checkpoint()
+FluidDynamicsNitsche::read_checkpoint()
{
this->GLSNavierStokesSolver::read_checkpoint();
@@ -1070,6 +1070,6 @@ GLSNitscheNavierStokesSolver::read_checkpoint()
// Pre-compile the 2D and 3D Navier-Stokes solver to ensure that the library
// is valid before we actually compile the solver This greatly helps with
// debugging
-template class GLSNitscheNavierStokesSolver<2>;
-template class GLSNitscheNavierStokesSolver<2, 3>;
-template class GLSNitscheNavierStokesSolver<3>;
+template class FluidDynamicsNitsche<2>;
+template class FluidDynamicsNitsche<2, 3>;
+template class FluidDynamicsNitsche<3>;