| [17802] | 1 | Index: ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp (revision 17563)
|
|---|
| 4 | +++ ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp (revision 17564)
|
|---|
| 5 | @@ -50,12 +50,12 @@
|
|---|
| 6 | iomodel->FetchDataToInput(elements,ThicknessEnum);
|
|---|
| 7 | iomodel->FetchDataToInput(elements,BaseEnum);
|
|---|
| 8 | iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum);
|
|---|
| 9 | - iomodel->FetchDataToInput(elements,MeshElementonbedEnum);
|
|---|
| 10 | iomodel->FetchDataToInput(elements,EplHeadEnum);
|
|---|
| 11 | iomodel->FetchDataToInput(elements,SedimentHeadEnum);
|
|---|
| 12 | iomodel->FetchDataToInput(elements,HydrologydcEplInitialThicknessEnum);
|
|---|
| 13 | iomodel->FetchDataToInput(elements,HydrologydcSedimentTransmitivityEnum);
|
|---|
| 14 | iomodel->FetchDataToInput(elements,HydrologydcEplThicknessEnum);
|
|---|
| 15 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchDataToInput(elements,MeshElementonbedEnum);
|
|---|
| 16 |
|
|---|
| 17 | // elements->InputDuplicate(HydrologydcEplInitialThicknessEnum,HydrologydcEplThicknessEnum);
|
|---|
| 18 |
|
|---|
| 19 | @@ -72,9 +72,9 @@
|
|---|
| 20 | iomodel->Constant(&isefficientlayer,HydrologydcIsefficientlayerEnum);
|
|---|
| 21 | if(!isefficientlayer) return;
|
|---|
| 22 |
|
|---|
| 23 | - iomodel->FetchData(3,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationVertexEquationEnum);
|
|---|
| 24 | + if(iomodel->meshtype!=Mesh2DhorizontalEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);
|
|---|
| 25 | ::CreateNodes(nodes,iomodel,HydrologyDCEfficientAnalysisEnum,P1Enum);
|
|---|
| 26 | - iomodel->DeleteData(3,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationVertexEquationEnum);
|
|---|
| 27 | + iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);
|
|---|
| 28 | }/*}}}*/
|
|---|
| 29 | void HydrologyDCEfficientAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
|
|---|
| 30 |
|
|---|
| 31 | Index: ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeXAnalysis.cpp
|
|---|
| 32 | ===================================================================
|
|---|
| 33 | --- ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeXAnalysis.cpp (revision 17563)
|
|---|
| 34 | +++ ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeXAnalysis.cpp (revision 17564)
|
|---|
| 35 | @@ -34,9 +34,9 @@
|
|---|
| 36 | }
|
|---|
| 37 | }/*}}}*/
|
|---|
| 38 | void SmoothedSurfaceSlopeXAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel){/*{{{*/
|
|---|
| 39 | - iomodel->FetchData(1,MeshVertexonbedEnum);
|
|---|
| 40 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(1,MeshVertexonbedEnum);
|
|---|
| 41 | ::CreateNodes(nodes,iomodel,SmoothedSurfaceSlopeXAnalysisEnum,P1Enum);
|
|---|
| 42 | - iomodel->DeleteData(1,MeshVertexonbedEnum);
|
|---|
| 43 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->DeleteData(1,MeshVertexonbedEnum);
|
|---|
| 44 | }/*}}}*/
|
|---|
| 45 | void SmoothedSurfaceSlopeXAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
|
|---|
| 46 | }/*}}}*/
|
|---|
| 47 | Index: ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp
|
|---|
| 48 | ===================================================================
|
|---|
| 49 | --- ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp (revision 17563)
|
|---|
| 50 | +++ ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp (revision 17564)
|
|---|
| 51 | @@ -34,9 +34,9 @@
|
|---|
| 52 | }
|
|---|
| 53 | }/*}}}*/
|
|---|
| 54 | void SmoothedSurfaceSlopeYAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel){/*{{{*/
|
|---|
| 55 | - iomodel->FetchData(1,MeshVertexonbedEnum);
|
|---|
| 56 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(1,MeshVertexonbedEnum);
|
|---|
| 57 | ::CreateNodes(nodes,iomodel,SmoothedSurfaceSlopeYAnalysisEnum,P1Enum);
|
|---|
| 58 | - iomodel->DeleteData(1,MeshVertexonbedEnum);
|
|---|
| 59 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->DeleteData(1,MeshVertexonbedEnum);
|
|---|
| 60 | }/*}}}*/
|
|---|
| 61 | void SmoothedSurfaceSlopeYAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
|
|---|
| 62 | }/*}}}*/
|
|---|
| 63 | Index: ../trunk-jpl/src/c/analyses/BalancevelocityAnalysis.cpp
|
|---|
| 64 | ===================================================================
|
|---|
| 65 | --- ../trunk-jpl/src/c/analyses/BalancevelocityAnalysis.cpp (revision 17563)
|
|---|
| 66 | +++ ../trunk-jpl/src/c/analyses/BalancevelocityAnalysis.cpp (revision 17564)
|
|---|
| 67 | @@ -43,9 +43,7 @@
|
|---|
| 68 | if(iomodel->meshtype==Mesh3DEnum) _error_("DG 3d not implemented yet");
|
|---|
| 69 |
|
|---|
| 70 | /*First fetch data: */
|
|---|
| 71 | - iomodel->FetchData(3,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationVertexEquationEnum);
|
|---|
| 72 | ::CreateNodes(nodes,iomodel,BalancevelocityAnalysisEnum,P1Enum);
|
|---|
| 73 | - iomodel->DeleteData(3,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationVertexEquationEnum);
|
|---|
| 74 | }/*}}}*/
|
|---|
| 75 | void BalancevelocityAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
|
|---|
| 76 |
|
|---|
| 77 | Index: ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
|
|---|
| 78 | ===================================================================
|
|---|
| 79 | --- ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp (revision 17563)
|
|---|
| 80 | +++ ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp (revision 17564)
|
|---|
| 81 | @@ -83,13 +83,12 @@
|
|---|
| 82 | iomodel->FetchDataToInput(elements,ThicknessEnum);
|
|---|
| 83 | iomodel->FetchDataToInput(elements,BaseEnum);
|
|---|
| 84 | iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum);
|
|---|
| 85 | - iomodel->FetchDataToInput(elements,MeshElementonbedEnum);
|
|---|
| 86 | iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
|
|---|
| 87 | iomodel->FetchDataToInput(elements,HydrologydcBasalMoulinInputEnum);
|
|---|
| 88 | iomodel->FetchDataToInput(elements,SedimentHeadEnum);
|
|---|
| 89 | iomodel->FetchDataToInput(elements,HydrologydcSedimentTransmitivityEnum);
|
|---|
| 90 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchDataToInput(elements,MeshElementonbedEnum);
|
|---|
| 91 |
|
|---|
| 92 | -
|
|---|
| 93 | if(isefficientlayer)iomodel->FetchDataToInput(elements,HydrologydcMaskEplactiveNodeEnum);
|
|---|
| 94 | }/*}}}*/
|
|---|
| 95 | void HydrologyDCInefficientAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel){/*{{{*/
|
|---|
| 96 | @@ -101,7 +100,7 @@
|
|---|
| 97 | /*Now, do we really want DC?*/
|
|---|
| 98 | if(hydrology_model!=HydrologydcEnum) return;
|
|---|
| 99 |
|
|---|
| 100 | - if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);
|
|---|
| 101 | + if(iomodel->meshtype!=Mesh2DhorizontalEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);
|
|---|
| 102 | ::CreateNodes(nodes,iomodel,HydrologyDCInefficientAnalysisEnum,P1Enum);
|
|---|
| 103 | iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);
|
|---|
| 104 | }/*}}}*/
|
|---|
| 105 | @@ -121,7 +120,7 @@
|
|---|
| 106 | iomodel->Constant(&hydrology_model,HydrologyModelEnum);
|
|---|
| 107 | if(hydrology_model!=HydrologydcEnum) return;
|
|---|
| 108 |
|
|---|
| 109 | - iomodel->FetchData(1,MeshVertexonbedEnum);
|
|---|
| 110 | + if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(1,MeshVertexonbedEnum);
|
|---|
| 111 |
|
|---|
| 112 | //create penalties for nodes: no node can have water above the max
|
|---|
| 113 | CreateSingleNodeToElementConnectivity(iomodel);
|
|---|
| 114 | Index: ../trunk-jpl/src/m/classes/model.py
|
|---|
| 115 | ===================================================================
|
|---|
| 116 | --- ../trunk-jpl/src/m/classes/model.py (revision 17563)
|
|---|
| 117 | +++ ../trunk-jpl/src/m/classes/model.py (revision 17564)
|
|---|
| 118 | @@ -373,7 +373,6 @@
|
|---|
| 119 | #First do the connectivity for the contourenvelope in 2d
|
|---|
| 120 | [md2.mesh.vertexconnectivity]=NodeConnectivity(md2.mesh.elements2d,md2.mesh.numberofvertices2d)
|
|---|
| 121 | [md2.mesh.elementconnectivity]=ElementConnectivity(md2.mesh.elements2d,md2.mesh.vertexconnectivity)
|
|---|
| 122 | - md2.mesh.segments=contourenvelope(md2)
|
|---|
| 123 | md2.mesh.vertexonboundary=numpy.zeros(numberofvertices2/md2.mesh.numberoflayers,bool)
|
|---|
| 124 | md2.mesh.vertexonboundary[md2.mesh.segments[:,0:2]-1]=True
|
|---|
| 125 | md2.mesh.vertexonboundary=numpy.tile(md2.mesh.vertexonboundary,md2.mesh.numberoflayers)
|
|---|
| 126 | Index: ../trunk-jpl/src/m/classes/model.m
|
|---|
| 127 | ===================================================================
|
|---|
| 128 | --- ../trunk-jpl/src/m/classes/model.m (revision 17563)
|
|---|
| 129 | +++ ../trunk-jpl/src/m/classes/model.m (revision 17564)
|
|---|
| 130 | @@ -472,7 +472,6 @@
|
|---|
| 131 | %First do the connectivity for the contourenvelope in 2d
|
|---|
| 132 | md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements2d,md2.mesh.numberofvertices2d);
|
|---|
| 133 | md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements2d,md2.mesh.vertexconnectivity);
|
|---|
| 134 | - md2.mesh.segments=contourenvelope(md2);
|
|---|
| 135 | md2.mesh.vertexonboundary=zeros(numberofvertices2/md2.mesh.numberoflayers,1); md2.mesh.vertexonboundary(md2.mesh.segments(:,1:2))=1;
|
|---|
| 136 | md2.mesh.vertexonboundary=repmat(md2.mesh.vertexonboundary,md2.mesh.numberoflayers,1);
|
|---|
| 137 | %Then do it for 3d as usual
|
|---|