Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yohei iter module #251

Open
wants to merge 236 commits into
base: main
Choose a base branch
from
Open

Yohei iter module #251

wants to merge 236 commits into from

Conversation

yohei-sato-psi
Copy link
Collaborator

I have added

  • physical time information into vtu file.
  • SAVE_RESULTS_UNITS as keyword in control.
    Please check them.

On branch bojan_fixed_cell_ranges

modified:   Shared/Boundary_Mod.f90
new file:   Shared/Browse.h90
modified:   Shared/Grid_Mod.f90
modified:   Shared/Grid_Mod/Bnd_Cond_Ranges.f90
modified:   Shared/Grid_Mod/Sort_Faces_Smart.f90
(Regions would be more usefull globally)

On branch bojan_fixed_cell_ranges

modified:   Generate/Domain_Mod.f90
renamed:    Generate/Domain_Mod/Allocate_Regions.f90 -> Generate/Domain_Mod/Allocate_Ranges.f90
renamed:    Generate/Domain_Mod/Distribute_Regions.f90 -> Generate/Domain_Mod/Distribute_Ranges.f90
modified:   Generate/Generate_Mod/Load_Dom.f90
modified:   Generate/Main_Gen.f90
renamed:    Generate/Region_Mod.f90 -> Generate/Range_Mod.f90
modified:   Generate/Refines_Mod.f90
modified:   Generate/Refines_Mod/Allocate_Levels.f90
modified:   Generate/Refines_Mod/Mark_Cells.f90
modified:   Generate/makefile
modified:   Generate/makefile_explicit_dependencies
Boundary_Mod became Region_Mod.  Also, along the same path,
removed almost all occurences of variables "color" - it was
a bit confusing for users of the code.

On branch bojan_fixed_cell_ranges

modified:   Convert/Convert_Mod/Allocate_Memory.f90
modified:   Convert/Convert_Mod/Calculate_Geometry.f90
modified:   Convert/Convert_Mod/Create_Dual.f90
modified:   Convert/Convert_Mod/Find_Faces.f90
modified:   Convert/Convert_Mod/Find_Parents.f90
modified:   Convert/Convert_Mod/Grid_Topology.f90
modified:   Convert/Convert_Mod/Insert_Buildings.f90
modified:   Convert/Convert_Mod/Load_Fluent.f90
modified:   Convert/Convert_Mod/Load_Gambit.f90
modified:   Convert/Convert_Mod/Load_Gmsh.f90
modified:   Convert/Convert_Mod/N_Bnd_Cells_In_Color.f90
modified:   Convert/Convert_Mod/N_Nodes_In_Bnd_Color.f90
modified:   Convert/makefile
modified:   Convert/makefile_explicit_dependencies
modified:   Divide/makefile
modified:   Divide/makefile_explicit_dependencies
modified:   Generate/Domain_Mod/Distribute_Ranges.f90
modified:   Generate/Generate_Mod/Load_Dom.f90
modified:   Generate/Refines_Mod/Connectivity.f90
modified:   Generate/makefile
modified:   Generate/makefile_explicit_dependencies
modified:   Process/Read_Controls_Mod/Boundary_Conditions.f90
modified:   Process/makefile
modified:   Process/makefile_explicit_dependencies
modified:   Shared/Browse.h90
modified:   Shared/Grid_Mod.f90
modified:   Shared/Grid_Mod/Allocate_Cells.f90
modified:   Shared/Grid_Mod/Bnd_Cond_Name.f90
modified:   Shared/Grid_Mod/Bnd_Cond_Type.f90
modified:   Shared/Grid_Mod/Calculate_Face_Geometry.f90
modified:   Shared/Grid_Mod/Calculate_Wall_Distance.f90
modified:   Shared/Grid_Mod/Load_Cfn.f90
renamed:    Shared/Grid_Mod/Print_Bnd_Cond_List.f90 -> Shared/Grid_Mod/Print_Regions_List.f90
renamed:    Shared/Grid_Mod/Bnd_Cond_Ranges.f90 -> Shared/Grid_Mod/Regions_Ranges.f90
modified:   Shared/Grid_Mod/Save_Cfn.f90
modified:   Shared/Grid_Mod/Save_Vtu_Faces.f90
modified:   Shared/Grid_Mod/Sort_Faces_Smart.f90
modified:   Shared/Grid_Mod/Write_Template_Control_File.f90
renamed:    Shared/Boundary_Mod.f90 -> Shared/Region_Mod.f90
color and bnd_cond are giving space to regions

On branch bojan_fixed_cell_ranges

