Changeset 22758 for issm/trunk/src/c/classes/Constraints/SpcStatic.cpp
- Timestamp:
- 05/10/18 10:24:27 (7 years ago)
- Location:
- issm/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c
- Property svn:ignore
-
old new 20 20 kriging 21 21 issm_slr 22 issm_ocean 23 lnb_param.mod 24 lovenb_sub.mod 25 model.mod 26 util.mod
-
- Property svn:ignore
-
issm/trunk/src/c/classes/Constraints/SpcStatic.cpp
r21341 r22758 18 18 } 19 19 /*}}}*/ 20 SpcStatic::SpcStatic(int spc_ sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){/*{{{*/20 SpcStatic::SpcStatic(int spc_id,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){/*{{{*/ 21 21 22 sid = spc_sid;22 id = spc_id; 23 23 nodeid = spc_nodeid; 24 24 dof = spc_dof; … … 40 40 SpcStatic* spcstat = new SpcStatic(*this); 41 41 42 spcstat-> sid=this->sid;42 spcstat->id=this->id; 43 43 spcstat->nodeid=this->nodeid; 44 44 spcstat->dof=this->dof; … … 52 52 53 53 _printf_("SpcStatic:\n"); 54 _printf_(" sid: " << sid << "\n");54 _printf_(" id: " << id << "\n"); 55 55 _printf_(" nodeid: " << nodeid << "\n"); 56 56 _printf_(" dof: " << dof << "\n"); … … 63 63 64 64 _printf_("SpcStatic:\n"); 65 _printf_(" sid: " << sid << "\n");65 _printf_(" id: " << id << "\n"); 66 66 _printf_(" nodeid: " << nodeid << "\n"); 67 67 _printf_(" dof: " << dof << "\n"); … … 71 71 } 72 72 /*}}}*/ 73 int SpcStatic::Id(void){ return sid; }/*{{{*/73 int SpcStatic::Id(void){ return id; }/*{{{*/ 74 74 /*}}}*/ 75 75 void SpcStatic::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/ … … 77 77 MARSHALLING_ENUM(SpcStaticEnum); 78 78 79 MARSHALLING( sid);79 MARSHALLING(id); 80 80 MARSHALLING(nodeid); 81 81 MARSHALLING(dof); … … 100 100 void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/ 101 101 102 Node* node=NULL;103 104 102 /*Chase through nodes and find the node to which this SpcStatic applys: */ 105 node=(Node*)nodes->GetObjectById(NULL,nodeid);103 Node* node=(Node*)nodes->GetObjectById(NULL,nodeid); 106 104 107 105 /*Apply constraint: */ … … 114 112 if (in_analysis_type==this->analysis_type) return true; 115 113 else return false; 114 } 115 /*}}}*/ 116 void SpcStatic::InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){/*{{{*/ 117 118 /*Only update if this is a constraint parameter*/ 119 if(name != BalancethicknessSpcthicknessEnum) return; 120 121 /*Chase through nodes and find the node to which this SpcStatic applys: */ 122 Node* node=(Node*)nodes->GetObjectById(NULL,nodeid); 123 124 /*Apply constraint: */ 125 if(node){ //in case the spc is dealing with a node on another cpu 126 int sid = node->Sid(); 127 this->value = vector[sid]; 128 _assert_(!xIsNan<IssmDouble>(this->value)); 129 } 116 130 } 117 131 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.