Commit 92603702 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

added option to load cmplx version

parent 1248262c
......@@ -117,12 +117,15 @@ class HypGrid2DWrapper(object):
developed by Niels N. Sorensen, DTU Wind Energy.
"""
def __init__(self):
def __init__(self, prefix=''):
"""
"""
try:
from HypGrid2D import HypGrid2D
if prefix == 'c_':
from HypGrid2D import c_HypGrid2D as HypGrid2D
else:
from HypGrid2D import HypGrid2D
self.HypGrid2D = HypGrid2D
lHypGrid2D = True
except:
......@@ -142,9 +145,7 @@ class HypGrid2DWrapper(object):
# retrieve vertices from HypGrid2D
for name in self.vertices.__dict__.keys():
print 'updating hyp', name
if hasattr(self.HypGrid2D.h2d_vertices, name):
print 'hasattr'
val = getattr(self.HypGrid2D.h2d_vertices, name)
setattr(self.vertices, name, val)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment