Changeset 17310
- Timestamp:
- 02/20/14 08:12:01 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r17309 r17310 138 138 /*}}}*/ 139 139 140 void Seg::GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){/*{{{*/ 141 142 /* Intermediaries */ 143 int nrfrontnodes,index; 144 IssmDouble levelset[NUMVERTICES]; 145 146 /*Recover parameters and values*/ 147 GetInputListOnVertices(&levelset[0],levelsetenum); 148 /* Get nodes where there is no ice */ 149 nrfrontnodes=0; 150 for(int i=0;i<NUMVERTICES;i++){ 151 if(levelset[i]>=0.){ 152 index=i; 153 nrfrontnodes++; 154 } 155 } 156 157 _assert_(nrfrontnodes==1); 158 159 IssmDouble* xyz_front = xNew<IssmDouble>(3); 160 161 /* Return nodes */ 162 for(int dir=0;dir<3;dir++){ 163 xyz_front[dir]=xyz_list[3*index+dir]; 164 } 165 166 *pxyz_front=xyz_front; 167 }/*}}}*/ 140 168 /*FUNCTION Seg::GetNumberOfNodes;{{{*/ 141 169 int Seg::GetNumberOfNodes(void){ … … 209 237 } 210 238 /*}}}*/ 239 /*FUNCTION Seg::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){{{*/ 240 Gauss* Seg::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){ 241 242 /*Output*/ 243 Gauss* gauss = NULL; 244 245 if(xyz_list_front[0] == xyz_list[0]){ 246 gauss = new GaussSeg(+1.); 247 } 248 else if(xyz_list_front[0] == xyz_list[3*1+0]){ 249 gauss = new GaussSeg(-1.); 250 } 251 else{ 252 _error_("front is not located on element edge"); 253 } 254 255 return gauss; 256 } 257 /*}}}*/ 211 258 /*FUNCTION Seg::NewElementVector{{{*/ 212 259 ElementVector* Seg::NewElementVector(int approximation_enum){ … … 235 282 } 236 283 /*}}}*/ 284 /*FUNCTION Seg::NormalSection{{{*/ 285 void Seg::NormalSection(IssmDouble* normal,IssmDouble* xyz_list_front){ 286 287 IssmDouble* xyz_list = xNew<IssmDouble>(NUMVERTICES*3); 288 ::GetVerticesCoordinates(xyz_list,this->vertices,NUMVERTICES); 289 290 if(xyz_list_front[0]>xyz_list[0]) 291 normal[0]= + 1.; 292 else 293 normal[0]= - 1.; 294 295 xDelete<IssmDouble>(xyz_list); 296 } 297 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17309 r17310 109 109 void NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");}; 110 110 bool IsIceInElement(); 111 void NormalSection(IssmDouble* normal,IssmDouble* xyz_list) {_error_("not implemented yet");};111 void NormalSection(IssmDouble* normal,IssmDouble* xyz_list); 112 112 void NormalTop(IssmDouble* normal,IssmDouble* xyz_list){_error_("not implemented yet");}; 113 113 void NormalBase(IssmDouble* normal,IssmDouble* xyz_list){_error_("not implemented yet");}; … … 136 136 Gauss* NewGauss(void); 137 137 Gauss* NewGauss(int order); 138 Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order) {_error_("not implemented yet");};138 Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order); 139 139 Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){_error_("not implemented yet");}; 140 140 Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");}; … … 151 151 bool IsIcefront(void); 152 152 void ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented");}; 153 void GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum) {_error_("not implemented");};153 void GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum); 154 154 void GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");}; 155 155 -
issm/trunk-jpl/src/c/classes/gauss/GaussSeg.cpp
r17309 r17310 46 46 xDelete<IssmPDouble>(pcoords1); 47 47 xDelete<IssmPDouble>(pweights); 48 49 /*Initialize static fields as undefinite*/ 50 weight=UNDEF; 51 coord1=UNDEF; 52 } 53 /*}}}*/ 54 /*FUNCTION GaussSeg::GaussSeg(IssmDouble position) {{{*/ 55 GaussSeg::GaussSeg(IssmDouble position){ 56 57 /*Get gauss points*/ 58 this->numgauss = 1; 59 this->coords1=xNew<IssmDouble>(numgauss); 60 this->weights=xNew<IssmDouble>(numgauss); 61 62 /*cast : */ 63 _assert_(position>=-1. && position<=+1.); 64 this->coords1[0]=position; 65 this->weights[0]=1.; 48 66 49 67 /*Initialize static fields as undefinite*/ -
issm/trunk-jpl/src/c/classes/gauss/GaussSeg.h
r17309 r17310 25 25 GaussSeg(); 26 26 GaussSeg(int order); 27 GaussSeg(IssmDouble position); 27 28 ~GaussSeg(); 28 29
Note:
See TracChangeset
for help on using the changeset viewer.