Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FldAddMultiShear.cpp
Go to the documentation of this file.
1 #include <cstdio>
2 #include <cstdlib>
3 #include <sstream>
4 #include <iostream>
5 
6 #include <MultiRegions/ExpList.h>
12 
13 using namespace std;
14 using namespace Nektar;
15 
16 int main(int argc, char *argv[])
17 {
18  int i,j;
19  int nfiles, nStart, surfID;
20  if(argc != 5)
21  {
22  fprintf(stderr,"Usage: FldAddMultiShear meshfile nfiles FirstInFile BoundaryID\n");
23  exit(1);
24  }
25 
26  nfiles = boost::lexical_cast<int>(argv[2]);
27  surfID = boost::lexical_cast<int>(argv[4]);
28 
29  vector<string> infiles(nfiles);
30  string outfile;
31 
32  // Output file name: multishear.fld
33  stringstream filename2;
34  filename2 << "multishear.fld";
35  filename2 >> outfile;
36 
37  // starting checkpoint file name: name_tn_wss.fld. n can be any number.
38  string basename = argv[3];
39  basename = basename.substr(basename.find_last_of("t")+1, basename.find_last_of(".")-basename.find_last_of("t"));
40  stringstream filename3;
41  filename3 << basename;
42  filename3 >> nStart;
43 
44  for (i = 0; i< nfiles; ++i)
45  {
46  basename = argv[3];
47  string extension = ".fld";
48  basename = basename.substr(0, basename.find_first_of("_"));
49  stringstream filename;
50  filename << basename << "_t" << i+nStart << "_wss.fld";
51  filename >> infiles[i];
52  cout << infiles[i]<<endl;
53  }
54 
55  argv[2] = argv[3];
56  argv[4] = argv[3];
57 
59  = LibUtilities::SessionReader::CreateInstance(argc, argv);
60 
61 
62  //----------------------------------------------
63  // Read in mesh from input file
64  string meshfile(argv[1]);
65  SpatialDomains::MeshGraphSharedPtr graphShPt = SpatialDomains::MeshGraph::Read(vSession);
66  //----------------------------------------------
67 
68 
69  //----------------------------------------------
70  // Import first field file.
71  vector<LibUtilities::FieldDefinitionsSharedPtr> fielddef;
72  vector<vector<NekDouble> > fielddata;
73  LibUtilities::Import(infiles[0],fielddef,fielddata);
74  //----------------------------------------------
75 
76 
77  //----------------------------------------------
78  // Define Expansion
79  //----------------------------------------------
80  int expdim = graphShPt->GetMeshDimension();
81  int nfields = fielddef[0]->m_fields.size();
82  int addfields = 7;
83  int sfields = nfields - expdim;
84  Array<OneD, MultiRegions::ExpListSharedPtr> Exp(nfields+addfields), shear(sfields), extraVar(addfields);
85  MultiRegions::AssemblyMapCGSharedPtr m_locToGlobalMap;
86 
87  switch(expdim)
88  {
89  case 1:
90  {
91  ASSERTL0(false,"Expansion dimension not recognised");
92  }
93  break;
94  case 2:
95  {
96  ASSERTL0(false,"Expansion dimension not recognised");
97  }
98  break;
99  case 3:
100  {
101  i = 0;
104  ::AllocateSharedPtr(vSession, graphShPt,
105  vSession->GetVariable(i));
106 
107  m_locToGlobalMap = firstfield->GetLocalToGlobalMap();
108 
109  Exp[0] = firstfield;
110  for(i = 1; i < expdim; ++i)
111  {
113  ::AllocateSharedPtr(*firstfield, graphShPt,
114  vSession->GetVariable(i));
115  }
116 
117  for(i = 0; i < sfields; ++i)
118  {
120  ::AllocateSharedPtr(*firstfield, graphShPt,
121  vSession->GetVariable(i));
122  }
123 
124  for(i = 0; i < addfields; ++i)
125  {
127  ::AllocateSharedPtr(*firstfield, graphShPt,
128  vSession->GetVariable(0));
129  }
130 
131  }
132  break;
133  default:
134  ASSERTL0(false,"Expansion dimension not recognised");
135  break;
136  }
137 
138 
139  //-------------------------------------
140  // FIRST FILE - INITIALISING EVERYTHING
141  //-------------------------------------
142 
143  // Set up mapping from Boundary condition to element details.
146  Array<OneD, int> BoundarytoElmtID;
147  Array<OneD, int> BoundarytoTraceID;
149 
150  // Copy data from field file
151  for(i = 0; i < fielddata.size(); ++i)
152  {
153  Exp[0]->ExtractDataToCoeffs(fielddef[i],
154  fielddata[i],
155  fielddef[i]->m_fields[0],
156  Exp[0]->UpdateCoeffs());
157  }
158  Exp[0]->BwdTrans(Exp[0]->GetCoeffs(),Exp[0]->UpdatePhys());
159 
160  Exp[0]->GetBoundaryToElmtMap(BoundarytoElmtID,BoundarytoTraceID);
161  BndExp[0] = Exp[0]->GetBndCondExpansions();
162 
163  // Get face 2D expansion from element expansion
164  bc = boost::dynamic_pointer_cast<StdRegions::StdExpansion2D> (BndExp[0][surfID]->GetExp(0));
165 
166  int nfq= bc->GetTotPoints();
167  int nelem = BndExp[0][surfID]->GetExpSize();
168  int nbq = nelem*nfq;
169 
170  int nt = Exp[0]->GetNpoints();
171  Array<OneD, const NekDouble> testing(nt);
172 
173 
174  // Define local arrays for wss components, and outputs (TAwss, osi, trs)
175  int n, cnt, elmtid, offset, boundary, bndOffset;
176  Array<OneD, NekDouble> Sx(nbq), Sy(nbq), Sz(nbq), S(nbq), Sxr(nbq), Syr(nbq), Szr(nbq);
177  Array<OneD, NekDouble> Save(nbq), temp2(nbq), trs(nbq), TAwss(nbq), osi(nbq);
178  Array<OneD, Array<OneD, NekDouble> > temp(sfields), values(nfields);
179 
180  for (i = 0; i < sfields; i++)
181  {
182  temp[i]= Array<OneD, NekDouble>(nfq);
183  }
184 
185  Vmath::Zero (nbq, Sx, 1);
186  Vmath::Zero (nbq, Sy, 1);
187  Vmath::Zero (nbq, Sz, 1);
188 
189  // -----------------------------------------------------
190  // Compute temporal average wall shear stress vector,
191  // and the spatial average of the temporal average.
192  // -----------------------------------------------------
193 
194  for (int fileNo = 0; fileNo < nfiles ; ++fileNo)
195  {
196  // Import field file.
197  fielddef.clear();
198  fielddata.clear();
199  LibUtilities::Import(infiles[fileNo],fielddef,fielddata);
200 
201  // Copy data from field file
202  for(j = 0; j < nfields; ++j)
203  {
204  for(int i = 0; i < fielddata.size(); ++i)
205  {
206  Exp[j]->ExtractDataToCoeffs(fielddef[i],
207  fielddata[i],
208  fielddef[i]->m_fields[j],
209  Exp[j]->UpdateCoeffs());
210  }
211  Exp[j]->BwdTrans(Exp[j]->GetCoeffs(),Exp[j]->UpdatePhys());
212  }
213 
214  Exp[0]->GetBoundaryToElmtMap(BoundarytoElmtID,BoundarytoTraceID);
215  BndExp[0] = Exp[0]->GetBndCondExpansions();
216 
217  for(cnt = n = 0; n < BndExp[0].num_elements(); ++n)
218  {
219  if(n == surfID)
220  {
221  for(i = 0; i < nelem; ++i, cnt++)
222  {
223  // find element and face of this expansion.
224  elmtid = BoundarytoElmtID[cnt];
225  elmt = Exp[0]->GetExp(elmtid);
226  offset = Exp[0]->GetPhys_Offset(elmtid);
227  bndOffset = nfq*i;
228 
229  if(expdim == 2)
230  {
231  // Not implemented in 2D.
232  }
233  else
234  {
235  // Get face 2D expansion from element expansion
236  bc = boost::dynamic_pointer_cast<StdRegions::StdExpansion2D> (BndExp[0][n]->GetExp(i));
237 
238  //identify boundary of element looking at.
239  boundary = BoundarytoTraceID[cnt];
240 
241  // Get face stress values.
242  for (int t = 0; t< expdim; t++)
243  {
244  elmt->GetFacePhysVals(boundary,bc, Exp[t+expdim]->GetPhys() + offset, temp[t]);
245  }
246 
247  for (int m = 0; m < nfq; m++)
248  {
249  Sxr[bndOffset + m] = temp[0][m];
250  Syr[bndOffset + m] = temp[1][m];
251  Szr[bndOffset + m] = temp[2][m];
252  }
253  }
254  }
255 
256  // Sx = Sx + Sxr;
257  Vmath::Vadd (nbq, Sxr, 1, Sx, 1, Sx, 1);
258  Vmath::Vadd (nbq, Syr, 1, Sy, 1, Sy, 1);
259  Vmath::Vadd (nbq, Szr, 1, Sz, 1, Sz, 1);
260 
261  Vmath::Zero (nbq, Sxr, 1);
262  Vmath::Zero (nbq, Syr, 1);
263  Vmath::Zero (nbq, Szr, 1);
264  }
265  else
266  {
267  cnt += BndExp[0][n]->GetExpSize();
268  }
269  }
270  }
271 
272  // Temporal averages of each wss component: Sx = Sx / nfiles. I.e. mean temporal wss
273  Vmath::Smul(nbq, 1.0/nfiles , Sx, 1, Sx, 1);
274  Vmath::Smul(nbq, 1.0/nfiles , Sy, 1, Sy, 1);
275  Vmath::Smul(nbq, 1.0/nfiles , Sz, 1, Sz, 1);
276 
277  // Spatial average of the temporal averaged wss vector: Save = sqrt(sx^2 + Sy^2 + Sz^2);
278  // i.e magnitude of mean temporal wss.
279  Vmath::Vvtvvtp(nbq, Sx, 1, Sx, 1, Sy, 1, Sy, 1, Save, 1);
280  Vmath::Vvtvp(nbq, Sz, 1, Sz, 1, Save, 1, Save, 1);
281  Vmath::Vsqrt(nbq, Save, 1, Save, 1);
282 
283  //temporal averaged vector / spatial average (sort of normalisation): Sxr = Sx/Save;
284  //unit vector of mean temporal wss (t).
285  Vmath::Vdiv(nbq, Sx, 1, Save, 1, Sxr, 1);
286  Vmath::Vdiv(nbq, Sy, 1, Save, 1, Syr, 1);
287  Vmath::Vdiv(nbq, Sz, 1, Save, 1, Szr, 1);
288 
289  Vmath::Zero (nbq, Sx, 1);
290  Vmath::Zero (nbq, Sy, 1);
291  Vmath::Zero (nbq, Sz, 1);
292  Vmath::Zero (nbq, trs, 1);
293  Vmath::Zero (nbq, TAwss, 1);
294 
295  // -----------------------------------------------------
296  // Loop through files again, and compute transverse wss
297  // -----------------------------------------------------
298 
299  for (int fileNo = 0; fileNo < nfiles ; ++fileNo)
300  {
301  Vmath::Zero (nbq, Sx, 1);
302  Vmath::Zero (nbq, Sy, 1);
303  Vmath::Zero (nbq, Sz, 1);
304 
305  // Import field file.
306  fielddef.clear();
307  fielddata.clear();
308  LibUtilities::Import(infiles[fileNo],fielddef,fielddata);
309 
310  // Copy data from field file
311  for(j = 0; j < nfields; ++j)
312  {
313  for(int i = 0; i < fielddata.size(); ++i)
314  {
315  Exp[j]->ExtractDataToCoeffs(fielddef[i],
316  fielddata[i],
317  fielddef[i]->m_fields[j],
318  Exp[j]->UpdateCoeffs());
319  }
320  Exp[j]->BwdTrans(Exp[j]->GetCoeffs(),Exp[j]->UpdatePhys());
321  }
322 
323  Exp[0]->GetBoundaryToElmtMap(BoundarytoElmtID,BoundarytoTraceID);
324  BndExp[0] = Exp[0]->GetBndCondExpansions();
325 
326  for(cnt = n = 0; n < BndExp[0].num_elements(); ++n)
327  {
328  if(n == surfID)
329  {
330  for(i = 0; i < nelem; ++i, cnt++)
331  {
332  // find element and face of this expansion.
333  elmtid = BoundarytoElmtID[cnt];
334  elmt = Exp[0]->GetExp(elmtid);
335  offset = Exp[0]->GetPhys_Offset(elmtid);
336  bndOffset = nfq*i;
337 
338  if(expdim == 2)
339  {
340  }
341  else
342  {
343  // Get face 2D expansion from element expansion
344  bc = boost::dynamic_pointer_cast<StdRegions::StdExpansion2D> (BndExp[0][n]->GetExp(i));
345 
346  //identify boundary of element looking at.
347  boundary = BoundarytoTraceID[cnt];
348 
349  // Get face stress values.
350  for (int t = 0; t< sfields; t++)
351  {
352  elmt->GetFacePhysVals(boundary,bc,Exp[t+expdim]->GetPhys() + offset, temp[t]);
353  }
354 
355  for (int m = 0; m < nfq; m++)
356  {
357  Sx[bndOffset + m] = temp[0][m];
358  Sy[bndOffset + m] = temp[1][m];
359  Sz[bndOffset + m] = temp[2][m];
360  //S [bndOffset + m] = temp[3][m];
361  }
362  }
363  }
364 
365  Vmath::Vvtvvtp(nbq, Sx, 1, Sx, 1, Sy, 1, Sy, 1, S, 1);
366  Vmath::Vvtvp(nbq, Sz, 1, Sz, 1, S, 1, S, 1);
367  Vmath::Vsqrt(nbq, S, 1, S, 1);
368 
369  // transverse wall shear stress
370  // trs = trs + sqrt(s^2 - (Sx*Sxr + Sy*Syr + Sz*Szr)^2)
371  Vmath::Vvtvvtp(nbq, Sx, 1, Sxr, 1, Sy, 1, Syr, 1, temp2, 1);
372  Vmath::Vvtvp(nbq, Sz, 1, Szr, 1, temp2, 1, temp2, 1);
373  Vmath::Vmul(nbq, temp2, 1, temp2, 1, temp2, 1);
374  Vmath::Vvtvm(nbq, S, 1, S, 1, temp2, 1, temp2, 1);
375  for (int m = 0; m < nbq; m++)
376  {
377  if (temp2[m]> 0.0)
378  {
379  trs[m] = trs[m] + sqrt(temp2[m]);
380  } /*
381  else
382  {
383  trs[m] = 0.0;
384  }*/
385  }
386 
387  Vmath::Zero (nbq, temp2, 1);
388 
389  //Time averaged wss TAwss = TAwss + S;
390  Vmath::Vadd (nbq, S, 1, TAwss, 1, TAwss, 1);
391  }
392  else
393  {
394  cnt += BndExp[0][n]->GetExpSize();
395  }
396  }
397  }
398 
399 
400  // Final step in computing trs and TAwss: trs = trs/nfiles;
401  Vmath::Smul (nbq, (1.0/nfiles), trs, 1, trs, 1);
402  Vmath::Smul (nbq, (1.0/nfiles), TAwss, 1, TAwss, 1);
403 
404  //Compute osi = 0.5*(1- Save/TAwss)
405  Vmath::Vdiv(nbq, Save, 1, TAwss, 1, osi, 1);
406  Vmath::Smul(nbq, -0.5, osi, 1, osi, 1);
407  Vmath::Sadd(nbq, 0.5, osi, 1, osi, 1);
408 
409  fielddef.clear();
410  fielddata.clear();
411  LibUtilities::Import(infiles[nfiles-1],fielddef,fielddata);
412 
413  // Copy u,v,w, data from last field file for the fields
414  for(j = 0; j < nfields; ++j)
415  {
416  for(int i = 0; i < fielddata.size(); ++i)
417  {
418  Exp[j]->ExtractDataToCoeffs(fielddef[i],
419  fielddata[i],
420  fielddef[i]->m_fields[j],
421  Exp[j]->UpdateCoeffs());
422  }
423  Exp[j]->BwdTrans(Exp[j]->GetCoeffs(),Exp[j]->UpdatePhys());
424  }
425 
426  for(j = 0; j < addfields; ++j)
427  {
428  for(int i = 0; i < fielddata.size(); ++i)
429  {
430  Exp[j+nfields]->ExtractDataToCoeffs(fielddef[i],
431  fielddata[i],
432  fielddef[i]->m_fields[j],
433  Exp[j+nfields]->UpdateCoeffs());
434  }
435  Exp[j+nfields]->BwdTrans(Exp[j+nfields]->GetCoeffs(),Exp[j+nfields]->UpdatePhys());
436  }
437 
438  Exp[0]->GetBoundaryToElmtMap(BoundarytoElmtID,BoundarytoTraceID);
439 
440  //get boundary expansions for each field
441  for(j = 0; j < nfields+addfields; ++j)
442  {
443  BndExp[j] = Exp[j]->GetBndCondExpansions();
444  }
445 
446  for(cnt = n = 0; n < BndExp[0].num_elements(); ++n)
447  {
448  if(n == surfID)
449  {
450  for(i = 0; i < nelem; ++i, cnt++)
451  {
452  // find element and face of this expansion.
453  elmtid = BoundarytoElmtID[cnt];
454  offset = Exp[0]->GetPhys_Offset(elmtid);
455  bndOffset = nfq*i;
456 
457  if(expdim == 2)
458  {
459  }
460  else
461  {
462  // Get face 2D expansion from element expansion
463  bc = boost::dynamic_pointer_cast<StdRegions::StdExpansion2D> (BndExp[0][n]->GetExp(i));
464 
465  //identify boundary of element looking at.
466  boundary = BoundarytoTraceID[cnt];
467 
468  //Update outfield coefficients in the elemental boundary expansion
469  for (j = 0; j < nfq; j++)
470  {
471  temp[0][j] = trs[bndOffset + j];
472  temp[1][j] = TAwss[bndOffset + j];
473  temp[2][j] = osi[bndOffset + j];
474  }
475 
476  for (j = 0; j < 3; j++)
477  {
478  values[j] = BndExp[j+nfields][n]->UpdateCoeffs() + BndExp[j+nfields][n]->GetCoeff_Offset(i);
479  bc->FwdTrans(temp[j], values[j]);
480 
481  Vmath::Zero(nbq, temp[j],1);
482  }
483 
484  for (j = 0; j < nfq; j++)
485  {
486  temp[0][j] = Sxr[bndOffset + j];
487  temp[1][j] = Syr[bndOffset + j];
488  temp[2][j] = Szr[bndOffset + j];
489  }
490 
491  for (j = 0; j < 3; j++)
492  {
493  values[j] = BndExp[j+nfields+3][n]->UpdateCoeffs() + BndExp[j+nfields+3][n]->GetCoeff_Offset(i);
494  bc->FwdTrans(temp[j], values[j]);
495 
496  Vmath::Zero(nbq, temp[j],1);
497  }
498 
499 
500  for (j = 0; j < nfq; j++)
501  {
502  temp[0][j] = Save[bndOffset + j];
503  }
504 
505  values[0] = BndExp[nfields+addfields-1][n]->UpdateCoeffs() + BndExp[nfields+addfields-1][n]->GetCoeff_Offset(i);
506  bc->FwdTrans(temp[0], values[0]);
507 
508  }
509  }
510  }
511  else
512  {
513  cnt += BndExp[0][n]->GetExpSize();
514  }
515  }
516 
517  for(j = 0; j < nfields + addfields; ++j)
518  {
519  int ncoeffs = Exp[j]->GetNcoeffs();
520  Array<OneD, NekDouble> output(ncoeffs);
521 
522  output=Exp[j]->UpdateCoeffs();
523 
524  int nGlobal=m_locToGlobalMap->GetNumGlobalCoeffs();
525  Array<OneD, NekDouble> outarray(nGlobal,0.0);
526 
527  int bndcnt=0;
528 
529  const Array<OneD,const int>& map = m_locToGlobalMap->GetBndCondCoeffsToGlobalCoeffsMap();
530  NekDouble sign;
531 
532  for(i = 0; i < BndExp[j].num_elements(); ++i)
533  {
534  if(i==surfID)
535  {
536  const Array<OneD,const NekDouble>& coeffs = BndExp[j][i]->GetCoeffs();
537  for(int k = 0; k < (BndExp[j][i])->GetNcoeffs(); ++k)
538  {
539  sign = m_locToGlobalMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
540  outarray[map[bndcnt++]] = sign * coeffs[k];
541  }
542  }
543  else
544  {
545  bndcnt += BndExp[j][i]->GetNcoeffs();
546  }
547  }
548  m_locToGlobalMap->GlobalToLocal(outarray,output);
549 
550  }
551 
552  //-----------------------------------------------
553  // Write solution to file
554  // ----------------------------------------------
555  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
556  = Exp[0]->GetFieldDefinitions();
557  std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
558 
559  vector<string > outname;
560 
561  outname.push_back("TransWSS");
562  outname.push_back("TAWSS");
563  outname.push_back("OSI");
564  outname.push_back("norm_mean_x");
565  outname.push_back("norm_mean_y");
566  outname.push_back("norm_mean_z");
567  outname.push_back("mean_mag");
568 
569  for(j = 0; j < nfields+addfields; ++j)
570  {
571  for(i = 0; i < FieldDef.size(); ++i)
572  {
573  if (j >= nfields)
574  {
575  FieldDef[i]->m_fields.push_back(outname[j-nfields]);
576  }
577  else
578  {
579  FieldDef[i]->m_fields.push_back(fielddef[i]->m_fields[j]);
580  }
581  Exp[j]->AppendFieldData(FieldDef[i], FieldData[i]);
582  }
583  }
584 
585  LibUtilities::Write(outfile, FieldDef, FieldData);
586 
587  return 0;
588 }
589 
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:22
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition: Vmath.cpp:394
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition: Vmath.cpp:428
STL namespace.
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Definition: Vmath.cpp:227
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > ElementiDs)
Imports an FLD file.
Definition: FieldIO.cpp:115
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
boost::shared_ptr< StdExpansion2D > StdExpansion2DSharedPtr
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:199
double NekDouble
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
Definition: Vmath.cpp:301
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
Definition: Vmath.cpp:523
void Vvtvm(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvm (vector times vector plus vector): z = w*x - y
Definition: Vmath.cpp:451
void Write(const std::string &outFile, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, const FieldMetaDataMap &fieldinfomap)
Write a field file in serial only.
Definition: FieldIO.cpp:81
boost::shared_ptr< ContField3D > ContField3DSharedPtr
Definition: ContField3D.h:191
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:359
boost::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
Definition: AssemblyMapCG.h:52
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:442
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:285
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:169
int main(int argc, char *argv[])