diff options
author | 2020-09-21 12:42:02 +0200 | |
---|---|---|
committer | 2020-09-21 12:42:02 +0200 | |
commit | f9f3aa6e96e9c7827bef1f449fa2ce3d86505a23 (patch) | |
tree | c26ef7e8aa0517e1df521d245fbe6bf2a6809adf /Source/Particles/ElementaryProcess/QEDInternals/QedTableParserHelperFunctions.H | |
parent | 789f0da95e409b035cfffcacbb75dc847243e30a (diff) | |
download | WarpX-f9f3aa6e96e9c7827bef1f449fa2ce3d86505a23.tar.gz WarpX-f9f3aa6e96e9c7827bef1f449fa2ce3d86505a23.tar.zst WarpX-f9f3aa6e96e9c7827bef1f449fa2ce3d86505a23.zip |
Coupling WarpX with an ✨improved✨ version of the QED library (#1198)
* Initial work to couple improved QED module to WarpX
* WIP to couple with WarpX the new QED library
* Continuing work to couple the new version of the QED library with WarpX
* progress towards completing coupling with new version of QED library
* WarpX coupled with new version of QED library
* default behavior is to display table generation progress
* some host device functions are now device only
* fixed bug
* bugfixing
* updating tests
* updated test
* updated test
* added initial version of tests (not working)
* added check and updated a comment
* fixed bug
* added inputfiles and analysis script for new BW tests
* test for BW process are ready
* modified test
* make lgtm happy
* removed TABs
* initial work to add QS tests (not working)
* removed old tests
* fixed bug in script
* changed position of evolution of optical depth
* progress with QSR tests
* improved test
* very low energy photons are always eliminated
* added tests to regression suite
* improved test
* improved tests
* removed redundant parameter
* removed trailing white space
* updated documentation
* fix lgtm warnings
* fixed missing check on chi parameter
* fixed missing check on chi parameter & bugfixing
* improved comments
* increased tolerance in tests
* updated units in test
* now test succeds if the error is extremely small
* updated checksums
* fixed bug
* fixed some unused or uninitialized variables warnings
* now using ignore_unused instead of commenting out some variables
* fixed warnings
* partial fix of a test
* fixed test
* fixed test
* added checksums
* fixed tests
* fixed benchmark for qed_schwinger2
* removed checksums for tests which do no exist anymore
* fixed checksums for several qed tests
* fixed checksums for several qed tests
* fixed checksums
* removed unwanted checksum
* fixed checksum
* removed files which should have been deleted
* add some const
* [skip ci] added some docstrings and some const
* Update Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* added some docstrings and some const
* replaced ManagedVectors with DeviceVectors
* Update Source/Particles/ElementaryProcess/QEDInternals/QedWrapperCommons.H
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* added some const
* removed unwanted assert
* updated comment
* changed position of GPU synchronization directive
* Update Docs/source/running_cpp/parameters.rst
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Examples/Modules/qed/quantum_synchrotron/analysis.py
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Examples/Modules/qed/quantum_synchrotron/analysis.py
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Examples/Modules/qed/breit_wheeler/analysis.py
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Examples/Modules/qed/breit_wheeler/analysis.py
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* add do_plot option to some analysis scripts
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* uncomment a line
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* simplified input scripts for BW tests
* simplified input scripts for QS tests
* removed unwanted files
* simplified analysis script
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* reverted modification to schwinger analysis script
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* remove outdated comment
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Source/Particles/MultiParticleContainer.cpp
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* fix warnings
* made test more robust
* reset benchmark for qed_breit_wheeler_2d
* fixed bug in test
* make test more robust
* made test more robust
* Update Examples/Modules/qed/quantum_synchrotron/analysis.py
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update Examples/Modules/qed/quantum_synchrotron/analysis.py
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
* Update run_test.sh
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Tools <warpx@lbl.gov>
Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Particles/ElementaryProcess/QEDInternals/QedTableParserHelperFunctions.H')
-rw-r--r-- | Source/Particles/ElementaryProcess/QEDInternals/QedTableParserHelperFunctions.H | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/Source/Particles/ElementaryProcess/QEDInternals/QedTableParserHelperFunctions.H b/Source/Particles/ElementaryProcess/QEDInternals/QedTableParserHelperFunctions.H deleted file mode 100644 index dd66f626f..000000000 --- a/Source/Particles/ElementaryProcess/QEDInternals/QedTableParserHelperFunctions.H +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright 2019 Luca Fedeli, Maxence Thevenet - * - * This file is part of WarpX. - * - * License: BSD-3-Clause-LBNL - */ -#ifndef WARPX_amrex_qed_table_parser_helper_functions_h_ -#define WARPX_amrex_qed_table_parser_helper_functions_h_ - -/** - * This header contains helper functions to safely extract data - * (e.g. integers, floating point numbers) from raw binary data - * (i.e. a char*) and to convert arrays into raw binary data. - */ - -#include <AMReX_Vector.H> -#include <tuple> - -namespace QedUtils{ - /** - * This function safely extracts an amrex::Vector<T> from raw binary data. - * T must be a simple datatype (e.g. an int, a float, a double...). - * - * @param[in] p_data a pointer to the binary stream - * @param[in] how_many how many T should be read from stream - * @param[in] p_last a pointer to the last element of the char* array - * @return {a tuple containing - * 1) flag (which is false if p_last is exceeded) - * 2) a Vector of T - * 3) a pointer to a new location of the binary data (after having read how_many T)} - */ - template <class T> - std::tuple<bool, amrex::Vector<T>, const char*>parse_raw_data_vec( - const char* p_data, size_t how_many, const char* const p_last) - { - amrex::Vector<T> res; - if(p_data + sizeof(T)*how_many > p_last) - return std::make_tuple(false, res, nullptr); - - auto r_data = reinterpret_cast<const T*>(p_data); - - res.assign(r_data, r_data + how_many); - - p_data += sizeof(T)*how_many; - return std::make_tuple(true, res, p_data); - } - - /** - * This function safely extracts a T from raw binary data. - * T must be a simple datatype (e.g. an int, a float, a double...). - * - * @param[in] p_data a pointer to the binary stream - * @param[in] p_last a pointer to the last element of the char* array - * @return {a tuple containing - * 1) flag (which is false if p_last is exceeded) - * 2) a T - * 3) a pointer to a new location of the binary data (after having read 1 T)} - */ - template <class T> - std::tuple<bool, T, const char*> parse_raw_data( - const char* p_data, const char* const p_last) - { - T res; - if(p_data + sizeof(T) > p_last) - return std::make_tuple(false, res, nullptr); - - auto r_data = reinterpret_cast<const T*>(p_data); - - res = *r_data; - - p_data += sizeof(T); - return std::make_tuple(true, res, p_data); - } - - /** - * This function converts a C-style array of T into - * a Vector<char> (i.e. raw binary data) and adds it - * to an existing Vector<char> passed by reference - * @param[in] p_data a pointer to the beginning of the array - * @param[in] how_many number of elements of type T in the array - * @param[in,out] raw_data data will be appended to this vector - */ - template <class T> - void add_data_to_vector_char ( - const T* p_data, size_t how_many, amrex::Vector<char>& raw_data) - { - raw_data.insert( - raw_data.end(), - reinterpret_cast<const char*>(p_data), - reinterpret_cast<const char*>(p_data) + - sizeof(T)*how_many - ); - } -}; - -#endif //WARPX_amrex_qed_table_parser_helper_functions_h_ |