mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-12 12:30:37 +08:00
Some Changes to Maps and documentation
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ from Tests import checkDerivative
|
||||
|
||||
class IdentityMap(object):
|
||||
"""
|
||||
SimPEG Model
|
||||
SimPEG Map
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class BaseMesh(object):
|
||||
@property
|
||||
def nC(self):
|
||||
"""
|
||||
Total number of cells in the model.
|
||||
Total number of cells in the mesh.
|
||||
|
||||
:rtype: int
|
||||
:return: nC
|
||||
|
||||
@@ -6,7 +6,7 @@ class BaseRegularization(object):
|
||||
|
||||
This is used to regularize the model space::
|
||||
|
||||
reg = Regularization(mesh, model)
|
||||
reg = Regularization(mesh)
|
||||
|
||||
"""
|
||||
|
||||
@@ -24,6 +24,7 @@ class BaseRegularization(object):
|
||||
def __init__(self, mesh, mapping=None, **kwargs):
|
||||
Utils.setKwargs(self, **kwargs)
|
||||
self.mesh = mesh
|
||||
assert isinstance(mesh, Mesh.BaseMesh), "mesh must be a SimPEG.Mesh object."
|
||||
self.mapping = mapping or Maps.IdentityMap(mesh)
|
||||
self.mapping._assertMatchesPair(self.mapPair)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class MapTests(unittest.TestCase):
|
||||
for M in dir(Maps):
|
||||
try:
|
||||
maps = getattr(Maps, M)(self.mesh2)
|
||||
assert isinstance(maps, Maps.BaseModel)
|
||||
assert isinstance(maps, Maps.IdentityMap)
|
||||
except Exception, e:
|
||||
continue
|
||||
self.assertTrue(maps.test())
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
.. _api_Model:
|
||||
.. _api_Maps:
|
||||
|
||||
|
||||
Model
|
||||
*****
|
||||
Maps
|
||||
****
|
||||
|
||||
A SimPEG model operates on a vector and transforms it to another space.
|
||||
A SimPEG Map operates on a vector and transforms it to another space.
|
||||
We will use an example commonly applied in electromagnetics (EM) of the
|
||||
log-conductivity model (:class:`SimPEG.Model.LogModel`).
|
||||
log-conductivity model.
|
||||
Electrical conductivity varies over many orders of magnitude, so it is a common
|
||||
technique when solving the inverse problem to parameterize and optimize in terms
|
||||
of log conductivity. This makes sense not only because it ensures all conductivities
|
||||
will be positive, but because this is fundamentally the space where conductivity
|
||||
lives (i.e. it varies logarithmically). In SimPEG, we use the term Model to
|
||||
describe how to get between these two spaces.
|
||||
lives (i.e. it varies logarithmically). In SimPEG, we use a (:class:`SimPEG.Maps.ExpMap`) to
|
||||
describe how to map back to conductivity.
|
||||
|
||||
The API
|
||||
=======
|
||||
|
||||
.. autoclass:: SimPEG.Model.BaseModel
|
||||
.. autoclass:: SimPEG.Maps.IdentityMap
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: SimPEG.Model.BaseNonLinearModel
|
||||
.. autoclass:: SimPEG.Maps.NonLinearMap
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: SimPEG.Model.ComboModel
|
||||
.. autoclass:: SimPEG.Maps.ComboMap
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
Common Models
|
||||
=============
|
||||
Common Maps
|
||||
===========
|
||||
|
||||
.. autoclass:: SimPEG.Model.LogModel
|
||||
.. autoclass:: SimPEG.Maps.ExpMap
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: SimPEG.Model.Vertical1DModel
|
||||
.. autoclass:: SimPEG.Maps.Vertical1DMap
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: SimPEG.Model.Mesh2Mesh
|
||||
.. autoclass:: SimPEG.Maps.Mesh2Mesh
|
||||
:members:
|
||||
:undoc-members:
|
||||
+1
-1
@@ -39,7 +39,7 @@ Forward Problems
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
api_Model
|
||||
api_Maps
|
||||
api_Survey
|
||||
api_Problem
|
||||
|
||||
|
||||
Reference in New Issue
Block a user