OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
AbstractAmrWriter.h
Go to the documentation of this file.
1 //
2 // Class AbstractAmrWriter
3 // Abstract base class for writing AMR data to output files.
4 //
5 // Copyright (c) 2016 - 2020, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
6 // All rights reserved
7 //
8 // Implemented as part of the PhD thesis
9 // "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10 //
11 // This file is part of OPAL.
12 //
13 // OPAL is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20 //
21 #ifndef ABSTRACT_AMR_WRITER_H
22 #define ABSTRACT_AMR_WRITER_H
23 
24 #include "Amr/AmrObject.h"
25 #include "Amr/AmrDefs.h"
27 
29 
30 public:
43  const amr::AmrVectorFieldContainer_t& efield,
44  const amr::AmrIntArray_t& refRatio,
45  const amr::AmrGeomContainer_t& geom,
46  const int& nLevel,
47  const double& time,
48  const double& scale = 1.0) = 0;
49 
55  virtual void writeBunch(const AmrPartBunch* bunch_p,
56  const double& time,
57  const double& scale = 1.0) = 0;
58 
59  virtual ~AbstractAmrWriter() { }
60 
61 };
62 
63 #endif
amrex::Vector< AmrVectorField_t > AmrVectorFieldContainer_t
Definition: AmrDefs.h:42
amrex::Vector< AmrGeometry_t > AmrGeomContainer_t
Definition: AmrDefs.h:43
amrex::Vector< std::unique_ptr< AmrField_t > > AmrScalarFieldContainer_t
Definition: AmrDefs.h:41
amrex::Vector< int > AmrIntArray_t
Definition: AmrDefs.h:47
virtual void writeBunch(const AmrPartBunch *bunch_p, const double &time, const double &scale=1.0)=0
virtual ~AbstractAmrWriter()
virtual void writeFields(const amr::AmrScalarFieldContainer_t &rho, const amr::AmrScalarFieldContainer_t &phi, const amr::AmrVectorFieldContainer_t &efield, const amr::AmrIntArray_t &refRatio, const amr::AmrGeomContainer_t &geom, const int &nLevel, const double &time, const double &scale=1.0)=0