modified:   Convert/Convert_Mod.f90
modified:   Convert/Convert_Mod/Calculate_Geometry.f90
modified:   Convert/Convert_Mod/Create_Dual.f90
modified:   Convert/Convert_Mod/Find_Parents.f90
modified:   Convert/Convert_Mod/Insert_Buildings.f90
modified:   Convert/Convert_Mod/Load_Fluent.f90
modified:   Convert/Convert_Mod/Load_Gambit.f90
modified:   Convert/Convert_Mod/Load_Gmsh.f90
renamed:    Convert/Convert_Mod/N_Bnd_Cells_In_Color.f90 -> Convert/Convert_Mod/N_Bnd_Cells_In_Region.f90
renamed:    Convert/Convert_Mod/N_Edges_In_Bnd_Color.f90 -> Convert/Convert_Mod/N_Edges_In_Region.f90
renamed:    Convert/Convert_Mod/N_Nodes_In_Bnd_Color.f90 -> Convert/Convert_Mod/N_Nodes_In_Region.f90
modified:   Convert/Convert_Mod/N_Sharp_Edges.f90
modified:   Generate/Domain_Mod/Distribute_Ranges.f90
modified:   Process/Read_Controls_Mod/Boundary_Conditions.f90
modified:   Shared/Grid_Mod.f90
modified:   Shared/Grid_Mod/Calculate_Face_Geometry.f90
modified:   Shared/Grid_Mod/Load_Cfn.f90
modified:   Shared/Grid_Mod/Print_Regions_List.f90
modified:   Shared/Grid_Mod/Regions_Ranges.f90
modified:   Shared/Grid_Mod/Save_Cfn.f90
modified:   Shared/Grid_Mod/Sort_Faces_Smart.f90
modified:   Shared/Grid_Mod/Write_Template_Control_File.f90
On branch bojan_fixed_cell_ranges

modified:   Convert/Main_Con.f90
modified:   Generate/Main_Gen.f90
I didn't see hell of improvements on performance, if any,
but logic tells me this is a better way to implement these
procedures.

On branch bojan_fixed_cell_ranges

modified:   Shared/Comm_Mod/Parallel/Global_Lor_Log_Array.f90
modified:   Shared/Comm_Mod/Parallel/Global_Sum_Int_Array.f90
modified:   Shared/Comm_Mod/Parallel/Global_Sum_Real_Array.f90
This is to allow sub-sequent introductions of new n_region which will entail
inside regions, for both cells and faces.  In a few places, regions for faces
periodic in x, y, and z can be seen (per_x_reg, per_y_reg, per_z_reg).

On branch bojan_fixed_cell_ranges

modified:   Convert/Convert_Mod/Calculate_Geometry.f90
modified:   Convert/Convert_Mod/Create_Dual.f90
modified:   Convert/Convert_Mod/Find_Parents.f90
modified:   Convert/Convert_Mod/Insert_Buildings.f90
modified:   Convert/Convert_Mod/Load_Fluent.f90
modified:   Convert/Convert_Mod/Load_Gambit.f90
modified:   Convert/Convert_Mod/Load_Gmsh.f90
modified:   Convert/Convert_Mod/N_Edges_In_Region.f90
modified:   Convert/Convert_Mod/N_Sharp_Edges.f90
modified:   Generate/Domain_Mod/Distribute_Ranges.f90
modified:   Process/Read_Controls_Mod/Boundary_Conditions.f90
modified:   Shared/Grid_Mod.f90
modified:   Shared/Grid_Mod/Calculate_Face_Geometry.f90
modified:   Shared/Grid_Mod/Load_Cfn.f90
modified:   Shared/Grid_Mod/Print_Regions_List.f90
modified:   Shared/Grid_Mod/Regions_Ranges.f90
modified:   Shared/Grid_Mod/Save_Cfn.f90
modified:   Shared/Grid_Mod/Write_Template_Control_File.f90
On branch bojan_fixed_cell_ranges

modified:   Process/Field_Mod/Gradients/Calculate_Grad_Matrix.f90
modified:   Process/Field_Mod/Gradients/Grad_Component.f90
modified:   Process/Field_Mod/Gradients/Grad_Component_No_Refresh.f90
modified:   Process/Field_Mod/Gradients/Grad_Gauss.f90
modified:   Process/Numerics_Mod/Advection_Term.f90
modified:   Process/Numerics_Mod/Inertial_Term.f90
modified:   Process/Process_Mod/Balance_Volume.f90
modified:   Process/Process_Mod/Compute_Momentum.f90
modified:   Process/Process_Mod/Compute_Momentum_Explicit.f90
modified:   Process/Process_Mod/Convective_Outflow.f90
modified:   Process/Process_Mod/Rhie_And_Chow.f90
modified:   Process/Process_Mod/Update_Boundary_Values.f90
modified:   Shared/Browse.h90
modified:   Shared/Grid_Mod/Sort_Faces_Smart.f90
renamed:    Process/Field_Mod/Utilities/Correct_Fluxes_With_Body_Forces.f90 -> Process/Field_Mod/Utilities/Unused/Correct_Fluxes_With_Body_Forces.f90
renamed:    Process/Field_Mod/Utilities/Inertial_Term_Momentum.f90 -> Process/Field_Mod/Utilities/Unused/Inertial_Term_Momentum.f90
On branch bojan_fixed_cell_ranges

