Changeset 4459
- Timestamp:
- 07/08/10 10:41:19 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4440 r4459 5528 5528 } 5529 5529 /*}}}*/ 5530 /*FUNCTION Penta::GetParameterValue {{{1*/5530 /*FUNCTION Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord) {{{1*/ 5531 5531 void Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord){ 5532 5532 … … 5537 5537 5538 5538 *pvalue=l1l6[0]*v_list[0]+l1l6[1]*v_list[1]+l1l6[2]*v_list[2]+l1l6[3]*v_list[3]+l1l6[4]*v_list[4]+l1l6[5]*v_list[5]; 5539 } 5540 /*}}}*/ 5541 /*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype) {{{1*/ 5542 void Penta::GetParameterValue(double* pvalue,Node* node,int enumtype){ 5543 5544 /*Output*/ 5545 double value; 5546 5547 /*Intermediaries*/ 5548 const int numnodes=6; 5549 int grid=-1; 5550 int i; 5551 double gauss[numnodes][numnodes]={{1,0,0,0},{0,1,0,0},{0,0,1,0},{1,0,0,1},{0,1,0,1},{0,0,1,1}}; 5552 5553 /*go through 3 nodes (all nodes for tria) and identify 1st and 2nd nodes: */ 5554 ISSMASSERT(nodes); 5555 for(i=0;i<numnodes;i++){ 5556 if (node==nodes[i]){ 5557 grid=i; 5558 break; 5559 } 5560 } 5561 5562 /*Check that the node has been found*/ 5563 if (grid==-1) ISSMERROR("Node pointer not found in Penta's nodes"); 5564 5565 /*Get Parameter value on node*/ 5566 inputs->GetParameterValue(pvalue,&gauss[grid][0],enumtype); 5567 return; 5568 5539 5569 } 5540 5570 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r4434 r4459 159 159 void GetParameterDerivativeValue(double* p, double* p_list,double* xyz_list, double* gauss_coord); 160 160 void GetParameterValue(double* pvalue, double* v_list,double* gauss_coord); 161 void GetParameterValue(double* pvalue,Node* node,int enumtype); 161 162 void GetPhi(double* phi, double* epsilon, double viscosity); 162 163 void GetSolutionFromInputsDiagnosticHoriz(Vec solutiong); -
issm/trunk/src/c/objects/Loads/Pengrid.cpp
r4456 r4459 399 399 } 400 400 /*}}}*/ 401 /*FUNCTION Pengrid::GetParameterValue {{{1*/ 402 void Pengrid::GetParameterValue(double* pvalue,int enumtype){ 403 404 /*output: */ 405 double value; 406 407 /*dynamic objects pointed to by hooks: */ 408 Penta* penta=NULL; 409 Node* node=NULL; 410 411 /*recover objects from hooks: */ 412 penta=(Penta*)helement->delivers(); 413 node =(Node*)hnode->delivers(); 414 415 /*Get value on Element 1*/ 416 penta->GetParameterValue(&value,node,enumtype); 417 418 /*Assign output pointers:*/ 419 *pvalue=value; 420 } 421 /*}}}*/ 401 422 /*FUNCTION Pengrid::PenaltyConstrain {{{1*/ 402 423 void Pengrid::PenaltyConstrain(int* punstable){ … … 536 557 537 558 //recover slope: */ 538 penta->inputs->GetParameterValue(&slope[0],node,BedSlopeXEnum);539 penta->inputs->GetParameterValue(&slope[1],node,BedSlopeYEnum);559 this->GetParameterValue(&slope[0],BedSlopeXEnum); 560 this->GetParameterValue(&slope[1],BedSlopeYEnum); 540 561 541 562 /*recover parameters: */ -
issm/trunk/src/c/objects/Loads/Pengrid.h
r4396 r4459 70 70 void PenaltyCreateKMatrixDiagnosticStokes(Mat Kgg,double kmax); 71 71 void GetDofList(int* doflist,int* pnumberofdofspernode); 72 void GetParameterValue(double* pvalue,int enumtype); 72 73 void PenaltyCreateKMatrixThermal(Mat Kgg,double kmax); 73 74 void PenaltyCreateKMatrixMelting(Mat Kgg,double kmax);
Note:
See TracChangeset
for help on using the changeset viewer.