Skip to content

Séparation des fichiers pour les solveurs de Riemann et les fonctions d'initialisation#34

Open
lukbrb wants to merge 9 commits intodevfrom
refactor/multifiles
Open

Séparation des fichiers pour les solveurs de Riemann et les fonctions d'initialisation#34
lukbrb wants to merge 9 commits intodevfrom
refactor/multifiles

Conversation

@lukbrb
Copy link
Collaborator

@lukbrb lukbrb commented Dec 19, 2025

Pour les solveurs de Riemann, chacun se trouve dans un fichier dédié, dans le dossier riemann. On a accès par défaut aux :

  • HLL
  • HLLC
  • FSLP

Les fichiers d'en-têtes sont inclus dans le fichier RiemannSolvers.h.

Pour les fichiers d'initialisation, le fonctionnement est similaire. Les problèmes sont dans le dossier init, dans lequel on trouve les sous-dossiers hydro et mhd.

Les fichiers d'en-têtes sont inclus dans Init.h.

@lukbrb lukbrb changed the title Refactor/multifiles Séparation des fichiers pour les solveurs de Riemann et les fonctions d'initialisation Dec 19, 2025
@lukbrb lukbrb marked this pull request as ready for review December 19, 2025 07:52
@lukbrb lukbrb force-pushed the refactor/multifiles branch from 262b4af to 09be247 Compare December 19, 2025 17:15
@lukbrb lukbrb force-pushed the refactor/multifiles branch 2 times, most recently from f015f9d to c32be84 Compare January 5, 2026 16:47
@lukbrb lukbrb changed the base branch from main to dev January 5, 2026 16:48
@lukbrb lukbrb force-pushed the refactor/multifiles branch from c32be84 to fe21353 Compare January 6, 2026 15:36
@lukbrb
Copy link
Collaborator Author

lukbrb commented Jan 6, 2026

J'ai refactorisé le switch du solveur de riemann, mais je crois que j'oublie un KOKKOS_INLINE non ?

En tout ça a été validé par avec ma suite de tests

@lukbrb lukbrb force-pushed the refactor/multifiles branch from c9b843d to 3816e61 Compare January 7, 2026 09:37
@mdelorme mdelorme force-pushed the refactor/multifiles branch from 3816e61 to 3cad355 Compare January 13, 2026 15:25
@lukbrb
Copy link
Collaborator Author

lukbrb commented Jan 14, 2026

Concernant la factory, cppcheck se plaint de quelques trucs :

src/init/hydro/Sod.h:19:8: performance: inconclusive: Technically the member function 'fv2d::InitSod < IX >::init' can be static (but you may consider moving to unnamed namespace). [functionStatic]
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/Sod.h:19:8: performance: inconclusive: Technically the member function 'fv2d::InitSod < IY >::init' can be static (but you may consider moving to unnamed namespace). [functionStatic]
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/Blast.h:13:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/Blast.h:13:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/C91.h:13:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/C91.h:13:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/Diffusion.h:13:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/Diffusion.h:13:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/GreshoVortex.h:16:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/GreshoVortex.h:16:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/H84.h:12:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/H84.h:12:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/KelvinHelmholtz.h:16:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/KelvinHelmholtz.h:16:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/hydro/RayleighTaylor.h:13:8: style: The function 'init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFormula.h:16:16: note: Virtual function in base class
  virtual void init(Array Q, const Params &full_params) = 0;
               ^
src/init/hydro/RayleighTaylor.h:13:8: note: Function in derived class
  void init(Array Q, const Params &full_params)
       ^
src/init/InitFactory.h:46:63: performance: Function parameter 'formula_name' should be passed by const reference. [passedByValue]
  static std::shared_ptr<InitFormula> instantiate(std::string formula_name)
                                                              ^
src/init/InitFactory.h:31:43: performance: Function parameter 'formula_name' should be passed by const reference. [passedByValue]
  static bool registerFormula(std::string formula_name)
                                          ^
src/init/InitFactory.h:52:18: style: Variable 'f' can be declared as reference to const [constVariableReference]
      for (auto &f : formulae)
                 ^
src/init/hydro/C91.h:23:18: style: Variable 'x' is assigned a value that is never used. [unreadVariable]
          real_t x = pos[IX];
                 ^
src/init/hydro/H84.h:22:18: style: Variable 'x' is assigned a value that is never used. [unreadVariable]
          real_t x = pos[IX];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments