(self, mesh_points, filename)
Writes a vtk file, called filename, copying all the
        structures from self.filename but the coordinates.
        `mesh_points` is a matrix that contains the new coordinates
        to write in the vtk file.

        :param numpy.ndarray mesh_points: it is a `n_points`-by-3
            matrix containing the coordinates of the points of the
            mesh
        :param string filename: name of the output file.
Writes a vtk file, called filename, copying all the
        structures from self.filename but the coordinates.
        `mesh_points` is a matrix that contains the new coordinates
        to write in the vtk file.
Writes a vtk file called filename copying all the structures from self . filename but the coordinates . mesh_points is a matrix that contains the new coordinates to write in the vtk file .
def write(self, mesh_points, filename):
        """
        Writes a vtk file, called filename, copying all the
        structures from self.filename but the coordinates.
        `mesh_points` is a matrix that contains the new coordinates
        to write in the vtk file.

        :param numpy.ndarray mesh_points: it is a `n_points`-by-3
            matrix containing the coordinates of the points of the
            mesh
        :param string filename: name of the output file.
        """
        self._check_filename_type(filename)
        self._check_extension(filename)
        self._check_infile_instantiation()

        self.outfile = filename

        reader = vtk.vtkDataSetReader()
        reader.SetFileName(self.infile)
        reader.ReadAllVectorsOn()
        reader.ReadAllScalarsOn()
        reader.Update()
        data = reader.GetOutput()

        points = vtk.vtkPoints()
        for i in range(data.GetNumberOfPoints()):
            points.InsertNextPoint(mesh_points[i, :])

        data.SetPoints(points)

        writer = vtk.vtkDataSetWriter()
        writer.SetFileName(self.outfile)
        writer.SetInputData(data)
        writer.Write()
def write ( self , mesh_points , filename ) : self . _check_filename_type ( filename ) self . _check_extension ( filename ) self . _check_infile_instantiation ( ) self . outfile = filename reader = vtk . vtkDataSetReader ( ) reader . SetFileName ( self . infile ) reader . ReadAllVectorsOn ( ) reader . ReadAllScalarsOn ( ) reader . Update ( ) data = reader . GetOutput ( ) points = vtk . vtkPoints ( ) for i in range ( data . GetNumberOfPoints ( ) ) : points . InsertNextPoint ( mesh_points [ i , : ] ) data . SetPoints ( points ) writer = vtk . vtkDataSetWriter ( ) writer . SetFileName ( self . outfile ) writer . SetInputData ( data ) writer . Write ( )