Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
em1dmodelling.h
1/******************************************************************************
2 * Copyright (C) 2009-2024 by the GIMLi development team *
3 * Thomas Günther thomas@resistivity.net *
4 * Carsten Rücker carsten@resistivity.net *
5 * *
6 * Licensed under the Apache License, Version 2.0 (the "License"); *
7 * you may not use this file except in compliance with the License. *
8 * You may obtain a copy of the License at *
9 * *
10 * http://www.apache.org/licenses/LICENSE-2.0 *
11 * *
12 * Unless required by applicable law or agreed to in writing, software *
13 * distributed under the License is distributed on an "AS IS" BASIS, *
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15 * See the License for the specific language governing permissions and *
16 * limitations under the License. *
17 * *
18 ******************************************************************************/
19
20#ifndef _GIMLI_EM1DMODELLING__H
21#define _GIMLI_EM1DMODELLING__H
22
23#include "gimli.h"
24#include "mesh.h"
25#include "meshgenerators.h"
26#include "modellingbase.h"
27
28namespace GIMLI{
30
32
33class DLLEXPORT MT1dModelling : public ModellingBase {
34public:
35 MT1dModelling(const RVector & periods, size_t nlay, bool verbose = false)
36 : ModellingBase(verbose), periods_(periods), nlay_(nlay) {
38 }
39
40// MT1dModelling(Mesh & mesh, const RVector & periods, size_t nlay, bool verbose = false)
41// : ModellingBase(mesh, verbose), periods_(periods), nlay_(nlay) {
42// }
43
44 virtual ~MT1dModelling() { }
45
47 virtual RVector rhoaphi(const RVector & rho, const RVector & thk);
48
49 virtual RVector rhoa(const RVector & rho, const RVector & thk);
50
51 virtual RVector rhoa(const RVector & model);
53
54
56 virtual RVector response(const RVector & model);
57
58protected:
59 RVector periods_;
60 size_t nlay_;
61};
62
66class DLLEXPORT MT1dRhoModelling : public MT1dModelling {
67public:
68// MT1dRhoModelling(Mesh & mesh, const RVector & periods, const RVector & thk, bool verbose = false)
69// : MT1dModelling(mesh, periods, thk.size(), verbose), thk_(thk) {
70// }
71
72 MT1dRhoModelling(RVector & periods, RVector & thk, bool verbose = false)
73 : MT1dModelling(periods, thk.size(), verbose), thk_(thk) {
74 setMesh(createMesh1D(thk.size() + 1, 1));
75 }
76
77 virtual ~MT1dRhoModelling() { }
78
79 virtual RVector response(const RVector & rho) { return rhoaphi(rho, thk_); }
80
81 virtual RVector rhoa(const RVector & rho) { return MT1dModelling::rhoa(rho, thk_); }
82
83protected:
84 RVector thk_;
85};
86
89class DLLEXPORT FDEM1dModelling : public ModellingBase {
90public:
92 FDEM1dModelling(size_t nlay, const RVector & freqs,
93 const RVector & coilspacing,
94 double z=0.0, bool verbose=false);
95
96 FDEM1dModelling(size_t nlay, const RVector & freqs,
97 double coilspacing,
98 double z=0.0, bool verbose=false);
99
100 virtual ~FDEM1dModelling() { }
101
102 void init();
103
104 virtual RVector response(const RVector & model);
105
109 const RVector & freeAirSolution() const { return freeAirSolution_; }
110
111 RVector calc(const RVector & rho, const RVector & thk);
112
113
114protected:
115 size_t nlay_;
116 RVector freqs_;
117 RVector coilspacing_;
118 double zs_, ze_; // transmitter&receiver heights (minus)
119 size_t nfr_;
120 RVector freeAirSolution_;
121};
122
123//class MaxMinModelling:FDEMModelling
124//110,220,440,880,1760,3520,7040,14080,28160,56320
125
129class DLLEXPORT FDEM1dRhoModelling : public FDEM1dModelling {
130public:
132 FDEM1dRhoModelling(const RVector & thk, const RVector & freq, const RVector & coilspacing, double z=0.0, bool verbose=false)
133 : FDEM1dModelling(thk.size(), freq, coilspacing, z, verbose), thk_(thk) {
134 setMesh(createMesh1D(thk.size() + 1, 1));
135 }
136
137 FDEM1dRhoModelling(const RVector & thk, const RVector & freq, double coilspacing, double z=0.0, bool verbose=false)
138 : FDEM1dModelling(thk.size(), freq, coilspacing, z, verbose), thk_(thk) {
139 setMesh(createMesh1D(thk.size() + 1, 1));
140 }
141
142 virtual ~FDEM1dRhoModelling() { }
143
144 RVector response(const RVector & model){ return calc(model, thk_); }
145
146protected:
147 RVector thk_;
148};
149
153class DLLEXPORT MRSModelling : public ModellingBase {
154public:
156 MRSModelling(Mesh & mesh, RMatrix & KR, RMatrix & KI, bool verbose = false) :
157 ModellingBase(mesh, verbose), KR_(&KR), KI_(&KI) { }
158
159 MRSModelling(RMatrix & KR, RMatrix & KI, bool verbose = false) :
160 ModellingBase(verbose), KR_(&KR), KI_(&KI) { }
161
162 virtual ~MRSModelling() { }
163
165 RVector response(const RVector & model);
166
168 void createJacobian(const RVector & model);
169
170protected:
171 RMatrix *KR_, *KI_;
172};
173
177class DLLEXPORT MRS1dBlockModelling : public MRSModelling{
178public:
180 MRS1dBlockModelling(Mesh & mesh, RMatrix & KR, RMatrix & KI, RVector & zvec, bool verbose = false)
181 : MRSModelling(mesh, KR, KI, verbose), nlay_((mesh.cellCount() + 1) / 2),
182 nvec_(KR.cols()),zvec_(zvec) {
183 }
184
185 MRS1dBlockModelling(int nlay, RMatrix & KR, RMatrix & KI, RVector & zvec, bool verbose = false)
186 : MRSModelling(KR, KI, verbose), nlay_(nlay), nvec_(KR.cols()), zvec_(zvec) {
188 }
189
190 virtual ~MRS1dBlockModelling() { }
192 RVector response(const RVector & model);
193
195 void createJacobian(const RVector & model){
197 }
198
199protected:
200 size_t nlay_;
201 size_t nvec_;
202 RVector zvec_;
203};
204
205
206
207} // namespace GIMLI{
208
209#endif // _GIMLI_EM1D__H
Definition em1dmodelling.h:89
const RVector & freeAirSolution() const
Definition em1dmodelling.h:109
FDEM1dModelling(size_t nlay, const RVector &freqs, const RVector &coilspacing, double z=0.0, bool verbose=false)
default constructor creating a block model
Definition em1dmodelling.cpp:93
Definition em1dmodelling.h:129
FDEM1dRhoModelling(const RVector &thk, const RVector &freq, const RVector &coilspacing, double z=0.0, bool verbose=false)
default constructor creating a block model
Definition em1dmodelling.h:132
Definition em1dmodelling.h:177
MRS1dBlockModelling(int nlay, RMatrix &KR, RMatrix &KI, RVector &zvec, bool verbose=false)
Definition em1dmodelling.h:185
MRS1dBlockModelling(Mesh &mesh, RMatrix &KR, RMatrix &KI, RVector &zvec, bool verbose=false)
Definition em1dmodelling.h:180
void createJacobian(const RVector &model)
Definition em1dmodelling.h:195
virtual ~MRSModelling()
destructor
Definition em1dmodelling.h:162
MRSModelling(Mesh &mesh, RMatrix &KR, RMatrix &KI, bool verbose=false)
constructor using a predefined mesh and real/imag matrix
Definition em1dmodelling.h:156
MRSModelling(RMatrix &KR, RMatrix &KI, bool verbose=false)
constructor with real/imag matrix only
Definition em1dmodelling.h:159
virtual RVector rhoa(const RVector &rho, const RVector &thk)
app. res. and phase
Definition em1dmodelling.cpp:70
virtual RVector rhoaphi(const RVector &rho, const RVector &thk)
Definition em1dmodelling.cpp:28
virtual RVector response(const RVector &model)
app. res. for thk/res vector
Definition em1dmodelling.cpp:61
virtual RVector rhoa(const RVector &rho)
only app. res.
Definition em1dmodelling.h:81
virtual RVector response(const RVector &rho)
app. res. for thk/res vector
Definition em1dmodelling.h:79
Definition mesh.h:128
bool verbose() const
Definition modellingbase.h:48
void setMesh(const Mesh &mesh, bool ignoreRegionManager=false)
Definition modellingbase.cpp:179
virtual void createJacobian(const RVector &model)
Definition modellingbase.cpp:332
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24
RVector z(const R3Vector &rv)
Definition pos.cpp:120
Mesh createMesh1D(Index nCells, Index nClones)
Definition meshgenerators.cpp:49
Mesh createMesh1DBlock(Index nLayers, Index nProperties)
Definition meshgenerators.cpp:69