OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
FM3DH5Block.h
Go to the documentation of this file.
1//
2// Class FM3DH5Block
3// Class for dynamic 3D field-maps stored in H5hut files.
4//
5// Copyright (c) 2020, Achim Gsell, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved.
7//
8// This file is part of OPAL.
9//
10// OPAL is free software: you can redistribute it and/or modify
11// it under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// You should have received a copy of the GNU General Public License
16// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17//
18#ifndef CLASSIC_FIELDMAP3DH5BLOCK_H
19#define CLASSIC_FIELDMAP3DH5BLOCK_H
20
21#include "Algorithms/Vektor.h"
22#include "Fields/Definitions.h"
24#include "Fields/FieldArray.h"
25
26#include <memory>
27#include <string>
28
30
31public:
32 virtual bool getFieldstrength (
33 const Vector_t &R, Vector_t &E, Vector_t &B) const;
34
35 virtual ~_FM3DH5Block (
36 );
37
38private:
40 const std::string& filename);
41
42 static FM3DH5Block create(const std::string& filename);
43
44 virtual void readMap (
45 );
46
47 virtual void freeMap (
48 );
49
55 bool hasH_m = true;
56
58 bool loaded_m = false;
59
60 friend class _Fieldmap;
61 friend class _FM3DH5BlockBase;
62};
63
64using FM3DH5Block = std::shared_ptr<_FM3DH5Block>;
65
66#endif
std::shared_ptr< _FM3DH5Block > FM3DH5Block
Definition Definitions.h:63
std::shared_ptr< _FM3DH5Block > FM3DH5Block
Definition FM3DH5Block.h:64
FieldArray FieldstrengthHy_m
Definition FM3DH5Block.h:52
bool hasH_m
False once readMap() has found every Hfield sample to be exactly zero.
Definition FM3DH5Block.h:55
virtual ~_FM3DH5Block()
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
virtual void freeMap()
static FM3DH5Block create(const std::string &filename)
FieldArray FieldstrengthHx_m
Definition FM3DH5Block.h:51
virtual void readMap()
bool loaded_m
readMap() has run. The arrays cannot tell any more: a zero group is released.
Definition FM3DH5Block.h:58
FieldArray FieldstrengthHz_m
Definition FM3DH5Block.h:50