modified:   Divide/Divide_Mod.f90
modified:   Process/Field_Mod.f90
modified:   Process/Numerics_Mod.f90
modified:   Process/Process_Mod.f90
The cell ranges didn't work in parallel, because this procedure
wasn't taking at all the proper order of boundary cells in the
regions.  It has now been fix, but saving of backup files from
Process will also be influenced, which is addressed in the next
commit.

On branch bojan_fixed_cell_ranges

modified:   Divide/Divide_Mod/Save_Subdomains.f90
the formation of cell mappings for parallel backup saving has
to be addressed to.  The changes done here follow the fix of
cell ranges in fix  cf7ca1e

I hope this variant will be a bit more robust, time will tell.

On branch bojan_fixed_cell_ranges

modified:   Shared/Grid_Mod/Form_Maps.f90
On branch bojan_fixed_cell_ranges

modified:   Shared/Browse.h90
On branch bojan_fixed_cell_ranges

modified:   Convert/Convert_Mod.f90
modified:   Convert/Convert_Mod/Find_Parents.f90
modified:   Convert/Convert_Mod/Insert_Buildings.f90
modified:   Shared/Grid_Mod/Load_Cfn.f90
modified:   Shared/Grid_Mod/Save_Cfn.f90
modified:   Shared/Grid_Mod/Write_Template_Control_File.f90
On branch bojan_fixed_cell_ranges

modified:   Process/Read_Controls_Mod.f90
modified:   Process/Read_Controls_Mod/Boundary_Conditions.f90
Since the definition of f_cell and l_cell changed, it was not
entering the loop for calculation of wall distance.  It has
been fixed by the introduction of a macro for browsing.

On branch bojan_fixed_cell_ranges

modified:   Shared/Grid_Mod/Calculate_Wall_Distance.f90
On branch bojan_fixed_cell_ranges

modified:   Shared/Grid_Mod/Form_Maps.f90
modified:   Shared/Grid_Mod/Sort_Faces_Smart.f90
The problem was with the paths.  They are simply not the
same for Fortran's include and preprocessor's #include.

Along the way, I also removed some redundant and unused user
functions.

On branch bojan_fixed_cell_ranges

modified:   Sources/Process/User_Mod.f90
modified:   Tests/Laminar/Flat_Plate/User_Mod/Save_Results.f90
modified:   Tests/Laminar/Membrane/2_Domains/User_Mod/Beginning_Of_Iteration.f90
modified:   Tests/Laminar/Membrane/2_Domains/User_Mod/Initialize_Variables.f90
modified:   Tests/Laminar/Membrane/2_Domains/User_Mod/Interface_Exchange.f90
modified:   Tests/Laminar/Membrane/2_Domains/User_Mod/Jump_Cond.f90
modified:   Tests/Laminar/Membrane/2_Domains/User_Mod/Pv_Sat_Salt.f90
modified:   Tests/Manual/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Save_Results.f90
modified:   Tests/Rans/Backstep_Re_28000/User_Mod/Save_Results.f90
modified:   Tests/Rans/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Save_Results.f90
deleted:    Tests/Vof/Dam_Break_3d/User_Mod/Check_Inside_Box.f90
modified:   Tests/Vof/Dam_Break_3d/User_Mod/Initialize_Variables.f90
deleted:    Tests/Vof/Dam_Break_3d/User_Mod/Vof_Initialization_Box.f90
deleted:    Tests/Vof/Dam_Break_3d/User_Mod/Vof_Interface_Box.f90
typechange: Tests/Vof/Dam_Break_3d/User_Mod/Vof_Quick_Sort.f90
typechange: Tests/Vof/Mencinger_And_Zun/User_Mod/Check_Inside_Box.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/Initialize_Variables.f90
typechange: Tests/Vof/Mencinger_And_Zun/User_Mod/Vof_Initialization_Box.f90
typechange: Tests/Vof/Mencinger_And_Zun/User_Mod/Vof_Interface_Box.f90
typechange: Tests/Vof/Stefan/User_Mod/Check_Inside_Box.f90
modified:   Tests/Vof/Stefan/User_Mod/Initialize_Variables.f90
typechange: Tests/Vof/Stefan/User_Mod/Vof_Initialization_Box.f90
typechange: Tests/Vof/Stefan/User_Mod/Vof_Interface_Box.f90
deleted:    Tests/Vof/User_Mod/Check_Inside_Box.f90
deleted:    Tests/Vof/User_Mod/Vof_Area_Square_Circle.f90
deleted:    Tests/Vof/User_Mod/Vof_Divide_Cuboid.f90
deleted:    Tests/Vof/User_Mod/Vof_Exact_Cylinder.f90
deleted:    Tests/Vof/User_Mod/Vof_Initialization_Box.f90
deleted:    Tests/Vof/User_Mod/Vof_Initialization_Cylinder.f90
deleted:    Tests/Vof/User_Mod/Vof_Initialization_Ellipsoid.f90
deleted:    Tests/Vof/User_Mod/Vof_Initialization_Plane.f90
deleted:    Tests/Vof/User_Mod/Vof_Interface_Box.f90
deleted:    Tests/Vof/User_Mod/Vof_Interface_Cylinder.f90
deleted:    Tests/Vof/User_Mod/Vof_Interface_Ellipsoid.f90
deleted:    Tests/Vof/User_Mod/Vof_Interface_Plane.f90
deleted:    Tests/Vof/User_Mod/Vof_Quick_Sort.f90
deleted:    Tests/Vof/User_Mod/readme
modified:   Tests/test_user_functions_compile.sh
On branch bojan_fixed_cell_ranges

modified:   Divide/Divide_Mod/Save_Subdomains.f90
On branch bojan_fixed_cell_ranges

modified:   Process/Field_Mod/Utilities/Calculate_Fluxes.f90
This implementation was tested heavily agains the Dam_Break_2d case.
What I also learned, something a bit disturbing, that Intel does have
a tendency to change results slighlt when code is refactored, although
the sequence of operations stays the same.  I lost almost a week in
testing trying to find the cause of differences for new implementations.

With GNU Fortran, there are no such issues.

On branch bojan_fixed_cell_ranges

modified:   Vof_Mod.f90
modified:   Vof_Mod/Core/Compute_Vof.f90
modified:   Vof_Mod/Core/Correct_Beta.f90
modified:   Vof_Mod/Core/Discretize.f90
modified:   Vof_Mod/Core/Max_Courant_Number.f90
modified:   Vof_Mod/Core/Predict_Beta.f90
When browsing for starts and ends, is is better to take
a HUGE_INT than the number of boundary cells.  Namelly,
the number of boundary cells could be zero :-S

On branch bojan_fixed_cell_ranges

modified:   Shared/Grid_Mod/Regions_Ranges.f90
On branch bojan_fixed_cell_ranges

modified:   Shared/Assert_Mod/Handle_Assert.f90
With Euler's number being the HUGE int we are on the limit of
representable integers in 32 bit precision.  Any careless
addition or sutraction, can yield the number change its sign.

On branch bojan_fixed_cell_ranges

modified:   Shared/Const_Mod.f90
This is clearly not very important, but is kind of neat.

On branch bojan_fixed_cell_ranges

modified:   Generate/Domain_Mod.f90
modified:   Generate/Domain_Mod/Allocate_Blocks.f90
modified:   Generate/Domain_Mod/Allocate_Lines.f90
modified:   Generate/Domain_Mod/Allocate_Points.f90
modified:   Generate/Domain_Mod/Allocate_Ranges.f90
modified:   Generate/Domain_Mod/Calculate_Node_Coordinates.f90
modified:   Generate/Domain_Mod/Connect_Blocks.f90
modified:   Generate/Domain_Mod/Connect_Periodicity.f90
modified:   Generate/Domain_Mod/Distribute_Nodes.f90
modified:   Generate/Domain_Mod/Distribute_Ranges.f90
modified:   Generate/Domain_Mod/Find_Line.f90
modified:   Generate/Domain_Mod/Find_Surface.f90
modified:   Generate/Domain_Mod/Is_Line_In_Block.f90
modified:   Generate/Domain_Mod/Laplace.f90
modified:   Generate/Main_Gen.f90
On branch bojan_fixed_cell_ranges

modified:   Shared/Grid_Mod/Allocate_Cells.f90
modified:   Shared/Grid_Mod/Allocate_Nodes.f90
On branch bojan_fixed_cell_ranges

modified:   Convert/Convert_Mod/Load_Fluent.f90
modified:   Convert/Convert_Mod/Load_Gambit.f90
modified:   Convert/Convert_Mod/Load_Gmsh.f90
modified:   Generate/Generate_Mod/Load_Dom.f90
new file:   Shared/Grid_Mod/Allocate_Regions.f90
modified:   Shared/Grid_Mod.f90
modified:   Shared/Grid_Mod/Load_Cfn.f90
modified:   Shared/Grid_Mod/Regions_Ranges.f90
modified:   Shared/Grid_Mod/Sort_Faces_Smart.f90
modified:   Shared/Region_Mod.f90
A special function which also takes into account
buffer cells was needed to browse through cell
values in old and older than old time steps.

