Changeset 3920
- Timestamp:
- 05/24/10 13:56:27 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Sing.cpp
r3887 r3920 185 185 printf(" inputs\n"); 186 186 inputs->Echo(); 187 } 188 /*}}}*/ 189 /*FUNCTION Sing::IsInput{{{1*/ 190 bool Sing::IsInput(int name){ 191 if (name==SurfaceSlopexEnum || 192 name==SurfaceSlopeyEnum){ 193 return true; 194 } 195 else return false; 187 196 } 188 197 /*}}}*/ … … 551 560 /*FUNCTION Sing::UpdateInputsFromVector(double* vector, int name, int type);{{{1*/ 552 561 void Sing::UpdateInputsFromVector(double* vector, int name, int type){ 553 ISSMERROR(" not supported yet!"); 562 563 Node* node=NULL; 564 /*Check that name is an element input*/ 565 if (!IsInput(name)) return; 566 567 switch(type){ 568 569 case VertexEnum: 570 571 /*New SingVertexInpu*/ 572 double value; 573 574 /*Get values on the 6 vertices*/ 575 node=(Node*)this->hnodes.delivers(); 576 value=vector[node->GetVertexDof()]; 577 578 /*update input*/ 579 this->inputs->AddInput(new SingVertexInput(name,value)); 580 return; 581 582 default: 583 ISSMERROR("type %i (%s) not implemented yet",type,EnumAsString(type)); 584 } 554 585 } 555 586 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Sing.h
r3887 r3920 26 26 int id; 27 27 28 Hook hnodes; //hook to 2nodes28 Hook hnodes; //hook to 1 nodes 29 29 Hook hmatice; //hook to 1 matice 30 30 Hook hmatpar; //hook to 1 matpar … … 48 48 int Enum(); 49 49 int Id(); 50 bool IsInput(int name); 50 51 void Marshall(char** pmarshalled_dataset); 51 52 int MarshallSize(); … … 55 56 void UpdateInputsFromVector(int* vector, int name, int type); 56 57 void UpdateInputsFromVector(bool* vector, int name, int type); 57 void 58 void 59 void 58 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 59 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} 60 void UpdateInputsFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");} 60 61 61 62 void UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type); 62 63 63 void 64 void DepthAverageInputAtBase(int enum_type){ISSMERROR("not implemented yet");}; 64 65 /*}}}*/ 65 66 /*numerics: {{{1*/ -
issm/trunk/src/c/objects/Elements/Tria.cpp
r3887 r3920 300 300 void Tria::Echo(void){ 301 301 this->DeepEcho(); 302 } 303 /*}}}*/ 304 /*FUNCTION Tria::IsInput{{{1*/ 305 bool Tria::IsInput(int name){ 306 if (name==SurfaceSlopexEnum || 307 name==SurfaceSlopeyEnum){ 308 return true; 309 } 310 else return false; 302 311 } 303 312 /*}}}*/ … … 4666 4675 /*FUNCTION Tria::UpdateInputsFromVector(double* vector, int name, int type);{{{1*/ 4667 4676 void Tria::UpdateInputsFromVector(double* vector, int name, int type){ 4668 ISSMERROR(" not supported yet!"); 4677 4678 /*Check that name is an element input*/ 4679 if (!IsInput(name)) return; 4680 4681 switch(type){ 4682 4683 case VertexEnum: 4684 4685 /*New PentaVertexInpu*/ 4686 double values[3]; 4687 4688 /*Get values on the 6 vertices*/ 4689 for (int i=0;i<3;i++){ 4690 values[i]=vector[this->nodes[i]->GetVertexDof()]; 4691 } 4692 4693 /*update input*/ 4694 this->inputs->AddInput(new TriaVertexInput(name,values)); 4695 return; 4696 4697 default: 4698 4699 ISSMERROR("type %i (%s) not implemented yet",type,EnumAsString(type)); 4700 } 4669 4701 } 4670 4702 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.h
r3887 r3920 48 48 int Enum(); 49 49 int Id(); 50 bool IsInput(int name); 50 51 void Marshall(char** pmarshalled_dataset); 51 52 int MarshallSize(); -
issm/trunk/src/c/objects/Inputs/SingVertexInput.cpp
r3847 r3920 145 145 /*}}}*/ 146 146 /*FUNCTION SingVertexInput::GetParameterValue(double* pvalue){{{1*/ 147 void SingVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");} 147 void SingVertexInput::GetParameterValue(double* pvalue){ 148 *pvalue=value; 149 } 148 150 /*}}}*/ 149 151 /*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/
Note:
See TracChangeset
for help on using the changeset viewer.