OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
202 stars 65 forks source link

TimeseriesOutputComp allocates memory unnecessarily #1095

Closed robfalck closed 1 month ago

robfalck commented 1 month ago

Description

TimeseriesOutputComp calls lagrange_matrices and saves the resulting interpolation and differentiation matrices even if they are not needed.

In the most common use case where a timeseries does no interpolation and computes no rates, these matrices are not necessary.

Furthermore, when differentiation matrices are not needed, we should skip their computation since they can be expensive when segments have a large number of discretization nodes, as is the case with Birkhoff transcription.

Example

N/A

Dymos Version

1.11.1-dev

Relevant environment information

No response