On branch bojan_fixed_cell_ranges

modified:   Process/Process_Mod/Compute_Momentum.f90
modified:   Shared/Browse.h90
On branch bojan_fixed_cell_ranges

modified:   Vof/Rising_Bubble/generate.scr
On branch bojan_fixed_cell_ranges

modified:   Rans/Channel_Re_Tau_590/Rsm/User_Mod/Source.f90
On branch bojan_fixed_cell_ranges

modified:   Generate_Mod/Load_Dom.f90
Niceno and others added 30 commits April 5, 2023 02:50
Going back to 968a1d8

On branch bojan_more_robust_communicator

modified:   Tokenizer_Mod.f90
In cases of simulaitons with multiple domains, in particulart when
mutliple domains are meshed concurrently in GMSH to ensure comformity
but some are deleted just before saving the files, the error picked
here can occur.  However, in that case it is really not an error but
rather some faces are hanging blank on purpose.

On branch bojan_more_robust_communicator

modified:   Convert_Mod/Find_Parents.f90
OK, so it was not the size of the Tokenizer about which compiler
was complaining, but the size of the Tokenizer when it is inisde
another procedure, this time it was Frameless in Message_Mod.

To resolve the warning, I ditched the local Tokenizer from Frameless
and use global (singleton) one called "Line".  Also, the definition
of the line had to be moved, from File_Mod to Tokenizer_Mod, where it
should have naturally been all along.

On branch bojan_more_robust_communicator

modified:   Shared/File_Mod.f90
modified:   Shared/Message_Mod/Frameless.f90
modified:   Shared/Tokenizer_Mod.f90
when extracting cells from grid.  The way it was before, the Front
elements were pointing from VOF=1 towards VOF=0, which is wrong.

Read also the comments close to the part of the code which changed.
There is no doubt that the whole thing is still a bit nebulous, not
surprising when one uses third party libraries, they are always
shrouded in a bit of mystery.

On branch bojan_more_robust_communicator

modified:   Shared/Polyhedron_Mod/Extract_From_Grid.f90
Funny thing ... in order to resolve this, I had to introduce new
data member into Grid_Mod called "rank", which is just a number
holding the domain number which grid represents.  This rank is set
in Load_Dim (from Grid_Mod) and special assertions are introduced
in File_Mod/Set_Name to make sure the rank is not accidentaly left
at zero.

On branch bojan_more_robust_communicator

modified:   Process/Front_Mod/Save_Debug_Front_Vtu.f90
modified:   Shared/File_Mod/Set_Name.f90
modified:   Shared/Grid_Mod.f90
modified:   Shared/Grid_Mod/Load_Dim.f90
On branch bojan_more_robust_communicator

modified:   Documentation/Syntax/.vim/syntax/control.vim
On branch bojan_more_robust_communicator

modified:   Documentation/Syntax/.vim/syntax/fortran.vim
Date:      Sun Apr 16 11:55:55 2023 +0200

On branch bojan_time_module

