source:
issm/oecreview/Archive/16554-17801/ISSM-17670-17671.diff
Last change on this file was 17802, checked in by , 11 years ago | |
---|---|
File size: 9.6 KB |
-
../trunk-jpl/src/c/classes/Elements/Element.h
85 85 void GetNodesSidList(int* sidlist); 86 86 void GetNodesLidList(int* lidlist); 87 87 void GetPhi(IssmDouble* phi, IssmDouble* epsilon, IssmDouble viscosity); 88 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum); 89 void GetVertexPidList(int* pidlist); 88 90 void GetVerticesCoordinates(IssmDouble** xyz_list); 89 91 void GetVerticesSidList(int* sidlist); 90 92 void GetVerticesConnectivityList(int* connectivitylist); … … 219 221 virtual Gauss* NewGaussTop(int order)=0; 220 222 221 223 virtual void InputScale(int enum_type,IssmDouble scale_factor)=0; 222 virtual void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum)=0;223 224 virtual IssmDouble TimeAdapt()=0; 224 225 virtual void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0; 225 226 virtual void Delta18oParameterization(void)=0; -
../trunk-jpl/src/c/classes/Elements/Tria.cpp
833 833 return this->nodes[node_number]; 834 834 835 835 }/*}}}*/ 836 /*FUNCTION Tria::GetVertexPidList {{{*/837 void Tria::GetVertexPidList(int* doflist){838 839 for(int i=0;i<3;i++) doflist[i]=vertices[i]->Pid();840 841 }842 /*}}}*/843 /*FUNCTION Tria::GetVectorFromInputs{{{*/844 void Tria::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){845 846 int vertexpidlist[NUMVERTICES];847 848 /*Get out if this is not an element input*/849 if(!IsInput(input_enum)) return;850 851 /*Prepare index list*/852 this->GetVertexPidList(&vertexpidlist[0]);853 854 /*Get input (either in element or material)*/855 Input* input=inputs->GetInput(input_enum);856 if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");857 858 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */859 input->GetVectorFromInputs(vector,&vertexpidlist[0]);860 }861 /*}}}*/862 836 /*FUNCTION Tria::GetXcoord {{{*/ 863 837 IssmDouble Tria::GetXcoord(Gauss* gauss){ 864 838 -
../trunk-jpl/src/c/classes/Elements/Tria.h
81 81 int NumberofNodesVelocity(void); 82 82 int NumberofNodesPressure(void); 83 83 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 84 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum);85 84 void GetVerticesCoordinatesBase(IssmDouble** pxyz_list); 86 85 void GetVerticesCoordinatesTop(IssmDouble** pxyz_list); 87 86 void InputDepthAverageAtBase(int enum_type,int average_enum_type); … … 179 178 IssmDouble GetArea(void); 180 179 void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints); 181 180 int GetElementType(void); 182 183 void GetVertexPidList(int* doflist);184 181 IssmDouble GetXcoord(Gauss* gauss); 185 182 IssmDouble GetYcoord(Gauss* gauss); 186 183 IssmDouble GetZcoord(Gauss* gauss){_error_("not implemented");}; -
../trunk-jpl/src/c/classes/Elements/Penta.cpp
824 824 return phi; 825 825 } 826 826 /*}}}*/ 827 /*FUNCTION Penta::GetVertexPidList {{{*/828 void Penta::GetVertexPidList(int* doflist){829 830 for(int i=0;i<6;i++) doflist[i]=vertices[i]->Pid();831 832 }833 /*}}}*/834 827 /*FUNCTION Penta::GetElementType {{{*/ 835 828 int Penta::GetElementType(){ 836 829 … … 967 960 return tau_parameter; 968 961 } 969 962 /*}}}*/ 970 /*FUNCTION Penta::GetVectorFromInputs{{{*/971 void Penta::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){972 973 int vertexpidlist[NUMVERTICES];974 975 /*Get out if this is not an element input*/976 if (!IsInput(input_enum)) return;977 978 /*Prepare index list*/979 this->GetVertexPidList(&vertexpidlist[0]);980 981 /*Get input (either in element or material)*/982 Input* input=inputs->GetInput(input_enum);983 if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");984 985 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */986 input->GetVectorFromInputs(vector,&vertexpidlist[0]);987 }988 /*}}}*/989 963 /*FUNCTION Penta::GetXcoord {{{*/ 990 964 IssmDouble Penta::GetXcoord(Gauss* gauss){ 991 965 -
../trunk-jpl/src/c/classes/Elements/Penta.h
79 79 IssmDouble GetXcoord(Gauss* gauss); 80 80 IssmDouble GetYcoord(Gauss* gauss); 81 81 IssmDouble GetZcoord(Gauss* gauss); 82 void GetVectorFromInputs(Vector<IssmDouble>* vector,int name_enum);83 82 void GetVerticesCoordinatesBase(IssmDouble** pxyz_list); 84 83 void GetVerticesCoordinatesTop(IssmDouble** pxyz_list); 85 84 … … 177 176 void NormalTop(IssmDouble* bed_normal, IssmDouble* xyz_list); 178 177 ElementMatrix* CreateBasalMassMatrix(void); 179 178 void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints); 180 181 void GetVertexPidList(int* doflist);182 179 int GetElementType(void); 183 180 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype); 184 181 Node* GetNode(int node_number); -
../trunk-jpl/src/c/classes/Elements/Tetra.cpp
843 843 tetra_node_ids[7]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofelements+iomodel->elements[4*index+2]; 844 844 tetra_node_ids[8]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofelements+iomodel->elements[4*index+3]; 845 845 break; 846 case TaylorHoodEnum: 846 847 numnodes = 14; 847 tetra_node_ids 848 tetra_node_ids = xNew<int>(numnodes); 848 849 tetra_node_ids[0]=iomodel->nodecounter+iomodel->elements[4*index+0]; 849 850 tetra_node_ids[1]=iomodel->nodecounter+iomodel->elements[4*index+1]; 850 851 tetra_node_ids[2]=iomodel->nodecounter+iomodel->elements[4*index+2]; -
../trunk-jpl/src/c/classes/Elements/Seg.h
127 127 void GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");}; 128 128 129 129 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");}; 130 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");};131 130 void InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");}; 132 131 void InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");}; 133 132 void InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");}; -
../trunk-jpl/src/c/classes/Elements/Tetra.h
132 132 void GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");}; 133 133 134 134 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");}; 135 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");};136 135 void InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");}; 137 136 void InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");}; 138 137 void InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");}; -
../trunk-jpl/src/c/classes/Elements/Element.cpp
527 527 } 528 528 } 529 529 /*}}}*/ 530 void Element::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){/*{{{*/ 531 532 /*Fetch number vertices for this element and allocate arrays*/ 533 int numvertices = this->GetNumberOfVertices(); 534 int* vertexpidlist = xNew<int>(numvertices); 535 IssmDouble* values = xNew<IssmDouble>(numvertices); 536 537 /*Fill in values*/ 538 this->GetVertexPidList(vertexpidlist); 539 this->GetInputListOnNodesVelocity(values,input_enum); 540 vector->SetValues(numvertices,vertexpidlist,values,INS_VAL); 541 542 /*Clean up*/ 543 xDelete<int>(vertexpidlist); 544 xDelete<IssmDouble>(values); 545 546 } 547 /*}}}*/ 548 void Element::GetVertexPidList(int* pidlist){/*{{{*/ 549 550 int numvertices = this->GetNumberOfVertices(); 551 for(int i=0;i<numvertices;i++) pidlist[i]=vertices[i]->Pid(); 552 553 } 554 /*}}}*/ 530 555 void Element::GetVerticesCoordinates(IssmDouble** pxyz_list){/*{{{*/ 531 556 532 557 int numvertices = this->GetNumberOfVertices();
Note:
See TracBrowser
for help on using the repository browser.