Skip to content

Commit

Permalink
FEM: code formating, flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Oct 19, 2017
1 parent 37f8656 commit dccb89b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Mod/Fem/PyGui/_CommandFemEquation.py
Expand Up @@ -96,6 +96,7 @@ def GetResources(self):
'ToolTip': "Creates a FEM equation for electrostatic"
}


class Fluxsolver(_Base):

def getSpecifier(self):
Expand Down
Expand Up @@ -103,7 +103,7 @@ def _restoreVisibility(self):
def _initParamWidget(self):
unit = "V"
q = Units.Quantity("{} {}".format(self._obj.Potential, unit))

self._paramWidget.potentialTxt.setText(
q.UserString)
self._paramWidget.potentialBox.setChecked(
Expand Down
5 changes: 4 additions & 1 deletion src/Mod/Fem/femsolver/elmer/equations/fluxsolver.py
Expand Up @@ -48,15 +48,18 @@ def __init__(self, obj):
obj.addProperty(
"App::PropertyString", "FluxVariable",
"Fluxsolver", "Insert variable name for flux calculation")
'''
#obj.addProperty(
#"App::PropertyBool", "CalculateFluxAbs",
#"Fluxsolver", "Select calculation of abs of flux")
#obj.addProperty(
#"App::PropertyBool", "CalculateFluxMagnitude",
#"Fluxsolver", "Select calculation of magnitude of flux")
'''
obj.addProperty(
"App::PropertyBool", "CalculateGrad",
"Fluxsolver", "Select calculation of gradient")
'''
#obj.addProperty(
#"App::PropertyBool", "CalculateGradAbs",
#"Fluxsolver", "Select calculation of abs of gradient")
Expand All @@ -66,7 +69,7 @@ def __init__(self, obj):
#obj.addProperty(
#"App::PropertyBool", "EnforcePositiveMagnitude",
#"Fluxsolver", "Select calculation of positive magnitude")

'''
obj.Priority = 5


Expand Down
6 changes: 1 addition & 5 deletions src/Mod/Fem/femsolver/elmer/writer.py
Expand Up @@ -346,9 +346,6 @@ def _handleElectrostaticBndConditions(self):
self._boundary(name, "Potential Constant", True)
self._handled(obj)




def _handleFluxsolver(self):
activeIn = []
for equation in self.solver.Group:
Expand All @@ -363,14 +360,13 @@ def _handleFluxsolver(self):

def _getFluxsolverSolver(self, equation):
s = self._createLinearSolver(equation)
s["Equation"] = "Flux Solver" # equation.Name
s["Equation"] = "Flux Solver" # equation.Name
s["Procedure"] = sifio.FileAttr("FluxSolver/FluxSolver")
s["Flux Variable"] = equation.FluxVariable
s["Calculate Flux"] = equation.CalculateFlux
s["Calculate Grad"] = equation.CalculateGrad
return s


def _handleElasticity(self):
activeIn = []
for equation in self.solver.Group:
Expand Down

0 comments on commit dccb89b

Please sign in to comment.