def __init__(self, solver, directory, testmode=False): self.analysis = FemUtils.findAnalysisOfMember(solver) self.solver = solver self.directory = directory self.testmode = testmode self._usedVarNames = set() self._builder = sifio.Builder() self._handledObjects = set()
def __init__(self, obj): self._obj = obj self._paramWidget = Gui.PySideUic.loadUi( App.getHomePath() + "Mod/Fem/Resources/ui/InitialFlowVelocity.ui") self._initParamWidget() self.form = [self._paramWidget] analysis = FemUtils.findAnalysisOfMember(obj) self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject") self._part = self._mesh.Part if self._mesh is not None else None self._partVisible = None self._meshVisible = None
def __init__(self, obj): self._obj = obj self._refWidget = FemSelectionWidgets.BoundarySelector() self._refWidget.setReferences(obj.References) self._paramWidget = Gui.PySideUic.loadUi( App.getHomePath() + "Mod/Fem/Resources/ui/ElectrostaticPotential.ui") self._initParamWidget() self.form = [self._refWidget, self._paramWidget] analysis = FemUtils.findAnalysisOfMember(obj) self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject") self._part = self._mesh.Part if self._mesh is not None else None self._partVisible = None self._meshVisible = None
def __init__(self, obj): self._obj = obj self._refWidget = FemSelectionWidgets.SolidSelector() self._refWidget.setReferences(obj.References) propWidget = obj.ViewObject.Proxy.getTaskWidget(obj.ViewObject) if propWidget is None: self.form = self._refWidget else: self.form = [self.refWidget, propWidget] analysis = FemUtils.findAnalysisOfMember(obj) self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject") self._part = self._mesh.Part if self._mesh is not None else None self._partVisible = None self._meshVisible = None
def __init__(self, obj): self._obj = obj self._refWidget = FemSelectionWidgets.BoundarySelector() self._refWidget.setReferences(obj.References) self._paramWidget = Gui.PySideUic.loadUi( App.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemFlowVelocity.ui") self._initParamWidget() self.form = [self._refWidget, self._paramWidget] analysis = FemUtils.findAnalysisOfMember(obj) self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject") self._part = None if hasattr(self._mesh, "Part"): # Geometry of Gmesh mesh obj self._part = self._mesh.Part elif hasattr(self._mesh, "Shape"): # Geometry of Netgen mesh obj self._part = self._mesh.Shape self._partVisible = None self._meshVisible = None
def _checkModel(self, obj): if self._partOfModel(obj): analysis = FemUtils.findAnalysisOfMember(obj) if analysis is not None: self._resetAll(analysis)
def _checkSolver(self, obj): analysis = FemUtils.findAnalysisOfMember(obj) for m in _machines.itervalues(): if analysis == m.analysis and obj == m.solver: m.reset()
def analysis(self): return FemUtils.findAnalysisOfMember(self.solver)