Skip to content

Commit

Permalink
add cpxmod field to eigs function in math module (#2074)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored May 31, 2023
1 parent 58ab4fc commit 1a8e9d3
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/ansys/mapdl/core/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 1a8e9d3

Please sign in to comment.