Skip to content

Particle moments to csv#35

Open
gyalla wants to merge 4 commits intomainfrom
output_particle_moments
Open

Particle moments to csv#35
gyalla wants to merge 4 commits intomainfrom
output_particle_moments

Conversation

@gyalla
Copy link
Copy Markdown
Collaborator

@gyalla gyalla commented Apr 9, 2026

No description provided.

@gyalla gyalla force-pushed the output_particle_moments branch from 0294aa8 to 0371151 Compare April 17, 2026 13:09
@gyalla gyalla requested a review from reuterb April 17, 2026 13:12

const bool need_header = fileIsEmpty(filename);

std::ofstream out(filename, std::ios::app);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this mean append? Is the way this is structured mean that the same file can keep getting appended to if you don't delete it between sims?

const std::string& file_prefix,
const int step,
const double time)
{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we put this in a free function a la DumpParticles.cpp? e.g.,

void dumpParticleMoments(const ParticleOperations& particle_operations, 
                                               const ParticleContainer& particles,
                                               const std::string& filename_prefix,
                                               const int step,
                                               const double time) 
{
  auto & number_density = particle_operations.getNumberDensity(particles);
  ...
}

If not now, we should later.

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.

2 participants