FEMTIC
ObservedDataStation.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------------------
2 // The MIT License (MIT)
3 //
4 // Copyright (c) 2021 Yoshiya Usui
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in all
14 // copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 // SOFTWARE.
23 //-------------------------------------------------------------------------------------------------------
24 #ifndef DBLDEF_OBSERVED_DATA_STATION
25 #define DBLDEF_OBSERVED_DATA_STATION
26 
27 #include <vector>
28 #include <complex>
29 
30 #include "Forward3D.h"
31 #include "CommonParameters.h"
32 #include "MeshDataTetraElement.h"
33 
34 // Observed data of each station
36  public:
37  // Constructer
38  explicit ObservedDataStation();
39 
40  // Destructer
42 
43  // Get ID of station
44  int getStationID() const;
45 
46  // Get ID of the station where magnetic field is observed
47  int getIDOfMagneticFieldStation() const;
48 
49  // Get total number of frequencies
50  int getTotalNumberOfFrequency() const;
51 
52  // Get frequencies at which observed value exists
53  double getFrequencyValues( const int num ) const;
54 
55  // Find and return frequency IDs ( consecutive number in this station ) from frequency value.
56  // If the specified frequency is not included, return -1.
57  int getFreqIDs( const double freq ) const;
58 
59  // Set up frequencies calculated by this PE, at which observed value exists
60  void setupFrequenciesCalculatedByThisPE( const int nFreqCalculatedByThisPE, const double* freqCalculatedByThisPE );
61 
62  // Find and return frequency IDs among the ones calculated by this PE ( consecutive number in this PE and station ) from frequency value.
63  // If the specified frequency is not included, return -1.
64  int getFreqIDsAmongThisPE( const double freq ) const;
65 
66  protected:
67  // ID of station
69 
70  // ID of the station where magnetic field is observed
72 
73  // Total number of frequencies
75 
76  // Frequencies at which observed value exists
77  double* m_freq;
78 
79  // Total number of frequencies calculated by this PE
81 
82  // IDs of frequencies calculated by this PE, at which observed value exists
84 
85  private:
86  // Copy constructer
88 
89  // Copy assignment operator
91 
92 };
93 
94 #endif
Definition: ObservedDataStation.h:35
ObservedDataStation()
Definition: ObservedDataStation.cpp:33
int getIDOfMagneticFieldStation() const
Definition: ObservedDataStation.cpp:122
int m_IDOfMagneticFieldStation
Definition: ObservedDataStation.h:71
int m_numOfFreqCalculatedByThisStaAndPE
Definition: ObservedDataStation.h:80
ObservedDataStation & operator=(const ObservedDataStation &rhs)
int getTotalNumberOfFrequency() const
Definition: ObservedDataStation.cpp:58
int m_numOfFrequency
Definition: ObservedDataStation.h:74
int getFreqIDs(const double freq) const
Definition: ObservedDataStation.cpp:69
ObservedDataStation(const ObservedDataStation &rhs)
int getFreqIDsAmongThisPE(const double freq) const
Definition: ObservedDataStation.cpp:107
double * m_freq
Definition: ObservedDataStation.h:77
int getStationID() const
Definition: ObservedDataStation.cpp:53
~ObservedDataStation()
Definition: ObservedDataStation.cpp:43
int m_stationID
Definition: ObservedDataStation.h:68
std::vector< int > m_freqIDsAmongThisStationCalculatedByThisPE
Definition: ObservedDataStation.h:83
double getFrequencyValues(const int num) const
Definition: ObservedDataStation.cpp:63
void setupFrequenciesCalculatedByThisPE(const int nFreqCalculatedByThisPE, const double *freqCalculatedByThisPE)
Definition: ObservedDataStation.cpp:83