How to use the discretize.TensorMesh.readModelUBC function in discretize

To help you get started, we’ve selected a few discretize examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github simpeg / simpeg / SimPEG / PF / MagneticsDriver.py View on Github external
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
github simpeg / simpeg / SimPEG / PF / MagneticsDriver.py View on Github external
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
github simpeg / simpeg / SimPEG / PF / MagneticsDriver.py View on Github external
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
                )

                # # Reduce to active space
                # self._mref = self._mref[self.activeCells]

        return self._mref