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

WIP: General unsteady adjoint weighted integration #3247

Open
wants to merge 11 commits into
base: devel
Choose a base branch
from

Conversation

vikramvgarg
Copy link
Contributor

@vikramvgarg vikramvgarg commented Apr 24, 2022

This PR aims to condense and organize the different integrate_xyz_timestep methods currently present in TimeSolver. The scattered integrate_xyz_timestep implementations will be consolidated into a single advance_postprocessing_timestep method.

TS::integrate_qoi_timestep, integrate_adjoint_sensitivity and integrate_adjoint_refinement_error_estimate will be removed from the library and moved to user/example code. The lambda's to achieve their functionality will be added to relevant adjoint examples.

More details:

In general, to integrate a function f across a time interval [0, T], we have the quadrature:
int_{0}^{T} f(u,z) dt ~ (sum_{i=1}^{N_outer_timesteps} ( sum_{j=1}^{N_inner_steps} w_ij f(u^j,z^j) )

  1. advance_posprocessing_timestep will take a vector of std::functions as the argument, which specify f(u^j,z^j).
  2. advance_posprocessing_timestep will manage the time incrementation, solution and mesh retrieval from history and provide quadrature weights w_ij as per the particular time stepping scheme.
  3. The std::functions will also receive a system reference which they can use for any system level operations, for example calling system.qoi().

… and its 1st level derived classes.

1) The new advance_postprocessing_timestep takes a vector of std::function as arguments and provides
these functions with the right time integration quadrature.
2) advance_postprocessing_timestep manages the time incrementation, retrieval of solutions and meshes.
1) Provide user access to the last used timestep. Overloaded, since adaptive time solver
needs to ask core solver what deltat it used last.
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.

1 participant