Skip to content

Commit 1a8e9d3

Browse files
Gryfenfer97pre-commit-ci[bot]germa89
authored
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 <[email protected]>
1 parent 58ab4fc commit 1a8e9d3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/ansys/mapdl/core/math.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,18 @@ def sparse(self, mat, thresh="", **kwargs):
902902
kwargs.setdefault("mute", True)
903903
self._mapdl.run(f"*COMP,{mat.id},SPARSE,{thresh}", **kwargs)
904904

905-
def eigs(self, nev, k, m=None, c=None, phi=None, algo=None, fmin=None, fmax=None):
905+
def eigs(
906+
self,
907+
nev,
908+
k,
909+
m=None,
910+
c=None,
911+
phi=None,
912+
algo=None,
913+
fmin=None,
914+
fmax=None,
915+
cpxmod=None,
916+
):
906917
"""Solve an eigenproblem.
907918
908919
Parameters
@@ -933,6 +944,8 @@ def eigs(self, nev, k, m=None, c=None, phi=None, algo=None, fmin=None, fmax=None
933944
fmin = ""
934945
if not fmax:
935946
fmax = ""
947+
if not cpxmod:
948+
cpxmod = ""
936949

937950
cid = ""
938951
if not c:
@@ -947,7 +960,7 @@ def eigs(self, nev, k, m=None, c=None, phi=None, algo=None, fmin=None, fmax=None
947960

948961
self._mapdl.run("/SOLU", mute=True)
949962
self._mapdl.run("antype,modal", mute=True)
950-
self._mapdl.run(f"modopt,{algo},{nev},{fmin},{fmax}", mute=True)
963+
self._mapdl.run(f"modopt,{algo},{nev},{fmin},{fmax},{cpxmod}", mute=True)
951964
ev = self.vec()
952965

953966
phistr = "" if not phi else phi.id

0 commit comments

Comments
 (0)