Example #1
0
 def makeMesh(self, depth=None, quality=34.3, paraDX=0.5, boundary=0, paraBoundary=5):
     """create (inversion)"""
     if depth is None:
         depth = max(self.getOffset()) / 3.0
     self.poly = createParaDomain2D(
         self.data.sensorPositions(), paraDepth=depth, paraDX=paraDX, paraBoundary=paraBoundary, boundary=boundary
     )
     self.mesh = createMesh(self.poly, quality=quality, smooth=(1, 10))
     self.mesh.createNeighbourInfos()
Example #2
0
    def _parse_surface(self, surf):
        """
        Parses the surface and creates the parametric domain.

        The parameter domain will have marker '2' and the outer region will
        have marker '1'.

        TODO: Add override capability via **kwargs
        """

        self.sensors_pos = self._extract_points(surf.findall("point[@type='node']"))
        paradx = float(surf.get("paradx", 0.5))
        paradepth = float(surf.get("paradepth", 0.0))
        paraboundary = float(surf.get("paraboundary", 2.0))
        boundary = float(surf.get("boundary", -1.0))
        self.paramaxcellsize = float(surf.get("maxcellsize", 0.0))

        self.poly = createParaDomain2D(
            self.sensors_pos, paradx, paradepth, paraboundary, self.paramaxcellsize, boundary
        )

        marker_pos, marker_id = self._extract_marker(surf)
        self.poly.addRegionMarker(marker_pos, marker_id)