Exemplo n.º 1
0
    def compute_projection(self, name, pts, surf_pts=None, ndim=1):
        num = self._num
        size = self._size
        str_indices = self._str_indices
        topo = self._topo
        bspline = self._bspline
        cp_str = self.vec['cp_str'].array
        pt_str = self.vec['pt_str'].array

        pts = numpy.array(pts, order='F')
        if surf_pts is None:
            surf_pts = numpy.linspace(1, num['surf'], num['surf'])
        else:
            surf_pts = numpy.array(surf_pts, int) + 1

        npts = pts.shape[0]
        nsurf_pts = surf_pts.shape[0]
        nrefine = 10
        surfs, ind_u, ind_v \
            = BSElib.computeproj(npts, nsurf_pts, 
                                 size['cp_str'], size['pt_str'], 
                                 num['surf'], num['group'], nrefine,
                                 surf_pts,
                                 str_indices['cp'], str_indices['pt'],
                                 topo['surf_group'], bspline['order'],
                                 bspline['num_cp'], bspline['num_pt'],
                                 cp_str, pt_str, pts)
        self.add_jacobian(name, surfs-1, ind_u, ind_v, ndim)
Exemplo n.º 2
0
    def compute_projection(self, name, pts, surf_pts=None, ndim=1):
        num = self._num
        size = self._size
        str_indices = self._str_indices
        topo = self._topo
        bspline = self._bspline
        cp_str = self.vec['cp_str'].array
        pt_str = self.vec['pt_str'].array

        pts = numpy.array(pts, order='F')
        if surf_pts is None:
            surf_pts = numpy.linspace(1, num['surf'], num['surf'])
        else:
            surf_pts = numpy.array(surf_pts, int) + 1

        npts = pts.shape[0]
        nsurf_pts = surf_pts.shape[0]
        nrefine = 10
        surfs, ind_u, ind_v \
            = BSElib.computeproj(npts, nsurf_pts,
                                 size['cp_str'], size['pt_str'],
                                 num['surf'], num['group'], nrefine,
                                 surf_pts,
                                 str_indices['cp'], str_indices['pt'],
                                 topo['surf_group'], bspline['order'],
                                 bspline['num_cp'], bspline['num_pt'],
                                 cp_str, pt_str, pts)
        self.add_jacobian(name, surfs - 1, ind_u, ind_v, ndim)