FEM: solver ccxtools, change object type
This commit is contained in:
@@ -384,7 +384,7 @@ class _MaterialMechanicalNonlinear(CommandManager):
|
||||
# set solver attribute for nonlinearity for ccxtools
|
||||
# CalculiX solver or new frame work CalculiX solver
|
||||
if solver_object and (
|
||||
is_of_type(solver_object, "Fem::FemSolverCalculixCcxTools")
|
||||
is_of_type(solver_object, "Fem::SolverCcxTools")
|
||||
or is_of_type(solver_object, "Fem::FemSolverObjectCalculix")
|
||||
):
|
||||
FreeCAD.Console.PrintMessage(
|
||||
|
||||
@@ -78,7 +78,7 @@ def run_analysis(doc, base_name, filepath=""):
|
||||
from femtools.femutils import is_derived_from
|
||||
if (
|
||||
is_derived_from(m, "Fem::FemSolverObjectPython")
|
||||
and m.Proxy.Type != "Fem::FemSolverCalculixCcxTools"
|
||||
and m.Proxy.Type != "Fem::SolverCcxTools"
|
||||
):
|
||||
solver = m
|
||||
break
|
||||
|
||||
@@ -39,7 +39,7 @@ class _FemSolverCalculix(FemConstraint.Proxy):
|
||||
"""The Fem::FemSolver's Proxy python type, add solver specific properties
|
||||
"""
|
||||
|
||||
Type = "Fem::FemSolverCalculixCcxTools"
|
||||
Type = "Fem::SolverCcxTools"
|
||||
|
||||
def __init__(self, obj):
|
||||
super(_FemSolverCalculix, self).__init__(obj)
|
||||
|
||||
@@ -99,7 +99,7 @@ def run_fem_solver(solver, working_dir=None):
|
||||
:class:`Machine`.
|
||||
"""
|
||||
|
||||
if solver.Proxy.Type == "Fem::FemSolverCalculixCcxTools":
|
||||
if solver.Proxy.Type == "Fem::SolverCcxTools":
|
||||
App.Console.PrintMessage("CalxuliX ccx tools solver!\n")
|
||||
from femtools.ccxtools import CcxTools as ccx
|
||||
fea = ccx(solver)
|
||||
|
||||
@@ -342,7 +342,7 @@ class TestObjectType(unittest.TestCase):
|
||||
)
|
||||
solverelmer = ObjectsFem.makeSolverElmer(doc)
|
||||
self.assertEqual(
|
||||
"Fem::FemSolverCalculixCcxTools",
|
||||
"Fem::SolverCcxTools",
|
||||
type_of_obj(ObjectsFem.makeSolverCalculixCcxTools(doc))
|
||||
)
|
||||
self.assertEqual(
|
||||
@@ -542,7 +542,7 @@ class TestObjectType(unittest.TestCase):
|
||||
solverelmer = ObjectsFem.makeSolverElmer(doc)
|
||||
self.assertTrue(is_of_type(
|
||||
ObjectsFem.makeSolverCalculixCcxTools(doc),
|
||||
"Fem::FemSolverCalculixCcxTools"
|
||||
"Fem::SolverCcxTools"
|
||||
))
|
||||
self.assertTrue(is_of_type(
|
||||
ObjectsFem.makeSolverCalculix(doc),
|
||||
@@ -1142,7 +1142,7 @@ class TestObjectType(unittest.TestCase):
|
||||
))
|
||||
self.assertTrue(is_derived_from(
|
||||
solver_ccxtools,
|
||||
"Fem::FemSolverCalculixCcxTools"
|
||||
"Fem::SolverCcxTools"
|
||||
))
|
||||
|
||||
# FemSolverObjectCalculix
|
||||
|
||||
@@ -203,7 +203,7 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject):
|
||||
def find_solver(self):
|
||||
found_solver_for_use = False
|
||||
for m in self.analysis.Group:
|
||||
if femutils.is_of_type(m, "Fem::FemSolverCalculixCcxTools"):
|
||||
if femutils.is_of_type(m, "Fem::SolverCcxTools"):
|
||||
# we are going to explicitly check for the ccx tools solver type only,
|
||||
# thus it is possible to have lots of framework solvers inside the analysis anyway
|
||||
# for some methods no solver is needed (purge_results) --> solver could be none
|
||||
|
||||
@@ -60,7 +60,7 @@ def check_analysismember(analysis, solver, mesh, member):
|
||||
"Solver is set to nonlinear materials, "
|
||||
"but there is no nonlinear material in the analysis.\n"
|
||||
)
|
||||
if solver.Proxy.Type == "Fem::FemSolverCalculixCcxTools" \
|
||||
if solver.Proxy.Type == "Fem::SolverCcxTools" \
|
||||
and solver.GeometricalNonlinearity != "nonlinear":
|
||||
# nonlinear geometry --> should be set
|
||||
# https://forum.freecadweb.org/viewtopic.php?f=18&t=23101&p=180489#p180489
|
||||
|
||||
Reference in New Issue
Block a user