modified:   Sources/Process/Backup_Mod/Load.f90
modified:   Sources/Process/Backup_Mod/Save.f90
modified:   Sources/Process/Backup_Mod/Time_To_Save_Backup.f90
modified:   Sources/Process/Field_Mod.f90
modified:   Sources/Process/Field_Mod/Utilities/Report_Vol_Balance.f90
modified:   Sources/Process/Field_Mod/Utilities/Report_Vol_Balance_Start.f90
modified:   Sources/Process/Main_Pro.f90
modified:   Sources/Process/Process_Mod/Compute_Energy.f90
modified:   Sources/Process/Process_Mod/Compute_Momentum.f90
modified:   Sources/Process/Process_Mod/Compute_Pressure.f90
modified:   Sources/Process/Process_Mod/Compute_Scalar.f90
modified:   Sources/Process/Process_Mod/Convective_Outflow.f90
modified:   Sources/Process/Process_Mod/Correct_Velocity.f90
modified:   Sources/Process/Process_Mod/Piso_Algorithm.f90
modified:   Sources/Process/Results_Mod/Main_Results.f90
modified:   Sources/Process/Results_Mod/Save_Vtu_Front.f90
modified:   Sources/Process/Results_Mod/Save_Vtu_Results.f90
modified:   Sources/Process/Results_Mod/Save_Vtu_Surf.f90
modified:   Sources/Process/Results_Mod/Save_Vtu_Swarm.f90
modified:   Sources/Process/Results_Mod/Time_To_Save_Results.f90
modified:   Sources/Process/Results_Mod/Time_To_Save_Swarm.f90
modified:   Sources/Process/Swarm_Mod/Advance_Particles.f90
modified:   Sources/Process/Swarm_Mod/Calculate_Mean.f90
new file:   Sources/Process/Time_Mod.f90
new file:   Sources/Process/Time_Mod/Curr_Dt.f90
new file:   Sources/Process/Time_Mod/First_Dt.f90
new file:   Sources/Process/Time_Mod/Get_Time.f90
new file:   Sources/Process/Time_Mod/Increase_Time.f90
new file:   Sources/Process/Time_Mod/Last_Dt.f90
new file:   Sources/Process/Time_Mod/Needs_More_Steps.f90
new file:   Sources/Process/Time_Mod/Set_Curr_Dt.f90
new file:   Sources/Process/Time_Mod/Set_First_Dt.f90
new file:   Sources/Process/Time_Mod/Set_Last_Dt.f90
new file:   Sources/Process/Time_Mod/Set_Time.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Energy.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Momentum.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Pressure.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Scalar.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Vof.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Correct_Velocity.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Iteration.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Simulation.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Time_Step.f90
modified:   Sources/Process/User_Mod/Calculate_Mean.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Energy.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Momentum.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Pressure.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Scalar.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Vof.f90
modified:   Sources/Process/User_Mod/End_Of_Correct_Velocity.f90
modified:   Sources/Process/User_Mod/End_Of_Iteration.f90
modified:   Sources/Process/User_Mod/End_Of_Simulation.f90
modified:   Sources/Process/User_Mod/End_Of_Time_Step.f90
modified:   Sources/Process/User_Mod/Insert_Particles.f90
modified:   Sources/Process/User_Mod/Save_Results.f90
modified:   Sources/Process/User_Mod/Save_Swarm.f90
modified:   Tests/Functionality/Communication/User_Mod/Beginning_Of_Time_Step.f90
modified:   Tests/Functionality/Omp/User_Mod/Beginning_Of_Simulation.f90
modified:   Tests/Hybrid_Les_Rans/Channel_Re_Tau_2000/Uniform_Mesh/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Hybrid_Les_Rans/Channel_Re_Tau_2000/Uniform_Mesh/User_Mod/Save_Results.f90
modified:   Tests/Laminar/Accuracy_Test/Channel_Re_2000/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Laminar/Accuracy_Test/Channel_Re_2000/User_Mod/Save_Results.f90
modified:   Tests/Laminar/Cavity/Thermally_Driven/Conjugate/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Laminar/Cavity/Thermally_Driven/Direct/Variable_Properties_Air/User_Mod/Beginning_Of_Simulation.f90
modified:   Tests/Laminar/Cavity/Thermally_Driven/Direct/Variable_Properties_Air/User_Mod/Beginning_Of_Time_Step.f90
modified:   Tests/Laminar/Cylinder/Vertical/User_Mod/Beginning_Of_Iteration.f90
modified:   Tests/Laminar/Cylinder/Vertical/User_Mod/Save_Results.f90
modified:   Tests/Laminar/Flat_Plate/User_Mod/Plain_Nu.f90
modified:   Tests/Laminar/Flat_Plate/User_Mod/Plain_Profiles.f90
modified:   Tests/Laminar/Flat_Plate/User_Mod/Save_Results.f90
modified:   Tests/Laminar/Membrane/2_Domains/User_Mod/Beginning_Of_Iteration.f90
modified:   Tests/Les/Barc/User_Mod/Beginning_Of_Simulation.f90
modified:   Tests/Les/Channel_Re_Tau_180/Periodic_Domain/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Les/Channel_Re_Tau_180/Periodic_Domain/User_Mod/Save_Results.f90
modified:   Tests/Les/Channel_Re_Tau_180/User_Mod/Save_Results.f90
modified:   Tests/Les/Forrest/User_Mod/Beginning_Of_Time_Step.f90
modified:   Tests/Les/Forrest/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Les/Forrest/User_Mod/Save_Results.f90
modified:   Tests/Les/Pipe_Re_Tau_180/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Les/Pipe_Re_Tau_180/User_Mod/Save_Results.f90
modified:   Tests/Les/Rayleigh_Benard_Convection_Ra_10e09/User_Mod/Save_Results.f90
modified:   Tests/Manual/Channel_Re_Tau_590/Stretched_Mesh/User_Mod/Save_Results.f90
modified:   Tests/Manual/Conjugate/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Manual/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Save_Impinging_Jet_Nu.f90
modified:   Tests/Manual/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Save_Impinging_Jet_Profiles.f90
modified:   Tests/Manual/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Save_Results.f90
modified:   Tests/Manual/Inflows/Option_4/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Manual/Matrix_Of_Cubes/User_Mod/Beginning_Of_Simulation.f90
modified:   Tests/Manual/Rising_Bubble/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Manual/Thermally_Driven/Varible/User_Mod/Beginning_Of_Simulation.f90
modified:   Tests/Manual/Thermally_Driven/Varible/User_Mod/Beginning_Of_Time_Step.f90
modified:   Tests/Rans/Backstep_Re_28000/User_Mod/Backstep_Cf_St.f90
modified:   Tests/Rans/Backstep_Re_28000/User_Mod/Backstep_Profiles.f90
modified:   Tests/Rans/Backstep_Re_28000/User_Mod/Save_Results.f90
modified:   Tests/Rans/Channel_Re_Tau_590/Rsm/User_Mod/Save_Results.f90
modified:   Tests/Rans/Channel_Re_Tau_590/Stretched_Mesh/User_Mod/Save_Results.f90
modified:   Tests/Rans/Channel_Re_Tau_590/Uniform_Mesh/User_Mod/Save_Results.f90
modified:   Tests/Rans/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Impinging_Jet_Nu.f90
modified:   Tests/Rans/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Impinging_Jet_Profiles.f90
modified:   Tests/Rans/Impinging_Jet_2d_Distant_Re_23000/User_Mod/Save_Results.f90
modified:   Tests/Rans/Pipe_Re_Tau_550/User_Mod/Save_Results.f90
modified:   Tests/Rans/Rayleigh_Benard_Convection_Ra_10e09/User_Mod/Save_Results.f90
modified:   Tests/Swarm/Bend_90_Degrees/User_Mod/Insert_Particles.f90
modified:   Tests/Swarm/Channel_Re_Tau_590/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Swarm/Channel_Re_Tau_590/User_Mod/Insert_Particles.f90
modified:   Tests/Swarm/Channel_Re_Tau_590/User_Mod/Save_Results.f90
modified:   Tests/Swarm/Channel_Re_Tau_590/User_Mod/Save_Swarm.f90
modified:   Tests/Swarm/Cylinders_Periodic/User_Mod/Insert_Particles.f90
modified:   Tests/Swarm/Rod_Bundle_Polyhedral/User_Mod/Insert_Particles.f90
modified:   Tests/Swarm/T_Junction_Square/User_Mod/Insert_Particles.f90
modified:   Tests/Swarm/Three_Phase_Flow/User_Mod/Insert_Particles.f90
modified:   Tests/Vof/Dam_Break_3d/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/Beginning_Of_Correct_Velocity.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/End_Of_Compute_Momentum.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/End_Of_Compute_Pressure.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/End_Of_Correct_Velocity.f90
modified:   Tests/Vof/Pie/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Vof/Rising_Bubble/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Vof/Spurious/User_Mod/End_Of_Time_Step.f90
modified:   Tests/Vof/Stefan/User_Mod/End_Of_Compute_Energy.f90
modified:   Tests/Vof/Stefan/User_Mod/End_Of_Compute_Pressure.f90
modified:   Tests/Vof/Stefan/User_Mod/End_Of_Compute_Vof.f90
modified:   Tests/Vof/Sucking/User_Mod/End_Of_Compute_Energy.f90
modified:   Tests/Vof/Sucking/User_Mod/End_Of_Compute_Pressure.f90
modified:   Tests/Vof/Sucking/User_Mod/End_Of_Compute_Vof.f90
modified:   Tests/Vof/Vertical_Tube/User_Mod/End_Of_Time_Step.f90
On branch bojan_time_module

