Skip to content

Commit

Permalink
Rename all Nitsche files using Fluid Dynamics prefix (#1228)
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-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.

Former-commit-id: de2a7b7
  • Loading branch information
lpsaavedra authored Aug 7, 2024
1 parent 9a80395 commit add6ae4
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 35 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-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
Expand Down
2 changes: 1 addition & 1 deletion applications/lethe-fluid-nitsche/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* ---------------------------------------------------------------------
*/

#include "solvers/gls_nitsche_navier_stokes.h"
#include "solvers/fluid_dynamics_nitsche.h"

int
main(int argc, char *argv[])
Expand Down Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand Down
8 changes: 4 additions & 4 deletions applications/lethe-fluid/gls_navier_stokes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
navier_stokes_base_1_1 [label=<<B>FluidDynamicsVANS</B> <br/>(lethe-fluid-vans)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classFluidDynamicsVANS.html", tooltip="FluidDynamicsVANS"];
navier_stokes_base_1_2 [label=<<B>GLSSharpNavierStokesSolver</B> <br/>(lethe-fluid-sharp)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classGLSSharpNavierStokesSolver.html", tooltip="GLSSharpNavierStokesSolver"];
navier_stokes_base_1_3 [label=<<B>GLSNitscheNavierStokesSolver</B> <br/>(lethe-fluid-nitsche)>,href="https://chaos-polymtl.github.io/lethe/doxygen/classGLSNitscheNavierStokesSolver.html", tooltip="GLSNitscheNavierStokesSolver"];
navier_stokes_base_1_3 [label=<<B>FluidDynamicsNitsche</B> <br/>(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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <core/exceptions.h>
#include <core/solid_base.h>
Expand All @@ -38,10 +38,10 @@ using namespace dealii;
*/

template <int dim, int spacedim = dim>
class GLSNitscheNavierStokesSolver : public GLSNavierStokesSolver<spacedim>
class FluidDynamicsNitsche : public GLSNavierStokesSolver<spacedim>
{
public:
GLSNitscheNavierStokesSolver(SimulationParameters<spacedim> &nsparam);
FluidDynamicsNitsche(SimulationParameters<spacedim> &nsparam);

virtual void
solve() override;
Expand Down
4 changes: 2 additions & 2 deletions source/solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <core/time_integration_utilities.h>
#include <core/utilities.h>

#include <solvers/gls_nitsche_navier_stokes.h>
#include <solvers/fluid_dynamics_nitsche.h>

#include <deal.II/base/multithread_info.h>

Expand All @@ -32,9 +32,9 @@
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>

// Constructor for class GLSNitscheNavierStokesSolver
// Constructor for class FluidDynamicsNitsche
template <int dim, int spacedim>
GLSNitscheNavierStokesSolver<dim, spacedim>::GLSNitscheNavierStokesSolver(
FluidDynamicsNitsche<dim, spacedim>::FluidDynamicsNitsche(
SimulationParameters<spacedim> &p_nsparam)
: GLSNavierStokesSolver<spacedim>(p_nsparam)
{
Expand All @@ -60,7 +60,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::GLSNitscheNavierStokesSolver(
template <int dim, int spacedim>
template <bool assemble_matrix>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::assemble_nitsche_restriction()
FluidDynamicsNitsche<dim, spacedim>::assemble_nitsche_restriction()
{
TimerOutput::Scope t(this->computing_timer, "Nitsche assemble restriction");

Expand Down Expand Up @@ -238,7 +238,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::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<Particles::ParticleHandler<3>> &solid_ph =
Expand Down Expand Up @@ -334,7 +334,7 @@ GLSNitscheNavierStokesSolver<2, 3>::calculate_forces_on_solid(

template <int dim, int spacedim>
Tensor<1, spacedim>
GLSNitscheNavierStokesSolver<dim, spacedim>::calculate_forces_on_solid(
FluidDynamicsNitsche<dim, spacedim>::calculate_forces_on_solid(
const unsigned int i_solid)
{
std::shared_ptr<Particles::ParticleHandler<dim, spacedim>> &solid_ph =
Expand Down Expand Up @@ -418,7 +418,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::calculate_forces_on_solid(

template <int dim, int spacedim>
Tensor<1, 3>
GLSNitscheNavierStokesSolver<dim, spacedim>::calculate_torque_on_solid(
FluidDynamicsNitsche<dim, spacedim>::calculate_torque_on_solid(
const unsigned int i_solid)
{
std::shared_ptr<Particles::ParticleHandler<spacedim>> &solid_ph =
Expand Down Expand Up @@ -524,7 +524,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::calculate_torque_on_solid(

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::postprocess_solid_forces(
FluidDynamicsNitsche<dim, spacedim>::postprocess_solid_forces(
const unsigned int i_solid,
bool first_solid_forces)
{
Expand Down Expand Up @@ -608,7 +608,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::postprocess_solid_forces(

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::postprocess_solid_torques(
FluidDynamicsNitsche<dim, spacedim>::postprocess_solid_torques(
const unsigned int i_solid,
bool first_solid_torques)
{
Expand Down Expand Up @@ -691,7 +691,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::postprocess_solid_torques(

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::solve()
FluidDynamicsNitsche<dim, spacedim>::solve()
{
// Fluid setup
read_mesh_and_manifolds(
Expand Down Expand Up @@ -817,7 +817,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::solve()

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::output_solid_particles(
FluidDynamicsNitsche<dim, spacedim>::output_solid_particles(
const unsigned int i_solid)
{
std::shared_ptr<Particles::ParticleHandler<spacedim>> &particle_handler =
Expand Down Expand Up @@ -845,7 +845,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::output_solid_particles(

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::output_solid_triangulation(
FluidDynamicsNitsche<dim, spacedim>::output_solid_triangulation(
const unsigned int i_solid)
{
#if (DEAL_II_VERSION_MAJOR < 10 && DEAL_II_VERSION_MINOR < 4)
Expand Down Expand Up @@ -905,7 +905,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::output_solid_triangulation(

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::refine_mesh()
FluidDynamicsNitsche<dim, spacedim>::refine_mesh()
{
bool refinement_step;
if (this->simulation_parameters.mesh_adaptation.refinement_at_frequency)
Expand Down Expand Up @@ -946,7 +946,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::refine_mesh()

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::assemble_matrix_and_rhs()
FluidDynamicsNitsche<dim, spacedim>::assemble_matrix_and_rhs()
{
this->GLSNavierStokesSolver<spacedim>::assemble_system_matrix();

Expand All @@ -957,7 +957,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::assemble_matrix_and_rhs()

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::assemble_rhs()
FluidDynamicsNitsche<dim, spacedim>::assemble_rhs()
{
this->GLSNavierStokesSolver<spacedim>::assemble_system_rhs();

Expand All @@ -966,7 +966,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::assemble_rhs()

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::write_checkpoint()
FluidDynamicsNitsche<dim, spacedim>::write_checkpoint()
{
// Write solid base checkpoint
for (unsigned int i_solid = 0; i_solid < solids.size(); ++i_solid)
Expand Down Expand Up @@ -1007,7 +1007,7 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::write_checkpoint()

template <int dim, int spacedim>
void
GLSNitscheNavierStokesSolver<dim, spacedim>::read_checkpoint()
FluidDynamicsNitsche<dim, spacedim>::read_checkpoint()
{
this->GLSNavierStokesSolver<spacedim>::read_checkpoint();

Expand Down Expand Up @@ -1070,6 +1070,6 @@ GLSNitscheNavierStokesSolver<dim, spacedim>::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>;

0 comments on commit add6ae4

Please sign in to comment.