Formatted libuvlm to spaces
@@ -24,7 +24,6 @@ LoopPanel=[(0,1),(1,2),(2,3),(3,0)] # used in eval_panel_{exp/comp}
def biot_panel_cpp(zetaP, ZetaPanel, gamma=1.0):
-
assert zetaP.flags['C_CONTIGUOUS'] and ZetaPanel.flags['C_CONTIGUOUS'], \
'Input not C contiguous'
velP = np.zeros((3,), order='C')
@@ -88,7 +87,6 @@ def biot_panel(zetaC,ZetaPanel,gamma=1.0):
return q
-
def biot_panel_fast(zetaC, ZetaPanel, gamma=1.0):
'''
Induced velocity over point ZetaC of a panel of vertices coordinates
@@ -115,8 +113,6 @@ def biot_panel_fast(zetaC,ZetaPanel,gamma=1.0):
return q
-
-
def panel_normal(ZetaPanel):
'''
return normal of panel with vertiex coordinates ZetaPanel, where:
@@ -162,7 +158,6 @@ def panel_area(ZetaPanel):
return A
-
if __name__ == '__main__':
import cProfile
@@ -193,13 +188,18 @@ if __name__=='__main__':
def run_biot_panel_cpp():
for ii in range(10000):
biot_panel_cpp(zetaP, ZetaPanel, gamma=3.)
+
+
def run_biot_panel_fast():
for ii in range(10000):
biot_panel_fast(zetaP, ZetaPanel, gamma=3.)
+
+
def run_biot_panel_ref():
for ii in range(10000):
biot_panel(zetaP, ZetaPanel, gamma=3.)
+
print('------------------------------------------ profiling biot_panel_cpp')
cProfile.runctx('run_biot_panel_cpp()', globals(), locals())
@@ -208,14 +208,3 @@ if __name__=='__main__':
print('------------------------------------------ profiling biot_panel_ref')
cProfile.runctx('run_biot_panel_ref()', globals(), locals())
-
-
-
-
-
-
-
-
-
-
-
