Changeset 24939
- Timestamp:
- 05/31/20 21:34:58 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r24933 r24939 1287 1287 return kappa; 1288 1288 }/*}}}*/ 1289 void EnthalpyAnalysis::GetBAdvec(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/1290 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1.1291 * For node i, Bi' can be expressed in the actual coordinate system1292 * by:1293 * Bi_advec =[ h ]1294 * [ h ]1295 * [ h ]1296 * where h is the interpolation function for node i.1297 *1298 * We assume B has been allocated already, of size: 3x(1*NUMNODESP1)1299 */1300 1301 /*Fetch number of nodes for this finite element*/1302 int numnodes = element->GetNumberOfNodes();1303 1304 /*Get nodal functions*/1305 IssmDouble* basis=xNew<IssmDouble>(numnodes);1306 element->NodalFunctions(basis,gauss);1307 1308 /*Build B: */1309 for(int i=0;i<numnodes;i++){1310 B[numnodes*0+i] = basis[i];1311 B[numnodes*1+i] = basis[i];1312 B[numnodes*2+i] = basis[i];1313 }1314 1315 /*Clean-up*/1316 xDelete<IssmDouble>(basis);1317 }/*}}}*/1318 void EnthalpyAnalysis::GetBAdvecprime(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/1319 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1.1320 * For node i, Bi' can be expressed in the actual coordinate system1321 * by:1322 * Biprime_advec=[ dh/dx ]1323 * [ dh/dy ]1324 * [ dh/dz ]1325 * where h is the interpolation function for node i.1326 *1327 * We assume B has been allocated already, of size: 3x(1*numnodes)1328 */1329 1330 /*Fetch number of nodes for this finite element*/1331 int numnodes = element->GetNumberOfNodes();1332 1333 /*Get nodal functions derivatives*/1334 IssmDouble* dbasis=xNew<IssmDouble>(3*numnodes);1335 element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss);1336 1337 /*Build B: */1338 for(int i=0;i<numnodes;i++){1339 B[numnodes*0+i] = dbasis[0*numnodes+i];1340 B[numnodes*1+i] = dbasis[1*numnodes+i];1341 B[numnodes*2+i] = dbasis[2*numnodes+i];1342 }1343 1344 /*Clean-up*/1345 xDelete<IssmDouble>(dbasis);1346 }/*}}}*/1347 1289 void EnthalpyAnalysis::GetBasalConstraints(Vector<IssmDouble>* vec_spc,Element* element){/*{{{*/ 1348 1290 -
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.h
r24335 r24939 41 41 static IssmDouble EnthalpyDiffusionParameter(Element* element,IssmDouble enthalpy,IssmDouble pressure); 42 42 static IssmDouble EnthalpyDiffusionParameterVolume(Element* element,int enthalpy_enum); 43 void GetBAdvec(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss);44 void GetBAdvecprime(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss);45 43 static void GetBasalConstraints(Vector<IssmDouble>* vec_spc,Element* element); 46 44 static void GetBasalConstraintsSteadystate(Vector<IssmDouble>* vec_spc,Element* element); -
issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.cpp
r24935 r24939 76 76 void DoubleInput2::GetInput(IssmDouble* pvalue,int index){/*{{{*/ 77 77 78 if(index<0){79 printf("-------------- file: DoubleInput2.cpp line: %g\n",__LINE__);80 }81 78 _assert_(index>=0); 82 79 _assert_(index<this->size); -
issm/trunk-jpl/src/c/classes/Inputs2/IntInput2.cpp
r24335 r24939 76 76 void IntInput2::GetInput(int* pvalue,int index){/*{{{*/ 77 77 78 if(index<0){79 printf("-------------- file: IntInput2.cpp line: %i\n",__LINE__);80 int* temp = xNew<int>(3);81 }82 78 _assert_(index>=0); 83 79 _assert_(index<this->size);
Note:
See TracChangeset
for help on using the changeset viewer.