Changeset 4698
- Timestamp:
- 07/21/10 14:43:45 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/Inputs.cpp
r4547 r4698 95 95 input->GetParameterValue(pvalue,gauss); 96 96 } 97 }98 /*}}}*/99 /*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node, int enum_type){{{1*/100 void Inputs::GetParameterValue(double* pvalue,Node* node,int enum_type){101 102 /*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */103 104 vector<Object*>::iterator object;105 Input* input=NULL;106 bool found=false;107 108 /*Go through inputs and check whether any input with the same name is already in: */109 for ( object=objects.begin() ; object < objects.end(); object++ ){110 111 input=(Input*)(*object);112 if (input->EnumType()==enum_type){113 found=true;114 break;115 }116 }117 118 if (!found){119 /*we could not find an input with the correct enum type. No defaults values were provided,120 * error out: */121 ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));122 }123 124 /*Ok, we have an input if we made it here, request the input to return the values: */125 input->GetParameterValue(pvalue,node);126 }127 /*}}}*/128 /*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node1, Node* node2,int enum_type){{{1*/129 void Inputs::GetParameterValue(double* pvalue,Node* node1, Node* node2,double gauss_coord,int enum_type){130 131 /*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */132 133 vector<Object*>::iterator object;134 Input* input=NULL;135 bool found=false;136 137 /*Go through inputs and check whether any input with the same name is already in: */138 for ( object=objects.begin() ; object < objects.end(); object++ ){139 140 input=(Input*)(*object);141 if (input->EnumType()==enum_type){142 found=true;143 break;144 }145 }146 147 if (!found){148 /*we could not find an input with the correct enum type. No defaults values were provided,149 * error out: */150 ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));151 }152 153 /*Ok, we have an input if we made it here, request the input to return the values: */154 input->GetParameterValue(pvalue,node1,node2,gauss_coord);155 97 } 156 98 /*}}}*/ -
issm/trunk/src/c/Container/Inputs.h
r4236 r4698 37 37 void GetParameterValue(int* pvalue,int enum_type); 38 38 void GetParameterValue(double* pvalue,int enum_type); 39 void GetParameterValue(double* pvalue,Node* node,int enum_type);40 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord,int enum_type);41 39 void GetParameterValue(double* pvalue,double* gauss,int enum_type); 42 40 void GetParameterValue(double* pvalue,double* gauss,int enum_type,double defaultvalue); -
issm/trunk/src/c/modules/PenaltyConstraintsx/RiftConstraints.cpp
r4458 r4698 1 /*!\file RiftConstraints.cpp 2 * \brief: manage penalties for rifts 3 */ 4 5 #include "./PenaltyConstraintsLocal.h" 6 #include "../../EnumDefinitions/EnumDefinitions.h" 7 #include "../../include/include.h" 8 #include "../../shared/shared.h" 9 10 #define _ZIGZAGCOUNTER_ 11 12 int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,Loads* loads,int min_mechanical_constraints,int analysis_type){ 13 14 int num_unstable_constraints=0; 15 int converged=0; 16 int potential; 17 extern int my_rank; 18 ISSMERROR(" check analysis_type across all routine!"); 19 20 Constrain(&num_unstable_constraints,loads); 21 if(num_unstable_constraints==0)converged=1; 22 23 24 if(IsFrozen(loads)){ 25 converged=1; 26 num_unstable_constraints=0; 27 } 28 else if(num_unstable_constraints<=min_mechanical_constraints){ 29 _printf_(" freezing constraints\n"); 30 FreezeConstraints(loads); 31 } 32 33 /*Assign output pointers: */ 34 *pconverged=converged; 35 *pnum_unstable_constraints=num_unstable_constraints; 36 } 37 38 int IsMaterialStable(Loads* loads){ 39 40 int i; 41 42 Riftfront* riftfront=NULL; 43 int found=0; 44 int mpi_found=0; 45 46 /*go though loads, and if non-linearity of the material has converged, let all penalties know: */ 47 for (i=0;i<loads->Size();i++){ 48 49 if(RiftfrontEnum==loads->GetEnum(i)){ 50 51 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 52 53 if (riftfront->IsMaterialStable()){ 54 found=1; 55 /*do not break! all penalties should get informed the non-linearity converged!*/ 56 } 57 } 58 } 59 60 #ifdef _PARALLEL_ 61 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 62 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 63 found=mpi_found; 64 #endif 65 66 return found; 67 } 68 69 int RiftIsPresent(Loads* loads,int analysis_type){ 70 71 72 int i; 73 74 int found=0; 75 int mpi_found=0; 76 77 /*go though loads, and figure out if one of the loads is a Riftfront: */ 78 for (i=0;i<loads->Size();i++){ 79 Load* load=(Load*)loads->GetObjectByOffset(i); 80 if(load->InAnalysis(analysis_type)){ 81 if(RiftfrontEnum==loads->GetEnum(i)){ 82 found=1; 83 break; 84 } 85 } 86 } 87 88 #ifdef _PARALLEL_ 89 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 90 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 91 found=mpi_found; 92 #endif 93 94 return found; 95 } 96 97 int IsPreStable(Loads* loads){ 98 99 100 int i; 101 102 Riftfront* riftfront=NULL; 103 int found=0; 104 int mpi_found=0; 105 106 /*go though loads, and figure out if one of the penpair loads is still not stable: */ 107 for (i=0;i<loads->Size();i++){ 108 109 if(RiftfrontEnum==loads->GetEnum(i)){ 110 111 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 112 113 if (riftfront->PreStable()==0){ 114 found=1; 115 break; 116 } 117 } 118 } 119 120 #ifdef _PARALLEL_ 121 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 122 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 123 found=mpi_found; 124 #endif 125 126 if (found){ 127 /*We found an unstable constraint. : */ 128 return 0; 129 } 130 else{ 131 return 1; 132 } 133 } 134 135 int SetPreStable(Loads* loads){ 136 137 138 int i; 139 140 Riftfront* riftfront=NULL; 141 int found=0; 142 int mpi_found=0; 143 144 /*go though loads, and set loads to pre stable.:*/ 145 for (i=0;i<loads->Size();i++){ 146 147 if(RiftfrontEnum==loads->GetEnum(i)){ 148 149 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 150 riftfront->SetPreStable(); 151 } 152 } 153 } 154 155 int PreConstrain(int* pnum_unstable_constraints,Loads* loads){ 156 157 int i; 158 159 /* generic object pointer: */ 160 Riftfront* riftfront=NULL; 161 162 int unstable; 163 int sum_num_unstable_constraints; 164 int num_unstable_constraints=0; 165 166 /*Enforce constraints: */ 167 for (i=0;i<loads->Size();i++){ 168 169 if (RiftfrontEnum==loads->GetEnum(i)){ 170 171 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 172 173 riftfront->PreConstrain(&unstable); 174 175 num_unstable_constraints+=unstable; 176 } 177 } 178 179 #ifdef _PARALLEL_ 180 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 181 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); 182 num_unstable_constraints=sum_num_unstable_constraints; 183 #endif 184 185 /*Assign output pointers: */ 186 *pnum_unstable_constraints=num_unstable_constraints; 187 188 } 189 190 int Constrain(int* pnum_unstable_constraints,Loads* loads){ 191 192 int i; 193 194 /* generic object pointer: */ 195 Riftfront* riftfront=NULL; 196 197 int unstable; 198 int sum_num_unstable_constraints; 199 int num_unstable_constraints=0; 200 201 /*Enforce constraints: */ 202 for (i=0;i<loads->Size();i++){ 203 204 if (RiftfrontEnum==loads->GetEnum(i)){ 205 206 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 207 208 riftfront->Constrain(&unstable); 209 210 num_unstable_constraints+=unstable; 211 } 212 } 213 214 #ifdef _PARALLEL_ 215 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 216 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); 217 num_unstable_constraints=sum_num_unstable_constraints; 218 #endif 219 220 /*Assign output pointers: */ 221 *pnum_unstable_constraints=num_unstable_constraints; 222 223 } 224 225 void FreezeConstraints(Loads* loads){ 226 227 int i; 228 229 /* generic object pointer: */ 230 Riftfront* riftfront=NULL; 231 232 /*Enforce constraints: */ 233 for (i=0;i<loads->Size();i++){ 234 235 if (RiftfrontEnum==loads->GetEnum(i)){ 236 237 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 238 239 riftfront->FreezeConstraints(); 240 241 } 242 } 243 244 } 245 246 int IsFrozen(Loads* loads){ 247 248 int i; 249 250 /* generic object pointer: */ 251 Riftfront* riftfront=NULL; 252 int found=0; 253 int mpi_found=0; 254 255 /*Enforce constraints: */ 256 for (i=0;i<loads->Size();i++){ 257 258 if (RiftfrontEnum==loads->GetEnum(i)){ 259 260 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 261 if (riftfront->IsFrozen()){ 262 found=1; 263 break; 264 } 265 } 266 } 267 268 /*Is there just one found? that would mean we have frozen! : */ 269 #ifdef _PARALLEL_ 270 MPI_Reduce (&found,&mpi_found,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 271 MPI_Bcast(&mpi_found,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 272 found=mpi_found; 273 #endif 274 275 return found; 276 } 277 278 int MaxPenetrationInInputs(Loads* loads){ 279 280 int i; 281 282 /* generic object pointer: */ 283 Riftfront* riftfront=NULL; 284 285 /*rift penetration: */ 286 double max_penetration=0; 287 double mpi_max_penetration; 288 double penetration; 289 290 /*Ok, we are going to find the grid pairs which are not penetrating, even though they 291 * are penalised. We will release only the one with has least <0 penetration. : */ 292 293 max_penetration=0; 294 for (i=0;i<loads->Size();i++){ 295 296 if (RiftfrontEnum==loads->GetEnum(i)){ 297 298 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 299 300 riftfront->MaxPenetration(&penetration); 301 302 if (penetration>max_penetration)max_penetration=penetration; 303 } 304 } 305 306 #ifdef _PARALLEL_ 307 MPI_Reduce (&max_penetration,&mpi_max_penetration,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 308 MPI_Bcast(&mpi_max_penetration,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 309 max_penetration=mpi_max_penetration; 310 #endif 311 312 /*feed max_penetration to inputs: */ 313 for(i=0;i<loads->Size();i++){ 314 Load* load=(Load*)loads->GetObjectByOffset(i); 315 load->InputUpdateFromVector(&max_penetration,MaxPenetrationEnum,ConstantEnum); 316 } 317 } 318 319 int PotentialUnstableConstraints(Loads* loads){ 320 321 int i; 322 323 /* generic object pointer: */ 324 Riftfront* riftfront=NULL; 325 326 /*Ok, we are going to find the grid pairs which are not penetrating, even though they 327 * are penalised. We will release only the one with has least <0 penetration. : */ 328 int unstable=0; 329 int sum_num_unstable_constraints=0; 330 int num_unstable_constraints=0; 331 332 for (i=0;i<loads->Size();i++){ 333 334 if (RiftfrontEnum==loads->GetEnum(i)){ 335 336 riftfront=(Riftfront*)loads->GetObjectByOffset(i); 337 338 riftfront->PotentialUnstableConstraint(&unstable); 339 340 num_unstable_constraints+=unstable; 341 } 342 } 343 344 #ifdef _PARALLEL_ 345 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 346 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); 347 num_unstable_constraints=sum_num_unstable_constraints; 348 #endif 349 350 return num_unstable_constraints; 351 } 1 s: -
issm/trunk/src/c/objects/Elements/Tria.cpp
r4691 r4698 5233 5233 } 5234 5234 /*}}}*/ 5235 /*FUNCTION Tria::GetParameterValue(double* pvalue,Node* node,int enumtype) {{{1*/ 5236 void Tria::GetParameterValue(double* pvalue,Node* node,int enumtype){ 5237 5238 /*Output*/ 5239 double value; 5240 5241 /*Intermediaries*/ 5242 const int numnodes=3; 5243 int i; 5244 double gauss_tria[numnodes]={0.0}; 5245 5246 /*go through 3 nodes (all nodes for tria) and identify node: */ 5247 ISSMASSERT(nodes); 5248 for(i=0;i<numnodes;i++){ 5249 if (node==nodes[i]){ 5250 5251 /*OK we have found the node, update the gauss point and get value*/ 5252 gauss_tria[i]=1.0; 5253 5254 /*Recover input*/ 5255 this->inputs->GetParameterValue(&value, &gauss_tria[0],enumtype); 5256 5257 /*Assign output pointers:*/ 5258 *pvalue=value; 5259 return; 5260 5261 } 5262 } 5263 5264 /*If we reach tis point, the node provided has not been found;*/ 5265 ISSMERROR("The node provided are either the same or did not match current Tria nodes"); 5266 } 5267 /*}}}*/ 5235 5268 /*FUNCTION Tria::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype) {{{1*/ 5236 5269 void Tria::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype){ -
issm/trunk/src/c/objects/Elements/Tria.h
r4651 r4698 151 151 void GetParameterDerivativeValue(double* p, double* plist,double* xyz_list, double* gauss_l1l2l3); 152 152 void GetParameterValue(double* pp, double* plist, double* gauss_l1l2l3); 153 void GetParameterValue(double* pvalue,Node* node,int enumtype); 153 154 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype); 154 155 void GetSolutionFromInputsDiagnosticHoriz(Vec solution); -
issm/trunk/src/c/objects/Inputs/BeamVertexInput.cpp
r4546 r4698 186 186 void BeamVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");} 187 187 /*}}}*/ 188 /*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/189 void BeamVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}190 /*}}}*/191 /*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/192 void BeamVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}193 /*}}}*/194 188 /*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ 195 189 void BeamVertexInput::GetParameterValue(double* pvalue,double* gauss){ -
issm/trunk/src/c/objects/Inputs/BeamVertexInput.h
r4471 r4698 48 48 void GetParameterValue(int* pvalue); 49 49 void GetParameterValue(double* pvalue); 50 void GetParameterValue(double* pvalue,Node* node);51 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);52 50 void GetParameterValue(double* pvalue,double* gauss); 53 51 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue); -
issm/trunk/src/c/objects/Inputs/BoolInput.cpp
r4546 r4698 196 196 void BoolInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");} 197 197 /*}}}*/ 198 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,Node* node){{{1*/199 void BoolInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}200 /*}}}*/201 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/202 void BoolInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}203 /*}}}*/204 198 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ 205 199 void BoolInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");} -
issm/trunk/src/c/objects/Inputs/BoolInput.h
r4471 r4698 48 48 void GetParameterValue(int* pvalue); 49 49 void GetParameterValue(double* pvalue); 50 void GetParameterValue(double* pvalue,Node* node);51 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);52 50 void GetParameterValue(double* pvalue,double* gauss); 53 51 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue); -
issm/trunk/src/c/objects/Inputs/DoubleInput.cpp
r4546 r4698 209 209 } 210 210 /*}}}*/ 211 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,Node* node){{{1*/212 void DoubleInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}213 /*}}}*/214 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/215 void DoubleInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}216 /*}}}*/217 211 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ 218 212 void DoubleInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");} -
issm/trunk/src/c/objects/Inputs/DoubleInput.h
r4471 r4698 47 47 void GetParameterValue(int* pvalue); 48 48 void GetParameterValue(double* pvalue); 49 void GetParameterValue(double* pvalue,Node* node);50 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);51 49 void GetParameterValue(double* pvalue,double* gauss); 52 50 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue); -
issm/trunk/src/c/objects/Inputs/Input.h
r4471 r4698 25 25 virtual void GetParameterValue(int* pvalue)=0; 26 26 virtual void GetParameterValue(double* pvalue)=0; 27 virtual void GetParameterValue(double* pvalue,Node* node)=0;28 virtual void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord)=0;29 27 virtual void GetParameterValue(double* pvalue,double* gauss)=0; 30 28 virtual void GetParameterValue(double* pvalue,double* gauss,double defaultvalue)=0; -
issm/trunk/src/c/objects/Inputs/IntInput.cpp
r4546 r4698 195 195 } 196 196 /*}}}*/ 197 /*FUNCTION IntInput::GetParameterValue(double* pvalue,Node* node){{{1*/198 void IntInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}199 /*}}}*/200 /*FUNCTION IntInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/201 void IntInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}202 /*}}}*/203 197 /*FUNCTION IntInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ 204 198 void IntInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");} -
issm/trunk/src/c/objects/Inputs/IntInput.h
r4471 r4698 48 48 void GetParameterValue(int* pvalue); 49 49 void GetParameterValue(double* pvalue); 50 void GetParameterValue(double* pvalue,Node* node);51 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);52 50 void GetParameterValue(double* pvalue,double* gauss); 53 51 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue); -
issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp
r4546 r4698 218 218 /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue){{{1*/ 219 219 void PentaVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");} 220 /*}}}*/221 /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/222 void PentaVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}223 /*}}}*/224 /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/225 void PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}226 220 /*}}}*/ 227 221 /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ -
issm/trunk/src/c/objects/Inputs/PentaVertexInput.h
r4471 r4698 47 47 void GetParameterValue(int* pvalue); 48 48 void GetParameterValue(double* pvalue); 49 void GetParameterValue(double* pvalue,Node* node);50 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);51 49 void GetParameterValue(double* pvalue,double* gauss); 52 50 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue); -
issm/trunk/src/c/objects/Inputs/SingVertexInput.cpp
r4546 r4698 179 179 } 180 180 /*}}}*/ 181 /*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/182 void SingVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}183 /*}}}*/184 /*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/185 void SingVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}186 /*}}}*/187 181 /*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ 188 182 void SingVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");} -
issm/trunk/src/c/objects/Inputs/SingVertexInput.h
r4471 r4698 47 47 void GetParameterValue(int* pvalue); 48 48 void GetParameterValue(double* pvalue); 49 void GetParameterValue(double* pvalue,Node* node);50 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);51 49 void GetParameterValue(double* pvalue,double* gauss); 52 50 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue); -
issm/trunk/src/c/objects/Inputs/TriaVertexInput.h
r4471 r4698 49 49 void GetParameterValue(double* pvalue){ISSMERROR("not implemented yet");} 50 50 51 void GetParameterValue(double* pvalue,Node* node){ISSMERROR("not implemented yet");}52 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR("not implemented yet");}53 51 void GetParameterValue(double* pvalue,double* gauss); 54 52 void GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR("not implemented yet");} -
issm/trunk/src/c/objects/Loads/Riftfront.cpp
r4696 r4698 377 377 378 378 /*Recover thickness: */ 379 tria1-> inputs->GetParameterValue(&h[0],nodes[0],ThicknessEnum);380 tria2-> inputs->GetParameterValue(&h[1],nodes[1],ThicknessEnum);379 tria1->GetParameterValue(&h[0],nodes[0],ThicknessEnum); 380 tria2->GetParameterValue(&h[1],nodes[1],ThicknessEnum); 381 381 382 382 if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts"); … … 504 504 505 505 /*get thickness: */ 506 tria1-> inputs->GetParameterValue(&h[0],nodes[0],ThicknessEnum);507 tria2-> inputs->GetParameterValue(&h[1],nodes[1],ThicknessEnum);506 tria1->GetParameterValue(&h[0],nodes[0],ThicknessEnum); 507 tria2->GetParameterValue(&h[1],nodes[1],ThicknessEnum); 508 508 509 509 if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts"); 510 510 thickness=h[0]; 511 511 512 tria1-> inputs->GetParameterValue(&b[0],nodes[0],BedEnum);513 tria2-> inputs->GetParameterValue(&b[1],nodes[1],BedEnum);512 tria1->GetParameterValue(&b[0],nodes[0],BedEnum); 513 tria2->GetParameterValue(&b[1],nodes[1],BedEnum); 514 514 515 515 if (b[0]!=b[1])ISSMERROR(" different beds not supported for rift fronts"); … … 619 619 620 620 /*First recover velocity: */ 621 tria1-> inputs->GetParameterValue(&vx1,nodes[0],VxEnum);622 tria2-> inputs->GetParameterValue(&vx2,nodes[1],VxEnum);623 tria1-> inputs->GetParameterValue(&vy1,nodes[0],VyEnum);624 tria2-> inputs->GetParameterValue(&vy2,nodes[1],VyEnum);621 tria1->GetParameterValue(&vx1,nodes[0],VxEnum); 622 tria2->GetParameterValue(&vx2,nodes[1],VxEnum); 623 tria1->GetParameterValue(&vy1,nodes[0],VyEnum); 624 tria2->GetParameterValue(&vy2,nodes[1],VyEnum); 625 625 626 626 /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 749 749 750 750 /*recover velocity: */ 751 tria1-> inputs->GetParameterValue(&vx1,nodes[0],VxEnum);752 tria2-> inputs->GetParameterValue(&vx2,nodes[1],VxEnum);753 tria1-> inputs->GetParameterValue(&vy1,nodes[0],VyEnum);754 tria2-> inputs->GetParameterValue(&vy2,nodes[1],VyEnum);751 tria1->GetParameterValue(&vx1,nodes[0],VxEnum); 752 tria2->GetParameterValue(&vx2,nodes[1],VxEnum); 753 tria1->GetParameterValue(&vy1,nodes[0],VyEnum); 754 tria2->GetParameterValue(&vy2,nodes[1],VyEnum); 755 755 756 756 /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 811 811 812 812 /*First recover velocity: */ 813 tria1-> inputs->GetParameterValue(&vx1,nodes[0],VxEnum);814 tria2-> inputs->GetParameterValue(&vx2,nodes[1],VxEnum);815 tria1-> inputs->GetParameterValue(&vy1,nodes[0],VyEnum);816 tria2-> inputs->GetParameterValue(&vy2,nodes[1],VyEnum);813 tria1->GetParameterValue(&vx1,nodes[0],VxEnum); 814 tria2->GetParameterValue(&vx2,nodes[1],VxEnum); 815 tria1->GetParameterValue(&vy1,nodes[0],VyEnum); 816 tria2->GetParameterValue(&vy2,nodes[1],VyEnum); 817 817 818 818 /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 861 861 862 862 /*First recover velocity: */ 863 tria1-> inputs->GetParameterValue(&vx1,nodes[0],VxEnum);864 tria2-> inputs->GetParameterValue(&vx2,nodes[1],VxEnum);865 tria1-> inputs->GetParameterValue(&vy1,nodes[0],VyEnum);866 tria2-> inputs->GetParameterValue(&vy2,nodes[1],VyEnum);863 tria1->GetParameterValue(&vx1,nodes[0],VxEnum); 864 tria2->GetParameterValue(&vx2,nodes[1],VxEnum); 865 tria1->GetParameterValue(&vy1,nodes[0],VyEnum); 866 tria2->GetParameterValue(&vy2,nodes[1],VyEnum); 867 867 868 868 /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 917 917 918 918 /*First recover velocity: */ 919 tria1-> inputs->GetParameterValue(&vx1,nodes[0],VxEnum);920 tria2-> inputs->GetParameterValue(&vx2,nodes[1],VxEnum);921 tria1-> inputs->GetParameterValue(&vy1,nodes[0],VyEnum);922 tria2-> inputs->GetParameterValue(&vy2,nodes[1],VyEnum);919 tria1->GetParameterValue(&vx1,nodes[0],VxEnum); 920 tria2->GetParameterValue(&vx2,nodes[1],VxEnum); 921 tria1->GetParameterValue(&vy1,nodes[0],VyEnum); 922 tria2->GetParameterValue(&vy2,nodes[1],VyEnum); 923 923 924 924 /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
Note:
See TracChangeset
for help on using the changeset viewer.