From 46f905bf0ac6321f73d353ba76914dade55475a2 Mon Sep 17 00:00:00 2001 From: jessdtate Date: Sun, 2 Sep 2018 13:50:13 -0600 Subject: [PATCH 1/3] updated the example net. Uncertainty example cna now lounch from SCIRun. --- .../MSF_inverse_Cage.srn5 | 18 +- .../MSF_inverse_python.srn5 | 383 +- .../uncertainty_forward_II.srn5 | 5238 ++++++++++++++--- PythonLibrary/MFS_inverse/mfs_inverse.py | 93 +- 4 files changed, 4772 insertions(+), 960 deletions(-) diff --git a/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 b/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 index 338a179..f57c9ad 100644 --- a/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 +++ b/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 @@ -776,8 +776,8 @@ sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/MFS_i from mfs_inverse import * import numpy -scale_out = 0.05 -scale_in = 0.02 +scale_factor = 0.2 +scale_method = 'normals' @@ -790,7 +790,7 @@ electnodes = matrixInput2 lmbda= matrixInput3 lmbd=lmbda[0][0] -lmbd = numpy.linspace(0.00000001,1,10000).tolist() +lmbd = numpy.linspace(0.000000001,0.0001,1000).tolist() lmbd_method = 'creso' @@ -805,7 +805,7 @@ for k in electnodes: # run mfs inverse -[epis,lamb_o,curve] = mfs_inverse(heart,tank,sock_pts,tank_pot,electnodes,scale_out,scale_in,lmbd_method,lmbd,False,0.0) +[epis,lamb_o,curve] = mfs_inverse(heart,tank,sock_pts,tank_pot,electnodes,scale_factor,scale_method,lmbd_method,lmbd,False,0.0) epi_out=epis.tolist() @@ -1474,7 +1474,7 @@ matrixOutput3 = [curve] FixedMax 1 - 8.76099126141573947e+02 + 6.39615512795987371e+01 @@ -1486,7 +1486,7 @@ matrixOutput3 = [curve] FixedMin 1 - -4.87195264196177845e+02 + -1.38078989333325353e+03 @@ -4615,7 +4615,7 @@ matrixOutput3 = [curve] ScaleBarHeight 1 - 0.00000000000000000e+00 + 9.99899999999999949e+01 @@ -4627,7 +4627,7 @@ matrixOutput3 = [curve] ScaleBarLength 1 - 0.00000000000000000e+00 + 9.99899999999999949e+01 @@ -4723,7 +4723,7 @@ matrixOutput3 = [curve] ShowViewer 3 - 0 + 1 diff --git a/Networks/potential-based-inverse/MSF_inverse_python.srn5 b/Networks/potential-based-inverse/MSF_inverse_python.srn5 index 52c35a5..ce4dc2c 100644 --- a/Networks/potential-based-inverse/MSF_inverse_python.srn5 +++ b/Networks/potential-based-inverse/MSF_inverse_python.srn5 @@ -4,7 +4,7 @@ - 44 + 46 0 AlignMeshBoundingBoxes:0 @@ -365,6 +365,58 @@ + + EvaluateLinearAlgebraUnary:1 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + FlipSurfaceNormals:0 @@ -644,8 +696,9 @@ sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/MFS_i from mfs_inverse import * import numpy -scale_out = 0.0005 -scale_in = 0.00025 +scale_factor = 0.1 +scale_method = "normals" + # get inputs heart = fieldInput1 @@ -655,7 +708,7 @@ tank_pot = matrixInput1 electnodes = matrixInput2 # set lambda options here -lmbd = numpy.linspace(0.000000001,1,100).tolist() +lmbd = numpy.linspace(0.00000001,0.001,10000).tolist() lmbd_method = 'creso' #lmbd = matrixInput3 #lmbd = lmbd[0][0] @@ -671,7 +724,7 @@ for k in electnodes: t_p = [[t[0]] for t in tank_pot] # run mfs inverse -[epis, lambd_o,curve] = mfs_inverse(heart,tank,sock_pts,t_p,electnodes,scale_out,scale_in,lmbd_method,lmbd,False,0.0) +[epis, lambd_o,curve] = mfs_inverse(heart,tank,sock_pts,t_p,electnodes,scale_factor,scale_method,lmbd_method,lmbd,False,0.0) epi_out=epis.tolist() @@ -802,6 +855,216 @@ matrixOutput3 = [curve] + + LinePlotter:0 + + + SCIRun + Math + LinePlotter + + + + 13 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + Plot title + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + x axis + + + + + + YAxisLabel + + + YAxisLabel + + 2 + y axis + + + + + + + MapFieldDataOntoNodes:0 @@ -1310,7 +1573,7 @@ matrixOutput3 = [curve] FixedMax 1 - 3.09515078901511970e+03 + 4.46921299893047959e+01 @@ -1322,7 +1585,7 @@ matrixOutput3 = [curve] FixedMin 1 - -9.86426171570426050e+03 + -7.20574961746247880e+01 @@ -6503,7 +6766,7 @@ matrixOutput3 = [curve] ScaleBarFontSize 0 - 1 + 99 @@ -7591,7 +7854,7 @@ matrixOutput3 = [curve] ShowViewer 3 - 0 + 1 @@ -7673,7 +7936,7 @@ matrixOutput3 = [curve] - 63 + 65 0 AlignMeshBoundingBoxes:0 @@ -7795,6 +8058,18 @@ matrixOutput3 = [curve] 0 + + EvaluateLinearAlgebraUnary:1 + + Result + 0 + + LinePlotter:0 + + DependentVariables + 1 + + FlipSurfaceNormals:0 @@ -7879,6 +8154,18 @@ matrixOutput3 = [curve] 0 + + InterfaceWithPython:0 + + PythonMatrix3 + 0 + + EvaluateLinearAlgebraUnary:1 + + InputMatrix + 0 + + InterfaceWithPython:0 @@ -8434,7 +8721,7 @@ matrixOutput3 = [curve] - 44 + 46 0 AlignMeshBoundingBoxes:0 @@ -8478,6 +8765,13 @@ matrixOutput3 = [curve] 3.93000000000000000e+02 + + EvaluateLinearAlgebraUnary:1 + + 4.94000000000000000e+02 + 9.23000000000000000e+02 + + FlipSurfaceNormals:0 @@ -8502,10 +8796,17 @@ matrixOutput3 = [curve] InterfaceWithPython:0 - 6.22000000000000000e+02 + 6.23000000000000000e+02 6.05000000000000000e+02 + + LinePlotter:0 + + 5.42000000000000000e+02 + 1.12000000000000000e+03 + + MapFieldDataOntoNodes:0 @@ -8565,15 +8866,15 @@ matrixOutput3 = [curve] ReportMatrixInfo:0 - 5.58000000000000000e+02 - 7.83000000000000000e+02 + 5.11000000000000000e+02 + 7.70000000000000000e+02 ReportMatrixInfo:1 - 6.45000000000000000e+02 - 7.41000000000000000e+02 + 6.12000000000000000e+02 + 7.43000000000000000e+02 @@ -8586,8 +8887,8 @@ matrixOutput3 = [curve] RescaleColorMap:0 - 5.09000000000000000e+02 - 1.05100000000000000e+03 + 3.78000000000000000e+02 + 1.05500000000000000e+03 @@ -8642,8 +8943,8 @@ matrixOutput3 = [curve] ShowField:0 - 4.62000000000000000e+02 - 1.16900000000000000e+03 + 3.66000000000000000e+02 + 1.18400000000000000e+03 @@ -8746,7 +9047,7 @@ matrixOutput3 = [curve] - 6 + 8 0 CreateMatrix:0 @@ -8789,6 +9090,21 @@ p, li { white-space: pre-wrap; } 13 + + ReadField:10 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Torso Tank </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">geometry</span></p></body></html> + Torso Tank +geometry + 3 + 13 + + ReadField:2 @@ -8802,6 +9118,21 @@ p, li { white-space: pre-wrap; } 13 + + ReadField:9 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">torso measurement </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">locations</span></p></body></html> + torso measurement +locations + 3 + 13 + + ReadMatrix:0 @@ -8836,7 +9167,7 @@ node numbers 0 - 44 + 46 0 AlignMeshBoundingBoxes:0 @@ -8862,6 +9193,10 @@ node numbers EvaluateLinearAlgebraUnary:0 -1 + + EvaluateLinearAlgebraUnary:1 + -1 + FlipSurfaceNormals:0 -1 @@ -8878,6 +9213,10 @@ node numbers InterfaceWithPython:0 -1 + + LinePlotter:0 + -1 + MapFieldDataOntoNodes:0 -1 diff --git a/Networks/uncertainty-forward/uncertainty_forward_II.srn5 b/Networks/uncertainty-forward/uncertainty_forward_II.srn5 index 808be5a..333facb 100644 --- a/Networks/uncertainty-forward/uncertainty_forward_II.srn5 +++ b/Networks/uncertainty-forward/uncertainty_forward_II.srn5 @@ -4,10 +4,10 @@ - 26 + 47 0 - AppendMatrix:1 + AppendMatrix:3 SCIRun @@ -35,7 +35,7 @@ - AppendMatrix:2 + AppendMatrix:4 SCIRun @@ -62,6 +62,82 @@ + + BooleanCompare:0 + + + SCIRun + Flow Control + BooleanCompare + + + + 5 + 0 + + + Comparison_Option + + + Comparison_Option + + 2 + greatop + + + + + + Else_Option + + + Else_Option + + 2 + third + + + + + + Then_Option + + + Then_Option + + 2 + null + + + + + + Value_Option_1 + + + Value_Option_1 + + 2 + value + + + + + + Value_Option_2 + + + Value_Option_2 + + 2 + value + + + + + + + BuildBEMatrix:0 @@ -195,54 +271,50 @@ - CreateMatrix:1 + CollectMatrices:0 SCIRun Math - CreateMatrix + CollectMatrices - 1 + 3 0 - TextEntry + CollectAppendIndicator - TextEntry + CollectAppendIndicator - 2 - -30 + 0 + 0 - - - - - - CreateMatrix:2 - - - SCIRun - Math - CreateMatrix - - - - 1 - 0 - TextEntry + CollectPrependIndicator - TextEntry + CollectPrependIndicator - 2 - 10 + 0 + 1 + + + + + + CollectRowIndicator + + + CollectRowIndicator + + 0 + 1 @@ -251,65 +323,39 @@ - CreateMatrix:3 + ConvertScalarToMatrix:0 SCIRun - Math - CreateMatrix + Converters + ConvertScalarToMatrix - 1 + 0 0 - - - TextEntry - - - TextEntry - - 2 - 3 - - - - CreateMatrix:4 + ConvertScalarToMatrix:1 SCIRun - Math - CreateMatrix + Converters + ConvertScalarToMatrix - 1 + 0 0 - - - TextEntry - - - TextEntry - - 2 - 1 0 0 -0 1 0 -0 0 1 - - - - CreateMatrix:5 + CreateMatrix:7 SCIRun @@ -337,28 +383,77 @@ - CreateMatrix:6 + CreateStandardColorMap:0 SCIRun - Math - CreateMatrix + Visualization + CreateStandardColorMap - 1 + 5 0 - TextEntry + AlphaUserPointsVector - TextEntry + AlphaUserPointsVector + + 5 + + 0 + 0 + + + + + + + ColorMapInvert + + + ColorMapInvert + + 3 + 0 + + + + + + ColorMapName + + + ColorMapName 2 - 10 --5 --40 + Rainbow + + + + + + ColorMapResolution + + + ColorMapResolution + + 0 + 256 + + + + + + ColorMapShift + + + ColorMapShift + + 1 + 0.00000000000000000e+00 @@ -367,7 +462,7 @@ - CreateStandardColorMap:0 + CreateStandardColorMap:1 SCIRun @@ -445,6 +540,82 @@ + + CreateStandardMatrix:0 + + + SCIRun + Math + CreateStandardMatrix + + + + 5 + 0 + + + Columns + + + Columns + + 0 + 3 + + + + + + MatrixType + + + MatrixType + + 2 + Identity + + + + + + Rows + + + Rows + + 0 + 3 + + + + + + Size + + + Size + + 1 + 1.00000000000000000e+00 + + + + + + StartPointer + + + StartPointer + + 1 + 0.00000000000000000e+00 + + + + + + + EvaluateLinearAlgebraBinary:0 @@ -662,191 +833,174 @@ - InterfaceWithPython:0 + GetMatrixSlice:2 SCIRun - Python - InterfaceWithPython + Math + GetMatrixSlice - 13 + 6 0 - InputField:0 + IsSliceColumn - InputField:0 + IsSliceColumn - 2 - fieldInput1 + 3 + 1 - NumberOfRetries + MaxIndex - NumberOfRetries + MaxIndex 0 - 50 + 119 - PollingIntervalMilliseconds + PlayModeDelay - PollingIntervalMilliseconds + PlayModeDelay 0 - 200 - - - - - - PythonCode - - - PythonCode - - 2 - import numpy as np -import itertools -import os - -print('loaded builtin libs') - -sys.path.append('/Users/jess/software/pyopoly/p3/') - -print('path set') - -#import indexing, wafp, sensitivity -from test_functions import genz_oscillatory -#from opolynd import opolynd_eval -#from recurrence import jacobi_recurrence -print('uncertainty code loaded') - -torso = fieldInput1 - -Nx = len(torso['node']) - -print(Nx) - + 0 - PythonOutputField1Name + PlayModeType - PythonOutputField1Name + PlayModeType 2 - fieldOutput1 + looponce - PythonOutputField2Name + SliceIncrement - PythonOutputField2Name + SliceIncrement - 2 - fieldOutput2 + 0 + 1 - PythonOutputField3Name + SliceIndex - PythonOutputField3Name + SliceIndex - 2 - fieldOutput3 + 0 + 119 + + + + + + GetMatrixSlice:3 + + + SCIRun + Math + GetMatrixSlice + + + + 6 + 0 - PythonOutputMatrix1Name + IsSliceColumn - PythonOutputMatrix1Name + IsSliceColumn - 2 - matrixOutput1 + 3 + 0 - PythonOutputMatrix2Name + MaxIndex - PythonOutputMatrix2Name + MaxIndex - 2 - matrixOutput2 + 0 + 2 - PythonOutputMatrix3Name + PlayModeDelay - PythonOutputMatrix3Name + PlayModeDelay - 2 - matrixOutput3 + 0 + 0 - PythonOutputString1Name + PlayModeType - PythonOutputString1Name + PlayModeType 2 - stringOutput1 + looponce - PythonOutputString2Name + SliceIncrement - PythonOutputString2Name + SliceIncrement - 2 - stringOutput2 + 0 + 1 - PythonOutputString3Name + SliceIndex - PythonOutputString3Name + SliceIndex - 2 - stringOutput3 + 0 + 2 @@ -855,102 +1009,86 @@ print(Nx) - ReadField:0 + GetMatrixSlice:4 SCIRun - DataIO - ReadField + Math + GetMatrixSlice - 3 + 6 0 - FileTypeName + IsSliceColumn - FileTypeName + IsSliceColumn - 2 - SCIRun Field File + 3 + 0 - Filename + MaxIndex - Filename + MaxIndex - 2 - %SCIRUNDATADIR%/Data/tikhonov_inv/25feb97_sock_closed.fld + 0 + 5 - ScriptEnvironmentVariable + PlayModeDelay - ScriptEnvironmentVariable + PlayModeDelay - 2 - + 0 + 0 - - - - - - ReadField:1 - - - SCIRun - DataIO - ReadField - - - - 3 - 0 - FileTypeName + PlayModeType - FileTypeName + PlayModeType 2 - SCIRun Field File + looponce - Filename + SliceIncrement - Filename + SliceIncrement - 2 - %SCIRUNDATADIR%/Data/pot_based_BEM_forward/tank.fld + 0 + 1 - ScriptEnvironmentVariable + SliceIndex - ScriptEnvironmentVariable + SliceIndex - 2 - + 0 + 2 @@ -959,114 +1097,86 @@ print(Nx) - ReadMatrix:0 + GetMatrixSlice:5 SCIRun - DataIO - ReadMatrix + Math + GetMatrixSlice - 3 + 6 0 - FileTypeName + IsSliceColumn - FileTypeName + IsSliceColumn - 2 - SCIRun Matrix File + 3 + 1 - Filename + MaxIndex - Filename + MaxIndex - 2 - %SCIRUNDATADIR%/Data/tikhonov_inv/epi_pot_128_fr_170to190.mat + 0 + 20 - ScriptEnvironmentVariable + PlayModeDelay - ScriptEnvironmentVariable + PlayModeDelay - 2 - + 0 + 0 - - - - - - RescaleColorMap:0 - - - SCIRun - Visualization - RescaleColorMap - - - - 4 - 0 - AutoScale + PlayModeType - AutoScale + PlayModeType - 0 - 0 - - - - - - FixedMax - - - FixedMax - - 1 - 1.28900000000000000e+04 + 2 + looponce - FixedMin + SliceIncrement - FixedMin + SliceIncrement - 1 - -1.64000000000000000e+04 + 0 + 1 - Symmetric + SliceIndex - Symmetric + SliceIndex - 3 - 0 + 0 + 10 @@ -1075,118 +1185,86 @@ print(Nx) - RescaleColorMap:1 + GetMatrixSlice:6 SCIRun - Visualization - RescaleColorMap + Math + GetMatrixSlice - 4 + 6 0 - AutoScale + IsSliceColumn - AutoScale + IsSliceColumn - 0 - 0 + 3 + 1 - FixedMax + MaxIndex - FixedMax + MaxIndex - 1 - 2.81288706098427610e+03 + 0 + 20 - FixedMin + PlayModeDelay - FixedMin + PlayModeDelay - 1 - -5.44127539449097185e+02 + 0 + 0 - Symmetric + PlayModeType - Symmetric + PlayModeType - 3 - 0 + 2 + looponce - - - - - - SetFieldData:0 - - - SCIRun - ChangeFieldData - SetFieldData - - - - 1 - 0 - keepTypeCheckBox + SliceIncrement - keepTypeCheckBox + SliceIncrement - 3 - 0 + 0 + 1 - - - - - - SetFieldData:1 - - - SCIRun - ChangeFieldData - SetFieldData - - - - 1 - 0 - keepTypeCheckBox + SliceIndex - keepTypeCheckBox + SliceIndex - 3 - 0 + 0 + 10 @@ -1195,470 +1273,701 @@ print(Nx) - ShowField:0 + InterfaceWithPython:0 SCIRun - Visualization - ShowField + Python + InterfaceWithPython - 38 + 13 0 - CullBackfacingText + InputField:0 - CullBackfacingText + InputField:0 - 3 - 0 + 2 + fieldInput1 - CylinderRadius + NumberOfRetries - CylinderRadius + NumberOfRetries - 1 - 1.00000000000000006e-01 + 0 + 50 - CylinderResolution + PollingIntervalMilliseconds - CylinderResolution + PollingIntervalMilliseconds 0 - 5 + 200 - DefaultMeshColor + PythonCode - DefaultMeshColor + PythonCode 2 - Color(0.5,0.5,0.5) + import numpy as np +import itertools +import os + +print('loaded builtin libs') + +sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/Uncertainty/') + +print('path set') + +""" +import indexing, wafp, sensitivity +print('load 1') +from test_functions import genz_oscillatory +print('load 2') +from opolynd import opolynd_eval +print('load 3') +from recurrence import jacobi_recurrence +print('uncertainty code loaded') +""" + +torso = fieldInput1 + +Nx = len(torso['node']) + +print(Nx) + +x = np.linspace(0, 1, Nx) # spatial grid +#print(x) +curr_dir = os.getcwd() + + +######## Step 1: generate samples + +d = 3 # dimension of random/parameter space +k = 2 # polynomial degree (parameter space) +poly_space = indexing.total_degree_indices + +lambdas = poly_space(d, k) +N = lambdas.shape[0] + +M = N + 10 # Number of samples (expensive model runs) to perform. Must + # be at least N, but the +10 is arbitrary. + # Of course, large M ===> better. + +candidate_mesh_size = int(2e2) + +print("Generating parameter mesh...") +z = wafp.legendre_wafp(lambdas, M=candidate_mesh_size) +z = wafp.legendre_wafp_enrichment(z, lambdas, M-N) +#print(z) +# The samples are the array z, each row is a d-dimensional sample on the +# hypercube [-1,1]^d. The particular way these points are generated is +# random, so you'll get a different set of z each time this is fun, but +# the "quality" of the grid has relatively low variance from run to run. +# This takes a while, but these points may be stored for future use. + +# Compare surrogate discrepancy at validation points +M_validation = 100 +z_validation = np.random.uniform(0, 1, [100, d]) + +z_tot = np.row_stack((z,z_validation)) + +print(z_tot.shape) + +matrixOutput1 = (z_tot.T).tolist() +matrixOutput2 = lambdas.tolist() + +others = [[ d, k, N, M, M_validation, Nx ]] + +print(others) + +matrixOutput3 = others + + + + + + - DefaultTextColor + PythonOutputField1Name - DefaultTextColor + PythonOutputField1Name 2 - Color(1,1,1) + fieldOutput1 - EdgeTransparency + PythonOutputField2Name - EdgeTransparency + PythonOutputField2Name - 3 - 0 + 2 + fieldOutput2 - EdgeTransparencyValue + PythonOutputField3Name - EdgeTransparencyValue + PythonOutputField3Name - 1 - 6.49999976158142090e-01 + 2 + fieldOutput3 - EdgesAsCylinders + PythonOutputMatrix1Name - EdgesAsCylinders + PythonOutputMatrix1Name - 0 - 0 + 2 + matrixOutput1 - EdgesAvailable + PythonOutputMatrix2Name - EdgesAvailable + PythonOutputMatrix2Name - 3 - 1 + 2 + matrixOutput2 - EdgesColoring + PythonOutputMatrix3Name - EdgesColoring + PythonOutputMatrix3Name - 0 - 0 + 2 + matrixOutput3 - FaceInvertNormals + PythonOutputString1Name - FaceInvertNormals + PythonOutputString1Name - 3 - 0 + 2 + stringOutput1 - FaceTransparency + PythonOutputString2Name - FaceTransparency + PythonOutputString2Name - 3 - 0 + 2 + stringOutput2 - FaceTransparencyValue + PythonOutputString3Name - FaceTransparencyValue + PythonOutputString3Name - 1 - 6.49999976158142090e-01 - - - - - - FacesAvailable - - - FacesAvailable - - 3 - 1 + 2 + stringOutput3 + + + + + + InterfaceWithPython:1 + + + SCIRun + Python + InterfaceWithPython + + + + 16 + 0 - FacesColoring + InputMatrix:0 - FacesColoring + InputMatrix:0 - 0 - 1 + 2 + matrixInput1 - FieldName + InputMatrix:1 - FieldName + InputMatrix:1 2 - + matrixInput2 - NodeAsSpheres + InputMatrix:2 - NodeAsSpheres + InputMatrix:2 - 0 - 0 + 2 + matrixInput3 - NodeTransparency + InputMatrix:3 - NodeTransparency + InputMatrix:3 - 3 - 0 + 2 + matrixInput4 - NodeTransparencyValue + NumberOfRetries - NodeTransparencyValue + NumberOfRetries - 1 - 6.49999976158142090e-01 + 0 + 50 - NodesAvailable + PollingIntervalMilliseconds - NodesAvailable + PollingIntervalMilliseconds - 3 - 1 + 0 + 200 - NodesColoring + PythonCode - NodesColoring + PythonCode - 0 - 1 + 2 + # Insert your Python code here. The SCIRun API package is automatically imported. +import itertools +import numpy as np +import os + + +u_in = matrixInput1 +lmd = matrixInput2 +z_in = matrixInput3 +others = matrixInput4 + +d = int(others[0][0]) +k = int(others[0][1]) +N = int(others[0][2]) +M = int(others[0][3]) +M_validation = int(others[0][4]) +Nx = int(others[0][5]) + +print(type(M)) + +u_tot = np.array(u_in) +u=u_tot[:,0:M] +u_truth = u_tot[:,M:] + +lambdas = np.array(lmd).astype(int) +z_tot = np.array(z_in).T + +z = z_tot[0:M,:] +z_validation = z_tot[M:,:] + + +print(z.shape) + +#print(lambdas) +print(lambdas.shape) +print(lambdas.max()) + +######## Step 3: compute PCE coefficients +print("Assembling PCE coefficients...") +ab = jacobi_recurrence(lambdas.max()+1, alpha=0., beta=0., probability=True) +print(ab) +V = opolynd_eval(z, lambdas, ab) +weights = np.sqrt(float(N)/float(M)) / np.sqrt(np.sum(V**2,axis=1)) + +# The PCE coefficients are computed as a weighted discrete least-squares +# estimator with the weights above. +coeffs = np.linalg.lstsq( (V.T*weights).T, (u*weights).T)[0].T + +# Each row of coeffs contains PCE coefficients for a single x gridpoint. +# Each column of coeffs contains a particular PCE coefficient for all +# values of x. + +######## Step 4: whatever postprocessing you want +print("Processing PCE coefficients...") +# Compute total sensitivities +total_sensitivities = sensitivity.pce_total_sensitivity(coeffs.T, lambdas, list(range(d))) +#np.savetxt(sens_tot_file,total_sensitivities,delimiter = ' ') + +# Compute global sensitivities +# Compute main-effect and main-interaction sensitivities +Js = [[j] for j in range(d)] +for comb in itertools.combinations(list(range(d)), 2): + Js.append(comb) + +global_sensitivities = sensitivity.pce_global_sensitivity(coeffs.T, lambdas, Js) +#np.savetxt(sens_global_file,global_sensitivities,delimiter = ' ') + +matrixOutput1 = total_sensitivities.tolist() +matrixOutput2 = global_sensitivities.tolist() + + +# compare to validation points +u_pce = np.zeros([Nx, M_validation]) +V = opolynd_eval(z_validation, lambdas, ab) +u_pce = np.dot(V, coeffs.T).T + + +# Compute l2- and max-errors for each grid point: +l2_error = np.sqrt(np.sum((u_truth - u_pce)**2, axis=1))/np.sqrt(N) +linf_error = np.max(np.abs(u_truth - u_pce), axis=1) + +string_out = "L2 error on validation mesh: {0:1.3e}\nMaximum error on validation mesh: {1:1.3e}".format(np.linalg.norm(l2_error)/np.sqrt(Nx), np.max(linf_error.flatten())) + +print(string_out) + +stringOutput1 = string_out + + + + - RenderAsLocation + PythonOutputField1Name - RenderAsLocation + PythonOutputField1Name - 3 - 0 + 2 + fieldOutput1 - ShowCellIndices + PythonOutputField2Name - ShowCellIndices + PythonOutputField2Name - 3 - 0 + 2 + fieldOutput2 - ShowDataValues + PythonOutputField3Name - ShowDataValues + PythonOutputField3Name - 3 - 1 + 2 + fieldOutput3 - ShowEdgeIndices + PythonOutputMatrix1Name - ShowEdgeIndices + PythonOutputMatrix1Name - 3 - 0 + 2 + matrixOutput1 - ShowEdges + PythonOutputMatrix2Name - ShowEdges + PythonOutputMatrix2Name - 3 - 0 + 2 + matrixOutput2 - ShowFaceIndices + PythonOutputMatrix3Name - ShowFaceIndices + PythonOutputMatrix3Name - 3 - 0 + 2 + matrixOutput3 - ShowFaces + PythonOutputString1Name - ShowFaces + PythonOutputString1Name - 3 - 1 + 2 + stringOutput1 - ShowNodeIndices + PythonOutputString2Name - ShowNodeIndices + PythonOutputString2Name - 3 - 0 + 2 + stringOutput2 - ShowNodes + PythonOutputString3Name - ShowNodes + PythonOutputString3Name - 3 - 0 + 2 + stringOutput3 + + + + + + ReadField:0 + + + SCIRun + DataIO + ReadField + + + + 3 + 0 - ShowText + FileTypeName - ShowText + FileTypeName - 3 - 0 + 2 + SCIRun Field File - SphereResolution + Filename - SphereResolution + Filename - 0 - 5 + 2 + %SCIRUNDATADIR%/Data/tikhonov_inv/25feb97_sock_closed.fld - SphereScaleValue + ScriptEnvironmentVariable - SphereScaleValue + ScriptEnvironmentVariable - 1 - 2.99999999999999989e-02 + 2 + + + + + + + ReadField:1 + + + SCIRun + DataIO + ReadField + + + + 3 + 0 - TextAlwaysVisible + FileTypeName - TextAlwaysVisible + FileTypeName - 3 - 0 + 2 + SCIRun Field File - TextColoring + Filename - TextColoring + Filename - 0 - 0 + 2 + %SCIRUNDATADIR%/Data/pot_based_BEM_forward/tank.fld - TextPrecision + ScriptEnvironmentVariable - TextPrecision + ScriptEnvironmentVariable - 0 - 3 + 2 + - - - TextSize + + + + + + ReadMatrix:0 + + + SCIRun + DataIO + ReadMatrix + + + + 3 + 0 + + + FileTypeName - TextSize + FileTypeName - 0 - 8 + 2 + SCIRun Matrix File - UseFaceNormals + Filename - UseFaceNormals + Filename - 3 - 0 + 2 + %SCIRUNDATADIR%/Data/tikhonov_inv/epi_pot_128_fr_170to190.mat + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + @@ -1667,323 +1976,563 @@ print(Nx) - ShowField:1 + ReportMatrixInfo:0 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportMatrixInfo:1 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportMatrixInfo:2 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportMatrixInfo:3 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportStringInfo:0 + + + SCIRun + String + ReportStringInfo + + + + 0 + 0 + + + + + + RescaleColorMap:0 SCIRun Visualization - ShowField + RescaleColorMap - 38 + 4 0 - CullBackfacingText + AutoScale - CullBackfacingText + AutoScale - 3 + 0 0 - CylinderRadius + FixedMax - CylinderRadius + FixedMax 1 - 1.00000000000000006e-01 + 1.28900000000000000e+04 - CylinderResolution + FixedMin - CylinderResolution + FixedMin - 0 - 5 + 1 + -1.64000000000000000e+04 - DefaultMeshColor + Symmetric - DefaultMeshColor + Symmetric - 2 - Color(0.5,0.5,0.5) + 3 + 0 + + + + + + RescaleColorMap:1 + + + SCIRun + Visualization + RescaleColorMap + + + + 4 + 0 - DefaultTextColor + AutoScale - DefaultTextColor + AutoScale - 2 - Color(1,1,1) + 0 + 0 - EdgeTransparency + FixedMax - EdgeTransparency + FixedMax - 3 - 0 + 1 + 2.20559699785974453e+03 - EdgeTransparencyValue + FixedMin - EdgeTransparencyValue + FixedMin 1 - 6.49999976158142090e-01 + -5.13683733865315276e+02 - EdgesAsCylinders + Symmetric - EdgesAsCylinders + Symmetric - 0 + 3 0 + + + + + + RescaleColorMap:2 + + + SCIRun + Visualization + RescaleColorMap + + + + 4 + 0 - EdgesAvailable + AutoScale - EdgesAvailable + AutoScale - 3 + 0 1 - EdgesColoring + FixedMax - EdgesColoring + FixedMax - 0 - 1 + 1 + 1.00000000000000000e+00 - FaceInvertNormals + FixedMin - FaceInvertNormals + FixedMin - 3 - 0 + 1 + 0.00000000000000000e+00 - FaceTransparency + Symmetric - FaceTransparency + Symmetric 3 - 1 + 0 + + + + + + ResizeMatrix:0 + + + SCIRun + Math + ResizeMatrix + + + + 3 + 0 - FaceTransparencyValue + Major - FaceTransparencyValue + Major - 1 - 6.49999976158142090e-01 + 2 + Row - FacesAvailable + NoOfColumns - FacesAvailable + NoOfColumns - 3 + 0 1 - FacesColoring + NoOfRows - FacesColoring + NoOfRows 0 - 1 + 16191 + + + + + + ResizeMatrix:1 + + + SCIRun + Math + ResizeMatrix + + + + 3 + 0 - FieldName + Major - FieldName + Major 2 - + Row - NodeAsSpheres + NoOfColumns - NodeAsSpheres + NoOfColumns 0 - 0 + 21 - NodeTransparency + NoOfRows - NodeTransparency + NoOfRows - 3 - 0 + 0 + 771 + + + + + + ResizeMatrix:2 + + + SCIRun + Math + ResizeMatrix + + + + 3 + 0 - NodeTransparencyValue + Major - NodeTransparencyValue + Major - 1 - 6.49999976158142090e-01 + 2 + Row - NodesAvailable + NoOfColumns - NodesAvailable + NoOfColumns - 3 - 1 + 0 + 21 - NodesColoring + NoOfRows - NodesColoring + NoOfRows 0 - 1 + 771 + + + + + + SetFieldData:0 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 - RenderAsLocation + keepTypeCheckBox - RenderAsLocation + keepTypeCheckBox 3 0 + + + + + + SetFieldData:1 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 - ShowCellIndices + keepTypeCheckBox - ShowCellIndices + keepTypeCheckBox 3 0 + + + + + + SetFieldData:2 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 - ShowDataValues + keepTypeCheckBox - ShowDataValues + keepTypeCheckBox 3 - 1 + 0 + + + + + + SetFieldData:4 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 - ShowEdgeIndices + keepTypeCheckBox - ShowEdgeIndices + keepTypeCheckBox 3 0 + + + + + + ShowField:0 + + + SCIRun + Visualization + ShowField + + + + 38 + 0 - ShowEdges + CullBackfacingText - ShowEdges + CullBackfacingText 3 0 @@ -1992,58 +2541,58 @@ print(Nx) - ShowFaceIndices + CylinderRadius - ShowFaceIndices + CylinderRadius - 3 - 0 + 1 + 1.00000000000000006e-01 - ShowFaces + CylinderResolution - ShowFaces + CylinderResolution - 3 - 1 + 0 + 5 - ShowNodeIndices + DefaultMeshColor - ShowNodeIndices + DefaultMeshColor - 3 - 0 + 2 + Color(0.5,0.5,0.5) - ShowNodes + DefaultTextColor - ShowNodes + DefaultTextColor - 3 - 0 + 2 + Color(1,1,1) - ShowText + EdgeTransparency - ShowText + EdgeTransparency 3 0 @@ -2052,46 +2601,46 @@ print(Nx) - SphereResolution + EdgeTransparencyValue - SphereResolution + EdgeTransparencyValue - 0 - 5 + 1 + 6.49999976158142090e-01 - SphereScaleValue + EdgesAsCylinders - SphereScaleValue + EdgesAsCylinders - 1 - 2.99999999999999989e-02 + 0 + 0 - TextAlwaysVisible + EdgesAvailable - TextAlwaysVisible + EdgesAvailable 3 - 0 + 1 - TextColoring + EdgesColoring - TextColoring + EdgesColoring 0 0 @@ -2100,246 +2649,226 @@ print(Nx) - TextPrecision + FaceInvertNormals - TextPrecision + FaceInvertNormals - 0 - 3 + 3 + 0 - TextSize + FaceTransparency - TextSize + FaceTransparency - 0 - 8 + 3 + 0 - UseFaceNormals + FaceTransparencyValue - UseFaceNormals + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable 3 - 0 + 1 - - - - - - TransformMeshWithTransform:0 - - - SCIRun - ChangeMesh - TransformMeshWithTransform - - - - 0 - 0 - - - - - - ViewScene:0 - - - SCIRun - Render - ViewScene - - - - 39 - 0 - Ambient + FacesColoring - Ambient + FacesColoring - 1 - 2.00000000000000011e-01 + 0 + 1 - BackCull + FieldName - BackCull + FieldName - 3 - 0 + 2 + - BackgroundColor + NodeAsSpheres - BackgroundColor + NodeAsSpheres - 2 - Color(0,0,0) + 0 + 0 - Diffuse + NodeTransparency - Diffuse + NodeTransparency - 1 - 1.00000000000000000e+00 + 3 + 0 - DisplayList + NodeTransparencyValue - DisplayList + NodeTransparencyValue - 3 - 0 + 1 + 6.49999976158142090e-01 - Emission + NodesAvailable - Emission + NodesAvailable - 1 - 1.00000000000000000e+00 + 3 + 1 - FieldOfView + NodesColoring - FieldOfView + NodesColoring 0 - 20 + 1 - FogColor + RenderAsLocation - FogColor + RenderAsLocation - 2 - Color(0,0,1) + 3 + 0 - FogEnd + ShowCellIndices - FogEnd + ShowCellIndices - 1 - 7.09999999999999964e-01 + 3 + 0 - FogOn + ShowDataValues - FogOn + ShowDataValues 3 - 0 + 1 - FogStart + ShowEdgeIndices - FogStart + ShowEdgeIndices - 1 - 0.00000000000000000e+00 + 3 + 0 - HeadLightColor + ShowEdges - HeadLightColor + ShowEdges - 2 - Color(0,0,0) + 3 + 0 - HeadLightOn + ShowFaceIndices - HeadLightOn + ShowFaceIndices 3 - 1 + 0 - Light1Color + ShowFaces - Light1Color + ShowFaces - 2 - Color(0,0,0) + 3 + 1 - Light1On + ShowNodeIndices - Light1On + ShowNodeIndices 3 0 @@ -2348,22 +2877,22 @@ print(Nx) - Light2Color + ShowNodes - Light2Color + ShowNodes - 2 - Color(0,0,0) + 3 + 0 - Light2On + ShowText - Light2On + ShowText 3 0 @@ -2372,154 +2901,2374 @@ print(Nx) - Light3Color + SphereResolution - Light3Color + SphereResolution - 2 - Color(0,0,0) + 0 + 5 - Light3On + SphereScaleValue - Light3On + SphereScaleValue - 3 - 0 + 1 + 2.99999999999999989e-02 - Lighting + TextAlwaysVisible - Lighting + TextAlwaysVisible 3 - 1 + 0 - ObjectsOnly + TextColoring - ObjectsOnly + TextColoring - 3 - 1 + 0 + 0 - PolygonOffset + TextPrecision - PolygonOffset + TextPrecision - 1 - 0.00000000000000000e+00 + 0 + 3 - ScaleBarFontSize + TextSize - ScaleBarFontSize + TextSize 0 - 1 + 8 - ScaleBarHeight + UseFaceNormals - ScaleBarHeight + UseFaceNormals - 1 - 0.00000000000000000e+00 + 3 + 0 + + + + + + ShowField:1 + + + SCIRun + Visualization + ShowField + + + + 38 + 0 - ScaleBarLength + CullBackfacingText - ScaleBarLength + CullBackfacingText - 1 - 0.00000000000000000e+00 + 3 + 0 - ScaleBarLineWidth + CylinderRadius - ScaleBarLineWidth + CylinderRadius 1 - 1.00000000000000000e+00 + 1.00000000000000006e-01 - ScaleBarMultiplier + CylinderResolution - ScaleBarMultiplier + CylinderResolution - 1 - 0.00000000000000000e+00 + 0 + 5 - ScaleBarNumTicks + DefaultMeshColor - ScaleBarNumTicks + DefaultMeshColor - 0 - 0 + 2 + Color(0.5,0.5,0.5) - ScaleBarUnitValue + DefaultTextColor - ScaleBarUnitValue + DefaultTextColor 2 - mm + Color(1,1,1) - Shine + EdgeTransparency - Shine + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 1 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + ShowField:2 + + + SCIRun + Visualization + ShowField + + + + 38 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + total sensitivities + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + ShowField:3 + + + SCIRun + Visualization + ShowField + + + + 38 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + global sensitivities + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + TransformMeshWithTransform:0 + + + SCIRun + ChangeMesh + TransformMeshWithTransform + + + + 0 + 0 + + + + + + ViewScene:0 + + + SCIRun + Render + ViewScene + + + + 39 + 0 + + + Ambient + + + Ambient + + 1 + 2.00000000000000011e-01 + + + + + + BackCull + + + BackCull + + 3 + 0 + + + + + + BackgroundColor + + + BackgroundColor + + 2 + Color(0,0,0) + + + + + + Diffuse + + + Diffuse + + 1 + 1.00000000000000000e+00 + + + + + + DisplayList + + + DisplayList + + 3 + 0 + + + + + + Emission + + + Emission + + 1 + 1.00000000000000000e+00 + + + + + + FieldOfView + + + FieldOfView + + 0 + 20 + + + + + + FogColor + + + FogColor + + 2 + Color(0,0,1) + + + + + + FogEnd + + + FogEnd + + 1 + 7.09999999999999964e-01 + + + + + + FogOn + + + FogOn + + 3 + 0 + + + + + + FogStart + + + FogStart + + 1 + 0.00000000000000000e+00 + + + + + + HeadLightColor + + + HeadLightColor + + 2 + Color(0,0,0) + + + + + + HeadLightOn + + + HeadLightOn + + 3 + 1 + + + + + + Light1Color + + + Light1Color + + 2 + Color(0,0,0) + + + + + + Light1On + + + Light1On + + 3 + 0 + + + + + + Light2Color + + + Light2Color + + 2 + Color(0,0,0) + + + + + + Light2On + + + Light2On + + 3 + 0 + + + + + + Light3Color + + + Light3Color + + 2 + Color(0,0,0) + + + + + + Light3On + + + Light3On + + 3 + 0 + + + + + + Lighting + + + Lighting + + 3 + 1 + + + + + + ObjectsOnly + + + ObjectsOnly + + 3 + 1 + + + + + + PolygonOffset + + + PolygonOffset + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarFontSize + + + ScaleBarFontSize + + 0 + 1 + + + + + + ScaleBarHeight + + + ScaleBarHeight + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLength + + + ScaleBarLength + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLineWidth + + + ScaleBarLineWidth + + 1 + 1.00000000000000000e+00 + + + + + + ScaleBarMultiplier + + + ScaleBarMultiplier + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarNumTicks + + + ScaleBarNumTicks + + 0 + 0 + + + + + + ScaleBarUnitValue + + + ScaleBarUnitValue + + 2 + mm + + + + + + Shine + + + Shine + + 1 + 1.00000000000000000e+00 + + + + + + ShowBBox + + + ShowBBox + + 3 + 0 + + + + + + ShowScaleBar + + + ShowScaleBar + + 3 + 0 + + + + + + ShowViewer + + + ShowViewer + + 3 + 0 + + + + + + Specular + + + Specular + + 1 + 4.00000000000000022e-01 + + + + + + Stereo + + + Stereo + + 3 + 0 + + + + + + StereoFusion + + + StereoFusion + + 1 + 4.00000000000000022e-01 + + + + + + TextOffset + + + TextOffset + + 1 + 0.00000000000000000e+00 + + + + + + UseBGColor + + + UseBGColor + + 3 + 1 + + + + + + UseClip + + + UseClip + + 3 + 1 + + + + + + + + + ViewScene:1 + + + SCIRun + Render + ViewScene + + + + 39 + 0 + + + Ambient + + + Ambient + + 1 + 2.00000000000000011e-01 + + + + + + BackCull + + + BackCull + + 3 + 0 + + + + + + BackgroundColor + + + BackgroundColor + + 2 + Color(0,0,0) + + + + + + Diffuse + + + Diffuse + + 1 + 1.00000000000000000e+00 + + + + + + DisplayList + + + DisplayList + + 3 + 0 + + + + + + Emission + + + Emission + + 1 + 1.00000000000000000e+00 + + + + + + FieldOfView + + + FieldOfView + + 0 + 20 + + + + + + FogColor + + + FogColor + + 2 + Color(0,0,1) + + + + + + FogEnd + + + FogEnd + + 1 + 7.09999999999999964e-01 + + + + + + FogOn + + + FogOn + + 3 + 0 + + + + + + FogStart + + + FogStart + + 1 + 0.00000000000000000e+00 + + + + + + HeadLightColor + + + HeadLightColor + + 2 + Color(0,0,0) + + + + + + HeadLightOn + + + HeadLightOn + + 3 + 1 + + + + + + Light1Color + + + Light1Color + + 2 + Color(0,0,0) + + + + + + Light1On + + + Light1On + + 3 + 0 + + + + + + Light2Color + + + Light2Color + + 2 + Color(0,0,0) + + + + + + Light2On + + + Light2On + + 3 + 0 + + + + + + Light3Color + + + Light3Color + + 2 + Color(0,0,0) + + + + + + Light3On + + + Light3On + + 3 + 0 + + + + + + Lighting + + + Lighting + + 3 + 1 + + + + + + ObjectsOnly + + + ObjectsOnly + + 3 + 1 + + + + + + PolygonOffset + + + PolygonOffset + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarFontSize + + + ScaleBarFontSize + + 0 + 1 + + + + + + ScaleBarHeight + + + ScaleBarHeight + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLength + + + ScaleBarLength + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLineWidth + + + ScaleBarLineWidth + + 1 + 1.00000000000000000e+00 + + + + + + ScaleBarMultiplier + + + ScaleBarMultiplier + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarNumTicks + + + ScaleBarNumTicks + + 0 + 0 + + + + + + ScaleBarUnitValue + + + ScaleBarUnitValue + + 2 + mm + + + + + + Shine + + + Shine 1 1.00000000000000000e+00 @@ -2558,7 +5307,7 @@ print(Nx) ShowViewer 3 - 0 + 1 @@ -2692,152 +5441,428 @@ print(Nx) - 29 + 66 0 - AppendMatrix:1 + AppendMatrix:3 ResultMatrix 0 - AppendMatrix:2 + AppendMatrix:4 + + FirstMatrix + 0 + + + + AppendMatrix:4 + + ResultMatrix + 0 + + TransformMeshWithTransform:0 + + TransformMatrix + 0 + + + + BooleanCompare:0 + + OutputMatrix + 0 + + InterfaceWithPython:1 + + InputMatrix + 0 + + + + BuildBEMatrix:0 + + BEM_Forward_Matrix + 0 + + EvaluateLinearAlgebraBinary:0 + + LHS + 0 + + + + CollectMatrices:0 + + CompositeMatrix + 0 + + BooleanCompare:0 + + PossibleOutput + 0 + + + + CollectMatrices:0 + + CompositeMatrix + 0 + + ReportMatrixInfo:1 + + InputMatrix + 0 + + + + ConvertScalarToMatrix:0 + + Output + 0 + + BooleanCompare:0 + + MatrixA + 0 + + + + ConvertScalarToMatrix:1 + + Output + 0 + + BooleanCompare:0 + + MatrixB + 0 + + + + CreateMatrix:7 + + EnteredMatrix + 0 + + AppendMatrix:4 + + SecondMatrix + 0 + + + + CreateStandardColorMap:0 + + ColorMapObject + 0 + + RescaleColorMap:0 + + ColorMapObject + 0 + + + + CreateStandardColorMap:1 + + ColorMapObject + 0 + + RescaleColorMap:2 + + ColorMapObject + 0 + + + + CreateStandardMatrix:0 + + OutputMatrix + 0 + + AppendMatrix:3 + + FirstMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + GetMatrixSlice:1 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + ResizeMatrix:0 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + WriteMatrix:0 + + MatrixToWrite + 0 + + + + GetMatrixSlice:0 + + OutputMatrix + 0 + + SetFieldData:0 - FirstMatrix + InputMatrix 0 - AppendMatrix:2 + GetMatrixSlice:0 - ResultMatrix + Selected_Index 0 - TransformMeshWithTransform:0 + GetMatrixSlice:1 - TransformMatrix + Current_Index 0 - BuildBEMatrix:0 + GetMatrixSlice:0 - BEM_Forward_Matrix + Selected_Index 0 - EvaluateLinearAlgebraBinary:0 + GetMatrixSlice:5 - LHS + Current_Index 0 - CreateMatrix:4 + GetMatrixSlice:0 - EnteredMatrix + Selected_Index 0 - AppendMatrix:1 + GetMatrixSlice:6 - FirstMatrix + Current_Index 0 - CreateMatrix:5 + GetMatrixSlice:1 - EnteredMatrix + OutputMatrix 0 - AppendMatrix:2 + SetFieldData:1 - SecondMatrix + InputMatrix 0 - CreateMatrix:6 + GetMatrixSlice:2 - EnteredMatrix + OutputMatrix 0 - AppendMatrix:1 + AppendMatrix:3 SecondMatrix 0 - CreateStandardColorMap:0 + GetMatrixSlice:3 - ColorMapObject + OutputMatrix 0 - RescaleColorMap:0 + ResizeMatrix:1 - ColorMapObject + InputMatrix 0 - EvaluateLinearAlgebraBinary:0 + GetMatrixSlice:4 - Result + OutputMatrix 0 - GetMatrixSlice:1 + ResizeMatrix:2 InputMatrix 0 - EvaluateLinearAlgebraBinary:0 + GetMatrixSlice:5 - Result + OutputMatrix 0 - WriteMatrix:0 + SetFieldData:2 - MatrixToWrite + InputMatrix 0 - GetMatrixSlice:0 + GetMatrixSlice:6 OutputMatrix 0 - SetFieldData:0 + SetFieldData:4 InputMatrix 0 - GetMatrixSlice:0 + InterfaceWithPython:0 - Selected_Index + PythonMatrix1 0 - GetMatrixSlice:1 + GetMatrixSlice:2 - Current_Index + InputMatrix 0 - GetMatrixSlice:1 + InterfaceWithPython:0 - OutputMatrix + PythonMatrix1 0 - SetFieldData:1 + InterfaceWithPython:1 + + InputMatrix + 2 + + + + InterfaceWithPython:0 + + PythonMatrix1 + 0 + + ReportMatrixInfo:0 + + InputMatrix + 0 + + + + InterfaceWithPython:0 + + PythonMatrix2 + 0 + + InterfaceWithPython:1 + + InputMatrix + 1 + + + + InterfaceWithPython:0 + + PythonMatrix3 + 0 + + InterfaceWithPython:1 + + InputMatrix + 3 + + + + InterfaceWithPython:1 + + PythonMatrix1 + 0 + + GetMatrixSlice:3 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix1 + 0 + + ReportMatrixInfo:2 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix2 + 0 + + GetMatrixSlice:4 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix2 + 0 + + ReportMatrixInfo:3 InputMatrix 0 + + InterfaceWithPython:1 + + PythonString1 + 0 + + ReportStringInfo:0 + + Input + 0 + + ReadField:0 @@ -2863,132 +5888,276 @@ print(Nx) - ReadField:1 + ReadField:1 + + Field + 0 + + InterfaceWithPython:0 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:1 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:2 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:4 + + InputField + 0 + + + + ReadMatrix:0 + + Matrix + 0 + + EvaluateLinearAlgebraBinary:0 + + RHS + 0 + + + + ReadMatrix:0 + + Matrix + 0 + + GetMatrixSlice:0 + + InputMatrix + 0 + + + + ReportMatrixInfo:0 + + NumCols + 0 + + ConvertScalarToMatrix:0 + + Input + 0 + + + + ReportMatrixInfo:1 + + NumCols + 0 + + ConvertScalarToMatrix:1 + + Input + 0 + + + + RescaleColorMap:0 + + ColorMapOutput + 0 + + RescaleColorMap:1 + + ColorMapObject + 0 + + + + RescaleColorMap:0 + + ColorMapOutput + 0 + + ShowField:0 + + ColorMapObject + 0 + + + + RescaleColorMap:1 + + ColorMapOutput + 0 + + ShowField:1 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:2 + + ColorMapObject + 0 + + + + RescaleColorMap:2 - Field + ColorMapOutput 0 - InterfaceWithPython:0 + ShowField:3 - InputField + ColorMapObject 0 - ReadField:1 + ResizeMatrix:0 - Field + OutputMatrix 0 - SetFieldData:1 + CollectMatrices:0 - InputField + SubMatrix 0 - ReadMatrix:0 + ResizeMatrix:1 - Matrix + OutputMatrix 0 - EvaluateLinearAlgebraBinary:0 + GetMatrixSlice:5 - RHS + InputMatrix 0 - ReadMatrix:0 + ResizeMatrix:2 - Matrix + OutputMatrix 0 - GetMatrixSlice:0 + GetMatrixSlice:6 InputMatrix 0 - RescaleColorMap:0 + SetFieldData:0 - ColorMapOutput + OutputField 0 - RescaleColorMap:1 + RescaleColorMap:0 - ColorMapObject + Field 0 - RescaleColorMap:0 + SetFieldData:0 - ColorMapOutput + OutputField 0 ShowField:0 - ColorMapObject + Field 0 - RescaleColorMap:1 + SetFieldData:1 - ColorMapOutput + OutputField 0 - ShowField:1 + RescaleColorMap:1 - ColorMapObject + Field 0 - SetFieldData:0 + SetFieldData:1 OutputField 0 - RescaleColorMap:0 + ShowField:1 Field 0 - SetFieldData:0 + SetFieldData:2 OutputField 0 - ShowField:0 + RescaleColorMap:2 Field 0 - SetFieldData:1 + SetFieldData:2 OutputField 0 - RescaleColorMap:1 + ShowField:2 Field 0 - SetFieldData:1 + SetFieldData:4 OutputField 0 - ShowField:1 + ShowField:3 Field 0 @@ -3018,6 +6187,30 @@ print(Nx) 1 + + ShowField:2 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 0 + + + + ShowField:3 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 1 + + TransformMeshWithTransform:0 @@ -3045,104 +6238,153 @@ print(Nx) - 26 + 47 0 - AppendMatrix:1 + AppendMatrix:3 - -2.51400000000000000e+03 - -1.65700000000000000e+03 + -2.74600000000000000e+03 + -1.59500000000000000e+03 + + + + AppendMatrix:4 + + -2.72800000000000000e+03 + -1.49300000000000000e+03 - AppendMatrix:2 + BooleanCompare:0 - -2.51000000000000000e+03 - -1.52700000000000000e+03 + -3.04300000000000000e+03 + -6.53000000000000000e+02 BuildBEMatrix:0 - -3.03100000000000000e+03 - -1.34500000000000000e+03 + -3.03400000000000000e+03 + -1.26500000000000000e+03 - CreateMatrix:1 + CollectMatrices:0 - -2.45900000000000000e+03 - -1.99500000000000000e+03 + -2.95500000000000000e+03 + -9.36000000000000000e+02 - CreateMatrix:2 + ConvertScalarToMatrix:0 - -2.76000000000000000e+03 - -1.99300000000000000e+03 + -3.15500000000000000e+03 + -1.11300000000000000e+03 - CreateMatrix:3 + ConvertScalarToMatrix:1 - -2.62000000000000000e+03 - -1.99500000000000000e+03 + -3.05900000000000000e+03 + -7.51000000000000000e+02 - CreateMatrix:4 + CreateMatrix:7 - -2.52500000000000000e+03 - -1.78800000000000000e+03 + -2.65900000000000000e+03 + -1.68100000000000000e+03 - CreateMatrix:5 + CreateStandardColorMap:0 - -2.25400000000000000e+03 - -1.80200000000000000e+03 + -3.09500000000000000e+03 + -1.51700000000000000e+03 - CreateMatrix:6 + CreateStandardColorMap:1 - -2.49700000000000000e+03 - -1.88200000000000000e+03 + -3.02300000000000000e+03 + -1.80000000000000000e+01 - CreateStandardColorMap:0 + CreateStandardMatrix:0 - -2.76100000000000000e+03 - -1.51700000000000000e+03 + -2.87800000000000000e+03 + -1.80200000000000000e+03 EvaluateLinearAlgebraBinary:0 - -3.02800000000000000e+03 - -1.22900000000000000e+03 + -2.92100000000000000e+03 + -1.18000000000000000e+03 GetMatrixSlice:0 - -2.92400000000000000e+03 - -1.61400000000000000e+03 + -2.88800000000000000e+03 + -1.57900000000000000e+03 GetMatrixSlice:1 - -2.99700000000000000e+03 - -1.15600000000000000e+03 + -2.62700000000000000e+03 + -1.10100000000000000e+03 + + + + GetMatrixSlice:2 + + -2.61100000000000000e+03 + -1.79900000000000000e+03 + + + + GetMatrixSlice:3 + + -3.15300000000000000e+03 + -4.03000000000000000e+02 + + + + GetMatrixSlice:4 + + -2.87100000000000000e+03 + -3.49000000000000000e+02 + + + + GetMatrixSlice:5 + + -3.16400000000000000e+03 + -1.14000000000000000e+02 + + + + GetMatrixSlice:6 + + -2.83000000000000000e+03 + -1.24000000000000000e+02 InterfaceWithPython:0 - -2.85600000000000000e+03 - -1.85700000000000000e+03 + -2.76600000000000000e+03 + -1.91600000000000000e+03 + + + + InterfaceWithPython:1 + + -3.03400000000000000e+03 + -5.17000000000000000e+02 @@ -3162,8 +6404,43 @@ print(Nx) ReadMatrix:0 - -2.88900000000000000e+03 - -1.69800000000000000e+03 + -2.93000000000000000e+03 + -1.71100000000000000e+03 + + + + ReportMatrixInfo:0 + + -3.24000000000000000e+03 + -1.24500000000000000e+03 + + + + ReportMatrixInfo:1 + + -3.08400000000000000e+03 + -8.34000000000000000e+02 + + + + ReportMatrixInfo:2 + + -3.03500000000000000e+03 + -3.25000000000000000e+02 + + + + ReportMatrixInfo:3 + + -2.64300000000000000e+03 + -3.75000000000000000e+02 + + + + ReportStringInfo:0 + + -2.67400000000000000e+03 + -2.83000000000000000e+02 @@ -3180,11 +6457,39 @@ print(Nx) -9.14000000000000000e+02 + + RescaleColorMap:2 + + -2.96400000000000000e+03 + 1.89000000000000000e+02 + + + + ResizeMatrix:0 + + -2.93700000000000000e+03 + -1.05200000000000000e+03 + + + + ResizeMatrix:1 + + -3.16900000000000000e+03 + -2.58000000000000000e+02 + + + + ResizeMatrix:2 + + -2.84300000000000000e+03 + -2.68000000000000000e+02 + + SetFieldData:0 - -2.89600000000000000e+03 - -1.08000000000000000e+03 + -2.79300000000000000e+03 + -1.09400000000000000e+03 @@ -3194,6 +6499,20 @@ print(Nx) -1.00700000000000000e+03 + + SetFieldData:2 + + -3.21500000000000000e+03 + 7.40000000000000000e+01 + + + + SetFieldData:4 + + -2.78600000000000000e+03 + 4.20000000000000000e+01 + + ShowField:0 @@ -3208,11 +6527,25 @@ print(Nx) -8.50000000000000000e+02 + + ShowField:2 + + -3.19500000000000000e+03 + 3.35000000000000000e+02 + + + + ShowField:3 + + -2.85400000000000000e+03 + 3.22000000000000000e+02 + + TransformMeshWithTransform:0 - -2.87900000000000000e+03 - -1.44900000000000000e+03 + -2.89600000000000000e+03 + -1.34300000000000000e+03 @@ -3222,66 +6555,53 @@ print(Nx) -7.23000000000000000e+02 + + ViewScene:1 + + -3.15500000000000000e+03 + 4.70000000000000000e+02 + + WriteMatrix:0 - -3.01900000000000000e+03 - -8.72000000000000000e+02 + -3.14000000000000000e+03 + -1.02800000000000000e+03 - 4 + 2 0 - CreateMatrix:1 + GetMatrixSlice:2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">AP rotation</span></p></body></html> - AP rotation - 3 - 13 - - - - CreateMatrix:2 - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">long axis rotation</span></p></body></html> - long axis rotation - 3 - 13 - - - - CreateMatrix:3 - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">lateral rotation</p></body></html> - lateral rotation - 3 +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">iterate weights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">run play without </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">anything executed</span></p></body></html> + iterate weights +run play without +anything executed + 0 13 - CreateMatrix:6 + InterfaceWithPython:0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Translation</span></p></body></html> - Translation - 3 +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">compute </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">legendre points</span></p></body></html> + compute +legendre points + 5 13 @@ -3291,14 +6611,18 @@ p, li { white-space: pre-wrap; } 0 - 26 + 47 0 - AppendMatrix:1 + AppendMatrix:3 + -1 + + + AppendMatrix:4 -1 - AppendMatrix:2 + BooleanCompare:0 -1 @@ -3306,31 +6630,31 @@ p, li { white-space: pre-wrap; } -1 - CreateMatrix:1 + CollectMatrices:0 -1 - CreateMatrix:2 + ConvertScalarToMatrix:0 -1 - CreateMatrix:3 + ConvertScalarToMatrix:1 -1 - CreateMatrix:4 + CreateMatrix:7 -1 - CreateMatrix:5 + CreateStandardColorMap:0 -1 - CreateMatrix:6 + CreateStandardColorMap:1 -1 - CreateStandardColorMap:0 + CreateStandardMatrix:0 -1 @@ -3345,10 +6669,34 @@ p, li { white-space: pre-wrap; } GetMatrixSlice:1 -1 + + GetMatrixSlice:2 + -1 + + + GetMatrixSlice:3 + -1 + + + GetMatrixSlice:4 + -1 + + + GetMatrixSlice:5 + -1 + + + GetMatrixSlice:6 + -1 + InterfaceWithPython:0 -1 + + InterfaceWithPython:1 + -1 + ReadField:0 -1 @@ -3361,6 +6709,26 @@ p, li { white-space: pre-wrap; } ReadMatrix:0 -1 + + ReportMatrixInfo:0 + -1 + + + ReportMatrixInfo:1 + -1 + + + ReportMatrixInfo:2 + -1 + + + ReportMatrixInfo:3 + -1 + + + ReportStringInfo:0 + -1 + RescaleColorMap:0 -1 @@ -3369,6 +6737,22 @@ p, li { white-space: pre-wrap; } RescaleColorMap:1 -1 + + RescaleColorMap:2 + -1 + + + ResizeMatrix:0 + -1 + + + ResizeMatrix:1 + -1 + + + ResizeMatrix:2 + -1 + SetFieldData:0 -1 @@ -3377,6 +6761,14 @@ p, li { white-space: pre-wrap; } SetFieldData:1 -1 + + SetFieldData:2 + -1 + + + SetFieldData:4 + -1 + ShowField:0 -1 @@ -3385,6 +6777,14 @@ p, li { white-space: pre-wrap; } ShowField:1 -1 + + ShowField:2 + -1 + + + ShowField:3 + -1 + TransformMeshWithTransform:0 -1 @@ -3393,21 +6793,27 @@ p, li { white-space: pre-wrap; } ViewScene:0 -1 + + ViewScene:1 + -1 + WriteMatrix:0 -1 - 1 + 2 0 + WriteMatrix:0 ViewScene:0 - 2 + 3 0 ViewScene:0--ShowField:1 ViewScene:0--ShowField:0 + WriteMatrix:0--EvaluateLinearAlgebraBinary:0 0 diff --git a/PythonLibrary/MFS_inverse/mfs_inverse.py b/PythonLibrary/MFS_inverse/mfs_inverse.py index ea4e8de..6b2b448 100644 --- a/PythonLibrary/MFS_inverse/mfs_inverse.py +++ b/PythonLibrary/MFS_inverse/mfs_inverse.py @@ -68,20 +68,23 @@ # import required routines from various packages from sys import argv -from numpy import sqrt,pi,array,cross,zeros,einsum,arccos,sum,append,dot,diag,transpose,ones,reshape,isnan,linspace,where,diff,sign,argmin,argmax +from numpy import sqrt,pi,array,cross,zeros,einsum,arccos,sum,append,dot,diag,transpose,ones,reshape,isnan,linspace,where,diff,sign,argmin,argmax,mean,max,min from numpy.linalg import norm,svd import scipy #import pyqtgraph #from math import isnan -def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_out,scale_in,lmbd_method,lmbda,viz_regularization,gamma): +def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_factor,scale_method,lmbd_method,lmbda,viz_regularization,gamma): # read closed heart nodes and mesh heart_closed_verts = array(heart['node']) heart_closed_tris = array(heart['face']) # allows for either 0 and 1 based node numbering - if heart_closed_verts.shape[0] == heart_closed_tris.max(): +# print('heart min max',heart_closed_tris.min(),heart_closed_tris.max()) +# print(heart_closed_tris) + if heart_closed_verts.shape[0] == heart_closed_tris.max() and heart_closed_tris.min()>0: heart_closed_tris = heart_closed_tris-1 + print('shifting heart indices') # read sock nodes sock_verts = array(sock['node']) @@ -90,14 +93,20 @@ def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_out,scale_in,lmbd_meth tank_closed_verts = array(tank['node']) tank_closed_tris = array(tank['face']) # allows for either 0 and 1 based node numbering - if tank_closed_verts.shape[0] == tank_closed_tris.max(): +# print('tank min max',tank_closed_tris.min(),tank_closed_tris.max()) +# print(tank_closed_tris) + if tank_closed_verts.shape[0] == tank_closed_tris.max() and tank_closed_tris.min()>0: tank_closed_tris = tank_closed_tris-1 + print('shifting tank indices') # read jacket nodes +# print(elecsnums) elecs = array(electnums) # allows for either 0 and 1 based node numbering - if elecs.shape[0] <= elecs.max(): + if (elecs.shape[0] <= elecs.max()) and elecs.min()>0: elecs = elecs-1 + print('shifting electrodes') +# print(elecs) # read jacket potentials bspm = array(tank_pots) @@ -112,8 +121,19 @@ def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_out,scale_in,lmbd_meth # scale surfaces to obtain ficticious points # note: current setup for outward pointing normals on both surfaces - new_in_verts = scale_surf(heart_closed_verts,inner_norms,-scale_in) - new_out_verts = scale_surf(tank_closed_verts,outer_norms,scale_out) + new_in_verts = scale_surf(heart_closed_verts,inner_norms,-scale_factor,scale_method) + new_out_verts = scale_surf(tank_closed_verts,outer_norms,scale_factor,scale_method) + + +# print(heart_closed_verts.shape) +# print(tank_closed_verts.shape) +# H_points_m=mean(heart_closed_verts,axis=0) +# T_points_m=mean(tank_closed_verts,axis=0) +# print(H_points_m) +# print(T_points_m) + +# new_in_verts = (heart_closed_verts-H_points_m)*0.8+H_points_m +# new_out_verts = (tank_closed_verts-T_points_m)*1.2+T_points_m # set up vector of ficticious points fict_pts = append(new_out_verts,new_in_verts,axis=0) @@ -125,17 +145,23 @@ def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_out,scale_in,lmbd_meth # this assumes that the electrodes are given node numbers in the mesh. jacket,jacket_norms = assign_elec(new_elecs,tank_closed_verts,outer_norms) +# scipy.io.savemat('temp_output.mat',{'jacket':jacket, 'jacket_norm':jacket_norms, 'fict_pts':fict_pts}) + # build coefficient matrix A amat = get_mat(jacket,fict_pts,jacket_norms) - # perform SVD of matrix A # see numpy manual for full explanation u,s,vt = svd(amat,full_matrices=False) +# scipy.io.savemat('/Users/jess/FP/MFS/Bordeaux/temp_amat.mat',{'amat':amat,'u':u,'s':s,'vt':vt}) + s = s.reshape(-1,1) # determine u^T b alpha = dot(transpose(u),rhs) + print('rhs = ', rhs.shape) + print('alpha = ', alpha.shape) + # find regularization parameter lambda if lmbd_method == 'manual': if type(lmbda) is not float: @@ -157,9 +183,14 @@ def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_out,scale_in,lmbd_meth else: raise ValueError('lmbd_method input must be: manual, l_curve, zc, creso, gcv, or rgcv') + print('lambda =',lamb) + avec = tik_inv(u,s,vt,rhs,lamb) epi_pot = epis(avec,sock_verts,fict_pts) + print('avec = ',avec.shape) + print('epi_pot = ',epi_pot.shape) + return epi_pot,lamb,curve """ @@ -256,8 +287,21 @@ def norm_arr(vertices,faces): # function to scale a surface -def scale_surf(verts,norms,scale): - new_verts = verts+scale*norms +def scale_surf(verts,norms,scale,scale_method): + + if scale_method == "normals": + dist = norm(max(verts,axis=0)-min(verts,axis=0)) + new_verts = verts+scale*norms*dist + elif scale_method == "scale": + points_m=mean(verts,axis=0) + new_verts = (verts-points_m)*(1-scale)+points_m + elif scale_method == "RBF": + raise ValueError(" RBF method not yet implemented") + + else: + raise ValueError("scale_method not recognized") + + return new_verts # function to assign electrodes to node positions and normals @@ -284,14 +328,30 @@ def normder(x,y,normal): # routine to remove any jacket node that represents a 'bad electrode' # the potential for that node should be recorded as 'nan' def cleanbspm(bspm,jacket): - new_jack=jacket[~isnan(bspm).any(axis=1)] - new_bspm=bspm[~isnan(bspm).any(axis=1)] + print('bspm size: ',bspm.shape) + print('jacket size: ',jacket.shape) + print(len(bspm.shape)) +# print(bspm) +# print(bspm.shape(axis=1)) + if len(bspm.shape)==1: + bspm_ = zeros([len(jacket),1]) + else: + bspm_ = zeros([len(jacket),len(bspm[0,:])]) + + print('bspm_ size: ',bspm_.shape) + for k in range(len(jacket)): + bspm_[k,:] = bspm[int(jacket[k,0]),:] + +# bspm = bspm[int(jacket),:] + new_jack=jacket[~isnan(bspm_).any(axis=1)] + new_bspm=bspm_[~isnan(bspm_).any(axis=1)] return new_bspm,new_jack # routine to fill coefficient matrix # x - vector of jacket points # y - vector of ficticious points def get_mat(x,y,normal): + print('running get_mat()') # create array of zeros of appropriate size mat = zeros([2*len(x),len(y)+1],dtype=float) # set array values in the top half of the first column to 1.0 @@ -300,7 +360,7 @@ def get_mat(x,y,normal): for i in range(len(x)): for j in range(len(y)): # create upper half of coefficient matrix -#print('{} , {}'.format(i,j)) +# print('{} , {} : {}, {}'.format(i,j,kernel(x[i],y[j]),normder(x[i],y[j],normal[i]))) mat[i,j+1] = kernel(x[i],y[j]) # create lower half of coefficient matrix mat[i+len(x),j+1] = normder(x[i],y[j],normal[i]) @@ -318,10 +378,17 @@ def tik_inv(u,s,vt,b,l): # x - vector required points, # y - vector of ficticious pts def epis(a,x,y): + print('start epis') + print(a.shape) + print(x.shape) + print(y.shape) vec = a[0]*ones((len(x),1)) mat = zeros([len(x),len(y)]) for i in range(len(x)): for j in range(len(y)): +# print(x[i]) +# print(y[j]) +# print(kernel(x[i],y[j])) mat[i,j] = kernel(x[i],y[j]) vec = vec+dot(mat,a[1:]) return vec From f74eae38e713ada141c25ffef0bc7b3fd28732b3 Mon Sep 17 00:00:00 2001 From: jessdtate Date: Sun, 2 Sep 2018 15:00:42 -0600 Subject: [PATCH 2/3] some changes to the MFS examples --- .../MSF_inverse_Cage.srn5 | 627 +++++++++++++++++- .../MSF_inverse_python.srn5 | 8 +- PythonLibrary/MFS_inverse/mfs_inverse.py | 13 +- 3 files changed, 603 insertions(+), 45 deletions(-) diff --git a/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 b/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 index f57c9ad..72d8284 100644 --- a/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 +++ b/Networks/potential-based-inverse/MSF_inverse_Cage.srn5 @@ -4,7 +4,7 @@ - 36 + 40 0 BuildBEMatrix:0 @@ -325,6 +325,58 @@ + + EvaluateLinearAlgebraUnary:0 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + GetFieldData:0 @@ -373,7 +425,7 @@ MaxIndex 0 - 509 + 100 @@ -421,7 +473,7 @@ SliceIndex 0 - 134 + 37 @@ -461,7 +513,7 @@ MaxIndex 0 - 509 + 100 @@ -509,7 +561,7 @@ SliceIndex 0 - 134 + 37 @@ -549,7 +601,7 @@ MaxIndex 0 - 509 + 100 @@ -597,7 +649,7 @@ SliceIndex 0 - 134 + 37 @@ -615,7 +667,7 @@ - 22 + 25 0 @@ -737,6 +789,42 @@ + + + InputMatrix:6 + + + InputMatrix:6 + + 2 + matrixInput1 + + + + + + InputMatrix:7 + + + InputMatrix:7 + + 2 + matrixInput2 + + + + + + InputMatrix:8 + + + InputMatrix:8 + + 2 + matrixInput3 + + + NumberOfRetries @@ -757,7 +845,7 @@ PollingIntervalMilliseconds 0 - 200 + 50 @@ -774,6 +862,7 @@ sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/MFS_inverse') from mfs_inverse import * + import numpy scale_factor = 0.2 @@ -942,6 +1031,216 @@ matrixOutput3 = [curve] + + LinePlotter:0 + + + SCIRun + Math + LinePlotter + + + + 13 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + Plot title + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + x axis + + + + + + YAxisLabel + + + YAxisLabel + + 2 + y axis + + + + + + + MapFieldDataOntoNodes:0 @@ -1346,7 +1645,7 @@ matrixOutput3 = [curve] FixedMax 1 - 8.75694211277247270e+00 + 3.41358815481135025e+00 @@ -1358,7 +1657,7 @@ matrixOutput3 = [curve] FixedMin 1 - -6.52453057018040727e+00 + -8.98526109407475815e+00 @@ -1410,7 +1709,7 @@ matrixOutput3 = [curve] FixedMax 1 - 3.69113333973170166e+00 + 7.50986087817636871e-01 @@ -1422,7 +1721,7 @@ matrixOutput3 = [curve] FixedMin 1 - -2.45485989299534912e+00 + -1.44521988580754623e+00 @@ -1474,7 +1773,7 @@ matrixOutput3 = [curve] FixedMax 1 - 6.39615512795987371e+01 + 5.11853614120005815e+01 @@ -1486,7 +1785,7 @@ matrixOutput3 = [curve] FixedMin 1 - -1.38078989333325353e+03 + -7.73361727833728764e+02 @@ -1594,6 +1893,182 @@ matrixOutput3 = [curve] + + SelectSubMatrix:1 + + + SCIRun + Math + SelectSubMatrix + + + + 6 + 0 + + + columnCheckBox + + + columnCheckBox + + 3 + 1 + + + + + + columnEndSpinBox + + + columnEndSpinBox + + 0 + 170 + + + + + + columnStartSpinBox + + + columnStartSpinBox + + 0 + 70 + + + + + + rowCheckBox + + + rowCheckBox + + 3 + 0 + + + + + + rowEndSpinBox + + + rowEndSpinBox + + 0 + 0 + + + + + + rowStartSpinBox + + + rowStartSpinBox + + 0 + 0 + + + + + + + + + SelectSubMatrix:2 + + + SCIRun + Math + SelectSubMatrix + + + + 6 + 0 + + + columnCheckBox + + + columnCheckBox + + 3 + 1 + + + + + + columnEndSpinBox + + + columnEndSpinBox + + 0 + 170 + + + + + + columnStartSpinBox + + + columnStartSpinBox + + 0 + 70 + + + + + + rowCheckBox + + + rowCheckBox + + 3 + 0 + + + + + + rowEndSpinBox + + + rowEndSpinBox + + 0 + 0 + + + + + + rowStartSpinBox + + + rowStartSpinBox + + 0 + 0 + + + + + + + SetFieldData:0 @@ -4615,7 +5090,7 @@ matrixOutput3 = [curve] ScaleBarHeight 1 - 9.99899999999999949e+01 + 0.00000000000000000e+00 @@ -4627,7 +5102,7 @@ matrixOutput3 = [curve] ScaleBarLength 1 - 9.99899999999999949e+01 + 0.00000000000000000e+00 @@ -4805,7 +5280,7 @@ matrixOutput3 = [curve] - 57 + 61 0 BuildBEMatrix:0 @@ -4852,7 +5327,7 @@ matrixOutput3 = [curve] InterfaceWithPython:0 InputMatrix - 5 + 8 @@ -4891,6 +5366,18 @@ matrixOutput3 = [curve] 0 + + EvaluateLinearAlgebraUnary:0 + + Result + 0 + + LinePlotter:0 + + DependentVariables + 0 + + GetFieldData:0 @@ -4900,7 +5387,7 @@ matrixOutput3 = [curve] InterfaceWithPython:0 InputMatrix - 4 + 7 @@ -5185,7 +5672,7 @@ matrixOutput3 = [curve] Matrix 0 - GetMatrixSlice:0 + SelectSubMatrix:2 InputMatrix 0 @@ -5197,7 +5684,7 @@ matrixOutput3 = [curve] Matrix 0 - GetMatrixSlice:1 + EvaluateLinearAlgebraUnary:0 InputMatrix 0 @@ -5209,10 +5696,10 @@ matrixOutput3 = [curve] Matrix 0 - InterfaceWithPython:0 + SelectSubMatrix:1 InputMatrix - 3 + 0 @@ -5311,6 +5798,42 @@ matrixOutput3 = [curve] 0 + + SelectSubMatrix:1 + + ResultMatrix + 0 + + GetMatrixSlice:1 + + InputMatrix + 0 + + + + SelectSubMatrix:1 + + ResultMatrix + 0 + + InterfaceWithPython:0 + + InputMatrix + 6 + + + + SelectSubMatrix:2 + + ResultMatrix + 0 + + GetMatrixSlice:0 + + InputMatrix + 0 + + SetFieldData:0 @@ -5494,7 +6017,7 @@ matrixOutput3 = [curve] - 36 + 40 0 BuildBEMatrix:0 @@ -5531,6 +6054,13 @@ matrixOutput3 = [curve] 5.00000000000000000e+00 + + EvaluateLinearAlgebraUnary:0 + + 4.09000000000000000e+02 + -2.23000000000000000e+02 + + GetFieldData:0 @@ -5562,15 +6092,22 @@ matrixOutput3 = [curve] InterfaceWithPython:0 - -2.12000000000000000e+02 - 3.90000000000000000e+01 + -2.25000000000000000e+02 + 2.40000000000000000e+01 + + + + LinePlotter:0 + + 6.90000000000000000e+01 + -8.10000000000000000e+01 MapFieldDataOntoNodes:0 - -2.21000000000000000e+02 - -2.18000000000000000e+02 + -2.10000000000000000e+02 + -2.25000000000000000e+02 @@ -5657,6 +6194,20 @@ matrixOutput3 = [curve] -1.10000000000000000e+01 + + SelectSubMatrix:1 + + 2.62000000000000000e+02 + -2.60000000000000000e+02 + + + + SelectSubMatrix:2 + + 1.32000000000000000e+02 + -2.64000000000000000e+02 + + SetFieldData:0 @@ -5836,7 +6387,7 @@ p, li { white-space: pre-wrap; } 0 - 36 + 40 0 BuildBEMatrix:0 @@ -5858,6 +6409,10 @@ p, li { white-space: pre-wrap; } CreateStandardColorMap:0 -1 + + EvaluateLinearAlgebraUnary:0 + -1 + GetFieldData:0 -1 @@ -5878,6 +6433,10 @@ p, li { white-space: pre-wrap; } InterfaceWithPython:0 -1 + + LinePlotter:0 + -1 + MapFieldDataOntoNodes:0 -1 @@ -5930,6 +6489,14 @@ p, li { white-space: pre-wrap; } SelectSubMatrix:0 -1 + + SelectSubMatrix:1 + -1 + + + SelectSubMatrix:2 + -1 + SetFieldData:0 -1 diff --git a/Networks/potential-based-inverse/MSF_inverse_python.srn5 b/Networks/potential-based-inverse/MSF_inverse_python.srn5 index ce4dc2c..3b676c9 100644 --- a/Networks/potential-based-inverse/MSF_inverse_python.srn5 +++ b/Networks/potential-based-inverse/MSF_inverse_python.srn5 @@ -1573,7 +1573,7 @@ matrixOutput3 = [curve] FixedMax 1 - 4.46921299893047959e+01 + 4.46921299893041990e+01 @@ -1585,7 +1585,7 @@ matrixOutput3 = [curve] FixedMin 1 - -7.20574961746247880e+01 + -7.20574961746263796e+01 @@ -7734,7 +7734,7 @@ matrixOutput3 = [curve] ScaleBarFontSize 0 - 1 + 99 @@ -7854,7 +7854,7 @@ matrixOutput3 = [curve] ShowViewer 3 - 1 + 0 diff --git a/PythonLibrary/MFS_inverse/mfs_inverse.py b/PythonLibrary/MFS_inverse/mfs_inverse.py index 6b2b448..7707463 100644 --- a/PythonLibrary/MFS_inverse/mfs_inverse.py +++ b/PythonLibrary/MFS_inverse/mfs_inverse.py @@ -333,18 +333,9 @@ def cleanbspm(bspm,jacket): print(len(bspm.shape)) # print(bspm) # print(bspm.shape(axis=1)) - if len(bspm.shape)==1: - bspm_ = zeros([len(jacket),1]) - else: - bspm_ = zeros([len(jacket),len(bspm[0,:])]) - print('bspm_ size: ',bspm_.shape) - for k in range(len(jacket)): - bspm_[k,:] = bspm[int(jacket[k,0]),:] - -# bspm = bspm[int(jacket),:] - new_jack=jacket[~isnan(bspm_).any(axis=1)] - new_bspm=bspm_[~isnan(bspm_).any(axis=1)] + new_jack=jacket[~isnan(bspm).any(axis=1)] + new_bspm=bspm[~isnan(bspm).any(axis=1)] return new_bspm,new_jack # routine to fill coefficient matrix From dfd963de3786f2a54231603a69cfa768042319de Mon Sep 17 00:00:00 2001 From: jessdtate Date: Sun, 2 Sep 2018 15:04:53 -0600 Subject: [PATCH 3/3] updated toolkit file --- FwdInvToolkit.toolkit | 5666 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 4989 insertions(+), 677 deletions(-) diff --git a/FwdInvToolkit.toolkit b/FwdInvToolkit.toolkit index 2bcbd80..de14c8e 100644 --- a/FwdInvToolkit.toolkit +++ b/FwdInvToolkit.toolkit @@ -28331,7 +28331,7 @@ p, li { white-space: pre-wrap; } - 36 + 40 0 BuildBEMatrix:0 @@ -28652,6 +28652,58 @@ p, li { white-space: pre-wrap; } + + EvaluateLinearAlgebraUnary:0 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + GetFieldData:0 @@ -28700,7 +28752,7 @@ p, li { white-space: pre-wrap; } MaxIndex 0 - 509 + 100 @@ -28748,7 +28800,7 @@ p, li { white-space: pre-wrap; } SliceIndex 0 - 134 + 37 @@ -28788,7 +28840,7 @@ p, li { white-space: pre-wrap; } MaxIndex 0 - 509 + 100 @@ -28836,7 +28888,7 @@ p, li { white-space: pre-wrap; } SliceIndex 0 - 134 + 37 @@ -28876,7 +28928,7 @@ p, li { white-space: pre-wrap; } MaxIndex 0 - 509 + 100 @@ -28924,7 +28976,7 @@ p, li { white-space: pre-wrap; } SliceIndex 0 - 134 + 37 @@ -28942,7 +28994,7 @@ p, li { white-space: pre-wrap; } - 22 + 25 0 @@ -29064,6 +29116,42 @@ p, li { white-space: pre-wrap; } + + + InputMatrix:6 + + + InputMatrix:6 + + 2 + matrixInput1 + + + + + + InputMatrix:7 + + + InputMatrix:7 + + 2 + matrixInput2 + + + + + + InputMatrix:8 + + + InputMatrix:8 + + 2 + matrixInput3 + + + NumberOfRetries @@ -29084,7 +29172,7 @@ p, li { white-space: pre-wrap; } PollingIntervalMilliseconds 0 - 200 + 50 @@ -29101,10 +29189,11 @@ p, li { white-space: pre-wrap; } sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/MFS_inverse') from mfs_inverse import * + import numpy -scale_out = 0.05 -scale_in = 0.02 +scale_factor = 0.2 +scale_method = 'normals' @@ -29117,7 +29206,7 @@ electnodes = matrixInput2 lmbda= matrixInput3 lmbd=lmbda[0][0] -lmbd = numpy.linspace(0.00000001,1,10000).tolist() +lmbd = numpy.linspace(0.000000001,0.0001,1000).tolist() lmbd_method = 'creso' @@ -29132,7 +29221,7 @@ for k in electnodes: # run mfs inverse -[epis,lamb_o,curve] = mfs_inverse(heart,tank,sock_pts,tank_pot,electnodes,scale_out,scale_in,lmbd_method,lmbd,False,0.0) +[epis,lamb_o,curve] = mfs_inverse(heart,tank,sock_pts,tank_pot,electnodes,scale_factor,scale_method,lmbd_method,lmbd,False,0.0) epi_out=epis.tolist() @@ -29269,6 +29358,216 @@ matrixOutput3 = [curve] + + LinePlotter:0 + + + SCIRun + Math + LinePlotter + + + + 13 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + Plot title + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + x axis + + + + + + YAxisLabel + + + YAxisLabel + + 2 + y axis + + + + + + + MapFieldDataOntoNodes:0 @@ -29673,7 +29972,7 @@ matrixOutput3 = [curve] FixedMax 1 - 8.75694211277247270e+00 + 3.41358815481135025e+00 @@ -29685,7 +29984,7 @@ matrixOutput3 = [curve] FixedMin 1 - -6.52453057018040727e+00 + -8.98526109407475815e+00 @@ -29737,7 +30036,7 @@ matrixOutput3 = [curve] FixedMax 1 - 3.69113333973170166e+00 + 7.50986087817636871e-01 @@ -29749,7 +30048,7 @@ matrixOutput3 = [curve] FixedMin 1 - -2.45485989299534912e+00 + -1.44521988580754623e+00 @@ -29801,7 +30100,7 @@ matrixOutput3 = [curve] FixedMax 1 - 8.76099126141573947e+02 + 5.11853614120005815e+01 @@ -29813,7 +30112,7 @@ matrixOutput3 = [curve] FixedMin 1 - -4.87195264196177845e+02 + -7.73361727833728764e+02 @@ -29921,6 +30220,182 @@ matrixOutput3 = [curve] + + SelectSubMatrix:1 + + + SCIRun + Math + SelectSubMatrix + + + + 6 + 0 + + + columnCheckBox + + + columnCheckBox + + 3 + 1 + + + + + + columnEndSpinBox + + + columnEndSpinBox + + 0 + 170 + + + + + + columnStartSpinBox + + + columnStartSpinBox + + 0 + 70 + + + + + + rowCheckBox + + + rowCheckBox + + 3 + 0 + + + + + + rowEndSpinBox + + + rowEndSpinBox + + 0 + 0 + + + + + + rowStartSpinBox + + + rowStartSpinBox + + 0 + 0 + + + + + + + + + SelectSubMatrix:2 + + + SCIRun + Math + SelectSubMatrix + + + + 6 + 0 + + + columnCheckBox + + + columnCheckBox + + 3 + 1 + + + + + + columnEndSpinBox + + + columnEndSpinBox + + 0 + 170 + + + + + + columnStartSpinBox + + + columnStartSpinBox + + 0 + 70 + + + + + + rowCheckBox + + + rowCheckBox + + 3 + 0 + + + + + + rowEndSpinBox + + + rowEndSpinBox + + 0 + 0 + + + + + + rowStartSpinBox + + + rowStartSpinBox + + 0 + 0 + + + + + + + SetFieldData:0 @@ -33050,7 +33525,7 @@ matrixOutput3 = [curve] ShowViewer 3 - 0 + 1 @@ -33132,7 +33607,7 @@ matrixOutput3 = [curve] - 57 + 61 0 BuildBEMatrix:0 @@ -33179,7 +33654,7 @@ matrixOutput3 = [curve] InterfaceWithPython:0 InputMatrix - 5 + 8 @@ -33218,6 +33693,18 @@ matrixOutput3 = [curve] 0 + + EvaluateLinearAlgebraUnary:0 + + Result + 0 + + LinePlotter:0 + + DependentVariables + 0 + + GetFieldData:0 @@ -33227,7 +33714,7 @@ matrixOutput3 = [curve] InterfaceWithPython:0 InputMatrix - 4 + 7 @@ -33512,7 +33999,7 @@ matrixOutput3 = [curve] Matrix 0 - GetMatrixSlice:0 + SelectSubMatrix:2 InputMatrix 0 @@ -33524,7 +34011,7 @@ matrixOutput3 = [curve] Matrix 0 - GetMatrixSlice:1 + EvaluateLinearAlgebraUnary:0 InputMatrix 0 @@ -33536,10 +34023,10 @@ matrixOutput3 = [curve] Matrix 0 - InterfaceWithPython:0 + SelectSubMatrix:1 InputMatrix - 3 + 0 @@ -33638,6 +34125,42 @@ matrixOutput3 = [curve] 0 + + SelectSubMatrix:1 + + ResultMatrix + 0 + + GetMatrixSlice:1 + + InputMatrix + 0 + + + + SelectSubMatrix:1 + + ResultMatrix + 0 + + InterfaceWithPython:0 + + InputMatrix + 6 + + + + SelectSubMatrix:2 + + ResultMatrix + 0 + + GetMatrixSlice:0 + + InputMatrix + 0 + + SetFieldData:0 @@ -33821,7 +34344,7 @@ matrixOutput3 = [curve] - 36 + 40 0 BuildBEMatrix:0 @@ -33858,6 +34381,13 @@ matrixOutput3 = [curve] 5.00000000000000000e+00 + + EvaluateLinearAlgebraUnary:0 + + 4.09000000000000000e+02 + -2.23000000000000000e+02 + + GetFieldData:0 @@ -33889,15 +34419,22 @@ matrixOutput3 = [curve] InterfaceWithPython:0 - -2.12000000000000000e+02 - 3.90000000000000000e+01 + -2.25000000000000000e+02 + 2.40000000000000000e+01 + + + + LinePlotter:0 + + 6.90000000000000000e+01 + -8.10000000000000000e+01 MapFieldDataOntoNodes:0 - -2.21000000000000000e+02 - -2.18000000000000000e+02 + -2.10000000000000000e+02 + -2.25000000000000000e+02 @@ -33984,6 +34521,20 @@ matrixOutput3 = [curve] -1.10000000000000000e+01 + + SelectSubMatrix:1 + + 2.62000000000000000e+02 + -2.60000000000000000e+02 + + + + SelectSubMatrix:2 + + 1.32000000000000000e+02 + -2.64000000000000000e+02 + + SetFieldData:0 @@ -34163,7 +34714,7 @@ p, li { white-space: pre-wrap; } 0 - 36 + 40 0 BuildBEMatrix:0 @@ -34185,6 +34736,10 @@ p, li { white-space: pre-wrap; } CreateStandardColorMap:0 -1 + + EvaluateLinearAlgebraUnary:0 + -1 + GetFieldData:0 -1 @@ -34205,6 +34760,10 @@ p, li { white-space: pre-wrap; } InterfaceWithPython:0 -1 + + LinePlotter:0 + -1 + MapFieldDataOntoNodes:0 -1 @@ -34257,6 +34816,14 @@ p, li { white-space: pre-wrap; } SelectSubMatrix:0 -1 + + SelectSubMatrix:1 + -1 + + + SelectSubMatrix:2 + -1 + SetFieldData:0 -1 @@ -34334,7 +34901,7 @@ p, li { white-space: pre-wrap; } - 44 + 46 0 AlignMeshBoundingBoxes:0 @@ -34695,6 +35262,58 @@ p, li { white-space: pre-wrap; } + + EvaluateLinearAlgebraUnary:1 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + FlipSurfaceNormals:0 @@ -34974,8 +35593,9 @@ sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/MFS_i from mfs_inverse import * import numpy -scale_out = 0.0005 -scale_in = 0.00025 +scale_factor = 0.1 +scale_method = "normals" + # get inputs heart = fieldInput1 @@ -34985,7 +35605,7 @@ tank_pot = matrixInput1 electnodes = matrixInput2 # set lambda options here -lmbd = numpy.linspace(0.000000001,1,100).tolist() +lmbd = numpy.linspace(0.00000001,0.001,10000).tolist() lmbd_method = 'creso' #lmbd = matrixInput3 #lmbd = lmbd[0][0] @@ -35001,7 +35621,7 @@ for k in electnodes: t_p = [[t[0]] for t in tank_pot] # run mfs inverse -[epis, lambd_o,curve] = mfs_inverse(heart,tank,sock_pts,t_p,electnodes,scale_out,scale_in,lmbd_method,lmbd,False,0.0) +[epis, lambd_o,curve] = mfs_inverse(heart,tank,sock_pts,t_p,electnodes,scale_factor,scale_method,lmbd_method,lmbd,False,0.0) epi_out=epis.tolist() @@ -35132,6 +35752,216 @@ matrixOutput3 = [curve] + + LinePlotter:0 + + + SCIRun + Math + LinePlotter + + + + 13 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + Plot title + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + x axis + + + + + + YAxisLabel + + + YAxisLabel + + 2 + y axis + + + + + + + MapFieldDataOntoNodes:0 @@ -35640,7 +36470,7 @@ matrixOutput3 = [curve] FixedMax 1 - 3.09515078901511970e+03 + 4.46921299893041990e+01 @@ -35652,7 +36482,7 @@ matrixOutput3 = [curve] FixedMin 1 - -9.86426171570426050e+03 + -7.20574961746263796e+01 @@ -40833,7 +41663,7 @@ matrixOutput3 = [curve] ScaleBarFontSize 0 - 1 + 99 @@ -41801,7 +42631,7 @@ matrixOutput3 = [curve] ScaleBarFontSize 0 - 1 + 99 @@ -42003,7 +42833,7 @@ matrixOutput3 = [curve] - 63 + 65 0 AlignMeshBoundingBoxes:0 @@ -42125,6 +42955,18 @@ matrixOutput3 = [curve] 0 + + EvaluateLinearAlgebraUnary:1 + + Result + 0 + + LinePlotter:0 + + DependentVariables + 1 + + FlipSurfaceNormals:0 @@ -42209,6 +43051,18 @@ matrixOutput3 = [curve] 0 + + InterfaceWithPython:0 + + PythonMatrix3 + 0 + + EvaluateLinearAlgebraUnary:1 + + InputMatrix + 0 + + InterfaceWithPython:0 @@ -42764,7 +43618,7 @@ matrixOutput3 = [curve] - 44 + 46 0 AlignMeshBoundingBoxes:0 @@ -42808,6 +43662,13 @@ matrixOutput3 = [curve] 3.93000000000000000e+02 + + EvaluateLinearAlgebraUnary:1 + + 4.94000000000000000e+02 + 9.23000000000000000e+02 + + FlipSurfaceNormals:0 @@ -42832,10 +43693,17 @@ matrixOutput3 = [curve] InterfaceWithPython:0 - 6.22000000000000000e+02 + 6.23000000000000000e+02 6.05000000000000000e+02 + + LinePlotter:0 + + 5.42000000000000000e+02 + 1.12000000000000000e+03 + + MapFieldDataOntoNodes:0 @@ -42895,15 +43763,15 @@ matrixOutput3 = [curve] ReportMatrixInfo:0 - 5.58000000000000000e+02 - 7.83000000000000000e+02 + 5.11000000000000000e+02 + 7.70000000000000000e+02 ReportMatrixInfo:1 - 6.45000000000000000e+02 - 7.41000000000000000e+02 + 6.12000000000000000e+02 + 7.43000000000000000e+02 @@ -42916,8 +43784,8 @@ matrixOutput3 = [curve] RescaleColorMap:0 - 5.09000000000000000e+02 - 1.05100000000000000e+03 + 3.78000000000000000e+02 + 1.05500000000000000e+03 @@ -42972,8 +43840,8 @@ matrixOutput3 = [curve] ShowField:0 - 4.62000000000000000e+02 - 1.16900000000000000e+03 + 3.66000000000000000e+02 + 1.18400000000000000e+03 @@ -43076,7 +43944,7 @@ matrixOutput3 = [curve] - 6 + 8 0 CreateMatrix:0 @@ -43119,6 +43987,21 @@ p, li { white-space: pre-wrap; } 13 + + ReadField:10 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Torso Tank </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">geometry</span></p></body></html> + Torso Tank +geometry + 3 + 13 + + ReadField:2 @@ -43132,6 +44015,21 @@ p, li { white-space: pre-wrap; } 13 + + ReadField:9 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">torso measurement </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">locations</span></p></body></html> + torso measurement +locations + 3 + 13 + + ReadMatrix:0 @@ -43166,7 +44064,7 @@ node numbers 0 - 44 + 46 0 AlignMeshBoundingBoxes:0 @@ -43192,6 +44090,10 @@ node numbers EvaluateLinearAlgebraUnary:0 -1 + + EvaluateLinearAlgebraUnary:1 + -1 + FlipSurfaceNormals:0 -1 @@ -43208,6 +44110,10 @@ node numbers InterfaceWithPython:0 -1 + + LinePlotter:0 + -1 + MapFieldDataOntoNodes:0 -1 @@ -65312,10 +66218,10 @@ p, li { white-space: pre-wrap; } - 26 + 47 0 - AppendMatrix:1 + AppendMatrix:3 SCIRun @@ -65343,7 +66249,7 @@ p, li { white-space: pre-wrap; } - AppendMatrix:2 + AppendMatrix:4 SCIRun @@ -65370,6 +66276,82 @@ p, li { white-space: pre-wrap; } + + BooleanCompare:0 + + + SCIRun + Flow Control + BooleanCompare + + + + 5 + 0 + + + Comparison_Option + + + Comparison_Option + + 2 + greatop + + + + + + Else_Option + + + Else_Option + + 2 + third + + + + + + Then_Option + + + Then_Option + + 2 + null + + + + + + Value_Option_1 + + + Value_Option_1 + + 2 + value + + + + + + Value_Option_2 + + + Value_Option_2 + + 2 + value + + + + + + + BuildBEMatrix:0 @@ -65503,54 +66485,50 @@ p, li { white-space: pre-wrap; } - CreateMatrix:1 + CollectMatrices:0 SCIRun Math - CreateMatrix + CollectMatrices - 1 + 3 0 - TextEntry + CollectAppendIndicator - TextEntry + CollectAppendIndicator - 2 - -30 + 0 + 0 - - - - - - CreateMatrix:2 - - - SCIRun - Math - CreateMatrix - - - - 1 - 0 - TextEntry + CollectPrependIndicator - TextEntry + CollectPrependIndicator - 2 - 10 + 0 + 1 + + + + + + CollectRowIndicator + + + CollectRowIndicator + + 0 + 1 @@ -65559,65 +66537,39 @@ p, li { white-space: pre-wrap; } - CreateMatrix:3 + ConvertScalarToMatrix:0 SCIRun - Math - CreateMatrix + Converters + ConvertScalarToMatrix - 1 + 0 0 - - - TextEntry - - - TextEntry - - 2 - 3 - - - - CreateMatrix:4 + ConvertScalarToMatrix:1 SCIRun - Math - CreateMatrix + Converters + ConvertScalarToMatrix - 1 + 0 0 - - - TextEntry - - - TextEntry - - 2 - 1 0 0 -0 1 0 -0 0 1 - - - - CreateMatrix:5 + CreateMatrix:7 SCIRun @@ -65645,28 +66597,77 @@ p, li { white-space: pre-wrap; } - CreateMatrix:6 + CreateStandardColorMap:0 SCIRun - Math - CreateMatrix + Visualization + CreateStandardColorMap - 1 + 5 0 - TextEntry + AlphaUserPointsVector - TextEntry + AlphaUserPointsVector + + 5 + + 0 + 0 + + + + + + + ColorMapInvert + + + ColorMapInvert + + 3 + 0 + + + + + + ColorMapName + + + ColorMapName 2 - 10 --5 --40 + Rainbow + + + + + + ColorMapResolution + + + ColorMapResolution + + 0 + 256 + + + + + + ColorMapShift + + + ColorMapShift + + 1 + 0.00000000000000000e+00 @@ -65675,7 +66676,7 @@ p, li { white-space: pre-wrap; } - CreateStandardColorMap:0 + CreateStandardColorMap:1 SCIRun @@ -65753,6 +66754,82 @@ p, li { white-space: pre-wrap; } + + CreateStandardMatrix:0 + + + SCIRun + Math + CreateStandardMatrix + + + + 5 + 0 + + + Columns + + + Columns + + 0 + 3 + + + + + + MatrixType + + + MatrixType + + 2 + Identity + + + + + + Rows + + + Rows + + 0 + 3 + + + + + + Size + + + Size + + 1 + 1.00000000000000000e+00 + + + + + + StartPointer + + + StartPointer + + 1 + 0.00000000000000000e+00 + + + + + + + EvaluateLinearAlgebraBinary:0 @@ -65969,529 +67046,3095 @@ p, li { white-space: pre-wrap; } + + GetMatrixSlice:2 + + + SCIRun + Math + GetMatrixSlice + + + + 6 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 119 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 119 + + + + + + + + + GetMatrixSlice:3 + + + SCIRun + Math + GetMatrixSlice + + + + 6 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 0 + + + + + + MaxIndex + + + MaxIndex + + 0 + 2 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 2 + + + + + + + + + GetMatrixSlice:4 + + + SCIRun + Math + GetMatrixSlice + + + + 6 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 0 + + + + + + MaxIndex + + + MaxIndex + + 0 + 5 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 2 + + + + + + + + + GetMatrixSlice:5 + + + SCIRun + Math + GetMatrixSlice + + + + 6 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 20 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 10 + + + + + + + + + GetMatrixSlice:6 + + + SCIRun + Math + GetMatrixSlice + + + + 6 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 20 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 10 + + + + + + + InterfaceWithPython:0 SCIRun - Python - InterfaceWithPython + Python + InterfaceWithPython + + + + 13 + 0 + + + InputField:0 + + + InputField:0 + + 2 + fieldInput1 + + + + + + NumberOfRetries + + + NumberOfRetries + + 0 + 50 + + + + + + PollingIntervalMilliseconds + + + PollingIntervalMilliseconds + + 0 + 200 + + + + + + PythonCode + + + PythonCode + + 2 + import numpy as np +import itertools +import os + +print('loaded builtin libs') + +sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/Uncertainty/') + +print('path set') + +""" +import indexing, wafp, sensitivity +print('load 1') +from test_functions import genz_oscillatory +print('load 2') +from opolynd import opolynd_eval +print('load 3') +from recurrence import jacobi_recurrence +print('uncertainty code loaded') +""" + +torso = fieldInput1 + +Nx = len(torso['node']) + +print(Nx) + +x = np.linspace(0, 1, Nx) # spatial grid +#print(x) +curr_dir = os.getcwd() + + +######## Step 1: generate samples + +d = 3 # dimension of random/parameter space +k = 2 # polynomial degree (parameter space) +poly_space = indexing.total_degree_indices + +lambdas = poly_space(d, k) +N = lambdas.shape[0] + +M = N + 10 # Number of samples (expensive model runs) to perform. Must + # be at least N, but the +10 is arbitrary. + # Of course, large M ===> better. + +candidate_mesh_size = int(2e2) + +print("Generating parameter mesh...") +z = wafp.legendre_wafp(lambdas, M=candidate_mesh_size) +z = wafp.legendre_wafp_enrichment(z, lambdas, M-N) +#print(z) +# The samples are the array z, each row is a d-dimensional sample on the +# hypercube [-1,1]^d. The particular way these points are generated is +# random, so you'll get a different set of z each time this is fun, but +# the "quality" of the grid has relatively low variance from run to run. +# This takes a while, but these points may be stored for future use. + +# Compare surrogate discrepancy at validation points +M_validation = 100 +z_validation = np.random.uniform(0, 1, [100, d]) + +z_tot = np.row_stack((z,z_validation)) + +print(z_tot.shape) + +matrixOutput1 = (z_tot.T).tolist() +matrixOutput2 = lambdas.tolist() + +others = [[ d, k, N, M, M_validation, Nx ]] + +print(others) + +matrixOutput3 = others + + + + + + + + + + + + PythonOutputField1Name + + + PythonOutputField1Name + + 2 + fieldOutput1 + + + + + + PythonOutputField2Name + + + PythonOutputField2Name + + 2 + fieldOutput2 + + + + + + PythonOutputField3Name + + + PythonOutputField3Name + + 2 + fieldOutput3 + + + + + + PythonOutputMatrix1Name + + + PythonOutputMatrix1Name + + 2 + matrixOutput1 + + + + + + PythonOutputMatrix2Name + + + PythonOutputMatrix2Name + + 2 + matrixOutput2 + + + + + + PythonOutputMatrix3Name + + + PythonOutputMatrix3Name + + 2 + matrixOutput3 + + + + + + PythonOutputString1Name + + + PythonOutputString1Name + + 2 + stringOutput1 + + + + + + PythonOutputString2Name + + + PythonOutputString2Name + + 2 + stringOutput2 + + + + + + PythonOutputString3Name + + + PythonOutputString3Name + + 2 + stringOutput3 + + + + + + + + + InterfaceWithPython:1 + + + SCIRun + Python + InterfaceWithPython + + + + 16 + 0 + + + InputMatrix:0 + + + InputMatrix:0 + + 2 + matrixInput1 + + + + + + InputMatrix:1 + + + InputMatrix:1 + + 2 + matrixInput2 + + + + + + InputMatrix:2 + + + InputMatrix:2 + + 2 + matrixInput3 + + + + + + InputMatrix:3 + + + InputMatrix:3 + + 2 + matrixInput4 + + + + + + NumberOfRetries + + + NumberOfRetries + + 0 + 50 + + + + + + PollingIntervalMilliseconds + + + PollingIntervalMilliseconds + + 0 + 200 + + + + + + PythonCode + + + PythonCode + + 2 + # Insert your Python code here. The SCIRun API package is automatically imported. +import itertools +import numpy as np +import os + + +u_in = matrixInput1 +lmd = matrixInput2 +z_in = matrixInput3 +others = matrixInput4 + +d = int(others[0][0]) +k = int(others[0][1]) +N = int(others[0][2]) +M = int(others[0][3]) +M_validation = int(others[0][4]) +Nx = int(others[0][5]) + +print(type(M)) + +u_tot = np.array(u_in) +u=u_tot[:,0:M] +u_truth = u_tot[:,M:] + +lambdas = np.array(lmd).astype(int) +z_tot = np.array(z_in).T + +z = z_tot[0:M,:] +z_validation = z_tot[M:,:] + + +print(z.shape) + +#print(lambdas) +print(lambdas.shape) +print(lambdas.max()) + +######## Step 3: compute PCE coefficients +print("Assembling PCE coefficients...") +ab = jacobi_recurrence(lambdas.max()+1, alpha=0., beta=0., probability=True) +print(ab) +V = opolynd_eval(z, lambdas, ab) +weights = np.sqrt(float(N)/float(M)) / np.sqrt(np.sum(V**2,axis=1)) + +# The PCE coefficients are computed as a weighted discrete least-squares +# estimator with the weights above. +coeffs = np.linalg.lstsq( (V.T*weights).T, (u*weights).T)[0].T + +# Each row of coeffs contains PCE coefficients for a single x gridpoint. +# Each column of coeffs contains a particular PCE coefficient for all +# values of x. + +######## Step 4: whatever postprocessing you want +print("Processing PCE coefficients...") +# Compute total sensitivities +total_sensitivities = sensitivity.pce_total_sensitivity(coeffs.T, lambdas, list(range(d))) +#np.savetxt(sens_tot_file,total_sensitivities,delimiter = ' ') + +# Compute global sensitivities +# Compute main-effect and main-interaction sensitivities +Js = [[j] for j in range(d)] +for comb in itertools.combinations(list(range(d)), 2): + Js.append(comb) + +global_sensitivities = sensitivity.pce_global_sensitivity(coeffs.T, lambdas, Js) +#np.savetxt(sens_global_file,global_sensitivities,delimiter = ' ') + +matrixOutput1 = total_sensitivities.tolist() +matrixOutput2 = global_sensitivities.tolist() + + +# compare to validation points +u_pce = np.zeros([Nx, M_validation]) +V = opolynd_eval(z_validation, lambdas, ab) +u_pce = np.dot(V, coeffs.T).T + + +# Compute l2- and max-errors for each grid point: +l2_error = np.sqrt(np.sum((u_truth - u_pce)**2, axis=1))/np.sqrt(N) +linf_error = np.max(np.abs(u_truth - u_pce), axis=1) + +string_out = "L2 error on validation mesh: {0:1.3e}\nMaximum error on validation mesh: {1:1.3e}".format(np.linalg.norm(l2_error)/np.sqrt(Nx), np.max(linf_error.flatten())) + +print(string_out) + +stringOutput1 = string_out + + + + + + + + + + PythonOutputField1Name + + + PythonOutputField1Name + + 2 + fieldOutput1 + + + + + + PythonOutputField2Name + + + PythonOutputField2Name + + 2 + fieldOutput2 + + + + + + PythonOutputField3Name + + + PythonOutputField3Name + + 2 + fieldOutput3 + + + + + + PythonOutputMatrix1Name + + + PythonOutputMatrix1Name + + 2 + matrixOutput1 + + + + + + PythonOutputMatrix2Name + + + PythonOutputMatrix2Name + + 2 + matrixOutput2 + + + + + + PythonOutputMatrix3Name + + + PythonOutputMatrix3Name + + 2 + matrixOutput3 + + + + + + PythonOutputString1Name + + + PythonOutputString1Name + + 2 + stringOutput1 + + + + + + PythonOutputString2Name + + + PythonOutputString2Name + + 2 + stringOutput2 + + + + + + PythonOutputString3Name + + + PythonOutputString3Name + + 2 + stringOutput3 + + + + + + + + + ReadField:0 + + + SCIRun + DataIO + ReadField + + + + 3 + 0 + + + FileTypeName + + + FileTypeName + + 2 + SCIRun Field File + + + + + + Filename + + + Filename + + 2 + %SCIRUNDATADIR%/Data/tikhonov_inv/25feb97_sock_closed.fld + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReadField:1 + + + SCIRun + DataIO + ReadField + + + + 3 + 0 + + + FileTypeName + + + FileTypeName + + 2 + SCIRun Field File + + + + + + Filename + + + Filename + + 2 + %SCIRUNDATADIR%/Data/pot_based_BEM_forward/tank.fld + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReadMatrix:0 + + + SCIRun + DataIO + ReadMatrix + + + + 3 + 0 + + + FileTypeName + + + FileTypeName + + 2 + SCIRun Matrix File + + + + + + Filename + + + Filename + + 2 + %SCIRUNDATADIR%/Data/tikhonov_inv/epi_pot_128_fr_170to190.mat + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReportMatrixInfo:0 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportMatrixInfo:1 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportMatrixInfo:2 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportMatrixInfo:3 + + + SCIRun + Math + ReportMatrixInfo + + + + 0 + 0 + + + + + + ReportStringInfo:0 + + + SCIRun + String + ReportStringInfo + + + + 0 + 0 + + + + + + RescaleColorMap:0 + + + SCIRun + Visualization + RescaleColorMap + + + + 4 + 0 + + + AutoScale + + + AutoScale + + 0 + 0 + + + + + + FixedMax + + + FixedMax + + 1 + 1.28900000000000000e+04 + + + + + + FixedMin + + + FixedMin + + 1 + -1.64000000000000000e+04 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + RescaleColorMap:1 + + + SCIRun + Visualization + RescaleColorMap + + + + 4 + 0 + + + AutoScale + + + AutoScale + + 0 + 0 + + + + + + FixedMax + + + FixedMax + + 1 + 2.20559699785974453e+03 + + + + + + FixedMin + + + FixedMin + + 1 + -5.13683733865315276e+02 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + RescaleColorMap:2 + + + SCIRun + Visualization + RescaleColorMap + + + + 4 + 0 + + + AutoScale + + + AutoScale + + 0 + 1 + + + + + + FixedMax + + + FixedMax + + 1 + 1.00000000000000000e+00 + + + + + + FixedMin + + + FixedMin + + 1 + 0.00000000000000000e+00 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + ResizeMatrix:0 + + + SCIRun + Math + ResizeMatrix + + + + 3 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 1 + + + + + + NoOfRows + + + NoOfRows + + 0 + 16191 + + + + + + + + + ResizeMatrix:1 + + + SCIRun + Math + ResizeMatrix + + + + 3 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 21 + + + + + + NoOfRows + + + NoOfRows + + 0 + 771 + + + + + + + + + ResizeMatrix:2 + + + SCIRun + Math + ResizeMatrix + + + + 3 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 21 + + + + + + NoOfRows + + + NoOfRows + + 0 + 771 + + + + + + + + + SetFieldData:0 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:1 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:2 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:4 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 1 + 0 + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + ShowField:0 + + + SCIRun + Visualization + ShowField + + + + 38 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 0 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + ShowField:1 + + + SCIRun + Visualization + ShowField + + + + 38 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 1 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + ShowField:2 + + + SCIRun + Visualization + ShowField - 13 + 38 0 - InputField:0 + CullBackfacingText - InputField:0 + CullBackfacingText - 2 - fieldInput1 + 3 + 0 - NumberOfRetries + CylinderRadius - NumberOfRetries + CylinderRadius - 0 - 50 + 1 + 1.00000000000000006e-01 - PollingIntervalMilliseconds + CylinderResolution - PollingIntervalMilliseconds + CylinderResolution 0 - 200 + 5 - PythonCode + DefaultMeshColor - PythonCode + DefaultMeshColor 2 - import numpy as np -import itertools -import os - -print('loaded builtin libs') - -sys.path.append('/Users/jess/software/pyopoly/p3/') - -print('path set') - -#import indexing, wafp, sensitivity -from test_functions import genz_oscillatory -#from opolynd import opolynd_eval -#from recurrence import jacobi_recurrence -print('uncertainty code loaded') - -torso = fieldInput1 - -Nx = len(torso['node']) - -print(Nx) - + Color(0.5,0.5,0.5) - PythonOutputField1Name + DefaultTextColor - PythonOutputField1Name + DefaultTextColor 2 - fieldOutput1 + Color(1,1,1) - PythonOutputField2Name + EdgeTransparency - PythonOutputField2Name + EdgeTransparency - 2 - fieldOutput2 + 3 + 0 - PythonOutputField3Name + EdgeTransparencyValue - PythonOutputField3Name + EdgeTransparencyValue - 2 - fieldOutput3 + 1 + 6.49999976158142090e-01 - PythonOutputMatrix1Name + EdgesAsCylinders - PythonOutputMatrix1Name + EdgesAsCylinders - 2 - matrixOutput1 + 0 + 0 - PythonOutputMatrix2Name + EdgesAvailable - PythonOutputMatrix2Name + EdgesAvailable - 2 - matrixOutput2 + 3 + 1 - PythonOutputMatrix3Name + EdgesColoring - PythonOutputMatrix3Name + EdgesColoring - 2 - matrixOutput3 + 0 + 1 - PythonOutputString1Name + FaceInvertNormals - PythonOutputString1Name + FaceInvertNormals - 2 - stringOutput1 + 3 + 0 - PythonOutputString2Name + FaceTransparency - PythonOutputString2Name + FaceTransparency - 2 - stringOutput2 + 3 + 0 - PythonOutputString3Name + FaceTransparencyValue - PythonOutputString3Name + FaceTransparencyValue - 2 - stringOutput3 + 1 + 6.49999976158142090e-01 - - - - - - ReadField:0 - - - SCIRun - DataIO - ReadField - - - - 3 - 0 - FileTypeName + FacesAvailable - FileTypeName + FacesAvailable - 2 - SCIRun Field File + 3 + 1 - Filename + FacesColoring - Filename + FacesColoring - 2 - %SCIRUNDATADIR%/Data/tikhonov_inv/25feb97_sock_closed.fld + 0 + 1 - ScriptEnvironmentVariable + FieldName - ScriptEnvironmentVariable + FieldName 2 - + total sensitivities - - - - - - ReadField:1 - - - SCIRun - DataIO - ReadField - - - - 3 - 0 - FileTypeName + NodeAsSpheres - FileTypeName + NodeAsSpheres - 2 - SCIRun Field File + 0 + 0 - Filename + NodeTransparency - Filename + NodeTransparency - 2 - %SCIRUNDATADIR%/Data/pot_based_BEM_forward/tank.fld + 3 + 0 - ScriptEnvironmentVariable + NodeTransparencyValue - ScriptEnvironmentVariable + NodeTransparencyValue - 2 - + 1 + 6.49999976158142090e-01 - - - - - - ReadMatrix:0 - - - SCIRun - DataIO - ReadMatrix - - - - 3 - 0 - FileTypeName + NodesAvailable - FileTypeName + NodesAvailable - 2 - SCIRun Matrix File + 3 + 1 - Filename + NodesColoring - Filename + NodesColoring - 2 - %SCIRUNDATADIR%/Data/tikhonov_inv/epi_pot_128_fr_170to190.mat + 0 + 1 - ScriptEnvironmentVariable + RenderAsLocation - ScriptEnvironmentVariable + RenderAsLocation - 2 - + 3 + 0 - - - - - - RescaleColorMap:0 - - - SCIRun - Visualization - RescaleColorMap - - - - 4 - 0 - AutoScale + ShowCellIndices - AutoScale + ShowCellIndices - 0 + 3 0 - FixedMax + ShowDataValues - FixedMax + ShowDataValues - 1 - 1.28900000000000000e+04 + 3 + 1 - FixedMin + ShowEdgeIndices - FixedMin + ShowEdgeIndices - 1 - -1.64000000000000000e+04 + 3 + 0 - Symmetric + ShowEdges - Symmetric + ShowEdges 3 0 - - - - - - RescaleColorMap:1 - - - SCIRun - Visualization - RescaleColorMap - - - - 4 - 0 - AutoScale + ShowFaceIndices - AutoScale + ShowFaceIndices - 0 + 3 0 - FixedMax + ShowFaces - FixedMax + ShowFaces - 1 - 2.81288706098427610e+03 + 3 + 1 - FixedMin + ShowNodeIndices - FixedMin + ShowNodeIndices - 1 - -5.44127539449097185e+02 + 3 + 0 - Symmetric + ShowNodes - Symmetric + ShowNodes 3 0 - - - - - - SetFieldData:0 - - - SCIRun - ChangeFieldData - SetFieldData - - - - 1 - 0 - keepTypeCheckBox + ShowText - keepTypeCheckBox + ShowText 3 0 - - - - - - SetFieldData:1 - - - SCIRun - ChangeFieldData - SetFieldData - - - - 1 - 0 - keepTypeCheckBox + SphereResolution - keepTypeCheckBox + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals 3 0 @@ -66503,7 +70146,7 @@ print(Nx) - ShowField:0 + ShowField:3 SCIRun @@ -66630,7 +70273,7 @@ print(Nx) EdgesColoring 0 - 0 + 1 @@ -66702,7 +70345,7 @@ print(Nx) FieldName 2 - + global sensitivities @@ -66975,23 +70618,51 @@ print(Nx) - ShowField:1 + TransformMeshWithTransform:0 SCIRun - Visualization - ShowField + ChangeMesh + TransformMeshWithTransform - 38 + 0 + 0 + + + + + + ViewScene:0 + + + SCIRun + Render + ViewScene + + + + 39 0 - CullBackfacingText + Ambient - CullBackfacingText + Ambient + + 1 + 2.00000000000000011e-01 + + + + + + BackCull + + + BackCull 3 0 @@ -67000,130 +70671,130 @@ print(Nx) - CylinderRadius + BackgroundColor - CylinderRadius + BackgroundColor - 1 - 1.00000000000000006e-01 + 2 + Color(0,0,0) - CylinderResolution + Diffuse - CylinderResolution + Diffuse - 0 - 5 + 1 + 1.00000000000000000e+00 - DefaultMeshColor + DisplayList - DefaultMeshColor + DisplayList - 2 - Color(0.5,0.5,0.5) + 3 + 0 - DefaultTextColor + Emission - DefaultTextColor + Emission - 2 - Color(1,1,1) + 1 + 1.00000000000000000e+00 - EdgeTransparency + FieldOfView - EdgeTransparency + FieldOfView - 3 - 0 + 0 + 20 - EdgeTransparencyValue + FogColor - EdgeTransparencyValue + FogColor - 1 - 6.49999976158142090e-01 + 2 + Color(0,0,1) - EdgesAsCylinders + FogEnd - EdgesAsCylinders + FogEnd - 0 - 0 + 1 + 7.09999999999999964e-01 - EdgesAvailable + FogOn - EdgesAvailable + FogOn 3 - 1 + 0 - EdgesColoring + FogStart - EdgesColoring + FogStart - 0 - 1 + 1 + 0.00000000000000000e+00 - FaceInvertNormals + HeadLightColor - FaceInvertNormals + HeadLightColor - 3 - 0 + 2 + Color(0,0,0) - FaceTransparency + HeadLightOn - FaceTransparency + HeadLightOn 3 1 @@ -67132,70 +70803,70 @@ print(Nx) - FaceTransparencyValue + Light1Color - FaceTransparencyValue + Light1Color - 1 - 6.49999976158142090e-01 + 2 + Color(0,0,0) - FacesAvailable + Light1On - FacesAvailable + Light1On 3 - 1 + 0 - FacesColoring + Light2Color - FacesColoring + Light2Color - 0 - 1 + 2 + Color(0,0,0) - FieldName + Light2On - FieldName + Light2On - 2 - + 3 + 0 - NodeAsSpheres + Light3Color - NodeAsSpheres + Light3Color - 0 - 0 + 2 + Color(0,0,0) - NodeTransparency + Light3On - NodeTransparency + Light3On 3 0 @@ -67204,22 +70875,22 @@ print(Nx) - NodeTransparencyValue + Lighting - NodeTransparencyValue + Lighting - 1 - 6.49999976158142090e-01 + 3 + 1 - NodesAvailable + ObjectsOnly - NodesAvailable + ObjectsOnly 3 1 @@ -67228,118 +70899,118 @@ print(Nx) - NodesColoring + PolygonOffset - NodesColoring + PolygonOffset - 0 - 1 + 1 + 0.00000000000000000e+00 - RenderAsLocation + ScaleBarFontSize - RenderAsLocation + ScaleBarFontSize - 3 - 0 + 0 + 1 - ShowCellIndices + ScaleBarHeight - ShowCellIndices + ScaleBarHeight - 3 - 0 + 1 + 0.00000000000000000e+00 - ShowDataValues + ScaleBarLength - ShowDataValues + ScaleBarLength - 3 - 1 + 1 + 0.00000000000000000e+00 - ShowEdgeIndices + ScaleBarLineWidth - ShowEdgeIndices + ScaleBarLineWidth - 3 - 0 + 1 + 1.00000000000000000e+00 - ShowEdges + ScaleBarMultiplier - ShowEdges + ScaleBarMultiplier - 3 - 0 + 1 + 0.00000000000000000e+00 - ShowFaceIndices + ScaleBarNumTicks - ShowFaceIndices + ScaleBarNumTicks - 3 + 0 0 - ShowFaces + ScaleBarUnitValue - ShowFaces + ScaleBarUnitValue - 3 - 1 + 2 + mm - ShowNodeIndices + Shine - ShowNodeIndices + Shine - 3 - 0 + 1 + 1.00000000000000000e+00 - ShowNodes + ShowBBox - ShowNodes + ShowBBox 3 0 @@ -67348,10 +71019,10 @@ print(Nx) - ShowText + ShowScaleBar - ShowText + ShowScaleBar 3 0 @@ -67360,34 +71031,34 @@ print(Nx) - SphereResolution + ShowViewer - SphereResolution + ShowViewer - 0 - 5 + 3 + 0 - SphereScaleValue + Specular - SphereScaleValue + Specular 1 - 2.99999999999999989e-02 + 4.00000000000000022e-01 - TextAlwaysVisible + Stereo - TextAlwaysVisible + Stereo 3 0 @@ -67396,49 +71067,49 @@ print(Nx) - TextColoring + StereoFusion - TextColoring + StereoFusion - 0 - 0 + 1 + 4.00000000000000022e-01 - TextPrecision + TextOffset - TextPrecision + TextOffset - 0 - 3 + 1 + 0.00000000000000000e+00 - TextSize + UseBGColor - TextSize + UseBGColor - 0 - 8 + 3 + 1 - UseFaceNormals + UseClip - UseFaceNormals + UseClip 3 - 0 + 1 @@ -67447,23 +71118,7 @@ print(Nx) - TransformMeshWithTransform:0 - - - SCIRun - ChangeMesh - TransformMeshWithTransform - - - - 0 - 0 - - - - - - ViewScene:0 + ViewScene:1 SCIRun @@ -67866,7 +71521,7 @@ print(Nx) ShowViewer 3 - 0 + 1 @@ -68000,149 +71655,425 @@ print(Nx) - 29 + 66 0 - AppendMatrix:1 + AppendMatrix:3 ResultMatrix 0 - AppendMatrix:2 + AppendMatrix:4 FirstMatrix 0 - AppendMatrix:2 + AppendMatrix:4 ResultMatrix 0 TransformMeshWithTransform:0 - TransformMatrix + TransformMatrix + 0 + + + + BooleanCompare:0 + + OutputMatrix + 0 + + InterfaceWithPython:1 + + InputMatrix + 0 + + + + BuildBEMatrix:0 + + BEM_Forward_Matrix + 0 + + EvaluateLinearAlgebraBinary:0 + + LHS + 0 + + + + CollectMatrices:0 + + CompositeMatrix + 0 + + BooleanCompare:0 + + PossibleOutput + 0 + + + + CollectMatrices:0 + + CompositeMatrix + 0 + + ReportMatrixInfo:1 + + InputMatrix + 0 + + + + ConvertScalarToMatrix:0 + + Output + 0 + + BooleanCompare:0 + + MatrixA + 0 + + + + ConvertScalarToMatrix:1 + + Output + 0 + + BooleanCompare:0 + + MatrixB + 0 + + + + CreateMatrix:7 + + EnteredMatrix + 0 + + AppendMatrix:4 + + SecondMatrix + 0 + + + + CreateStandardColorMap:0 + + ColorMapObject + 0 + + RescaleColorMap:0 + + ColorMapObject + 0 + + + + CreateStandardColorMap:1 + + ColorMapObject + 0 + + RescaleColorMap:2 + + ColorMapObject + 0 + + + + CreateStandardMatrix:0 + + OutputMatrix + 0 + + AppendMatrix:3 + + FirstMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + GetMatrixSlice:1 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + ResizeMatrix:0 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + WriteMatrix:0 + + MatrixToWrite + 0 + + + + GetMatrixSlice:0 + + OutputMatrix + 0 + + SetFieldData:0 + + InputMatrix + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:1 + + Current_Index + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:5 + + Current_Index + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:6 + + Current_Index + 0 + + + + GetMatrixSlice:1 + + OutputMatrix + 0 + + SetFieldData:1 + + InputMatrix + 0 + + + + GetMatrixSlice:2 + + OutputMatrix + 0 + + AppendMatrix:3 + + SecondMatrix + 0 + + + + GetMatrixSlice:3 + + OutputMatrix + 0 + + ResizeMatrix:1 + + InputMatrix + 0 + + + + GetMatrixSlice:4 + + OutputMatrix + 0 + + ResizeMatrix:2 + + InputMatrix + 0 + + + + GetMatrixSlice:5 + + OutputMatrix + 0 + + SetFieldData:2 + + InputMatrix + 0 + + + + GetMatrixSlice:6 + + OutputMatrix + 0 + + SetFieldData:4 + + InputMatrix 0 - BuildBEMatrix:0 + InterfaceWithPython:0 - BEM_Forward_Matrix + PythonMatrix1 0 - EvaluateLinearAlgebraBinary:0 + GetMatrixSlice:2 - LHS + InputMatrix 0 - CreateMatrix:4 + InterfaceWithPython:0 - EnteredMatrix + PythonMatrix1 0 - AppendMatrix:1 + InterfaceWithPython:1 - FirstMatrix - 0 + InputMatrix + 2 - CreateMatrix:5 + InterfaceWithPython:0 - EnteredMatrix + PythonMatrix1 0 - AppendMatrix:2 + ReportMatrixInfo:0 - SecondMatrix + InputMatrix 0 - CreateMatrix:6 + InterfaceWithPython:0 - EnteredMatrix + PythonMatrix2 0 - AppendMatrix:1 + InterfaceWithPython:1 - SecondMatrix - 0 + InputMatrix + 1 - CreateStandardColorMap:0 + InterfaceWithPython:0 - ColorMapObject + PythonMatrix3 0 - RescaleColorMap:0 + InterfaceWithPython:1 - ColorMapObject - 0 + InputMatrix + 3 - EvaluateLinearAlgebraBinary:0 + InterfaceWithPython:1 - Result + PythonMatrix1 0 - GetMatrixSlice:1 + GetMatrixSlice:3 InputMatrix 0 - EvaluateLinearAlgebraBinary:0 + InterfaceWithPython:1 - Result + PythonMatrix1 0 - WriteMatrix:0 + ReportMatrixInfo:2 - MatrixToWrite + InputMatrix 0 - GetMatrixSlice:0 + InterfaceWithPython:1 - OutputMatrix + PythonMatrix2 0 - SetFieldData:0 + GetMatrixSlice:4 InputMatrix 0 - GetMatrixSlice:0 + InterfaceWithPython:1 - Selected_Index + PythonMatrix2 0 - GetMatrixSlice:1 + ReportMatrixInfo:3 - Current_Index + InputMatrix 0 - GetMatrixSlice:1 + InterfaceWithPython:1 - OutputMatrix + PythonString1 0 - SetFieldData:1 + ReportStringInfo:0 - InputMatrix + Input 0 @@ -68194,6 +72125,30 @@ print(Nx) 0 + + ReadField:1 + + Field + 0 + + SetFieldData:2 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:4 + + InputField + 0 + + ReadMatrix:0 @@ -68218,6 +72173,30 @@ print(Nx) 0 + + ReportMatrixInfo:0 + + NumCols + 0 + + ConvertScalarToMatrix:0 + + Input + 0 + + + + ReportMatrixInfo:1 + + NumCols + 0 + + ConvertScalarToMatrix:1 + + Input + 0 + + RescaleColorMap:0 @@ -68254,6 +72233,66 @@ print(Nx) 0 + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:2 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:3 + + ColorMapObject + 0 + + + + ResizeMatrix:0 + + OutputMatrix + 0 + + CollectMatrices:0 + + SubMatrix + 0 + + + + ResizeMatrix:1 + + OutputMatrix + 0 + + GetMatrixSlice:5 + + InputMatrix + 0 + + + + ResizeMatrix:2 + + OutputMatrix + 0 + + GetMatrixSlice:6 + + InputMatrix + 0 + + SetFieldData:0 @@ -68302,6 +72341,42 @@ print(Nx) 0 + + SetFieldData:2 + + OutputField + 0 + + RescaleColorMap:2 + + Field + 0 + + + + SetFieldData:2 + + OutputField + 0 + + ShowField:2 + + Field + 0 + + + + SetFieldData:4 + + OutputField + 0 + + ShowField:3 + + Field + 0 + + ShowField:0 @@ -68326,6 +72401,30 @@ print(Nx) 1 + + ShowField:2 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 0 + + + + ShowField:3 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 1 + + TransformMeshWithTransform:0 @@ -68353,104 +72452,153 @@ print(Nx) - 26 + 47 0 - AppendMatrix:1 + AppendMatrix:3 - -2.51400000000000000e+03 - -1.65700000000000000e+03 + -2.74600000000000000e+03 + -1.59500000000000000e+03 - AppendMatrix:2 + AppendMatrix:4 - -2.51000000000000000e+03 - -1.52700000000000000e+03 + -2.72800000000000000e+03 + -1.49300000000000000e+03 + + + + BooleanCompare:0 + + -3.04300000000000000e+03 + -6.53000000000000000e+02 BuildBEMatrix:0 - -3.03100000000000000e+03 - -1.34500000000000000e+03 + -3.03400000000000000e+03 + -1.26500000000000000e+03 - CreateMatrix:1 + CollectMatrices:0 - -2.45900000000000000e+03 - -1.99500000000000000e+03 + -2.95500000000000000e+03 + -9.36000000000000000e+02 - CreateMatrix:2 + ConvertScalarToMatrix:0 - -2.76000000000000000e+03 - -1.99300000000000000e+03 + -3.15500000000000000e+03 + -1.11300000000000000e+03 - CreateMatrix:3 + ConvertScalarToMatrix:1 - -2.62000000000000000e+03 - -1.99500000000000000e+03 + -3.05900000000000000e+03 + -7.51000000000000000e+02 - CreateMatrix:4 + CreateMatrix:7 - -2.52500000000000000e+03 - -1.78800000000000000e+03 + -2.65900000000000000e+03 + -1.68100000000000000e+03 - CreateMatrix:5 + CreateStandardColorMap:0 - -2.25400000000000000e+03 - -1.80200000000000000e+03 + -3.09500000000000000e+03 + -1.51700000000000000e+03 - CreateMatrix:6 + CreateStandardColorMap:1 - -2.49700000000000000e+03 - -1.88200000000000000e+03 + -3.02300000000000000e+03 + -1.80000000000000000e+01 - CreateStandardColorMap:0 + CreateStandardMatrix:0 - -2.76100000000000000e+03 - -1.51700000000000000e+03 + -2.87800000000000000e+03 + -1.80200000000000000e+03 EvaluateLinearAlgebraBinary:0 - -3.02800000000000000e+03 - -1.22900000000000000e+03 + -2.92100000000000000e+03 + -1.18000000000000000e+03 GetMatrixSlice:0 - -2.92400000000000000e+03 - -1.61400000000000000e+03 + -2.88800000000000000e+03 + -1.57900000000000000e+03 GetMatrixSlice:1 - -2.99700000000000000e+03 - -1.15600000000000000e+03 + -2.62700000000000000e+03 + -1.10100000000000000e+03 + + + + GetMatrixSlice:2 + + -2.61100000000000000e+03 + -1.79900000000000000e+03 + + + + GetMatrixSlice:3 + + -3.15300000000000000e+03 + -4.03000000000000000e+02 + + + + GetMatrixSlice:4 + + -2.87100000000000000e+03 + -3.49000000000000000e+02 + + + + GetMatrixSlice:5 + + -3.16400000000000000e+03 + -1.14000000000000000e+02 + + + + GetMatrixSlice:6 + + -2.83000000000000000e+03 + -1.24000000000000000e+02 InterfaceWithPython:0 - -2.85600000000000000e+03 - -1.85700000000000000e+03 + -2.76600000000000000e+03 + -1.91600000000000000e+03 + + + + InterfaceWithPython:1 + + -3.03400000000000000e+03 + -5.17000000000000000e+02 @@ -68470,8 +72618,43 @@ print(Nx) ReadMatrix:0 - -2.88900000000000000e+03 - -1.69800000000000000e+03 + -2.93000000000000000e+03 + -1.71100000000000000e+03 + + + + ReportMatrixInfo:0 + + -3.24000000000000000e+03 + -1.24500000000000000e+03 + + + + ReportMatrixInfo:1 + + -3.08400000000000000e+03 + -8.34000000000000000e+02 + + + + ReportMatrixInfo:2 + + -3.03500000000000000e+03 + -3.25000000000000000e+02 + + + + ReportMatrixInfo:3 + + -2.64300000000000000e+03 + -3.75000000000000000e+02 + + + + ReportStringInfo:0 + + -2.67400000000000000e+03 + -2.83000000000000000e+02 @@ -68488,11 +72671,39 @@ print(Nx) -9.14000000000000000e+02 + + RescaleColorMap:2 + + -2.96400000000000000e+03 + 1.89000000000000000e+02 + + + + ResizeMatrix:0 + + -2.93700000000000000e+03 + -1.05200000000000000e+03 + + + + ResizeMatrix:1 + + -3.16900000000000000e+03 + -2.58000000000000000e+02 + + + + ResizeMatrix:2 + + -2.84300000000000000e+03 + -2.68000000000000000e+02 + + SetFieldData:0 - -2.89600000000000000e+03 - -1.08000000000000000e+03 + -2.79300000000000000e+03 + -1.09400000000000000e+03 @@ -68502,6 +72713,20 @@ print(Nx) -1.00700000000000000e+03 + + SetFieldData:2 + + -3.21500000000000000e+03 + 7.40000000000000000e+01 + + + + SetFieldData:4 + + -2.78600000000000000e+03 + 4.20000000000000000e+01 + + ShowField:0 @@ -68517,79 +72742,80 @@ print(Nx) - TransformMeshWithTransform:0 + ShowField:2 - -2.87900000000000000e+03 - -1.44900000000000000e+03 + -3.19500000000000000e+03 + 3.35000000000000000e+02 - ViewScene:0 + ShowField:3 - -2.76100000000000000e+03 - -7.23000000000000000e+02 + -2.85400000000000000e+03 + 3.22000000000000000e+02 - WriteMatrix:0 + TransformMeshWithTransform:0 - -3.01900000000000000e+03 - -8.72000000000000000e+02 + -2.89600000000000000e+03 + -1.34300000000000000e+03 - - - 4 - 0 - CreateMatrix:1 + ViewScene:0 - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">AP rotation</span></p></body></html> - AP rotation - 3 - 13 + -2.76100000000000000e+03 + -7.23000000000000000e+02 - CreateMatrix:2 + ViewScene:1 - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">long axis rotation</span></p></body></html> - long axis rotation - 3 - 13 + -3.15500000000000000e+03 + 4.70000000000000000e+02 - CreateMatrix:3 + WriteMatrix:0 + + -3.14000000000000000e+03 + -1.02800000000000000e+03 + + + + + 2 + 0 + + GetMatrixSlice:2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">lateral rotation</p></body></html> - lateral rotation - 3 +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">iterate weights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">run play without </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">anything executed</span></p></body></html> + iterate weights +run play without +anything executed + 0 13 - CreateMatrix:6 + InterfaceWithPython:0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Translation</span></p></body></html> - Translation - 3 +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">compute </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">legendre points</span></p></body></html> + compute +legendre points + 5 13 @@ -68599,14 +72825,18 @@ p, li { white-space: pre-wrap; } 0 - 26 + 47 0 - AppendMatrix:1 + AppendMatrix:3 -1 - AppendMatrix:2 + AppendMatrix:4 + -1 + + + BooleanCompare:0 -1 @@ -68614,31 +72844,31 @@ p, li { white-space: pre-wrap; } -1 - CreateMatrix:1 + CollectMatrices:0 -1 - CreateMatrix:2 + ConvertScalarToMatrix:0 -1 - CreateMatrix:3 + ConvertScalarToMatrix:1 -1 - CreateMatrix:4 + CreateMatrix:7 -1 - CreateMatrix:5 + CreateStandardColorMap:0 -1 - CreateMatrix:6 + CreateStandardColorMap:1 -1 - CreateStandardColorMap:0 + CreateStandardMatrix:0 -1 @@ -68653,10 +72883,34 @@ p, li { white-space: pre-wrap; } GetMatrixSlice:1 -1 + + GetMatrixSlice:2 + -1 + + + GetMatrixSlice:3 + -1 + + + GetMatrixSlice:4 + -1 + + + GetMatrixSlice:5 + -1 + + + GetMatrixSlice:6 + -1 + InterfaceWithPython:0 -1 + + InterfaceWithPython:1 + -1 + ReadField:0 -1 @@ -68669,6 +72923,26 @@ p, li { white-space: pre-wrap; } ReadMatrix:0 -1 + + ReportMatrixInfo:0 + -1 + + + ReportMatrixInfo:1 + -1 + + + ReportMatrixInfo:2 + -1 + + + ReportMatrixInfo:3 + -1 + + + ReportStringInfo:0 + -1 + RescaleColorMap:0 -1 @@ -68677,6 +72951,22 @@ p, li { white-space: pre-wrap; } RescaleColorMap:1 -1 + + RescaleColorMap:2 + -1 + + + ResizeMatrix:0 + -1 + + + ResizeMatrix:1 + -1 + + + ResizeMatrix:2 + -1 + SetFieldData:0 -1 @@ -68685,6 +72975,14 @@ p, li { white-space: pre-wrap; } SetFieldData:1 -1 + + SetFieldData:2 + -1 + + + SetFieldData:4 + -1 + ShowField:0 -1 @@ -68693,6 +72991,14 @@ p, li { white-space: pre-wrap; } ShowField:1 -1 + + ShowField:2 + -1 + + + ShowField:3 + -1 + TransformMeshWithTransform:0 -1 @@ -68701,21 +73007,27 @@ p, li { white-space: pre-wrap; } ViewScene:0 -1 + + ViewScene:1 + -1 + WriteMatrix:0 -1 - 1 + 2 0 + WriteMatrix:0 ViewScene:0 - 2 + 3 0 ViewScene:0--ShowField:1 ViewScene:0--ShowField:0 + WriteMatrix:0--EvaluateLinearAlgebraBinary:0 0