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

remove #ifdefs from phantom #55

Open
danieljprice opened this issue Aug 18, 2020 · 1 comment
Open

remove #ifdefs from phantom #55

danieljprice opened this issue Aug 18, 2020 · 1 comment

Comments

@danieljprice
Copy link
Owner

#ifdefs look horrible in the code, and make testing all possible compile-time combinations very difficult. We should avoid introducing any new #ifdefs, preferencing use of the logical flags from the config module where possible, e.g. if (mhd), if (radiation) etc.

Many of these could also be made into runtime options, since they are mainly there to determine whether memory is allocated for certain arrays. This would need a bit more thought.

For now, we should try to keep as many files as .f90 as possible, rather than .F90, to disallow the use of ugly and unnecessary #ifdef statements. The only allowed use case for #ifdefs should be for linking with external libraries, e.g. MPI, or when the performance really matters (e.g. use of #ifdef PERIODIC in dens, force or kdtree)

danieljprice added a commit that referenced this issue Jun 6, 2022
danieljprice added a commit that referenced this issue Aug 10, 2022
…get temperature instead of calling get_temperature; remove ifdefs in derivs (#55)
danieljprice added a commit to Fitz-Hu/phantom that referenced this issue Sep 9, 2022
s-neilson pushed a commit to s-neilson/phantom that referenced this issue Mar 18, 2023
s-neilson pushed a commit to s-neilson/phantom that referenced this issue Mar 18, 2023
…get temperature instead of calling get_temperature; remove ifdefs in derivs (danieljprice#55)
s-neilson pushed a commit to s-neilson/phantom that referenced this issue Mar 18, 2023
danieljprice added a commit that referenced this issue Mar 23, 2023
danieljprice added a commit that referenced this issue Mar 23, 2023
danieljprice added a commit that referenced this issue Mar 23, 2023
…tils_tables.f90; added isothermal logical flag; add set_default_parameters routine to setup_wind.F90
danieljprice added a commit that referenced this issue Jul 10, 2023
danieljprice added a commit that referenced this issue Jul 10, 2023
danieljprice added a commit that referenced this issue Jul 10, 2023
… allow timestep too small to at least get to writing a dump file
danieljprice added a commit that referenced this issue Jul 10, 2023
danieljprice added a commit that referenced this issue Jul 12, 2023
danieljprice added a commit that referenced this issue Jul 14, 2023
@danieljprice danieljprice mentioned this issue Oct 26, 2023
danieljprice added a commit that referenced this issue Nov 27, 2023
danieljprice added a commit that referenced this issue Apr 9, 2024
…store changes which should not differ from master branch
danieljprice added a commit that referenced this issue Apr 10, 2024
danieljprice added a commit that referenced this issue Apr 10, 2024
danieljprice added a commit that referenced this issue Apr 10, 2024
@danieljprice
Copy link
Owner Author

Current status:

Number of source files (.f90, .F90):      442
Number of .f90 files               :      380
Number of .F90 files               :       62
Number of unique #ifdef statements :       48
Number of total  #ifdef statements :      526

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

No branches or pull requests

1 participant