modified:   Time_Mod/Curr_Dt.f90
modified:   Time_Mod/First_Dt.f90
modified:   Time_Mod/Get_Time.f90
modified:   Time_Mod/Increase_Time.f90
modified:   Time_Mod/Last_Dt.f90
modified:   Time_Mod/Needs_More_Steps.f90
modified:   Time_Mod/Set_Curr_Dt.f90
modified:   Time_Mod/Set_First_Dt.f90
modified:   Time_Mod/Set_Last_Dt.f90
modified:   Time_Mod/Set_Time.f90
Also introduced a new procedure in Grid_Mod, Load_And_Prepare_For_Processing
to shorten the Main_Pro for a dozen lines or so.

Date:      Wed Apr 19 18:16:08 2023 +0200

On branch bojan_time_module

modified:   Documentation/Syntax/.vim/syntax/fortran.vim
new file:   Sources/Process/Iter_Mod.f90
new file:   Sources/Process/Iter_Mod/Current.f90
new file:   Sources/Process/Iter_Mod/Get_Max.f90
new file:   Sources/Process/Iter_Mod/Get_Min.f90
new file:   Sources/Process/Iter_Mod/Get_Tol.f90
new file:   Sources/Process/Iter_Mod/Max_Fields_Residual.f90
new file:   Sources/Process/Iter_Mod/Needs_More_Iterations.f90
new file:   Sources/Process/Iter_Mod/Set_Max.f90
new file:   Sources/Process/Iter_Mod/Set_Min.f90
new file:   Sources/Process/Iter_Mod/Set_Tol.f90
modified:   Sources/Process/Main_Pro.f90
modified:   Sources/Process/Process_Mod/Compute_Energy.f90
modified:   Sources/Process/Process_Mod/Compute_Momentum.f90
modified:   Sources/Process/Process_Mod/Compute_Pressure.f90
modified:   Sources/Process/Process_Mod/Compute_Scalar.f90
modified:   Sources/Process/Process_Mod/Correct_Velocity.f90
modified:   Sources/Process/Process_Mod/Piso_Algorithm.f90
modified:   Sources/Process/Read_Controls_Mod.f90
modified:   Sources/Process/Read_Controls_Mod/Boundary_Conditions.f90
new file:   Sources/Process/Read_Controls_Mod/Iterations.f90
modified:   Sources/Process/Read_Controls_Mod/Native_Solvers.f90
modified:   Sources/Process/Read_Controls_Mod/Numerical_Schemes.f90
modified:   Sources/Process/Read_Controls_Mod/Petsc_Solvers.f90
modified:   Sources/Process/Read_Controls_Mod/Physical_Models.f90
modified:   Sources/Process/Read_Controls_Mod/Physical_Properties.f90
modified:   Sources/Process/Read_Controls_Mod/Solvers.f90
modified:   Sources/Process/Turb_Mod.f90
modified:   Sources/Process/Turb_Mod/Compute_F22.f90
modified:   Sources/Process/Turb_Mod/Compute_Stress.f90
modified:   Sources/Process/Turb_Mod/Compute_Variable.f90
modified:   Sources/Process/Turb_Mod/Main_Turb.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Energy.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Momentum.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Pressure.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Compute_Scalar.f90
modified:   Sources/Process/User_Mod/Beginning_Of_Correct_Velocity.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Energy.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Momentum.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Pressure.f90
modified:   Sources/Process/User_Mod/End_Of_Compute_Scalar.f90
modified:   Sources/Process/User_Mod/End_Of_Correct_Velocity.f90
modified:   Sources/Process/makefile
modified:   Sources/Process/makefile_explicit_dependencies
modified:   Sources/Shared/Grid_Mod.f90
new file:   Sources/Shared/Grid_Mod/Load_And_Prepare_For_Processing.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/Beginning_Of_Correct_Velocity.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/End_Of_Compute_Momentum.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/End_Of_Compute_Pressure.f90
modified:   Tests/Vof/Mencinger_And_Zun/User_Mod/End_Of_Correct_Velocity.f90
modified:   Tests/Vof/Stefan/User_Mod/End_Of_Compute_Energy.f90
modified:   Tests/Vof/Stefan/User_Mod/End_Of_Compute_Pressure.f90
modified:   Tests/Vof/Sucking/User_Mod/End_Of_Compute_Energy.f90
modified:   Tests/Vof/Sucking/User_Mod/End_Of_Compute_Pressure.f90
On branch bojan_iter_module

