Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

This PR adds comprehensive documentation for several undocumented parts of the SciMLBase.jl general API. Based on analysis of the codebase, I've identified and documented major gaps in the public API documentation.

New Documentation Added

1. Function Wrappers (interfaces/FunctionWrappers.md)

  • Documents the AD integration wrapper system including:
    • TimeGradientWrapper, UJacobianWrapper, TimeDerivativeWrapper
    • UDerivativeWrapper, ParamJacobianWrapper, JacobianWrapper
  • Essential for understanding automatic differentiation integration
  • Covers both in-place and out-of-place function forms

2. Integrator Interface (interfaces/IntegratorInterface.md)

  • Comprehensive documentation of fine-grained integrator control functions:
    • Cache management: get_tmp_cache, resize_non_user_cache!, etc.
    • Time control: add_tstop!, set_t!, get_dt, etc.
    • State management: set_u!, u_modified!, terminate!, etc.
  • Critical for advanced users needing solver control

3. Ensemble Analysis (interfaces/EnsembleAnalysis.md)

  • Documents ~30 statistical analysis functions for Monte Carlo simulations:
    • Timestep/timepoint statistics: timestep_mean, timepoint_quantile, etc.
    • Time series analysis: timeseries_steps_mean, componentwise_mean
    • Correlation analysis: timepoint_cor, timestep_cov
  • Important for uncertainty quantification and parameter studies

4. Clock System (interfaces/ClockSystem.md)

  • Documents the timing system for discrete and hybrid models:
    • Clock types: PeriodicClock, EventClock, SolverStepClock
    • Clock traits: is_discrete_time_domain, isclock, etc.
    • IndexedClock system for multi-rate applications

5. Algorithm Traits (interfaces/AlgorithmTraits.md)

  • Documents algorithm capability checking functions:
    • AD compatibility: isautodifferentiable, forwarddiffs_model
    • Number support: allows_arbitrary_number_types, allowscomplex
    • Behavior traits: isadaptive, isdiscrete, etc.
    • Utility functions: isinplace, numargs, check_keywords

Impact

These additions document approximately 100+ exported functions and types that were previously undocumented, representing substantial portions of the public API that advanced users need for:

  • Performance optimization and memory management
  • Custom integrator development and control
  • Ensemble simulation analysis and uncertainty quantification
  • Hybrid system modeling with discrete events
  • Algorithm selection and compatibility checking

Documentation Build

✅ Documentation builds successfully with julia --project=docs/ docs/make.jl
✅ All new files are properly integrated into the documentation structure via pages.jl
✅ Code formatted with JuliaFormatter using SciMLStyle

Test Plan

The documentation build passes successfully. No code changes were made - only documentation additions.

🤖 Generated with Claude Code

ChrisRackauckas and others added 6 commits August 15, 2025 07:31
- Add FunctionWrappers.md: Documents AD integration wrappers
- Add IntegratorInterface.md: Documents fine-grained solver control
- Add EnsembleAnalysis.md: Documents statistical analysis functions
- Add ClockSystem.md: Documents discrete/hybrid timing system
- Add AlgorithmTraits.md: Documents algorithm capability traits
- Update pages.jl to include new documentation files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Improve EnsembleAnalysis.md with additional advanced functions
- Enhance AlgorithmTraits.md with more comprehensive examples
- Add SpecializedProblems.md documenting specialized problem types:
  * NonlinearLeastSquaresProblem, SCCNonlinearProblem
  * SampledIntegralProblem, IncrementingODEProblem
  * TwoPointBVProblem, IntervalNonlinearProblem
  * HomotopyNonlinearFunction and related types
- Update pages.jl to include new documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Remove IntegratorInterface.md and FunctionWrappers.md documentation pages
- Add proper docstrings to function wrapper types in src/function_wrappers.jl:
  * AbstractWrappedFunction, TimeGradientWrapper, UJacobianWrapper
  * TimeDerivativeWrapper, UDerivativeWrapper, ParamJacobianWrapper
  * JacobianWrapper - all with comprehensive documentation
- Add docstrings to integrator cache functions in src/integrator_interface.jl:
  * user_cache, u_cache, du_cache, ratenoise_cache, rand_cache
- Add docstrings to clock trait functions in src/clock.jl:
  * isclock, issolverstepclock, iscontinuous, iseventclock
  * is_discrete_time_domain
- Update pages.jl to remove deleted documentation files
- Documentation builds successfully with proper docstring integration

This follows best practices by documenting the API directly in source code
rather than maintaining separate documentation files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Delete SpecializedProblems.md - information should come from docstrings
- Delete EnsembleAnalysis.md - functions already have proper docstrings
- Delete AlgorithmTraits.md - algorithm traits should be documented via docstrings
- Update pages.jl to remove references to deleted documentation files
- Documentation builds successfully with streamlined approach

This completes the transition to a docstring-only documentation approach,
ensuring API documentation is maintained directly in source code rather
than separate markdown files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 453dd52 into SciML:master Aug 15, 2025
48 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants