Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7a87a63 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
RoryBarnes committed Jun 21, 2024
1 parent 752f9d3 commit f358373
Show file tree
Hide file tree
Showing 74 changed files with 2,233 additions and 2,170 deletions.
62 changes: 31 additions & 31 deletions _sources/examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,46 @@ directory of the :code:`VPLanet` repository.



examples/MagmOc_Earth
examples/HabEvapCore
examples/HabitableZone
examples/IceBelts
examples/CassiniStates
examples/ChaoticResonances
examples/MiniNeptuneEvap
examples/GalaxyEffects
examples/EarthInterior
examples/AtmEscKepler-36
examples/CassiniMulti
examples/ParameterSweep
examples/NBodyAtmEsc
examples/StellarEvol
examples/MagneticBraking
examples/LuminosityCycle
examples/CircumbinaryOrbit
examples/HLossTides
examples/TidalEarth
examples/VenusApproxInterior
examples/StellarEvol
examples/DiffLimWaterEscape
examples/VenusWaterLoss
examples/BinaryTides
examples/FfdProxCen
examples/STEEP
examples/AtmEscKepler-36
examples/SS_NBody
examples/ApseLock
examples/VenusApproxInterior
examples/CassiniStates
examples/SSDistOrbDistRot
examples/WaterLossTides
examples/TideLock
examples/MagmOc_GJ1132b
examples/ParameterSweep
examples/MagmOc_Trappist1g
examples/HabitableZone
examples/AtmEscRegimes
examples/IoHeat
examples/GalaxyEffects
examples/RadHeat
examples/CircumbinaryOrbit
examples/TideLock
examples/WaterLossTides
examples/AbioticO2
examples/IceBelts
examples/MagneticBraking
examples/FfdProxCen
examples/ApseLock
examples/NBodyAtmEsc
examples/TidalEarth
examples/AtmEscFlareProxCen
examples/DampedCBP
examples/SS_NBody
examples/RadHeat
examples/MDwarfLuminosity
examples/IoHeat
examples/MagmOc_Earth
examples/SSDistOrbDistRot
examples/HabEvapCore
examples/EarthClimate
examples/EarthInterior
examples/DiffLimWaterEscape
examples/ChaoticResonances
examples/LuminosityCycle
examples/MiniNeptuneEvap
examples/AtmEscFlareProxCen
examples/MagmOc_GJ1132b
examples/AbioticO2
examples/STEEP


Broken
Expand Down
26 changes: 26 additions & 0 deletions _sources/primaryvariable.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ block of code that initializes the other pieces of the UPDATE struct.
malloc(update[iBody].iNumPrimaryVariable * sizeof(int));
control->Evolve.tmpUpdate[iBody].iaBody[iVar] =
malloc(update[iBody].iNumPrimaryVariable * sizeof(int *));
for (iSubStep=0; iSubStep < 4; iSubStep++) {
control->Evolve.daDerivProc[iSubStep][iBody][iVar] =
malloc(update[iBody].iNumEqns[iVar] * sizeof(double));
}
}
// Now allocate memory for the number of processes that affect this variable
Expand All @@ -192,6 +196,28 @@ variable.
assign a new value to this variable, you will overwrite the primary variable's
derivative (which would be bad!).
We then need to add some lines to ```module.c```. In InitializeModule, add
.. code-block:: bash
module->fnFinalizeUpdatePhysics =
malloc(iNumBodies * sizeof(fnFinalizeUpdateCarbManModule));
and in FinalizeModule, add
.. code-block:: bash
module->fnFinalizeUpdatePhysics[iBody] =
malloc(iNumModules * sizeof(fnFinalizeUpdateCarbManModule));
and
.. code-block:: bash
module->fnFinalizeUpdatePhysics[iBody][iModule] = &FinalizeUpdateNULL;
Please add them next to the other similar statements
Next we need to add code to the module file, physics.c in this example, for
which this primary variable will be added. First add a new function that
continues the initialization process:
Expand Down
36 changes: 18 additions & 18 deletions _sources/src.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ Detailed documentation of C source code.
:maxdepth: 1


src/output
src/system
src/module
src/distrot
src/magmoc
src/atmesc
src/update
src/galhabit
src/options
src/distorb
src/stellar
src/control
src/halt
src/vplanet
src/atmesc
src/binary
src/thermint
src/radheat
src/galhabit
src/evolve
src/poise
src/eqtide
src/flare
src/output
src/body
src/update
src/thermint
src/spinbody
src/binary
src/halt
src/vplanet
src/stellar
src/control
src/evolve
src/system
src/verify
src/magmoc
src/eqtide
src/poise
src/distorb
src/module
src/distrot

12 changes: 10 additions & 2 deletions _sources/tests.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,23 @@ further enabling confidence in the code's accuracy.
Test scripts live in the :code:`tests/` directory and are executed automatically
on every pull request with GitHub Actions. To perform the tests, we use :code:`pytest`, which will
find all Python files with the word :code:`test` somewhere in their name (side note:
if it's not meant to be a test, don't put :code:`test` in the file name!).
if it's not meant to be a test, don't put :code:`test` in the file name!). Under the :code:`tests`
directory are subdirectories whose names consists of VPLanet modules, e.g. BINARY and AtmescEqtideStellar.
These subdirectories contain the tests available for the module combinations of the subdirectory name.


The VPLanet team has made it easy to add or revise tests. Inside the :code:`tests/` directory
is a file called :code:`maketest.py`, which will generate a unit test from a set of valid infiles.
So a typical procedure to create a new test is to:

- Create a simulation that executes previously untested functionality
- Verify the results are accurate! (Obvious, we know, but please don't forget!)
- Copy the .in files t
- Create a subdirectory with a unique name for your test.
- Copy the .in files for your test into your new subdirectory
- cd to the :code:`tests` directory and run ```python maketest.py <modules/subdir>```, which the
argument is the relative to path to your new test
- Commit your .in files and the new :code:`test_<subdir>.py" file to the repository
- Issue a PR!
These unit tests not only ensure new modification don't break parts of the code
that already work. In addition, they are used to compute the fraction of the code
Expand Down
Loading

0 comments on commit f358373

Please sign in to comment.