예제 #1
0
    def loadMeshFromFile(self):
        """Opens a dialog prompting the user to specify project files that specify a mesh and its initial conditions.
        A mesh will be created immediately form the specified data files.
        File validation has not yet been implemented so improperly formatted files will likely 
        crash the application or case significant errors.
        """

        dialog = fileInputDialog(self, self.dataFiles)

        newFiles = dialog.execute()
        if newFiles is None:
            return

        self.plotcontrols.reset()
        self.dataFiles = newFiles

        self.setMesh(Mesh.loadMeshFromFile(self.dataFiles))