modified:   Sources/Process/Main_Pro.f90
On branch bojan_iter_module

modified:   Documentation/Syntax/.vim/syntax/control.vim
modified:   Documentation/Syntax/.vim/syntax/fortran.vim
The case when residuals did not reached the tolerance level
were not considered at all :-(

On branch bojan_iter_module

modified:   Sources/Process/Iter_Mod/Needs_More_Iterations.f90
There was a lot of mess in calling control functions for
linear solvers, both native and PETSc.  Default solver for
non-symmetric systems was 'cg' in some cases, and what is
much more dramatic, 'cg' was by default coupled with 'asm'
preconditioner which is not symmetric in parallel and and
messes up the convergence (in parallel).

To cite Pierre Jolivet, on of the more experienced PETSc
gurus:

"KSPCG requires a symmetric PC.  By default, PCASMType is
PC_ASM_RESTRICT, which yields a non-symmetric preconditioner.
With a single process, this does not matter, but with more
than one process, it does.  If you switch to -pc_asm_type
basic, KSPCG should converge. That being said, for Laplace
equation, there are much faster alternatives than PCASM, e.g.,
PCGAMG."

On branch bojan_iter_module

modified:   Sources/Process/Read_Controls_Mod/Petsc_Solvers.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Energy.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Momentum.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Potential.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Pressure.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Scalars.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Turbulence.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Vof.f90
modified:   Sources/Shared/Control_Mod/Native/Solver_For_Wall_Distance.f90
Ideally, this should be a separate function.

On branch bojan_iter_module

modified:   C_Petsc_Interface.c
On branch bojan_iter_module

modified:   Petsc_Mod/True/Solve_Petsc.f90
On branch bojan_iter_module

modified:   C_Petsc_Interface.c
On branch bojan_iter_module

modified:   test_build.sh
On branch bojan_iter_module

modified:   Read_Controls_Mod/Petsc_Solvers.f90
…e.g. [m/s], cause trouble in VisIt (visualization software).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants