Skip to content

Conversation

JamesMcClung
Copy link
Collaborator

At a certain point, I decided to start from scratch in injector_boundary_inflow.hxx because I wanted a cleaner API for specifying how to sample particles than setup_particles. (As a bonus, it also avoids std::function.)

The result is a monolithic InjectorBoundaryInflow::operator()(mprts, mflds) that injects particles and updates fields all at once. It's a combination of multiple inlined Inflow::inject_into_* methods and PushParticlesVb::push_mprts(). The only alternative seemed to be injecting particles, retrieving those particles via an accessor, reverse-calculating their trajectories, and then updating currents.

It fails the integration test by violating the continuity and gauss checks. Part of that may be the incorrect boundary conditions—it currently uses reflecting instead of open BCs, since the latter segfaults—but I'm sure there are other problems, too.

grid can change mid-run, so reference to it might become invalid
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