From 8c60d703d23206e35f8382f07d911471acfe010d Mon Sep 17 00:00:00 2001 From: lxvm Date: Wed, 6 Dec 2023 01:10:11 -0500 Subject: [PATCH] add comment explaining keyword parameter precedence --- src/apps.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apps.jl b/src/apps.jl index 92c140a..c7b3fbb 100644 --- a/src/apps.jl +++ b/src/apps.jl @@ -2,6 +2,12 @@ # arguments, except that we typically don't want to provide defaults in order to require # that the user provide the necessary data for the problem +# The precedence of parameters is: +# canonical parameters < parameters passed to integrand constructor < parameters passed to solver +# in particular, canonical parameters are only used to initialize the solver, never to solve +# We are able to provide this precedence of parameters by making all parameters keyword +# arguments. Moreover, positional arguments are reserved for internal use. + # Typically we also want to transform the problem based on the parameters, e.g. # - precompute some function that only depends on parameters, not variables # - truncate the limits of frequency integration