From 41b38c50fab915d2f864eec8e5961a374bea0508 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 25 Nov 2024 19:51:57 +0000 Subject: [PATCH] build based on c309c2b --- previews/PR60/.documenter-siteinfo.json | 2 +- previews/PR60/lib/checkpointing/index.html | 2 +- .../quickstart/{a6f7bb28.svg => 51a1434d.svg} | 60 +++++++++---------- previews/PR60/quickstart/index.html | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) rename previews/PR60/quickstart/{a6f7bb28.svg => 51a1434d.svg} (83%) diff --git a/previews/PR60/.documenter-siteinfo.json b/previews/PR60/.documenter-siteinfo.json index eaa848d..df1ddb6 100644 --- a/previews/PR60/.documenter-siteinfo.json +++ b/previews/PR60/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-25T19:51:25","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-25T19:51:53","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/previews/PR60/lib/checkpointing/index.html b/previews/PR60/lib/checkpointing/index.html index d5094e0..6902984 100644 --- a/previews/PR60/lib/checkpointing/index.html +++ b/previews/PR60/lib/checkpointing/index.html @@ -3,4 +3,4 @@ alg, model, loop, -)

This macro is supposed to be only used in conjunction with ChainRules. It does not initialize the shadowcopy. Apply the checkpointing scheme alg on the loop loop expression. model is the primal struct. shadowmodel contains the adjoints and is created here. It is supposed to be initialized by ChainRules.

source

Supported Schemes

Checkpointing.RevolveType
Revolve

This is a Julia adaptation of the functionality of Revolve; see Alg. 799 published by Griewank et al. A minor extension is the optional bundle parameter that allows to treat as many loop iterations in one tape/adjoint sweep. If bundle is 1, the default, then the behavior is that of Alg. 799.

source
Checkpointing.PeriodicType
Periodic

Periodic checkpointing scheme.

source

Supported Storages

Checkpointing.ArrayStorageType
ArrayStorage

Array (RAM) storage for checkpointing.

source
Checkpointing.HDF5StorageType
HDF5Storage

A storage type for checkpointing that uses HDF5 files to store the checkpoints.

source

Developer variables for implementing new schemes

Checkpointing.SchemeType
Scheme

Abstract type from which all checkpointing schemes are derived.

source
Checkpointing.ActionFlagType
ActionFlag

Each checkpointing algorithm currently uses the same ActionFlag type for setting the next action in the checkpointing scheme none: no action store: store a checkpoint now equivalent to TAKESHOT in Alg. 79 restore: restore a checkpoint now equivalent to RESTORE in Alg. 79 forward: execute iteration(s) forward equivalent to ADVANCE in Alg. 79 firstuturn: tape iteration(s); optionally leave to return later; and (upon return) do the adjoint(s) equivalent to FIRSTTURN in Alg. 799 uturn: tape iteration(s) and do the adjoint(s) equivalent to YOUTURN in Alg. 79 done: we are done with adjoining the loop equivalent to the terminate enum value in Alg. 79

source
Checkpointing.ActionType
Action

Stores the state of the checkpointing scheme after an action is taken. * actionflag is the next action * iteration is number of iterations for move forward * startiteration is the loop step to start from * cpnum is the checkpoint index number

source
+)

This macro is supposed to be only used in conjunction with ChainRules. It does not initialize the shadowcopy. Apply the checkpointing scheme alg on the loop loop expression. model is the primal struct. shadowmodel contains the adjoints and is created here. It is supposed to be initialized by ChainRules.

source

Supported Schemes

Checkpointing.RevolveType
Revolve

This is a Julia adaptation of the functionality of Revolve; see Alg. 799 published by Griewank et al. A minor extension is the optional bundle parameter that allows to treat as many loop iterations in one tape/adjoint sweep. If bundle is 1, the default, then the behavior is that of Alg. 799.

source
Checkpointing.PeriodicType
Periodic

Periodic checkpointing scheme.

source

Supported Storages

Checkpointing.ArrayStorageType
ArrayStorage

Array (RAM) storage for checkpointing.

source
Checkpointing.HDF5StorageType
HDF5Storage

A storage type for checkpointing that uses HDF5 files to store the checkpoints.

source

Developer variables for implementing new schemes

