Changeset 17874
- Timestamp:
- 04/29/14 10:12:30 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r17862 r17874 242 242 virtual int VelocityInterpolation()=0; 243 243 virtual int PressureInterpolation()=0; 244 virtual int TensorInterpolation()=0; 244 245 virtual bool IsZeroLevelset(int levelset_enum)=0; 245 246 virtual bool IsIcefront(void)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r17862 r17874 467 467 /*FUNCTION Penta::Delta18oParameterization{{{*/ 468 468 void Penta::Delta18oParameterization(void){ 469 /*Are we on the base? If not, return*/ 470 if(!IsOnBase()) return; 469 470 /*Are we on the base? If not, return*/ 471 if(!IsOnBase()) return; 471 472 472 473 int i; … … 1850 1851 1851 1852 _assert_(gauss->Enum()==GaussPentaEnum); 1852 this->GetNodalFunctionsDerivatives Velocity(dbasis,xyz_list,(GaussPenta*)gauss);1853 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussPenta*)gauss,this->VelocityInterpolation()); 1853 1854 1854 1855 } … … 1858 1859 1859 1860 _assert_(gauss->Enum()==GaussPentaEnum); 1860 this->GetNodalFunctions Velocity(basis,(GaussPenta*)gauss);1861 this->GetNodalFunctions(basis,(GaussPenta*)gauss,this->VelocityInterpolation()); 1861 1862 1862 1863 } … … 1866 1867 1867 1868 _assert_(gauss->Enum()==GaussPentaEnum); 1868 this->GetNodalFunctions Pressure(basis,(GaussPenta*)gauss);1869 this->GetNodalFunctions(basis,(GaussPenta*)gauss,this->PressureInterpolation()); 1869 1870 1870 1871 } … … 1874 1875 1875 1876 _assert_(gauss->Enum()==GaussPentaEnum); 1876 this->GetNodalFunctions Tensor(basis,(GaussPenta*)gauss);1877 this->GetNodalFunctions(basis,(GaussPenta*)gauss,this->TensorInterpolation()); 1877 1878 1878 1879 } -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r17862 r17874 92 92 int VelocityInterpolation(); 93 93 int PressureInterpolation(); 94 int TensorInterpolation(){_error_("not implemented yet");}; 94 95 bool IsZeroLevelset(int levelset_enum); 95 96 bool IsIcefront(void); -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
r17795 r17874 328 328 return; 329 329 default: 330 _error_("Element type "<<EnumToStringx( this->element_type)<<" not supported yet");330 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 331 331 } 332 332 } 333 333 /*}}}*/ 334 /*FUNCTION PentaRef::GetNodalFunctionsVelocity{{{*/ 335 void PentaRef::GetNodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss){ 336 /*This routine returns the values of the nodal functions at the gaussian point.*/ 337 338 int save = this->element_type; 339 this->element_type = VelocityInterpolation(); 340 this->GetNodalFunctions(basis,gauss); 341 this->element_type = save; 342 343 } 344 /*}}}*/ 345 /*FUNCTION PentaRef::GetNodalFunctionsPressure{{{*/ 346 void PentaRef::GetNodalFunctionsPressure(IssmDouble* basis,Gauss* gauss){ 347 /*This routine returns the values of the nodal functions at the gaussian point.*/ 348 349 int save = this->element_type; 350 this->element_type = PressureInterpolation(); 351 this->GetNodalFunctions(basis,gauss); 352 this->element_type = save; 353 354 } 355 /*}}}*/ 356 /*FUNCTION PentaRef::GetNodalFunctionsTensor{{{*/ 357 void PentaRef::GetNodalFunctionsTensor(IssmDouble* basis,Gauss* gauss){ 358 /*This routine returns the values of the nodal functions at the gaussian point.*/ 359 360 int save = this->element_type; 361 this->element_type = TensorInterpolation(); 362 this->GetNodalFunctions(basis,gauss); 363 this->element_type = save; 364 365 } 366 /*}}}*/ 367 /*FUNCTION PentaRef::GetNodalFunctionsDerivatives{{{*/ 334 /*FUNCTION PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){{{*/ 368 335 void PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){ 336 GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss,this->element_type); 337 } 338 /*}}}*/ 339 /*FUNCTION PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){{{*/ 340 void PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){ 369 341 370 342 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 373 345 374 346 /*Fetch number of nodes for this finite element*/ 375 int numnodes = this->NumberofNodes( );347 int numnodes = this->NumberofNodes(finiteelement); 376 348 377 349 /*Get nodal functions derivatives in reference triangle*/ 378 350 IssmDouble* dbasis_ref=xNew<IssmDouble>(3*numnodes); 379 GetNodalFunctionsDerivativesReference(dbasis_ref,gauss );351 GetNodalFunctionsDerivativesReference(dbasis_ref,gauss,finiteelement); 380 352 381 353 /*Get Jacobian invert: */ … … 397 369 /*Clean up*/ 398 370 xDelete<IssmDouble>(dbasis_ref); 399 400 } 401 /*}}}*/ 402 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesVelocity{{{*/ 403 void PentaRef::GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){ 404 405 int save = this->element_type; 406 this->element_type = VelocityInterpolation(); 407 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss); 408 this->element_type = save; 409 410 } 411 /*}}}*/ 412 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesPressure{{{*/ 413 void PentaRef::GetNodalFunctionsDerivativesPressure(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){ 414 415 int save = this->element_type; 416 this->element_type = PressureInterpolation(); 417 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss); 418 this->element_type = save; 419 } 420 /*}}}*/ 421 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesReference{{{*/ 422 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in){ 371 } 372 /*}}}*/ 373 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){{{*/ 374 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){ 375 GetNodalFunctionsDerivativesReference(dbasis,gauss,this->element_type); 376 } 377 /*}}}*/ 378 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){{{*/ 379 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){ 423 380 424 381 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 434 391 IssmDouble zeta=gauss->coord4; 435 392 436 switch( this->element_type){393 switch(finiteelement){ 437 394 case P0Enum: 438 395 /*Zero derivative*/ … … 837 794 return; 838 795 default: 839 _error_("Element type "<<EnumToStringx( this->element_type)<<" not supported yet");796 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 840 797 } 841 798 -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.h
r17536 r17874 24 24 void GetNodalFunctions(IssmDouble* basis, Gauss* gauss); 25 25 void GetNodalFunctions(IssmDouble* basis, Gauss* gauss,int finiteelement); 26 void GetNodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss);27 void GetNodalFunctionsPressure(IssmDouble* basis, Gauss* gauss);28 void GetNodalFunctionsTensor(IssmDouble* basis, Gauss* gauss);29 26 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss); 30 void GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss); 31 void GetNodalFunctionsDerivativesPressure(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss); 27 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss,int finiteelement); 32 28 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss); 29 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss,int finiteelement); 33 30 void GetNodalFunctionsP1(IssmDouble* l1l6, Gauss* gauss); 34 31 void GetNodalFunctionsMINI(IssmDouble* l1l7, Gauss* gauss); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17862 r17874 105 105 void ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");}; 106 106 int VelocityInterpolation(void){_error_("not implemented yet");}; 107 int TensorInterpolation(void){_error_("not implemented yet");}; 107 108 void GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");}; 108 109 IssmDouble GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/SegRef.cpp
r17623 r17874 91 91 _assert_(basis); 92 92 93 switch( element_type){93 switch(finiteelement){ 94 94 case P0Enum: 95 95 basis[0]=1.; … … 105 105 return; 106 106 default: 107 _error_("Element type "<<EnumToStringx( element_type)<<" not supported yet");107 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 108 108 } 109 109 } … … 179 179 return; 180 180 default: 181 _error_("Element type "<<EnumToStringx( this->element_type)<<" not supported yet");181 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 182 182 } 183 183 -
issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp
r17852 r17874 590 590 591 591 _assert_(gauss->Enum()==GaussTetraEnum); 592 this->GetNodalFunctions Velocity(basis,(GaussTetra*)gauss);592 this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->VelocityInterpolation()); 593 593 594 594 } … … 598 598 599 599 _assert_(gauss->Enum()==GaussTetraEnum); 600 this->GetNodalFunctions Pressure(basis,(GaussTetra*)gauss);600 this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->PressureInterpolation()); 601 601 602 602 } … … 606 606 607 607 _assert_(gauss->Enum()==GaussTetraEnum); 608 this->GetNodalFunctions Tensor(basis,(GaussTetra*)gauss);608 this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->TensorInterpolation()); 609 609 610 610 } … … 622 622 623 623 _assert_(gauss->Enum()==GaussTetraEnum); 624 this->GetNodalFunctionsDerivatives Velocity(dbasis,xyz_list,(GaussTetra*)gauss);624 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussTetra*)gauss,this->VelocityInterpolation()); 625 625 626 626 } … … 992 992 } 993 993 /*}}}*/ 994 /*FUNCTION Tetra::TensorInterpolation{{{*/ 995 int Tetra::TensorInterpolation(void){ 996 return TetraRef::TensorInterpolation(); 997 } 998 /*}}}*/ 994 999 /*FUNCTION Tetra::ZeroLevelsetCoordinates{{{*/ 995 1000 void Tetra::ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){ -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r17862 r17874 110 110 void ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");}; 111 111 int VelocityInterpolation(void); 112 int TensorInterpolation(void); 112 113 void GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");}; 113 114 IssmDouble GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/TetraRef.cpp
r17690 r17874 98 98 return; 99 99 default: 100 _error_("Element type "<<EnumToStringx(element_type)<<" not supported yet"); 101 } 102 } 103 /*}}}*/ 104 /*FUNCTION TetraRef::GetNodalFunctionsVelocity{{{*/ 105 void TetraRef::GetNodalFunctionsVelocity(IssmDouble* basis,GaussTetra* gauss){ 106 /*This routine returns the values of the nodal functions at the gaussian point.*/ 107 108 switch(this->element_type){ 109 case P1P1Enum: 110 this->element_type = P1Enum; 111 this->GetNodalFunctions(basis,gauss); 112 this->element_type = P1P1Enum; 113 return; 114 case P1P1GLSEnum: 115 this->element_type = P1Enum; 116 this->GetNodalFunctions(basis,gauss); 117 this->element_type = P1P1GLSEnum; 118 return; 119 case MINIcondensedEnum: 120 this->element_type = P1bubbleEnum; 121 this->GetNodalFunctions(basis,gauss); 122 this->element_type = MINIcondensedEnum; 123 return; 124 case MINIEnum: 125 this->element_type = P1bubbleEnum; 126 this->GetNodalFunctions(basis,gauss); 127 this->element_type = MINIEnum; 128 return; 129 case TaylorHoodEnum: 130 this->element_type = P2Enum; 131 this->GetNodalFunctions(basis,gauss); 132 this->element_type = TaylorHoodEnum; 133 return; 134 default: 135 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 136 } 137 } 138 /*}}}*/ 139 /*FUNCTION TetraRef::GetNodalFunctionsPressure{{{*/ 140 void TetraRef::GetNodalFunctionsPressure(IssmDouble* basis,GaussTetra* gauss){ 141 /*This routine returns the values of the nodal functions at the gaussian point.*/ 142 143 switch(this->element_type){ 144 case P1P1Enum: 145 this->element_type = P1Enum; 146 this->GetNodalFunctions(basis,gauss); 147 this->element_type = P1P1Enum; 148 return; 149 case P1P1GLSEnum: 150 this->element_type = P1Enum; 151 this->GetNodalFunctions(basis,gauss); 152 this->element_type = P1P1GLSEnum; 153 return; 154 case MINIcondensedEnum: 155 this->element_type = P1Enum; 156 this->GetNodalFunctions(basis,gauss); 157 this->element_type = MINIcondensedEnum; 158 return; 159 case MINIEnum: 160 this->element_type = P1Enum; 161 this->GetNodalFunctions(basis,gauss); 162 this->element_type = MINIEnum; 163 return; 164 case TaylorHoodEnum: 165 this->element_type = P1Enum; 166 this->GetNodalFunctions(basis,gauss); 167 this->element_type = TaylorHoodEnum; 168 return; 169 default: 170 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 171 } 172 } 173 /*}}}*/ 174 /*FUNCTION TetraRef::GetNodalFunctionsTensor{{{*/ 175 void TetraRef::GetNodalFunctionsTensor(IssmDouble* basis,GaussTetra* gauss){ 176 /*This routine returns the values of the nodal functions at the gaussian point.*/ 177 178 switch(this->element_type){ 179 case XTaylorHoodEnum: 180 this->element_type = P1DGEnum; 181 this->GetNodalFunctions(basis,gauss); 182 this->element_type = XTaylorHoodEnum; 183 return; 184 default: 185 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 100 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 186 101 } 187 102 } … … 226 141 } 227 142 /*}}}*/ 228 /*FUNCTION TetraRef::GetNodalFunctionsDerivativesPressure (THIS ONE and following ones){{{*/229 void TetraRef::GetNodalFunctionsDerivativesPressure(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){230 switch(this->element_type){231 case P1P1Enum:232 this->element_type = P1Enum;233 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);234 this->element_type = P1P1Enum;235 return;236 case P1P1GLSEnum:237 this->element_type = P1Enum;238 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);239 this->element_type = P1P1GLSEnum;240 return;241 case MINIcondensedEnum:242 this->element_type = P1Enum;243 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);244 this->element_type = MINIcondensedEnum;245 return;246 case MINIEnum:247 this->element_type = P1Enum;248 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);249 this->element_type = MINIEnum;250 return;251 case TaylorHoodEnum:252 this->element_type = P1Enum;253 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);254 this->element_type = TaylorHoodEnum;255 return;256 default:257 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");258 }259 }260 /*}}}*/261 /*FUNCTION TetraRef::GetNodalFunctionsDerivativesVelocity{{{*/262 void TetraRef::GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){263 switch(this->element_type){264 case P1P1Enum:265 this->element_type = P1Enum;266 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);267 this->element_type = P1P1Enum;268 return;269 case P1P1GLSEnum:270 this->element_type = P1Enum;271 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);272 this->element_type = P1P1GLSEnum;273 return;274 case MINIcondensedEnum:275 this->element_type = P1bubbleEnum;276 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);277 this->element_type = MINIcondensedEnum;278 return;279 case MINIEnum:280 this->element_type = P1bubbleEnum;281 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);282 this->element_type = MINIEnum;283 return;284 case TaylorHoodEnum:285 this->element_type = P2Enum;286 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);287 this->element_type = TaylorHoodEnum;288 return;289 default:290 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");291 }292 }293 /*}}}*/294 143 /*FUNCTION TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss){{{*/ 295 144 void TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss){ … … 395 244 return; 396 245 default: 397 _error_("Element type "<<EnumToStringx( this->element_type)<<" not supported yet");246 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 398 247 } 399 248 … … 629 478 630 479 return -1; 631 } 632 /*}}}*/ 480 }/*}}}*/ 481 /*FUNCTION TetraRef::TensorInterpolation{{{*/ 482 int TetraRef::TensorInterpolation(void){ 483 /*This routine returns the values of the nodal functions at the gaussian point.*/ 484 485 switch(this->element_type){ 486 case XTaylorHoodEnum: return P1DGEnum; 487 default: _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 488 } 489 } 490 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/TetraRef.h
r17536 r17874 29 29 void GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss); 30 30 void GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss,int finiteelement); 31 void GetNodalFunctionsVelocity(IssmDouble* basis, GaussTetra* gauss);32 void GetNodalFunctionsPressure(IssmDouble* basis, GaussTetra* gauss);33 void GetNodalFunctionsTensor(IssmDouble* basis, GaussTetra* gauss);34 31 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss); 35 32 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss,int finiteelement); 36 void GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,GaussTetra* gauss);37 void GetNodalFunctionsDerivativesPressure(IssmDouble* dbasis,IssmDouble* xyz_list,GaussTetra* gauss);38 33 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss); 39 34 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss,int finiteelement); … … 48 43 int VelocityInterpolation(void); 49 44 int PressureInterpolation(void); 45 int TensorInterpolation(void); 50 46 }; 51 47 #endif -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17863 r17874 1597 1597 1598 1598 _assert_(gauss->Enum()==GaussTriaEnum); 1599 this->GetNodalFunctionsDerivatives Velocity(dbasis,xyz_list,(GaussTria*)gauss);1599 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussTria*)gauss,this->VelocityInterpolation()); 1600 1600 1601 1601 } … … 1605 1605 1606 1606 _assert_(gauss->Enum()==GaussTriaEnum); 1607 this->GetNodalFunctions Velocity(basis,(GaussTria*)gauss);1607 this->GetNodalFunctions(basis,(GaussTria*)gauss,this->VelocityInterpolation()); 1608 1608 1609 1609 } … … 1613 1613 1614 1614 _assert_(gauss->Enum()==GaussTriaEnum); 1615 this->GetNodalFunctions Pressure(basis,(GaussTria*)gauss);1615 this->GetNodalFunctions(basis,(GaussTria*)gauss,this->PressureInterpolation()); 1616 1616 1617 1617 } … … 1621 1621 1622 1622 _assert_(gauss->Enum()==GaussTriaEnum); 1623 this->GetNodalFunctions Tensor(basis,(GaussTria*)gauss);1623 this->GetNodalFunctions(basis,(GaussTria*)gauss,this->TensorInterpolation()); 1624 1624 1625 1625 } … … 1702 1702 int Tria::PressureInterpolation(void){ 1703 1703 return TriaRef::PressureInterpolation(); 1704 } 1705 /*}}}*/ 1706 /*FUNCTION Tria::TensorInterpolation{{{*/ 1707 int Tria::TensorInterpolation(void){ 1708 return TriaRef::TensorInterpolation(); 1704 1709 } 1705 1710 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r17862 r17874 100 100 int VelocityInterpolation(); 101 101 int PressureInterpolation(); 102 int TensorInterpolation(); 102 103 IssmDouble SurfaceArea(void); 103 104 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement); -
issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp
r17549 r17874 212 212 return; 213 213 default: 214 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 215 } 216 } 217 /*}}}*/ 218 /*FUNCTION TriaRef::GetNodalFunctionsVelocity{{{*/ 219 void TriaRef::GetNodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss){ 220 /*This routine returns the values of the nodal functions at the gaussian point.*/ 221 222 switch(this->element_type){ 223 case P1P1Enum: 224 this->element_type = P1Enum; 225 this->GetNodalFunctions(basis,gauss); 226 this->element_type = P1P1Enum; 227 return; 228 case P1P1GLSEnum: 229 this->element_type = P1Enum; 230 this->GetNodalFunctions(basis,gauss); 231 this->element_type = P1P1GLSEnum; 232 return; 233 case MINIcondensedEnum: 234 this->element_type = P1bubbleEnum; 235 this->GetNodalFunctions(basis,gauss); 236 this->element_type = MINIcondensedEnum; 237 return; 238 case MINIEnum: 239 this->element_type = P1bubbleEnum; 240 this->GetNodalFunctions(basis,gauss); 241 this->element_type = MINIEnum; 242 return; 243 case TaylorHoodEnum: 244 this->element_type = P2Enum; 245 this->GetNodalFunctions(basis,gauss); 246 this->element_type = TaylorHoodEnum; 247 return; 248 case XTaylorHoodEnum: 249 this->element_type = P2Enum; 250 this->GetNodalFunctions(basis,gauss); 251 this->element_type = XTaylorHoodEnum; 252 return; 253 default: 254 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 255 } 256 } 257 /*}}}*/ 258 /*FUNCTION TriaRef::GetNodalFunctionsPressure{{{*/ 259 void TriaRef::GetNodalFunctionsPressure(IssmDouble* basis,Gauss* gauss){ 260 /*This routine returns the values of the nodal functions at the gaussian point.*/ 261 262 switch(this->element_type){ 263 case P1P1Enum: 264 this->element_type = P1Enum; 265 this->GetNodalFunctions(basis,gauss); 266 this->element_type = P1P1Enum; 267 return; 268 case P1P1GLSEnum: 269 this->element_type = P1Enum; 270 this->GetNodalFunctions(basis,gauss); 271 this->element_type = P1P1GLSEnum; 272 return; 273 case MINIcondensedEnum: 274 this->element_type = P1Enum; 275 this->GetNodalFunctions(basis,gauss); 276 this->element_type = MINIcondensedEnum; 277 return; 278 case MINIEnum: 279 this->element_type = P1Enum; 280 this->GetNodalFunctions(basis,gauss); 281 this->element_type = MINIEnum; 282 return; 283 case TaylorHoodEnum: 284 this->element_type = P1Enum; 285 this->GetNodalFunctions(basis,gauss); 286 this->element_type = TaylorHoodEnum; 287 return; 288 case XTaylorHoodEnum: 289 this->element_type = P1Enum; 290 this->GetNodalFunctions(basis,gauss); 291 this->element_type = XTaylorHoodEnum; 292 return; 293 default: 294 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 295 } 296 } 297 /*}}}*/ 298 /*FUNCTION TriaRef::GetNodalFunctionsTensor{{{*/ 299 void TriaRef::GetNodalFunctionsTensor(IssmDouble* basis,Gauss* gauss){ 300 /*This routine returns the values of the nodal functions at the gaussian point.*/ 301 302 switch(this->element_type){ 303 case XTaylorHoodEnum: 304 this->element_type = P1DGEnum; 305 this->GetNodalFunctions(basis,gauss); 306 this->element_type = XTaylorHoodEnum; 307 return; 308 default: 309 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 214 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 310 215 } 311 216 } … … 387 292 xDelete<IssmDouble>(dbasis_ref); 388 293 389 }390 /*}}}*/391 /*FUNCTION TriaRef::GetNodalFunctionsDerivativesPressure{{{*/392 void TriaRef::GetNodalFunctionsDerivativesPressure(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){393 switch(this->element_type){394 case P1P1Enum:395 this->element_type = P1Enum;396 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);397 this->element_type = P1P1Enum;398 return;399 case P1P1GLSEnum:400 this->element_type = P1Enum;401 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);402 this->element_type = P1P1GLSEnum;403 return;404 case MINIcondensedEnum:405 this->element_type = P1Enum;406 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);407 this->element_type = MINIcondensedEnum;408 return;409 case MINIEnum:410 this->element_type = P1Enum;411 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);412 this->element_type = MINIEnum;413 return;414 case TaylorHoodEnum:415 this->element_type = P1Enum;416 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);417 this->element_type = TaylorHoodEnum;418 return;419 default:420 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");421 }422 }423 /*}}}*/424 /*FUNCTION TriaRef::GetNodalFunctionsDerivativesVelocity{{{*/425 void TriaRef::GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){426 switch(this->element_type){427 case P1P1Enum:428 this->element_type = P1Enum;429 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);430 this->element_type = P1P1Enum;431 return;432 case P1P1GLSEnum:433 this->element_type = P1Enum;434 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);435 this->element_type = P1P1GLSEnum;436 return;437 case MINIcondensedEnum:438 this->element_type = P1bubbleEnum;439 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);440 this->element_type = MINIcondensedEnum;441 return;442 case MINIEnum:443 this->element_type = P1bubbleEnum;444 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);445 this->element_type = MINIEnum;446 return;447 case TaylorHoodEnum:448 case XTaylorHoodEnum:449 this->element_type = P2Enum;450 this->GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss);451 this->element_type = XTaylorHoodEnum;452 return;453 default:454 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");455 }456 294 } 457 295 /*}}}*/ … … 528 366 return; 529 367 default: 530 _error_("Element type "<<EnumToStringx( this->element_type)<<" not supported yet");368 _error_("Element type "<<EnumToStringx(finiteelement)<<" not supported yet"); 531 369 } 532 370 … … 683 521 684 522 return -1; 523 } 524 /*}}}*/ 525 /*FUNCTION TriaRef::TensorInterpolation{{{*/ 526 int TriaRef::TensorInterpolation(void){ 527 /*This routine returns the values of the nodal functions at the gaussian point.*/ 528 529 switch(this->element_type){ 530 case XTaylorHoodEnum: return P1DGEnum; 531 default: _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 532 } 685 533 } 686 534 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/TriaRef.h
r17536 r17874 29 29 void GetNodalFunctions(IssmDouble* basis,Gauss* gauss); 30 30 void GetNodalFunctions(IssmDouble* basis,Gauss* gauss,int finiteelement); 31 void GetNodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss);32 void GetNodalFunctionsPressure(IssmDouble* basis, Gauss* gauss);33 void GetNodalFunctionsTensor(IssmDouble* basis, Gauss* gauss);34 31 void GetSegmentNodalFunctions(IssmDouble* basis,Gauss* gauss, int index1,int index2); 35 32 void GetSegmentBFlux(IssmDouble* B,Gauss* gauss, int index1,int index2); … … 37 34 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss); 38 35 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement); 39 void GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);40 void GetNodalFunctionsDerivativesPressure(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);41 36 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss); 42 37 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss,int finiteelement); … … 52 47 int VelocityInterpolation(void); 53 48 int PressureInterpolation(void); 49 int TensorInterpolation(void); 54 50 }; 55 51 #endif
Note:
See TracChangeset
for help on using the changeset viewer.