neko icon indicating copy to clipboard operation
neko copied to clipboard

Remove reduntant constructor in fluid

Open timofeymukha opened this issue 9 months ago • 3 comments

  • Removes the _uvwm constructor. The code inside it overlapped with what was in the _all, and both called common, so the contents of _uvw could just be moved to common.
  • The _all essentially now deals with pressure. I think this should in principle be in fluid_pnpn and it would be most reasonable to move it there in a subsequent PR. E.g. the space of pressure may be different.
  • Moved the code for the output_bdry to a separate subroutine
  • I moved most of the logging to the end of _all. This now resulted in that the log of GS comes before it says "Fluid"
     --------Gather-Scatter--------  
      Comm         :          MPI
      Avg. internal:       290672
      Avg. external:            0
      Backend      :          std
  
      --------Gather-Scatter--------  
      Comm         :          MPI
      Avg. internal:        16336
      Avg. external:            0
      Backend      :          std
  
      --------Gather-Scatter--------  
      Comm         :          MPI
      Avg. internal:       109424
      Avg. external:            0
      Backend      :          std
  
      --------Gather-Scatter--------  
      Comm         :          MPI
      Avg. internal:       560080
      Avg. external:            0
      Backend      :          std
  
      --------Gather-Scatter--------  
      Comm         :          MPI
      Avg. internal:       290672
      Avg. external:            0
      Backend      :          std
  
      ------------Fluid-------------  
      Type       : Modular (Pn/Pn)
      Ksp prs.   : (gmres, hsmg)
       `-abs tol : 1.000000E-07
      Ksp vel.   : (cg, jacobi)
       `-abs tol : 1.000000E-07
      rho        : 1.000000E+00
      mu         : 7.142857E-04
      Dealias    : T
      Save bdry  : T

Since we mostly reuse the GS I think this is fine, but I can move the header back if needed.

timofeymukha avatar May 06 '24 15:05 timofeymukha