Checkpointing.SchemeType
Scheme

Abstract type from which all checkpointing schemes are derived.

source
Checkpointing.ActionFlagType
ActionFlag

Each checkpointing algorithm currently uses the same ActionFlag type for setting the next action in the checkpointing scheme none: no action store: store a checkpoint now equivalent to TAKESHOT in Alg. 79 restore: restore a checkpoint now equivalent to RESTORE in Alg. 79 forward: execute iteration(s) forward equivalent to ADVANCE in Alg. 79 firstuturn: tape iteration(s); optionally leave to return later; and (upon return) do the adjoint(s) equivalent to FIRSTTURN in Alg. 799 uturn: tape iteration(s) and do the adjoint(s) equivalent to YOUTURN in Alg. 79 done: we are done with adjoining the loop equivalent to the terminate enum value in Alg. 79

source
Checkpointing.ActionType
Action

Stores the state of the checkpointing scheme after an action is taken. * actionflag is the next action * iteration is number of iterations for move forward * startiteration is the loop step to start from * cpnum is the checkpoint index number

source
diff --git a/previews/PR60/quickstart/a6f7bb28.svg b/previews/PR60/quickstart/51a1434d.svg similarity index 83% rename from previews/PR60/quickstart/a6f7bb28.svg rename to previews/PR60/quickstart/51a1434d.svg index 5d5892f..9ac6855 100644 --- a/previews/PR60/quickstart/a6f7bb28.svg +++ b/previews/PR60/quickstart/51a1434d.svg @@ -1,44 +1,44 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/previews/PR60/quickstart/index.html b/previews/PR60/quickstart/index.html index 4927c1b..543147c 100644 --- a/previews/PR60/quickstart/index.html +++ b/previews/PR60/quickstart/index.html @@ -54,4 +54,4 @@ return heat.Tnext, dheat.Tnext[2:end-1] end
heat (generic function with 1 method)

Plot function values:

tsteps = 500
-T, dT = heat(Revolve{Heat}(tsteps,4), tsteps)
([20.0, 19.28670708893302, 18.5762559822926, 17.865804875652184, 17.163811520281293, 16.461818164910405, 15.773698196009292, 15.085578227108181, 14.416422194357889, 13.747266161607596  …  0.0010844643164675824, 0.0008681767992163476, 0.0007135124080400669, 0.0005588480168637862, 0.000445160866081522, 0.00033147371529925775, 0.0002427191223882328, 0.00015396452947720788, 7.698226473860394e-5, 0.0], [0.0356607964401121, 0.07117950265889618, 0.10669762026127153, 0.14179285030017058, 0.17688683371117586, 0.2112871477986924, 0.24568541302418895, 0.27913548144214495, 0.31258246870379675, 0.3448485923782427  …  0.3448485923782427, 0.31258246870379675, 0.27913548144214495, 0.24568541302418895, 0.2112871477986924, 0.17688683371117586, 0.14179285030017058, 0.10669762026127153, 0.07117950265889618, 0.0356607964401121])

Plot gradient with respect to sum(T):

plot(dT)
Example block output +T, dT = heat(Revolve{Heat}(tsteps,4), tsteps)
([20.0, 19.28670708893302, 18.5762559822926, 17.865804875652184, 17.163811520281293, 16.461818164910405, 15.773698196009292, 15.085578227108181, 14.416422194357889, 13.747266161607596  …  0.0010844643164675824, 0.0008681767992163476, 0.0007135124080400669, 0.0005588480168637862, 0.000445160866081522, 0.00033147371529925775, 0.0002427191223882328, 0.00015396452947720788, 7.698226473860394e-5, 0.0], [0.0356607964401121, 0.07117950265889618, 0.10669762026127153, 0.14179285030017058, 0.17688683371117586, 0.2112871477986924, 0.24568541302418895, 0.27913548144214495, 0.31258246870379675, 0.3448485923782427  …  0.3448485923782427, 0.31258246870379675, 0.27913548144214495, 0.24568541302418895, 0.2112871477986924, 0.17688683371117586, 0.14179285030017058, 0.10669762026127153, 0.07117950265889618, 0.0356607964401121])

Plot gradient with respect to sum(T):

plot(dT)
Example block output