FEM: Fix cxx typo and remove calculix from solvers tab in examples (#12876)
* FEM: remove calculix from solvers * FEM: remove calculix from joint with ccxtools if branches * FEM: remove calculix from its if * FEM: fix cxx typo in translations * FEM: fix cxx typo in classes name * FEM: fix ccx typo in shortcuts * FEM: convert FEM_*CcxTools to CamelCase * FEM: remove tests related to calculix * FEM: remove test_solver_calculix.py from Fem/CMakeLists.txt * FEM: convert all 'CalculiXccxTools' to 'CalculiXCcxTools' * FEM: revert changes in all *_*.ts files * FEM: convert 'SolverCcxtools' to 'SolverCcxTools' * FEM: convert remaining 'Ccxtools' to 'CcxTools'
This commit is contained in:
@@ -220,7 +220,7 @@
|
||||
<FCText Name="FEM_ResultShow">R, S</FCText>
|
||||
<FCText Name="FEM_ResultsPurge">R, P</FCText>
|
||||
<FCText Name="FEM_SolverCalculiX">S, C</FCText>
|
||||
<FCText Name="FEM_SolverCalculixCxxtools">S, X</FCText>
|
||||
<FCText Name="FEM_SolverCalculiXCcxTools">S, X</FCText>
|
||||
<FCText Name="FEM_SolverControl">S, T</FCText>
|
||||
<FCText Name="FEM_SolverElmer">S, E</FCText>
|
||||
<FCText Name="FEM_SolverMystran">S, M</FCText>
|
||||
|
||||
@@ -321,7 +321,6 @@ SET(FemTestsApp_SRCS
|
||||
femtest/app/test_object.py
|
||||
femtest/app/test_open.py
|
||||
femtest/app/test_result.py
|
||||
femtest/app/test_solver_calculix.py
|
||||
femtest/app/test_solver_elmer.py
|
||||
femtest/app/test_solver_mystran.py
|
||||
femtest/app/test_solver_z88.py
|
||||
|
||||
@@ -5659,7 +5659,7 @@ used for the Elmer solver</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FEM_SolverCalculixCxxtools</name>
|
||||
<name>FEM_SolverCalculiXCcxTools</name>
|
||||
<message>
|
||||
<location filename="../../../femcommands/commands.py" line="1058"/>
|
||||
<source>Solver CalculiX Standard</source>
|
||||
|
||||
@@ -166,7 +166,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
Gui::ToolBarItem* solve = new Gui::ToolBarItem(root);
|
||||
solve->setCommand("Solve");
|
||||
if (!Fem::Tools::checkIfBinaryExists("CCX", "ccx", "ccx").empty()) {
|
||||
*solve << "FEM_SolverCalculixCxxtools";
|
||||
*solve << "FEM_SolverCalculiXCcxTools";
|
||||
}
|
||||
if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver").empty()) {
|
||||
*solve << "FEM_SolverElmer";
|
||||
@@ -323,7 +323,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
Gui::MenuItem* solve = new Gui::MenuItem;
|
||||
root->insertItem(item, solve);
|
||||
solve->setCommand("&Solve");
|
||||
*solve << "FEM_SolverCalculixCxxtools"
|
||||
*solve << "FEM_SolverCalculiXCcxTools"
|
||||
<< "FEM_SolverElmer"
|
||||
<< "FEM_SolverMystran"
|
||||
<< "FEM_SolverZ88"
|
||||
|
||||
@@ -879,11 +879,11 @@ def makeEquationMagnetodynamic2D(
|
||||
return obj
|
||||
|
||||
|
||||
def makeSolverCalculixCcxTools(
|
||||
def makeSolverCalculiXCcxTools(
|
||||
doc,
|
||||
name="SolverCcxTools"
|
||||
):
|
||||
"""makeSolverCalculixCcxTools(document, [name]):
|
||||
"""makeSolverCalculiXCcxTools(document, [name]):
|
||||
makes a Calculix solver object for the ccx tools module"""
|
||||
obj = doc.addObject("Fem::FemSolverObjectPython", name)
|
||||
from femobjects import solver_ccxtools
|
||||
|
||||
@@ -35,7 +35,6 @@ from femtest.app.test_mesh import TestMeshEleTetra10 as FemTest08
|
||||
from femtest.app.test_mesh import TestMeshGroups as FemTest09
|
||||
from femtest.app.test_result import TestResult as FemTest10
|
||||
from femtest.app.test_ccxtools import TestCcxTools as FemTest11
|
||||
from femtest.app.test_solver_calculix import TestSolverCalculix as FemTest12
|
||||
from femtest.app.test_solver_elmer import TestSolverElmer as FemTest13
|
||||
from femtest.app.test_solver_z88 import TestSolverZ88 as FemTest14
|
||||
|
||||
@@ -51,6 +50,5 @@ False if FemTest08.__name__ else True
|
||||
False if FemTest09.__name__ else True
|
||||
False if FemTest10.__name__ else True
|
||||
False if FemTest11.__name__ else True
|
||||
False if FemTest12.__name__ else True
|
||||
False if FemTest13.__name__ else True
|
||||
False if FemTest14.__name__ else True
|
||||
|
||||
@@ -1045,19 +1045,19 @@ class _ResultsPurge(CommandManager):
|
||||
resulttools.purge_results(self.active_analysis)
|
||||
|
||||
|
||||
class _SolverCxxtools(CommandManager):
|
||||
class _SolverCcxTools(CommandManager):
|
||||
"The FEM_SolverCalculix ccx tools command definition"
|
||||
|
||||
def __init__(self):
|
||||
super(_SolverCxxtools, self).__init__()
|
||||
super(_SolverCcxTools, self).__init__()
|
||||
self.pixmap = "FEM_SolverStandard"
|
||||
self.menutext = Qt.QT_TRANSLATE_NOOP(
|
||||
"FEM_SolverCalculixCxxtools",
|
||||
"FEM_SolverCalculiXCcxTools",
|
||||
"Solver CalculiX Standard"
|
||||
)
|
||||
self.accel = "S, X"
|
||||
self.tooltip = Qt.QT_TRANSLATE_NOOP(
|
||||
"FEM_SolverCalculixCxxtools",
|
||||
"FEM_SolverCalculiXCcxTools",
|
||||
"Creates a standard FEM solver CalculiX with ccx tools"
|
||||
)
|
||||
self.is_active = "with_analysis"
|
||||
@@ -1072,7 +1072,7 @@ class _SolverCxxtools(CommandManager):
|
||||
FreeCADGui.addModule("FemGui")
|
||||
if has_nonlinear_material_obj:
|
||||
FreeCADGui.doCommand(
|
||||
"solver = ObjectsFem.makeSolverCalculixCcxTools(FreeCAD.ActiveDocument)"
|
||||
"solver = ObjectsFem.makeSolverCalculiXCcxTools(FreeCAD.ActiveDocument)"
|
||||
)
|
||||
FreeCADGui.doCommand("solver.GeometricalNonlinearity = 'nonlinear'")
|
||||
FreeCADGui.doCommand("solver.MaterialNonlinearity = 'nonlinear'")
|
||||
@@ -1080,7 +1080,7 @@ class _SolverCxxtools(CommandManager):
|
||||
else:
|
||||
FreeCADGui.doCommand(
|
||||
"FemGui.getActiveAnalysis().addObject(ObjectsFem."
|
||||
"makeSolverCalculixCcxTools(FreeCAD.ActiveDocument))"
|
||||
"makeSolverCalculiXCcxTools(FreeCAD.ActiveDocument))"
|
||||
)
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# expand analysis object in tree view
|
||||
@@ -1366,8 +1366,8 @@ FreeCADGui.addCommand(
|
||||
_ResultsPurge()
|
||||
)
|
||||
FreeCADGui.addCommand(
|
||||
"FEM_SolverCalculixCxxtools",
|
||||
_SolverCxxtools()
|
||||
"FEM_SolverCalculiXCcxTools",
|
||||
_SolverCcxTools()
|
||||
)
|
||||
FreeCADGui.addCommand(
|
||||
"FEM_SolverCalculiX",
|
||||
|
||||
@@ -35,7 +35,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": [],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["frequency"]
|
||||
}
|
||||
@@ -70,12 +70,10 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = doc.Analysis
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "frequency"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force", "pressure"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer"],
|
||||
"solvers": ["ccxtools", "elmer"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -73,10 +73,8 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = doc.Analysis
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "elmer":
|
||||
solver_obj = ObjectsFem.makeSolverElmer(doc, "SolverElmer")
|
||||
@@ -86,7 +84,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["displacement", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["buckling"]
|
||||
}
|
||||
@@ -106,17 +106,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "buckling"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["displacement", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["buckling"]
|
||||
}
|
||||
@@ -80,17 +80,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "buckling"
|
||||
solver_obj.BucklingFactors = 10
|
||||
|
||||
@@ -38,7 +38,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Hexa8",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["buckling"]
|
||||
}
|
||||
@@ -85,17 +85,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver,
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "buckling"
|
||||
solver_obj.BucklingFactors = 10
|
||||
|
||||
@@ -67,10 +67,8 @@ def setup_cantilever_base_edge(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "mystran":
|
||||
solver_obj = ObjectsFem.makeSolverMystran(doc, "SolverMystran")
|
||||
@@ -79,7 +77,7 @@ def setup_cantilever_base_edge(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -56,10 +56,8 @@ def setup_cantilever_base_face(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "mystran":
|
||||
solver_obj = ObjectsFem.makeSolverMystran(doc, "SolverMystran")
|
||||
@@ -70,7 +68,7 @@ def setup_cantilever_base_face(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -52,10 +52,8 @@ def setup_cantilever_base_solid(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "elmer":
|
||||
solver_obj = ObjectsFem.makeSolverElmer(doc, "SolverElmer")
|
||||
@@ -69,7 +67,7 @@ def setup_cantilever_base_solid(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -34,7 +34,7 @@ def get_information():
|
||||
"meshtype": "edge",
|
||||
"meshelement": "Seg3",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ def get_information():
|
||||
"meshtype": "edge",
|
||||
"meshelement": "Seg3",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ def get_information():
|
||||
"meshtype": "edge",
|
||||
"meshelement": "Seg3",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Hexa20",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer", "z88"],
|
||||
"solvers": ["ccxtools", "elmer", "z88"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Quad4",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "mystran"],
|
||||
"solvers": ["ccxtools", "mystran"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Quad8",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "edge",
|
||||
"meshelement": "Seg2",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "mystran"],
|
||||
"solvers": ["ccxtools", "mystran"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ def get_information():
|
||||
"meshtype": "edge",
|
||||
"meshelement": "Seg3",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tetra4",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer", "mystran", "z88"],
|
||||
"solvers": ["ccxtools", "elmer", "mystran", "z88"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria3",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "mystran"],
|
||||
"solvers": ["ccxtools", "mystran"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "z88"],
|
||||
"solvers": ["ccxtools", "z88"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer", "mystran", "z88"],
|
||||
"solvers": ["ccxtools", "elmer", "mystran", "z88"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer", "mystran", "z88"],
|
||||
"solvers": ["ccxtools", "elmer", "mystran", "z88"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "displacement"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer"],
|
||||
"solvers": ["ccxtools", "elmer"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["centrif", "fixed"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "multimaterial",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -127,17 +127,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -41,7 +41,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria3",
|
||||
"constraints": ["fixed", "force", "contact"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -136,17 +136,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.BeamShellResultOutput3D = True
|
||||
solver_obj.GeometricalNonlinearity = "linear" # really?
|
||||
|
||||
@@ -42,7 +42,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "pressure", "contact"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -116,17 +116,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -48,7 +48,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["section_print", "fixed", "pressure"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -221,17 +221,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "self weight"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer"],
|
||||
"solvers": ["ccxtools", "elmer"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -84,10 +84,8 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "elmer":
|
||||
solver_obj = ObjectsFem.makeSolverElmer(doc, "SolverElmer")
|
||||
@@ -98,7 +96,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -42,7 +42,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force", "tie"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -106,17 +106,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -42,7 +42,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["pressure", "displacement", "transform"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -116,17 +116,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -50,7 +50,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force", "transform"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -113,17 +113,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": [],
|
||||
"solvers": ["calculix", "ccxtools", "elmer"],
|
||||
"solvers": ["ccxtools", "elmer"],
|
||||
"material": "solid",
|
||||
"equations": ["elasticity"] # "frequency", but list not allowed here
|
||||
}
|
||||
@@ -81,10 +81,8 @@ def setup(doc=None, solvertype="elmer"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "elmer":
|
||||
solver_obj = ObjectsFem.makeSolverElmer(doc, "SolverElmer")
|
||||
@@ -97,7 +95,7 @@ def setup(doc=None, solvertype="elmer"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "frequency"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = False
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["frequency"]
|
||||
}
|
||||
@@ -83,17 +83,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "frequency"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -40,7 +40,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "multimaterial",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -122,17 +122,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -38,7 +38,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "multimaterial",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -111,17 +111,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -41,7 +41,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "pressure"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "multimaterial",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -107,17 +107,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -49,7 +49,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "nonlinear",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -116,17 +116,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -39,7 +39,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Quad4",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer", "mystran"],
|
||||
"solvers": ["ccxtools", "elmer", "mystran"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -115,10 +115,8 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "elmer":
|
||||
solver_obj = ObjectsFem.makeSolverElmer(doc, "SolverElmer")
|
||||
@@ -133,7 +131,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -42,7 +42,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["fixed", "force", "displacement"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "reinforced",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -102,17 +102,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -41,7 +41,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["force", "fixed"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -91,17 +91,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -41,7 +41,7 @@ def get_information():
|
||||
"meshtype": "face",
|
||||
"meshelement": "Tria6",
|
||||
"constraints": ["force", "fixed"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -201,17 +201,15 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -49,7 +49,7 @@ def get_information():
|
||||
"meshtype": "solid",
|
||||
"meshelement": "Tet10",
|
||||
"constraints": ["fixed", "initial temperature", "temperature"],
|
||||
"solvers": ["calculix", "ccxtools", "elmer"],
|
||||
"solvers": ["ccxtools", "elmer"],
|
||||
"material": "multimaterial",
|
||||
"equations": ["thermomechanical"]
|
||||
}
|
||||
@@ -120,10 +120,8 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "elmer":
|
||||
solver_obj = analysis.addObject(ObjectsFem.makeSolverElmer(doc, "SolverElmer"))[0]
|
||||
@@ -138,7 +136,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.AnalysisType = "thermomech"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
solver_obj.ThermoMechSteadyState = True
|
||||
|
||||
@@ -41,7 +41,7 @@ def get_information():
|
||||
"meshtype": "edge",
|
||||
"meshelement": "Seg3",
|
||||
"constraints": ["fixed", "force"],
|
||||
"solvers": ["calculix", "ccxtools"],
|
||||
"solvers": ["ccxtools"],
|
||||
"material": "solid",
|
||||
"equations": ["mechanical"]
|
||||
}
|
||||
@@ -399,10 +399,8 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")
|
||||
|
||||
# solver
|
||||
if solvertype == "calculix":
|
||||
solver_obj = ObjectsFem.makeSolverCalculix(doc, "SolverCalculiX")
|
||||
elif solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculixCcxTools(doc, "CalculiXccxTools")
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj = ObjectsFem.makeSolverCalculiXCcxTools(doc, "CalculiXCcxTools")
|
||||
solver_obj.WorkingDir = u""
|
||||
elif solvertype == "z88":
|
||||
solver_obj = ObjectsFem.makeSolverZ88(doc, "SolverZ88")
|
||||
@@ -411,7 +409,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
"Unknown or unsupported solver type: {}. "
|
||||
"No solver object was created.\n".format(solvertype)
|
||||
)
|
||||
if solvertype == "calculix" or solvertype == "ccxtools":
|
||||
if solvertype == "ccxtools":
|
||||
solver_obj.SplitInputWriter = False
|
||||
solver_obj.AnalysisType = "static"
|
||||
solver_obj.GeometricalNonlinearity = "linear"
|
||||
|
||||
@@ -173,7 +173,7 @@ def get_default_solver():
|
||||
"""
|
||||
solver_map = {0: "None"}
|
||||
if get_binary("Calculix", True):
|
||||
solver_map[1] = "CalculixCcxTools"
|
||||
solver_map[1] = "CalculiXCcxTools"
|
||||
if get_binary("ElmerSolver", True):
|
||||
solver_map[len(solver_map)] = "Elmer"
|
||||
if get_binary("Mystran", True):
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
__title__ = "Ccxtools FEM unit tests"
|
||||
__title__ = "CcxTools FEM unit tests"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "https://www.freecad.org"
|
||||
|
||||
@@ -153,7 +153,7 @@ class TestCcxTools(unittest.TestCase):
|
||||
if analysis_dir is None:
|
||||
analysis_dir = testtools.get_fem_test_tmp_dir(self.pre_dir_name + base_name)
|
||||
analysis = self.document.Analysis
|
||||
solver_object = self.document.CalculiXccxTools
|
||||
solver_object = self.document.CalculiXCcxTools
|
||||
fea = ccxtools.FemToolsCcx(analysis, solver_object, test_mode=True)
|
||||
fea.update_objects()
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ class TestObjectType(unittest.TestCase):
|
||||
solverelmer = ObjectsFem.makeSolverElmer(doc)
|
||||
self.assertEqual(
|
||||
"Fem::SolverCcxTools",
|
||||
type_of_obj(ObjectsFem.makeSolverCalculixCcxTools(doc))
|
||||
type_of_obj(ObjectsFem.makeSolverCalculiXCcxTools(doc))
|
||||
)
|
||||
self.assertEqual(
|
||||
"Fem::SolverCalculix",
|
||||
@@ -574,7 +574,7 @@ class TestObjectType(unittest.TestCase):
|
||||
))
|
||||
solverelmer = ObjectsFem.makeSolverElmer(doc)
|
||||
self.assertTrue(is_of_type(
|
||||
ObjectsFem.makeSolverCalculixCcxTools(doc),
|
||||
ObjectsFem.makeSolverCalculiXCcxTools(doc),
|
||||
"Fem::SolverCcxTools"
|
||||
))
|
||||
self.assertTrue(is_of_type(
|
||||
@@ -1285,7 +1285,7 @@ class TestObjectType(unittest.TestCase):
|
||||
))
|
||||
|
||||
# SolverCcxTools
|
||||
solver_ccxtools = ObjectsFem.makeSolverCalculixCcxTools(doc)
|
||||
solver_ccxtools = ObjectsFem.makeSolverCalculiXCcxTools(doc)
|
||||
self.assertTrue(is_derived_from(
|
||||
solver_ccxtools,
|
||||
"App::DocumentObject"
|
||||
@@ -1745,7 +1745,7 @@ class TestObjectType(unittest.TestCase):
|
||||
)
|
||||
solverelmer = ObjectsFem.makeSolverElmer(doc)
|
||||
self.assertTrue(
|
||||
ObjectsFem.makeSolverCalculixCcxTools(
|
||||
ObjectsFem.makeSolverCalculiXCcxTools(
|
||||
doc
|
||||
).isDerivedFrom("Fem::FemSolverObjectPython")
|
||||
)
|
||||
@@ -1891,7 +1891,7 @@ def create_all_fem_objects_doc(
|
||||
ObjectsFem.makePostVtkFilterCutFunction(doc, vres)
|
||||
ObjectsFem.makePostVtkFilterWarp(doc, vres)
|
||||
|
||||
analysis.addObject(ObjectsFem.makeSolverCalculixCcxTools(doc))
|
||||
analysis.addObject(ObjectsFem.makeSolverCalculiXCcxTools(doc))
|
||||
analysis.addObject(ObjectsFem.makeSolverCalculix(doc))
|
||||
sol = analysis.addObject(ObjectsFem.makeSolverElmer(doc))[0]
|
||||
analysis.addObject(ObjectsFem.makeSolverMystran(doc))
|
||||
|
||||
@@ -1,384 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2018 Bernd Hahnebach <bernd@bimstatik.org> *
|
||||
# * *
|
||||
# * This file is part of the FreeCAD CAx development system. *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||
# * as published by the Free Software Foundation; either version 2 of *
|
||||
# * the License, or (at your option) any later version. *
|
||||
# * for detail see the LICENCE text file. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU Library General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Library General Public *
|
||||
# * License along with this program; if not, write to the Free Software *
|
||||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
__title__ = "Solver calculix FEM unit tests"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "https://www.freecad.org"
|
||||
|
||||
import unittest
|
||||
from os.path import join
|
||||
|
||||
import FreeCAD
|
||||
|
||||
import femsolver.run
|
||||
from . import support_utils as testtools
|
||||
from .support_utils import fcc_print
|
||||
from .support_utils import get_namefromdef
|
||||
|
||||
|
||||
class TestSolverCalculix(unittest.TestCase):
|
||||
fcc_print("import TestSolverCalculix")
|
||||
|
||||
# ********************************************************************************************
|
||||
def setUp(
|
||||
self
|
||||
):
|
||||
# setUp is executed before every test
|
||||
|
||||
# new document
|
||||
self.document = FreeCAD.newDocument(self.__class__.__name__)
|
||||
|
||||
# more inits
|
||||
self.pre_dir_name = "solver_calculix_"
|
||||
self.ending = ".inp"
|
||||
self.infilename = "Mesh"
|
||||
self.test_file_dir = join(
|
||||
testtools.get_fem_test_home_dir(),
|
||||
"calculix"
|
||||
)
|
||||
|
||||
# ********************************************************************************************
|
||||
def tearDown(
|
||||
self
|
||||
):
|
||||
# tearDown is executed after every test
|
||||
FreeCAD.closeDocument(self.document.Name)
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_00print(
|
||||
self
|
||||
):
|
||||
# since method name starts with 00 this will be run first
|
||||
# this test just prints a line with stars
|
||||
|
||||
fcc_print("\n{0}\n{1} run FEM TestSolverCalculix tests {2}\n{0}".format(
|
||||
100 * "*",
|
||||
10 * "*",
|
||||
55 * "*"
|
||||
))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_box_frequency(
|
||||
self
|
||||
):
|
||||
fcc_print("")
|
||||
from femexamples.boxanalysis_frequency import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_box_static(
|
||||
self
|
||||
):
|
||||
fcc_print("")
|
||||
from femexamples.boxanalysis_static import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_buckling_flexuralbuckling(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_buckling_flexuralbuckling import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_beam_circle(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_beam_circle import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_beam_pipe(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_beam_pipe import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_beam_rect(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_beam_rect import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_hexa20(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_hexa20 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_quad4(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_quad4 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_quad8(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_quad8 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_seg2(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_seg2 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_seg3(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_seg3 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_tria3(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_tria3 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_tria6(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_ele_tria6 import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_faceload(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_faceload import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_nodeload(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_nodeload import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_prescribeddisplacement(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_prescribeddisplacement import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_centrif(
|
||||
self
|
||||
):
|
||||
# TODO does pass on my local machine, but not on ci
|
||||
return
|
||||
|
||||
from femexamples.constraint_centrif import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_contact_shell_shell(
|
||||
self
|
||||
):
|
||||
from femexamples.constraint_contact_shell_shell import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_contact_solid_solid(
|
||||
self
|
||||
):
|
||||
# TODO does pass on my local machine, but not on ci
|
||||
return
|
||||
|
||||
from femexamples.constraint_contact_solid_solid import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_sectionprint(
|
||||
self
|
||||
):
|
||||
from femexamples.constraint_section_print import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_selfweight_cantilever(
|
||||
self
|
||||
):
|
||||
from femexamples.constraint_selfweight_cantilever import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_tie(
|
||||
self
|
||||
):
|
||||
from femexamples.constraint_tie import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_transform_beam_hinged(
|
||||
self
|
||||
):
|
||||
from femexamples.constraint_transform_beam_hinged import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_constraint_transform_torque(
|
||||
self
|
||||
):
|
||||
from femexamples.constraint_transform_torque import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_frequency_beamsimple(
|
||||
self
|
||||
):
|
||||
from femexamples.frequency_beamsimple import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_material_multiple_bendingbeam_fiveboxes(
|
||||
self
|
||||
):
|
||||
from femexamples.material_multiple_bendingbeam_fiveboxes import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_material_multiple_bendingbeam_fivefaces(
|
||||
self
|
||||
):
|
||||
from femexamples.material_multiple_bendingbeam_fivefaces import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_material_multiple_tensionrod_twoboxes(
|
||||
self
|
||||
):
|
||||
from femexamples.material_multiple_tensionrod_twoboxes import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_material_nonlinear(
|
||||
self
|
||||
):
|
||||
from femexamples.material_nl_platewithhole import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_square_pipe_end_twisted_edgeforces(
|
||||
self
|
||||
):
|
||||
from femexamples.square_pipe_end_twisted_edgeforces import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_square_pipe_end_twisted_nodeforces(
|
||||
self
|
||||
):
|
||||
from femexamples.square_pipe_end_twisted_nodeforces import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_thermomech_bimetall(
|
||||
self
|
||||
):
|
||||
from femexamples.thermomech_bimetall import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def input_file_writing_test(
|
||||
self,
|
||||
base_name
|
||||
):
|
||||
self.document.recompute()
|
||||
|
||||
# get analysis working directory and save FreeCAD file
|
||||
working_dir = testtools.get_fem_test_tmp_dir(self.pre_dir_name + base_name)
|
||||
save_fc_file = join(working_dir, base_name + ".FCStd")
|
||||
# fcc_print("Save FreeCAD file to {} ...".format(save_fc_file))
|
||||
self.document.saveAs(save_fc_file)
|
||||
|
||||
# write input file
|
||||
machine = self.document.SolverCalculiX.Proxy.createMachine(
|
||||
self.document.SolverCalculiX,
|
||||
working_dir,
|
||||
True # set testmode to True
|
||||
)
|
||||
machine.target = femsolver.run.PREPARE
|
||||
machine.start()
|
||||
machine.join() # wait for the machine to finish
|
||||
|
||||
# compare input file with the given one
|
||||
inpfile_given = join(
|
||||
self.test_file_dir,
|
||||
base_name + self.ending
|
||||
)
|
||||
inpfile_totest = join(
|
||||
working_dir,
|
||||
self.infilename + self.ending
|
||||
)
|
||||
# fcc_print("Comparing {} to {}".format(inpfile_given, inpfile_totest))
|
||||
ret = testtools.compare_inp_files(
|
||||
inpfile_given,
|
||||
inpfile_totest
|
||||
)
|
||||
self.assertFalse(
|
||||
ret,
|
||||
"CalculiX write_inp_file for {0} test failed.\n{1}".format(base_name, ret)
|
||||
)
|
||||
Reference in New Issue
Block a user