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

fix docstring of trixi_include #1422

Merged
merged 1 commit into from
May 3, 2023
Merged

Conversation

ranocha
Copy link
Member

@ranocha ranocha commented May 2, 2023

Before:

julia> using Trixi

help?> trixi_include
search: trixi_include

  trixi_include([mod::Module=Main,] elixir::AbstractString; kwargs...)

  include the file elixir and evaluate its content in the global scope of module mod. You can override specific
  assignments in elixir by supplying keyword arguments. It's basic purpose is to make it easier to modify some
  parameters while running Trixi from the REPL. Additionally, this is used in tests to reduce the computational
  burden for CI while still providing examples with sensible default values for users.

  Before replacing assignments in elixir, the keyword argument maxiters is inserted into calls to solve and
  Trixi.solve with it's default value used in the SciML ecosystem for ODEs, see
  https://diffeq.sciml.ai/stable/basics/commonsolveropts/#Miscellaneous.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> redirect_stdout(devnull) do
           trixi_include(@__MODULE__, joinpath(examples_dir(), "tree_1d_dgsem", "elixir_advection_extended.jl"),
                         tspan=(0.0, 0.1))
           sol.t[end]
         end
  [ Info: You just called `trixi_include`. Julia may now compile the code, please be patient.
  0.1

After:

julia> using Trixi

help?> trixi_include
search: trixi_include

  trixi_include([mod::Module=Main,] elixir::AbstractString; kwargs...)

  include the file elixir and evaluate its content in the global scope of module mod. You can override specific
  assignments in elixir by supplying keyword arguments. It's basic purpose is to make it easier to modify some
  parameters while running Trixi.jl from the REPL. Additionally, this is used in tests to reduce the
  computational burden for CI while still providing examples with sensible default values for users.

  Before replacing assignments in elixir, the keyword argument maxiters is inserted into calls to solve and
  Trixi.solve with it's default value used in the SciML ecosystem for ODEs, see the "Miscellaneous" section of
  the documentation (https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/).

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> redirect_stdout(devnull) do
           trixi_include(@__MODULE__, joinpath(examples_dir(), "tree_1d_dgsem", "elixir_advection_extended.jl"),
                         tspan=(0.0, 0.1))
           sol.t[end]
         end
  [ Info: You just called `trixi_include`. Julia may now compile the code, please be patient.
  0.1

Note the wrong link in the old version.

@ranocha ranocha added the documentation Improvements or additions to documentation label May 2, 2023
@ranocha ranocha requested a review from sloede May 2, 2023 15:28
Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what happened there, but I approve of this change

@ranocha ranocha enabled auto-merge (squash) May 2, 2023 15:32
@ranocha ranocha merged commit 5133c36 into main May 3, 2023
28 checks passed
@ranocha ranocha deleted the hr/fix_docs_of_trixi_include branch May 3, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants