Changeset 17671
- Timestamp:
- 04/08/14 13:15:59 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r17636 r17671 526 526 lidlist[i]=nodes[i]->Lid(); 527 527 } 528 } 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 528 553 } 529 554 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r17585 r17671 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); … … 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; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r17641 r17671 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(){ … … 966 959 967 960 return tau_parameter; 968 }969 /*}}}*/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 961 } 988 962 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r17641 r17671 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); … … 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); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17585 r17671 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");}; -
issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp
r17610 r17671 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]; -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r17585 r17671 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");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17670 r17671 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){ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r17585 r17671 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); … … 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);
Note:
See TracChangeset
for help on using the changeset viewer.