Changeset 24431 for issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.cpp
- Timestamp:
- 12/04/19 21:11:16 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.cpp
r24429 r24431 207 207 ElementVector* ExtrapolationAnalysis::CreatePVector(Element* element){/*{{{*/ 208 208 return NULL; 209 210 }/*}}}*/211 void ExtrapolationAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss, int dim){/*{{{*/212 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.213 * For node i, Bi can be expressed in the actual coordinate system214 * by:215 * Bi=[ N ]216 * [ N ]217 * where N is the finiteelement function for node i.218 *219 * We assume B_prog has been allocated already, of size: 2x(NDOF1*numnodes)220 */221 222 /*Fetch number of nodes for this finite element*/223 int numnodes = element->GetNumberOfNodes();224 225 /*Get nodal functions*/226 IssmDouble* basis=xNew<IssmDouble>(numnodes);227 element->NodalFunctions(basis,gauss);228 229 /*Build B: */230 for(int i=0;i<numnodes;i++)231 for(int d=0;d<dim;d++)232 B[numnodes*d+i] = basis[i];233 234 /*Clean-up*/235 xDelete<IssmDouble>(basis);236 }/*}}}*/237 void ExtrapolationAnalysis::GetBprime(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss, int dim){/*{{{*/238 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2.239 * For node i, Bi' can be expressed in the actual coordinate system240 * by:241 * Bi_prime=[ dN/dx ]242 * [ dN/dy ]243 * where N is the finiteelement function for node i.244 *245 * We assume B' has been allocated already, of size: 3x(NDOF2*numnodes)246 */247 248 /*Fetch number of nodes for this finite element*/249 int numnodes = element->GetNumberOfNodes();250 251 /*Get nodal functions derivatives*/252 IssmDouble* dbasis=xNew<IssmDouble>(dim*numnodes);253 element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss);254 255 /*Build B': */256 for(int i=0;i<numnodes;i++)257 for(int d=0;d<dim;d++)258 Bprime[numnodes*d+i] = dbasis[d*numnodes+i];259 260 /*Clean-up*/261 xDelete<IssmDouble>(dbasis);262 263 209 }/*}}}*/ 264 210 void ExtrapolationAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ … … 288 234 } 289 235 }/*}}}*/ 290 int 236 int ExtrapolationAnalysis::GetExtrapolationCase(Element* element){/*{{{*/ 291 237 292 238 /* Get case of extrapolation, depending on domain quality, and extrapolation variable */
Note:
See TracChangeset
for help on using the changeset viewer.