Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
datamap.h
1/******************************************************************************
2 * Copyright (C) 2005-2024 by the resistivity.net development team *
3 * Carsten Rücker carsten@resistivity.net *
4 * *
5 * Licensed under the Apache License, Version 2.0 (the "License"); *
6 * you may not use this file except in compliance with the License. *
7 * You may obtain a copy of the License at *
8 * *
9 * http://www.apache.org/licenses/LICENSE-2.0 *
10 * *
11 * Unless required by applicable law or agreed to in writing, software *
12 * distributed under the License is distributed on an "AS IS" BASIS, *
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14 * See the License for the specific language governing permissions and *
15 * limitations under the License. *
16 * *
17 ******************************************************************************/
18
19#ifndef _BERT_DATAMAP__H
20#define _BERT_DATAMAP__H
21
22#include "bert.h"
23
24#include <matrix.h>
25#include <pos.h>
26
27namespace GIMLI{
28
31class DLLEXPORT DataMap {
32public:
34 DataMap();
35
37 DataMap(const std::string & filename);
38
40 DataMap(const DataMap & map);
41
43 DataMap & operator = (const DataMap & map);
44
46 bool isComplex() const { return complex_; }
47
49 int save(const std::string & filename);
50
52 int load(const std::string & filename);
53
56 void collect(const std::vector < ElectrodeShape * > & electrodes,
57 const RMatrix & sol, bool isCEM=false);
58
62 RVector data(const DataContainerERT & dat, bool reciprocity=false, bool imag=false);
63
65 inline void setElectrodes(const std::vector < RVector3 > & elecs){ elecs_ = elecs; }
66
68 inline const std::vector < RVector3 > & electrodes() const { return elecs_; }
69
71 inline const RMatrix & map() const { return map_; }
72
73protected:
75 void copy_(const DataMap & map);
76
78 std::vector < RVector3 > elecs_;
79
81 RMatrix map_;
82
83 bool complex_;
84};
85
86} //namespace BERT
87
88#endif // _BERT_DATAMAP__H
Definition bertDataContainer.h:32
Definition datamap.h:31
RMatrix map_
Definition datamap.h:81
const RMatrix & map() const
Definition datamap.h:71
void setElectrodes(const std::vector< RVector3 > &elecs)
Definition datamap.h:65
DataMap()
Definition datamap.cpp:32
bool isComplex() const
Definition datamap.h:46
const std::vector< RVector3 > & electrodes() const
Definition datamap.h:68
std::vector< RVector3 > elecs_
Definition datamap.h:78
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24
bool load(Matrix< ValueType > &A, const std::string &filename)
Definition matrix.h:828