aboutsummaryrefslogtreecommitdiff
path: root/Source/Parser/WarpXParser.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Parser/WarpXParser.H')
-rw-r--r--Source/Parser/WarpXParser.H10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Parser/WarpXParser.H b/Source/Parser/WarpXParser.H
index 863b35fb8..703b1effc 100644
--- a/Source/Parser/WarpXParser.H
+++ b/Source/Parser/WarpXParser.H
@@ -21,7 +21,7 @@
#include <omp.h>
#endif
-class GpuParser;
+template <int N> class GpuParser;
class WarpXParser
{
@@ -56,7 +56,7 @@ public:
std::set<std::string> symbols () const;
- friend class GpuParser;
+ template <int N> friend class GpuParser;
private:
void clear ();
@@ -71,9 +71,11 @@ private:
#ifdef _OPENMP
std::vector<struct wp_parser*> m_parser;
mutable std::vector<std::array<amrex::Real,16> > m_variables;
+ mutable std::vector<std::vector<std::string> > m_varnames;
#else
struct wp_parser* m_parser = nullptr;
mutable std::array<amrex::Real,16> m_variables;
+ mutable std::vector<std::string> m_varnames;
#endif
};
@@ -82,9 +84,9 @@ amrex::Real
WarpXParser::eval () const noexcept
{
#ifdef _OPENMP
- return wp_ast_eval(m_parser[omp_get_thread_num()]->ast);
+ return wp_ast_eval(m_parser[omp_get_thread_num()]->ast,nullptr);
#else
- return wp_ast_eval(m_parser->ast);
+ return wp_ast_eval(m_parser->ast,nullptr);
#endif
}