[17802] | 1 | Index: ../trunk-jpl/src/c/classes/Elements/Element.h
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/classes/Elements/Element.h (revision 17670)
|
---|
| 4 | +++ ../trunk-jpl/src/c/classes/Elements/Element.h (revision 17671)
|
---|
| 5 | @@ -85,6 +85,8 @@
|
---|
| 6 | void GetNodesSidList(int* sidlist);
|
---|
| 7 | void GetNodesLidList(int* lidlist);
|
---|
| 8 | void GetPhi(IssmDouble* phi, IssmDouble* epsilon, IssmDouble viscosity);
|
---|
| 9 | + void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum);
|
---|
| 10 | + void GetVertexPidList(int* pidlist);
|
---|
| 11 | void GetVerticesCoordinates(IssmDouble** xyz_list);
|
---|
| 12 | void GetVerticesSidList(int* sidlist);
|
---|
| 13 | void GetVerticesConnectivityList(int* connectivitylist);
|
---|
| 14 | @@ -219,7 +221,6 @@
|
---|
| 15 | virtual Gauss* NewGaussTop(int order)=0;
|
---|
| 16 |
|
---|
| 17 | virtual void InputScale(int enum_type,IssmDouble scale_factor)=0;
|
---|
| 18 | - virtual void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum)=0;
|
---|
| 19 | virtual IssmDouble TimeAdapt()=0;
|
---|
| 20 | virtual void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
|
---|
| 21 | virtual void Delta18oParameterization(void)=0;
|
---|
| 22 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
|
---|
| 23 | ===================================================================
|
---|
| 24 | --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 17670)
|
---|
| 25 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 17671)
|
---|
| 26 | @@ -833,32 +833,6 @@
|
---|
| 27 | return this->nodes[node_number];
|
---|
| 28 |
|
---|
| 29 | }/*}}}*/
|
---|
| 30 | -/*FUNCTION Tria::GetVertexPidList {{{*/
|
---|
| 31 | -void Tria::GetVertexPidList(int* doflist){
|
---|
| 32 | -
|
---|
| 33 | - for(int i=0;i<3;i++) doflist[i]=vertices[i]->Pid();
|
---|
| 34 | -
|
---|
| 35 | -}
|
---|
| 36 | -/*}}}*/
|
---|
| 37 | -/*FUNCTION Tria::GetVectorFromInputs{{{*/
|
---|
| 38 | -void Tria::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
|
---|
| 39 | -
|
---|
| 40 | - int vertexpidlist[NUMVERTICES];
|
---|
| 41 | -
|
---|
| 42 | - /*Get out if this is not an element input*/
|
---|
| 43 | - if(!IsInput(input_enum)) return;
|
---|
| 44 | -
|
---|
| 45 | - /*Prepare index list*/
|
---|
| 46 | - this->GetVertexPidList(&vertexpidlist[0]);
|
---|
| 47 | -
|
---|
| 48 | - /*Get input (either in element or material)*/
|
---|
| 49 | - Input* input=inputs->GetInput(input_enum);
|
---|
| 50 | - if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");
|
---|
| 51 | -
|
---|
| 52 | - /*We found the enum. Use its values to fill into the vector, using the vertices ids: */
|
---|
| 53 | - input->GetVectorFromInputs(vector,&vertexpidlist[0]);
|
---|
| 54 | -}
|
---|
| 55 | -/*}}}*/
|
---|
| 56 | /*FUNCTION Tria::GetXcoord {{{*/
|
---|
| 57 | IssmDouble Tria::GetXcoord(Gauss* gauss){
|
---|
| 58 |
|
---|
| 59 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.h
|
---|
| 60 | ===================================================================
|
---|
| 61 | --- ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 17670)
|
---|
| 62 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 17671)
|
---|
| 63 | @@ -81,7 +81,6 @@
|
---|
| 64 | int NumberofNodesVelocity(void);
|
---|
| 65 | int NumberofNodesPressure(void);
|
---|
| 66 | void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type);
|
---|
| 67 | - void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum);
|
---|
| 68 | void GetVerticesCoordinatesBase(IssmDouble** pxyz_list);
|
---|
| 69 | void GetVerticesCoordinatesTop(IssmDouble** pxyz_list);
|
---|
| 70 | void InputDepthAverageAtBase(int enum_type,int average_enum_type);
|
---|
| 71 | @@ -179,8 +178,6 @@
|
---|
| 72 | IssmDouble GetArea(void);
|
---|
| 73 | void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints);
|
---|
| 74 | int GetElementType(void);
|
---|
| 75 | -
|
---|
| 76 | - void GetVertexPidList(int* doflist);
|
---|
| 77 | IssmDouble GetXcoord(Gauss* gauss);
|
---|
| 78 | IssmDouble GetYcoord(Gauss* gauss);
|
---|
| 79 | IssmDouble GetZcoord(Gauss* gauss){_error_("not implemented");};
|
---|
| 80 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp
|
---|
| 81 | ===================================================================
|
---|
| 82 | --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 17670)
|
---|
| 83 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 17671)
|
---|
| 84 | @@ -824,13 +824,6 @@
|
---|
| 85 | return phi;
|
---|
| 86 | }
|
---|
| 87 | /*}}}*/
|
---|
| 88 | -/*FUNCTION Penta::GetVertexPidList {{{*/
|
---|
| 89 | -void Penta::GetVertexPidList(int* doflist){
|
---|
| 90 | -
|
---|
| 91 | - for(int i=0;i<6;i++) doflist[i]=vertices[i]->Pid();
|
---|
| 92 | -
|
---|
| 93 | -}
|
---|
| 94 | -/*}}}*/
|
---|
| 95 | /*FUNCTION Penta::GetElementType {{{*/
|
---|
| 96 | int Penta::GetElementType(){
|
---|
| 97 |
|
---|
| 98 | @@ -967,25 +960,6 @@
|
---|
| 99 | return tau_parameter;
|
---|
| 100 | }
|
---|
| 101 | /*}}}*/
|
---|
| 102 | -/*FUNCTION Penta::GetVectorFromInputs{{{*/
|
---|
| 103 | -void Penta::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
|
---|
| 104 | -
|
---|
| 105 | - int vertexpidlist[NUMVERTICES];
|
---|
| 106 | -
|
---|
| 107 | - /*Get out if this is not an element input*/
|
---|
| 108 | - if (!IsInput(input_enum)) return;
|
---|
| 109 | -
|
---|
| 110 | - /*Prepare index list*/
|
---|
| 111 | - this->GetVertexPidList(&vertexpidlist[0]);
|
---|
| 112 | -
|
---|
| 113 | - /*Get input (either in element or material)*/
|
---|
| 114 | - Input* input=inputs->GetInput(input_enum);
|
---|
| 115 | - if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");
|
---|
| 116 | -
|
---|
| 117 | - /*We found the enum. Use its values to fill into the vector, using the vertices ids: */
|
---|
| 118 | - input->GetVectorFromInputs(vector,&vertexpidlist[0]);
|
---|
| 119 | -}
|
---|
| 120 | -/*}}}*/
|
---|
| 121 | /*FUNCTION Penta::GetXcoord {{{*/
|
---|
| 122 | IssmDouble Penta::GetXcoord(Gauss* gauss){
|
---|
| 123 |
|
---|
| 124 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.h
|
---|
| 125 | ===================================================================
|
---|
| 126 | --- ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 17670)
|
---|
| 127 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 17671)
|
---|
| 128 | @@ -79,7 +79,6 @@
|
---|
| 129 | IssmDouble GetXcoord(Gauss* gauss);
|
---|
| 130 | IssmDouble GetYcoord(Gauss* gauss);
|
---|
| 131 | IssmDouble GetZcoord(Gauss* gauss);
|
---|
| 132 | - void GetVectorFromInputs(Vector<IssmDouble>* vector,int name_enum);
|
---|
| 133 | void GetVerticesCoordinatesBase(IssmDouble** pxyz_list);
|
---|
| 134 | void GetVerticesCoordinatesTop(IssmDouble** pxyz_list);
|
---|
| 135 |
|
---|
| 136 | @@ -177,8 +176,6 @@
|
---|
| 137 | void NormalTop(IssmDouble* bed_normal, IssmDouble* xyz_list);
|
---|
| 138 | ElementMatrix* CreateBasalMassMatrix(void);
|
---|
| 139 | void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints);
|
---|
| 140 | -
|
---|
| 141 | - void GetVertexPidList(int* doflist);
|
---|
| 142 | int GetElementType(void);
|
---|
| 143 | void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
|
---|
| 144 | Node* GetNode(int node_number);
|
---|
| 145 | Index: ../trunk-jpl/src/c/classes/Elements/Tetra.cpp
|
---|
| 146 | ===================================================================
|
---|
| 147 | --- ../trunk-jpl/src/c/classes/Elements/Tetra.cpp (revision 17670)
|
---|
| 148 | +++ ../trunk-jpl/src/c/classes/Elements/Tetra.cpp (revision 17671)
|
---|
| 149 | @@ -843,8 +843,9 @@
|
---|
| 150 | tetra_node_ids[7]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofelements+iomodel->elements[4*index+2];
|
---|
| 151 | tetra_node_ids[8]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofelements+iomodel->elements[4*index+3];
|
---|
| 152 | break;
|
---|
| 153 | + case TaylorHoodEnum:
|
---|
| 154 | numnodes = 14;
|
---|
| 155 | - tetra_node_ids = xNew<int>(numnodes);
|
---|
| 156 | + tetra_node_ids = xNew<int>(numnodes);
|
---|
| 157 | tetra_node_ids[0]=iomodel->nodecounter+iomodel->elements[4*index+0];
|
---|
| 158 | tetra_node_ids[1]=iomodel->nodecounter+iomodel->elements[4*index+1];
|
---|
| 159 | tetra_node_ids[2]=iomodel->nodecounter+iomodel->elements[4*index+2];
|
---|
| 160 | Index: ../trunk-jpl/src/c/classes/Elements/Seg.h
|
---|
| 161 | ===================================================================
|
---|
| 162 | --- ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 17670)
|
---|
| 163 | +++ ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 17671)
|
---|
| 164 | @@ -127,7 +127,6 @@
|
---|
| 165 | void GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");};
|
---|
| 166 |
|
---|
| 167 | void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");};
|
---|
| 168 | - void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");};
|
---|
| 169 | void InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");};
|
---|
| 170 | void InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
|
---|
| 171 | void InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");};
|
---|
| 172 | Index: ../trunk-jpl/src/c/classes/Elements/Tetra.h
|
---|
| 173 | ===================================================================
|
---|
| 174 | --- ../trunk-jpl/src/c/classes/Elements/Tetra.h (revision 17670)
|
---|
| 175 | +++ ../trunk-jpl/src/c/classes/Elements/Tetra.h (revision 17671)
|
---|
| 176 | @@ -132,7 +132,6 @@
|
---|
| 177 | void GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");};
|
---|
| 178 |
|
---|
| 179 | void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");};
|
---|
| 180 | - void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");};
|
---|
| 181 | void InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");};
|
---|
| 182 | void InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
|
---|
| 183 | void InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");};
|
---|
| 184 | Index: ../trunk-jpl/src/c/classes/Elements/Element.cpp
|
---|
| 185 | ===================================================================
|
---|
| 186 | --- ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 17670)
|
---|
| 187 | +++ ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 17671)
|
---|
| 188 | @@ -527,6 +527,31 @@
|
---|
| 189 | }
|
---|
| 190 | }
|
---|
| 191 | /*}}}*/
|
---|
| 192 | +void Element::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){/*{{{*/
|
---|
| 193 | +
|
---|
| 194 | + /*Fetch number vertices for this element and allocate arrays*/
|
---|
| 195 | + int numvertices = this->GetNumberOfVertices();
|
---|
| 196 | + int* vertexpidlist = xNew<int>(numvertices);
|
---|
| 197 | + IssmDouble* values = xNew<IssmDouble>(numvertices);
|
---|
| 198 | +
|
---|
| 199 | + /*Fill in values*/
|
---|
| 200 | + this->GetVertexPidList(vertexpidlist);
|
---|
| 201 | + this->GetInputListOnNodesVelocity(values,input_enum);
|
---|
| 202 | + vector->SetValues(numvertices,vertexpidlist,values,INS_VAL);
|
---|
| 203 | +
|
---|
| 204 | + /*Clean up*/
|
---|
| 205 | + xDelete<int>(vertexpidlist);
|
---|
| 206 | + xDelete<IssmDouble>(values);
|
---|
| 207 | +
|
---|
| 208 | +}
|
---|
| 209 | +/*}}}*/
|
---|
| 210 | +void Element::GetVertexPidList(int* pidlist){/*{{{*/
|
---|
| 211 | +
|
---|
| 212 | + int numvertices = this->GetNumberOfVertices();
|
---|
| 213 | + for(int i=0;i<numvertices;i++) pidlist[i]=vertices[i]->Pid();
|
---|
| 214 | +
|
---|
| 215 | +}
|
---|
| 216 | +/*}}}*/
|
---|
| 217 | void Element::GetVerticesCoordinates(IssmDouble** pxyz_list){/*{{{*/
|
---|
| 218 |
|
---|
| 219 | int numvertices = this->GetNumberOfVertices();
|
---|