From 1a8e9d317d7898fc4f1c549983b44235e1b397e4 Mon Sep 17 00:00:00 2001 From: Jamil Hajjar Date: Wed, 31 May 2023 16:33:58 +0200 Subject: [PATCH] add cpxmod field to eigs function in math module (#2074) * add cpxmod field to eigs function in math module * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: German <28149841+germa89@users.noreply.github.com> --- src/ansys/mapdl/core/math.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ansys/mapdl/core/math.py b/src/ansys/mapdl/core/math.py index 053f2ca04a..00d89fbd91 100755 --- a/src/ansys/mapdl/core/math.py +++ b/src/ansys/mapdl/core/math.py @@ -902,7 +902,18 @@ def sparse(self, mat, thresh="", **kwargs): kwargs.setdefault("mute", True) self._mapdl.run(f"*COMP,{mat.id},SPARSE,{thresh}", **kwargs) - def eigs(self, nev, k, m=None, c=None, phi=None, algo=None, fmin=None, fmax=None): + def eigs( + self, + nev, + k, + m=None, + c=None, + phi=None, + algo=None, + fmin=None, + fmax=None, + cpxmod=None, + ): """Solve an eigenproblem. Parameters @@ -933,6 +944,8 @@ def eigs(self, nev, k, m=None, c=None, phi=None, algo=None, fmin=None, fmax=None fmin = "" if not fmax: fmax = "" + if not cpxmod: + cpxmod = "" cid = "" if not c: @@ -947,7 +960,7 @@ def eigs(self, nev, k, m=None, c=None, phi=None, algo=None, fmin=None, fmax=None self._mapdl.run("/SOLU", mute=True) self._mapdl.run("antype,modal", mute=True) - self._mapdl.run(f"modopt,{algo},{nev},{fmin},{fmax}", mute=True) + self._mapdl.run(f"modopt,{algo},{nev},{fmin},{fmax},{cpxmod}", mute=True) ev = self.vec() phistr = "" if not phi else phi.id