Changeset 24712
- Timestamp:
- 04/16/20 19:38:06 (5 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Constraints
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp
r24106 r24712 104 104 105 105 /*Apply constraint: */ 106 if( node){ //in case the spc is dealing with a node on another cpu106 if(!this->penalty && node){ //in case the spc is dealing with a node on another cpu 107 107 node->ApplyConstraint(dof,value); 108 108 } … … 125 125 } 126 126 /*}}}*/ 127 void SpcStatic::PenaltyDofAndValue(int* pdof,IssmDouble* pvalue,Nodes* nodes,Parameters* parameters){/*{{{*/ 128 129 if(!this->penalty) _error_("cannot return dof and value for non penalty constraint"); 130 131 IssmDouble value_out = this->value; 132 int gdof; 133 134 /*Chase through nodes and find the node to which this SpcTransient applys: */ 135 Node* node=(Node*)nodes->GetObjectById(NULL,nodeid); 136 137 if(node){ //in case the spc is dealing with a node on another cpu 138 139 /*Get gdof */ 140 gdof = node->GetDof(dof,GsetEnum); 141 if(xIsNan<IssmDouble>(value_out)) gdof = -1; 142 } 143 else{ 144 value_out = NAN; 145 gdof = -1; 146 } 147 148 /*Assign output pointers*/ 149 *pdof = gdof; 150 *pvalue = value_out; 151 } 152 /*}}}*/ 127 153 128 154 /*SpcStatic functions*/ -
issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.h
r23588 r24712 39 39 void ActivatePenaltyMethod(void); 40 40 void ConstrainNode(Nodes* nodes,Parameters* parameters); 41 void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters) {_error_("not implemented yet");};41 void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters); 42 42 void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type); 43 43 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.