SimPEG.electromagnetics.static.spontaneous_potential.HydraulicHeadMap.dot#
- HydraulicHeadMap.dot(map1)[source]#
Multiply two mappings to create a
SimPEG.maps.ComboMap
.Let
and represent two mapping functions. Where represents a set of input model parameters, thedot
method is used to create a combination mapping:Where
and acts on the model first, and , the combination mapping .When using the dot method, the input argument map1 represents the first mapping that is be applied and self represents the second mapping that is be applied. Therefore, the correct syntax for using this method is:
self.dot(map1)
- Parameters:
- map1
A SimPEG mapping object.
Examples
Here we create a combination mapping that 1) projects a single scalar to a vector space of length 5, then takes the natural exponent.
>>> import numpy as np >>> from SimPEG.maps import ExpMap, Projection
>>> nP1 = 1 >>> nP2 = 5 >>> ind = np.zeros(nP1, dtype=int)
>>> projection_map = Projection(nP1, ind) >>> projection_map.shape (5, 1)
>>> exp_map = ExpMap(nP=5) >>> exp_map.shape (5, 5)
>>> combo_map = exp_map.dot(projection_map) >>> combo_map.shape (5, 1)
>>> m = np.array([2]) >>> combo_map * m array([7.3890561, 7.3890561, 7.3890561, 7.3890561, 7.3890561])