コード例 #1
0
ファイル: magnetics_driver.py プロジェクト: zhaohp2018/simpeg
    def m0(self):
        if getattr(self, "_m0", None) is None:
            if isinstance(self.mstart, float):
                self._m0 = np.ones(self.nC) * self.mstart
            else:
                self._m0 = TensorMesh.readModelUBC(self.mesh,
                                                   self.basePath + self.mstart)

        return self._m0
コード例 #2
0
 def mref(self):
     if getattr(self, "_mref", None) is None:
         if isinstance(self._mrefInput, float):
             self._mref = np.ones(self.nC) * self._mrefInput
         else:
             self._mref = TensorMesh.readModelUBC(
                 self.mesh, self.basePath + self._mrefInput)
             self._mref = self._mref[self.activeCells]
     return self._mref
コード例 #3
0
ファイル: magnetics_driver.py プロジェクト: zhaohp2018/simpeg
    def activeModel(self):
        if getattr(self, "_activeModel", None) is None:
            if self._staticInput == "FILE":
                # Read from file active cells with 0:air, 1:dynamic, -1 static
                self._activeModel = TensorMesh.readModelUBC(
                    self.mesh, self.basePath + self._staticInput)

            else:
                self._activeModel = np.ones(self._mesh.nC)

        return self._activeModel