diff options
author | 2020-04-16 17:09:47 -0700 | |
---|---|---|
committer | 2020-04-16 17:09:47 -0700 | |
commit | 92a94366aaf793542e6b9af409ba900df0a9637b (patch) | |
tree | cc005fbba17dda2f90e9c1f2b094e3f8fdf8878b /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 7373aaf36378a98ba890dedbbfe4f5e879671e66 (diff) | |
download | WarpX-92a94366aaf793542e6b9af409ba900df0a9637b.tar.gz WarpX-92a94366aaf793542e6b9af409ba900df0a9637b.tar.zst WarpX-92a94366aaf793542e6b9af409ba900df0a9637b.zip |
Particle Plotfile Filter (#724)
* functors to select particles
* add const
* oops, typo
* Update Source/Particles/Filter/FilterFunctors.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Apply suggestions from code review @ax3l
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* use SuperParticleType
* New particle filter.
* Fix bug
* Add doc
* Modify doc
* Test
* Modify based on suggestions
* Change units of ux,uy,uz
* Modify doc
* Move to constructor
* Minor
* Update Source/Diagnostics/ParticleIO.cpp
Co-Authored-By: Andrew Myers <atmyers2@gmail.com>
* Minor
* Apply suggestions from code review
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Andrew Myers <atmyers2@gmail.com>
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 982f3277f..c63b94a27 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -164,6 +164,20 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp plot_flags[plot_flag_size-1] = 1; } #endif + + // build filter functors + m_do_random_filter = pp.query("random_fraction", m_random_fraction); + m_do_uniform_filter = pp.query("uniform_stride", m_uniform_stride); + std::string buf; + m_do_parser_filter = pp.query("plot_filter_function(t,x,y,z,ux,uy,uz)", buf); + if (m_do_parser_filter) { + std::string function_string = ""; + Store_parserString(pp,"plot_filter_function(t,x,y,z,ux,uy,uz)", + function_string); + m_particle_filter_parser.reset(new ParserWrapper<7>( + makeParser(function_string,{"t","x","y","z","ux","uy","uz"}))); + } + } PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core) |