Skip to content

Commit

Permalink
Rename and clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunYen-Chen committed Jan 27, 2025
1 parent 211ae00 commit cbcf7fc
Show file tree
Hide file tree
Showing 46 changed files with 47 additions and 52 deletions.
1 change: 0 additions & 1 deletion .github/workflows/update_test_problem_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
paths:
- 'example/test_problem/*/*/README.md'
# - 'example/test_problem/Template/README.md'
- 'tool/wiki/sync_test_problem_pages.py'

env:
Expand Down
90 changes: 45 additions & 45 deletions doc/wiki/Test-Problems.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
> [!CAUTION]
> Please do not edit this file(page) manually since the workflow will overwrite your changes.
> Please do not edit this file (page) manually since the workflow will overwrite your changes.
>
> This file(page) is automatically generated by the workflow `Update test problem wiki page` using the script `tool/wiki/sync_test_problem_pages.py`.
> This file (page) is automatically generated by the workflow `Update test problem wiki page` using the script `tool/wiki/sync_test_problem_pages.py`.
>
> The workflow is triggered by push changes to any of `example/test_problem/*/*/README.md` and `tool/wiki/sync_test_problem_pages.py`.
Before going to the test problem, please check out the demos in [[Quick Start]].

# ELBDM tests
[[ DiskHeating \| Test-Problems:-DiskHeating ]]
[[DiskHeating | Test-Problems:-DiskHeating]]

[[ ExtPot \| Test-Problems:-ExtPot ]]
[[ExtPot | Test-Problems:-ExtPot]]

[[ GaussianWavePacket \| Test-Problems:-GaussianWavePacket ]]
[[GaussianWavePacket | Test-Problems:-GaussianWavePacket]]

[[ HaloMerger \| Test-Problems:-HaloMerger ]]
[[HaloMerger | Test-Problems:-HaloMerger]]

[[ IsolatedHalo \| Test-Problems:-IsolatedHalo ]]
[[IsolatedHalo | Test-Problems:-IsolatedHalo]]

[[ JeansInstabilityComoving \| Test-Problems:-JeansInstabilityComoving ]]
[[JeansInstabilityComoving | Test-Problems:-JeansInstabilityComoving]]

[[ LSS \| Test-Problems:-LSS ]]
[[LSS | Test-Problems:-LSS]]

[[ LSS_Hybrid \| Test-Problems:-LSS_Hybrid ]]
[[LSS_Hybrid | Test-Problems:-LSS_Hybrid]]

[[ Perturbation \| Test-Problems:-Perturbation ]]
[[Perturbation | Test-Problems:-Perturbation]]

[[ PlaneWave \| Test-Problems:-PlaneWave ]]
[[PlaneWave | Test-Problems:-PlaneWave]]

[[ RestrictionMismatch \| Test-Problems:-RestrictionMismatch ]]
[[RestrictionMismatch | Test-Problems:-RestrictionMismatch]]

[[ SelfSimilarHalo \| Test-Problems:-SelfSimilarHalo ]]
[[SelfSimilarHalo | Test-Problems:-SelfSimilarHalo]]

[[ Soliton \| Test-Problems:-Soliton ]]
[[Soliton | Test-Problems:-Soliton]]

[[ VortexPairLinear \| Test-Problems:-VortexPairLinear ]]
[[VortexPairLinear | Test-Problems:-VortexPairLinear]]

[[ VortexPairLinear_Hybrid \| Test-Problems:-VortexPairLinear_Hybrid ]]
[[VortexPairLinear_Hybrid | Test-Problems:-VortexPairLinear_Hybrid]]

[[ VortexPairRotating \| Test-Problems:-VortexPairRotating ]]
[[VortexPairRotating | Test-Problems:-VortexPairRotating]]

[[ VortexPairRotating_Hybrid \| Test-Problems:-VortexPairRotating_Hybrid ]]
[[VortexPairRotating_Hybrid | Test-Problems:-VortexPairRotating_Hybrid]]


# Hydro tests
[[ AGORA_IsolatedGalaxy \| Test-Problems:-AGORA_IsolatedGalaxy ]]
[[AGORA_IsolatedGalaxy | Test-Problems:-AGORA_IsolatedGalaxy]]

[[ AcousticWave \| Test-Problems:-AcousticWave ]]
[[AcousticWave | Test-Problems:-AcousticWave]]

[[ BlastWave \| Test-Problems:-BlastWave ]]
[[BlastWave | Test-Problems:-BlastWave]]

[[ Bondi \| Test-Problems:-Bondi ]]
[[Bondi | Test-Problems:-Bondi]]

[[ CDM_LSS \| Test-Problems:-CDM_LSS ]]
[[CDM_LSS | Test-Problems:-CDM_LSS]]

[[ CMZ \| Test-Problems:-CMZ ]]
[[CMZ | Test-Problems:-CMZ]]

[[ CR_Diffusion \| Test-Problems:-CR_Diffusion ]]
[[CR_Diffusion | Test-Problems:-CR_Diffusion]]

[[ CR_ShockTube \| Test-Problems:-CR_ShockTube ]]
[[CR_ShockTube | Test-Problems:-CR_ShockTube]]

[[ CR_SoundWave \| Test-Problems:-CR_SoundWave ]]
[[CR_SoundWave | Test-Problems:-CR_SoundWave]]

[[ Caustic \| Test-Problems:-Caustic ]]
[[Caustic | Test-Problems:-Caustic]]

[[ ClusterMerger \| Test-Problems:-ClusterMerger ]]
[[ClusterMerger | Test-Problems:-ClusterMerger]]

[[ EnergyPowerSpectrum \| Test-Problems:-EnergyPowerSpectrum ]]
[[EnergyPowerSpectrum | Test-Problems:-EnergyPowerSpectrum]]

[[ Gravity \| Test-Problems:-Gravity ]]
[[Gravity | Test-Problems:-Gravity]]

[[ JeansInstability \| Test-Problems:-JeansInstability ]]
[[JeansInstability | Test-Problems:-JeansInstability]]

[[ Jet \| Test-Problems:-Jet ]]
[[Jet | Test-Problems:-Jet]]

[[ JetICMWall \| Test-Problems:-JetICMWall ]]
[[JetICMWall | Test-Problems:-JetICMWall]]

[[ KelvinHelmholtzInstability \| Test-Problems:-KelvinHelmholtzInstability ]]
[[KelvinHelmholtzInstability | Test-Problems:-KelvinHelmholtzInstability]]

[[ MHD_ABC \| Test-Problems:-MHD_ABC ]]
[[MHD_ABC | Test-Problems:-MHD_ABC]]

[[ MHD_LinearWave \| Test-Problems:-MHD_LinearWave ]]
[[MHD_LinearWave | Test-Problems:-MHD_LinearWave]]

[[ MHD_OrszagTangVortex \| Test-Problems:-MHD_OrszagTangVortex ]]
[[MHD_OrszagTangVortex | Test-Problems:-MHD_OrszagTangVortex]]

[[ ParticleEquilibriumIC \| Test-Problems:-ParticleEquilibriumIC ]]
[[ParticleEquilibriumIC | Test-Problems:-ParticleEquilibriumIC]]

[[ ParticleTest \| Test-Problems:-ParticleTest ]]
[[ParticleTest | Test-Problems:-ParticleTest]]

[[ Plummer \| Test-Problems:-Plummer ]]
[[Plummer | Test-Problems:-Plummer]]

[[ Riemann \| Test-Problems:-Riemann ]]
[[Riemann | Test-Problems:-Riemann]]

[[ SphericalCollapse \| Test-Problems:-SphericalCollapse ]]
[[SphericalCollapse | Test-Problems:-SphericalCollapse]]

[[ Zeldovich \| Test-Problems:-Zeldovich ]]
[[Zeldovich | Test-Problems:-Zeldovich]]


8 changes: 2 additions & 6 deletions tool/wiki/sync_test_problem_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Global constants
#====================================================================================================
EXAMPLE_DIR = "../../example/test_problem/"
WIKI_DIR = "../../doc/wiki/Test-Problem-related/"
WIKI_DIR = "../../doc/wiki/Test-Problems-related/"
OUT_MD = "../../doc/wiki/Test-Problems.md"


Expand Down Expand Up @@ -71,8 +71,6 @@ def CopyAndAddMsg( filename, target ):

# output markdown file with new test problem
with open( OUT_MD, 'w' ) as f:
param_str_format = '| %-100s | %15s | %15s | %15s | %s |\n'

f.write( '> [!CAUTION]\n' )
f.write( '> Please do not edit this file (page) manually since the workflow will overwrite your changes.\n' )
f.write( '>\n' )
Expand All @@ -83,12 +81,10 @@ def CopyAndAddMsg( filename, target ):
f.write( 'Before going to the test problem, please check out the demos in [[Quick Start]].\n' )
f.write( '\n' )

#f.write( "[[ %s \\| %s ]]\n"%("Template", "Test-Problems:-Template") )
#f.write( "\n" )
for model, p in ALL_PATHS.items():
if model == "Template": continue
f.write( "# %s tests\n"%model )
for test in sorted(list(ALL_PATHS[model].keys())):
f.write( "[[ %s \\| %s ]]\n"%(test, "Test-Problems:-%s"%test) )
f.write( "[[%s | %s]]\n"%(test, "Test-Problems:-%s"%test) )
f.write( "\n" )
f.write( "\n" )

0 comments on commit cbcf7fc

Please sign in to comment.