Skip to content

Avoid redundant calculations for geometries with constant Jacobian #107

@mikeingold

Description

@mikeingold

Currently, integrals have to run jacobian at every point in the domain where the integrand function is evaluated. However, many geometries have linear parametric functions that will produce the exact same jacobian at every valid point in the geometry, making every function call after the first redundant.

Ideas:

  • Identify all geometry types that this applies to
  • Maybe create a special case single-argument jacobian(geometry) for these cases?
    • Map jacobian(geometry, ts) -> jacobian(geometry), or jacobian(geometry) -> jacobian(geometry, zeros(T, paramdim(geometry)))?
  • Use memoization to cache results?
  • Maybe create another set of _integral workers that dispatch on these cases and move the differential calculation outside the integral?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions