-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathZeroField.h
More file actions
63 lines (50 loc) · 1.87 KB
/
ZeroField.h
File metadata and controls
63 lines (50 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
///---------------------------------------------------------------------------------------------------
// file: ZeroField.h
//
// summary: Declares the zero field class
//
// Copyright (c) 2017 Alexander Neumann.
//
// author: Alexander
// date: 06.06.2017
#ifndef INC_ZeroField_H
#define INC_ZeroField_H
///---------------------------------------------------------------------------------------------------
#pragma once
#include "Properties/FieldProperties.h"
#include "SDEFramework/GeneralField.h"
#include "Properties/FieldProperties.h"
template<typename precision>
class ZeroField : public GeneralField<ZeroField<precision>>
{
public:
using ThisClass = ZeroField<precision>;
using Precision = precision;
using Base = GeneralField<ThisClass>;
using Traits = typename Base::Traits;
using FieldProperties = typename Traits::FieldProperties;
using FieldVector = typename Traits::FieldVector;
using FieldParams = typename Traits::FieldParameters;
private:
FieldParams params;
public:
ZeroField(const typename Traits::FieldParameters &input)
: params(input)
{};
ZeroField(const FieldProperties & par) : params(par.template getFieldParameters<Traits::Field_type>()) {};
inline auto getField(const precision) const { return FieldVector::Zero(); };
};
template<typename precision>
class FieldTraits<ZeroField<precision>>
{
public:
using Precision = precision;
using FieldProperties = Properties::FieldProperties<Precision>;
using FieldVector = Eigen::Matrix<Precision, 3, 1>;
using FieldVectorStdAllocator = std::allocator<FieldVector>;
using FieldParameters = ::Properties::Fields::Zero<Precision>;
static constexpr auto Field_type = ::Properties::IField::Field_Zero;
};
#endif // INC_ZeroField_H
// end of ZeroField.h
///---------------------------------------------------------------------------------------------------