Skip to content

Initialize problem from interpolated tables#129

Draft
adamdempsey90 wants to merge 1 commit into
developfrom
dempsey/fields
Draft

Initialize problem from interpolated tables#129
adamdempsey90 wants to merge 1 commit into
developfrom
dempsey/fields

Conversation

@adamdempsey90

@adamdempsey90 adamdempsey90 commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Background

This is a way to start a simulation from either a previous simulation or from an arbitrary function of space.

To really support the latter use case, though, we should probably just link in pybind11.

Description of Changes

Checklist

  • New features are documented
  • Tests added for bug fixes and new features
  • (@lanl.gov employees) Update copyright on changed files
  • Any contribution that was created or modified with the assistance of generative AI must have a comment disclosing this such as // This file was created in part or in whole by generative AI

Comment thread src/pgen/field.hpp
const int nspecies = v.GetSize(0, gas::prim::density());
for (int n = 0; n < nspecies; ++n) {
const auto id = v(0, gas::prim::density(n)).sparse_id;
const Real rho = sp.gas_rho.interpToReal(xv[2], xv[1], xv[0], id);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the slow way. It would be nice to instead create a DataBox that uses the v(0,gas::prim::density()) memory directly and interpolate all species at the same time.

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