Skip to content
Snippets Groups Projects
Commit 3a69647d authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

getdp: forgot to impose angular frequency when applying operator :-(. seems ok now.

parent 41a1b02b
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,9 @@ def parse():
Returns an argparse
"""
# Initialise
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(prog="cim.py",
description=desc,
epilog="author: N. Marsic")
# Position argumets
parser.add_argument("pro", type=str,
......@@ -38,3 +40,12 @@ def parse():
# Done
return parser.parse_args()
desc = ("a non-linear eigenvalue solver " +
"using the contour integral method proposed by Beyn " +
"coupled with a GetDP formulation.")
## Import only parse (other functions are just helpers)
__all__ = ['parse']
......@@ -24,10 +24,11 @@ if(not arg.quiet):
for i in range(l.shape[0]):
if(not arg.quiet): print " # " + str(i) + ": ",
print "(" + format(np.real(l[i]).tolist(), '+e') + ")",
print "(" + format(np.real(l[i]).tolist(), '+.12e') + ")",
print "+",
print "(" + format(np.imag(l[i]).tolist(), '+e') + ")*j",
print "| " + format(r[i], 'e')
print "(" + format(np.imag(l[i]).tolist(), '+.12e') + ")*j",
print "| " + format(r[i], 'e'),
print "| " + format(r[i]/np.abs(l[i]), 'e')
if(not arg.quiet):
print "----------- "
......@@ -39,7 +40,7 @@ if(not arg.quiet):
print "Generating eigenvector views..."
for i in range(l.shape[0]):
operator.view(V[:, i], arg.post, "beyn" + str(i) + ".pos")
operator.view(V[:, i], arg.post, "cim" + str(i) + ".pos")
if(not arg.quiet): print " # View: " + str(i) + " done!"
# Done
......
......@@ -49,6 +49,8 @@ class GetDPWave:
This method updates self.solution()
"""
GetDP.GetDPSetNumber("angularFreqRe", np.real(w).tolist())
GetDP.GetDPSetNumber("angularFreqIm", np.imag(w).tolist())
GetDP.GetDPSetNumber("x", self.__toGetDP(x))
GetDP.GetDPSetNumber("doApply", 1)
GetDP.GetDP(["getdp", self.__pro,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment