Skip to content

Add accelerator - #381

Draft
hgangwar wants to merge 8 commits into
SCOREC:developfrom
hgangwar:add_accelerator
Draft

hgangwar wants to merge 8 commits into
SCOREC:developfrom
hgangwar:add_accelerator

Conversation

@hgangwar

Copy link
Copy Markdown
Contributor

This PR adds the transient coupling accelerator interface and an initial Aitken relaxation implementation.

  • Accelerator: defines the interface for updating coupling iterates.
  • AitkenAccelerator: dynamically adjusts the relaxation factor using changes between successive interface residuals.
  • BeginWindow: resets iteration history at the start of each coupling time window.
  • Unit tests verify the initial relaxation, Aitken update, and window reset behavior.

Usage

  pcms::transient::AitkenAccelerator accelerator(0.5);

  accelerator.BeginWindow();

  std::vector<double> x_in{1.0, 2.0};
  std::vector<double> x_out{2.0, 4.0};

  accelerator.Update(x_in, x_out);

Here, x_in is the current interface iterate and x_out is the interface result produced by the coupled solve. After Update, x_in contains the relaxed iterate for the next fixed-point iteration.

N.B.: this PR needs to rebased once PR #380 is merged.

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