rsvs3D  0.0.0
Codes for the c++ implementation of the 3D RSVS
RSVScalc.cpp
1 
2 #include "RSVScalc.hpp"
3 
4 #include <cstdlib>
5 #include <fstream>
6 #include <iomanip>
7 #include <iostream>
8 
9 #include "matrixtools.hpp"
10 #include "parameters.hpp"
11 #include "snake.hpp"
12 #include "triangulate.hpp"
13 #include "vectorarray.hpp"
14 
24 #define TOSENSVEC(val, ind) rsvs3d::SignedLogScale((ind != rsvs3d::constants::__notfound ? val : 0.0))
25 
26 using namespace std;
27 
28 // silent functions
29 
30 /*
31 Implementation of the interfaces for RSVScalc
32 This file's object can be compiled quickly
33 */
34 
36 {
37  int ii;
38  int nDv, nConstr;
39  vector<int> vecin;
40  // prepare the SQP object
41  nConstr = triRSVS.meshDep->CountVoluParent();
42  if (triRSVS.snakeDep != NULL)
43  {
44  nDv = triRSVS.snakeDep->snaxs.size();
45  }
46  else
47  {
48  nDv = 0;
49  }
50 
51  // TODO this needs to be supported by mapping each volume to the constraint
52  // position There can be more than one constraint for each cell.
53  BuildConstrMap(triRSVS);
54 
55  vecin.clear();
56  vecin.reserve(nDv);
57  for (ii = 0; ii < nDv; ++ii)
58  {
59  if (!triRSVS.snakeDep->snaxs(ii)->isfreeze)
60  {
61  vecin.push_back(triRSVS.snakeDep->snaxs(ii)->index);
62  }
63  else if (this->SnakDVcond(triRSVS, ii))
64  {
65  vecin.push_back(triRSVS.snakeDep->snaxs(ii)->index);
66  }
67  }
68  nDv = this->BuildDVMap(vecin);
69 
70  BuildMathArrays(nDv, nConstr);
71 }
72 
73 bool RSVScalc::SnakDVcond(const triangulation &triRSVS, int ii)
74 {
75  bool allNeighFroze = true;
76  int nEdges, kk;
77  const edge *tempEdge;
78 
79  nEdges = triRSVS.snakeDep->snakeconn.verts(ii)->edgeind.size();
80 
81  kk = 0;
82  // Check if all neighbours of the snaxel are
83  while (kk < nEdges && allNeighFroze)
84  {
85  tempEdge = triRSVS.snakeDep->snakeconn.edges.isearch(triRSVS.snakeDep->snakeconn.verts(ii)->edgeind[kk]);
86  allNeighFroze &= triRSVS.snakeDep->snaxs.isearch(tempEdge->vertind[0])->isfreeze;
87  allNeighFroze &= triRSVS.snakeDep->snaxs.isearch(tempEdge->vertind[1])->isfreeze;
88 
89  ++kk;
90  }
91 
92  return (!allNeighFroze);
93 }
94 
95 void RSVScalc::CalculateTriangulation(const triangulation &triRSVS, int derivMethod)
96 {
97  int ii, ni;
98 
99  this->returnDeriv = true;
100 
101  // prepare the SQP object
102  this->PrepTriangulationCalc(triRSVS);
103 
104  // Calculate the SQP object
105  this->ZeroTimers();
106  auto calcTriFunc = &RSVScalc::CalcTriangle;
107  switch (derivMethod)
108  {
109  case 1:
110  calcTriFunc = &RSVScalc::CalcTriangleFD;
111  break;
112  case 2:
113  calcTriFunc = &RSVScalc::CalcTriangleDirectVolume;
114  break;
115  }
116  this->ZeroTimers();
117  ni = triRSVS.dynatri.size();
118  for (ii = 0; ii < ni; ii++)
119  {
120  (this->*calcTriFunc)(*(triRSVS.dynatri(ii)), triRSVS, true, true, true);
121  }
122 
123  ni = triRSVS.intertri.size();
124  for (ii = 0; ii < ni; ii++)
125  {
126  (this->*calcTriFunc)(*(triRSVS.intertri(ii)), triRSVS, false, true, true);
127  }
128 
129  ni = triRSVS.acttri.size();
130  for (ii = 0; ii < ni; ii++)
131  {
132  (this->*calcTriFunc)(*(triRSVS.stattri.isearch(triRSVS.acttri[ii])), triRSVS, false, true, false);
133  }
134 
135  // Output some data to check it makes sense
136 }
137 
144 {
145  int ii, ni, temp;
146 
147  ni = triRSVS.snakeDep->snaxs.size();
148  for (ii = 0; ii < ni; ii++)
149  {
150  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
151  triRSVS.snakeDep->snaxs[ii].v = temp != -1 ? this->deltaDV[temp] : 0;
152  }
153  triRSVS.snakeDep->snaxs.PrepareForUse();
154 }
155 
156 void RSVScalc::ReturnSensitivities(const triangulation &triRSVS, std::vector<double> &sensVec, int constrNum) const
157 {
158  int ii, ni, temp;
159 
160  if (constrNum >= this->nConstr)
161  {
162  RSVS3D_ERROR_RANGE("Constraint is beyond the available range.");
163  }
164  ni = triRSVS.snakeDep->snaxs.size();
165  sensVec.assign(ni, 0);
166  for (ii = 0; ii < ni; ii++)
167  {
168  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
169  sensVec[ii] = TOSENSVEC(this->sensDv(temp, constrNum), temp);
170  }
171 }
172 
173 void RSVScalc::ReturnGradient(const triangulation &triRSVS, std::vector<double> &sensVec, int constrNum) const
174 {
175  int ii, ni, temp;
176  int nNegOpts = 6;
177 
178  // auto TOSENSVEC = [&](double val, int ind) -> double
179  // {return rsvs3d::SignedLogScale(
180  // (ind!=rsvs3d::constants::__notfound?val:0.0));};
181 
182  if (constrNum >= this->nConstr || constrNum < -nNegOpts)
183  {
184  RSVS3D_ERROR_RANGE("Constraint is beyond the available range.");
185  }
186  ni = triRSVS.snakeDep->snaxs.size();
187  sensVec.assign(ni, 0);
188  int nNegTest = -nNegOpts;
189  if (constrNum == nNegTest++)
190  {
191  for (ii = 0; ii < ni; ii++)
192  {
193  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
194  sensVec[ii] = TOSENSVEC(this->dObj[temp], temp);
195  }
196  }
197  else if (constrNum == nNegTest++)
198  {
199  auto dLagTemp = this->dObj + this->lagMult.transpose() * this->dConstr;
200  for (ii = 0; ii < ni; ii++)
201  {
202  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
203  sensVec[ii] = TOSENSVEC(dLagTemp[temp], temp);
204  }
205  }
206  else if (constrNum == nNegTest++)
207  {
208  if (this->UseFullMath())
209  {
210  for (ii = 0; ii < ni; ii++)
211  {
212  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
213  sensVec[ii] = TOSENSVEC(this->HObj(temp, temp), temp);
214  }
215  }
216  else
217  {
218  for (ii = 0; ii < ni; ii++)
219  {
220  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
221  sensVec[ii] = TOSENSVEC(this->HObj_sparse(temp, temp), temp);
222  }
223  }
224  }
225  else if (constrNum == nNegTest++)
226  {
227  if (this->UseFullMath())
228  {
229  for (ii = 0; ii < ni; ii++)
230  {
231  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
232  sensVec[ii] = TOSENSVEC(this->HConstr(temp, temp), temp);
233  }
234  }
235  else
236  {
237  for (ii = 0; ii < ni; ii++)
238  {
239  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
240  sensVec[ii] = TOSENSVEC(this->HConstr_sparse(temp, temp), temp);
241  }
242  }
243  }
244  else if (constrNum == nNegTest++)
245  {
246  if (this->UseFullMath())
247  {
248  auto HLagTemp = this->HConstr + this->HObj;
249  for (ii = 0; ii < ni; ii++)
250  {
251  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
252  sensVec[ii] = TOSENSVEC(HLagTemp(temp, temp), temp);
253  }
254  }
255  else
256  {
257  for (ii = 0; ii < ni; ii++)
258  {
259  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
260  sensVec[ii] = TOSENSVEC((this->HConstr_sparse(temp, temp) + this->HObj_sparse(temp, temp)), temp);
261  }
262  }
263  }
264  else if (constrNum == nNegTest++)
265  {
266  if (this->UseFullMath())
267  {
268  for (ii = 0; ii < ni; ii++)
269  {
270  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
271  sensVec[ii] = TOSENSVEC(this->deltaDV[temp], temp);
272  }
273  }
274  else
275  {
276  RSVS3D_ERROR_NOTHROW("Delta DV output not supported in Sparse maths (easy to implement).");
277  }
278  }
279  else
280  {
281  if (constrNum < 0)
282  {
283  RSVS3D_ERROR_LOGIC("Negative ''constraints'' should be handled in"
284  " before this case.");
285  }
286  for (ii = 0; ii < ni; ii++)
287  {
288  temp = this->dvMap.find(triRSVS.snakeDep->snaxs(ii)->index);
289  sensVec[ii] = TOSENSVEC(this->dConstr(constrNum, temp), temp);
290  }
291  }
292 }
293 
295 {
296  int ii, ni, jj, nj;
297  int nDv, nConstr;
298  // vector<int> vecin;
299  triangulation triRSVS(meshin);
300  // prepare the SQP object
301  triRSVS.PrepareForUse();
302  this->returnDeriv = false;
303  nConstr = meshin.volus.size();
304 
305  nDv = 0;
306 
307  BuildMathArrays(nDv, nConstr);
308 
309  // TODO this needs to be supported by mapping each volume to the constraint
310  // position There can be more than one constraint for each cell.
311  // BuildConstrMap(triRSVS);
312  BuildConstrMap(meshin);
313 
314  // Calculate the SQP object
315  nj = meshin.surfs.size();
316  for (jj = 0; jj < nj; jj++)
317  {
318  TriangulateSurface(*(meshin.surfs(jj)), meshin, triRSVS.stattri, triRSVS.trivert, 1, 1);
319  triRSVS.PrepareForUse();
320  triRSVS.CalcTriVertPos();
321  triRSVS.PrepareForUse();
322  ni = triRSVS.stattri.size();
323  for (ii = 0; ii < ni; ii++)
324  {
325  CalcTriangle(*(triRSVS.stattri(ii)), triRSVS, true, true, false);
326  }
327  triRSVS.stattri.clear();
328  triRSVS.trivert.clear();
329  }
330 
331  // Output some data to check it makes sense
332 }
333 
334 void RSVScalc::Print2Screen(int outType) const
335 {
336  cout << "Math result: obj " << obj << " false access " << falseaccess << endl;
337  cout << "Constr ";
338  for (int i = 0; i < nConstr; ++i)
339  {
340  cout << constr[i] << " ";
341  }
342  cout << "constrTarg :" << endl;
343  PrintMatrix(constrTarg);
344  cout << endl;
345  if ((nConstr < 10 && nDv < 20 && outType == 1) || outType == 3)
346  {
347  cout << "constr :" << endl;
348  PrintMatrix(constr);
349  cout << "dObj :" << endl;
350  PrintMatrix(dObj);
351  cout << "lagMult :" << endl;
352  PrintMatrix(lagMult);
353 
354  cout << "dConstr :" << endl;
355  PrintMatrix(dConstr);
356  cout << "HConstr :" << endl;
357  PrintMatrix(HConstr);
358  cout << "HObj :" << endl;
359  PrintMatrix(HObj);
360  cout << "constrTarg :" << endl;
361  PrintMatrix(constrTarg);
362  }
363  if (outType == 2)
364  {
365  cout << "constrTarg :" << endl;
366  PrintMatrix(constrTarg);
367  cout << endl;
368  for (int i = 0; i < nDv; ++i)
369  {
370  cout << deltaDV[i] << " ";
371  }
372  cout << endl;
373  for (int i = 0; i < nConstr; ++i)
374  {
375  cout << lagMult[i] << " ";
376  }
377  cout << endl;
378  }
379  if (outType == 4)
380  {
381  const char *file = "matrices/dumpmatout.txt";
382  cout << "constr :" << endl;
383  PrintMatrixFile(constr, file);
384  cout << "dObj :" << endl;
385  PrintMatrixFile(dObj, file);
386  cout << "lagMult :" << endl;
387  PrintMatrixFile(lagMult, file);
388 
389  cout << "dConstr :" << endl;
390  PrintMatrixFile(dConstr, file);
391  cout << "HConstr :" << endl;
392  PrintMatrixFile(HConstr, file);
393  cout << "HObj :" << endl;
394  PrintMatrixFile(HObj, file);
395  cout << "constrTarg :" << endl;
396  PrintMatrixFile(constrTarg, file);
397  }
398 }
399 
401 {
402  int ii, ni;
403  vector<double> temp;
404  ni = constr.size();
405  double tempVal;
406  temp.reserve(ni);
407 
408  for (ii = 0; ii < ni; ii++)
409  {
410  temp.push_back(constr[ii]);
411  }
412  triRSVS.meshDep->MapVolu2Parent(temp, this->constrList, &volu::fill);
413  temp.clear();
414  for (ii = 0; ii < ni; ii++)
415  {
416  tempVal = fabs(constrTarg[ii] - constr[ii]);
417  if (tempVal > 1e-16)
418  {
419  temp.push_back(log10(tempVal));
420  }
421  else
422  {
423  temp.push_back(-16);
424  }
425  }
426  triRSVS.meshDep->MapVolu2Parent(temp, this->constrList, &volu::error);
427 }
428 
429 void RSVScalc::ReturnConstrToMesh(mesh &meshin, double volu::*mp) const
430 {
431  int ii, ni;
432  vector<double> temp;
433  ni = constr.size();
434  temp.reserve(ni);
435 
436  for (ii = 0; ii < ni; ii++)
437  {
438  temp.push_back(constr[ii]);
439  }
440  meshin.MapVolu2Self(temp, constrMap.vec, mp);
441 }
442 
443 void RSVScalc::BuildMathArrays(int nDvIn, int nConstrIn)
444 {
445  // Builds the target math arrays
446 
447  this->nDv = nDvIn;
448  this->nConstr = nConstrIn;
449  this->isConstrAct.clear();
450  this->isDvAct.clear();
451  this->isConstrAct.assign(nConstr, false);
452  this->isDvAct.assign(nDv, false);
453 
454  this->constr.setZero(nConstr);
455 
456  this->obj = 0.0;
457  this->dObj.setZero(nDv);
458 
459  if (this->nConstr != this->lagMult.size())
460  {
461  this->lagMult.setZero(nConstr);
462  }
463  this->deltaDV.setZero(nDv);
464 
465  this->dvCallConstr.setZero(nDv, 1);
466 
467  if (this->UseFullMath())
468  {
469  this->dConstr.setZero(nConstr, nDv);
470  this->HConstr.setZero(nDv, nDv);
471  this->HObj.setZero(nDv, nDv);
472  }
473  else
474  {
475  this->dConstr_sparse.setZero();
476  this->HConstr_sparse.setZero();
477  this->HObj_sparse.setZero();
478  this->HLag_sparse.setZero();
479  this->dConstr_sparse.resize(nConstr, nDv);
480  this->dConstr_sparse.reserve(nDv * 2);
481  this->HConstr_sparse.resize(nDv, nDv);
482  this->HConstr_sparse.reserve(nDv * 13);
483  this->HObj_sparse.resize(nDv, nDv);
484  this->HObj_sparse.reserve(nDv * 13);
485  }
486 }
487 
488 void RSVScalc::BuildConstrMap(const triangulation &triangleRSVS)
489 {
490  // explore parents of mesh adding 1 by 1 elemind
491  // for each parent
492  // for each snakemesh().volu
493  // Assign to constrMap.targ = the position in parent.volu of the parentconn
494  vector<double> voluVals;
495  triangleRSVS.meshDep->ReturnParentMap(constrMap.vec, constrMap.targ, constrList, voluVals);
496 
497  constrMap.GenerateHash();
498  constrTarg.setZero(voluVals.size());
499  for (int i = 0; i < int(voluVals.size()); ++i)
500  {
501  constrTarg[i] = voluVals[i];
502  }
503 }
504 
505 void RSVScalc::BuildConstrMap(const mesh &meshin)
506 {
507  int ni, ii;
508  ni = meshin.volus.size();
509  constrMap.vec.clear();
510  constrMap.targ.clear();
511  constrMap.vec.reserve(ni);
512  constrMap.targ.reserve(ni);
513  for (ii = 0; ii < ni; ++ii)
514  {
515  constrMap.vec.push_back(meshin.volus(ii)->index);
516  constrMap.targ.push_back(ii);
517  }
518 
519  constrMap.GenerateHash();
520 }
521 
522 int RSVScalc::BuildDVMap(const vector<int> &vecin)
523 {
524  this->dvMap.vec = vecin;
525  sort(this->dvMap.vec);
526  unique(this->dvMap.vec);
527  this->dvMap.GenerateHash();
528  return this->dvMap.vec.size();
529 }
530 
531 void RSVScalc::ConvergenceLog(ofstream &out, int loglvl) const
532 {
533  /*
534  takes in a stream and a log lvl (which defaults to the highest available)
535  */
536  // format stream (in preparation)
537 
538  // residual and delta are summary with:
539  // mean median max min std
540  double normConstr, normVel, normObjDeriv;
541  if (loglvl > 0)
542  {
543  out << "> constraint residual :, ";
544  normConstr = StreamStatistics(abs(this->constr.array() - this->constrTarg.array()), out, string(", "));
545  out << "> constraint delta :, ";
546  StreamStatistics((this->constr.array() - this->constrTarg.array()), out, string(", "));
547  out << "> objective residual :, ";
548  StreamStatistics(abs(this->deltaDV.array()), out, string(", "));
549  out << "> objective delta :, ";
550  normVel = StreamStatistics(this->deltaDV.array(), out, string(", "));
551  out << "> objective derivative :, ";
552  normObjDeriv = StreamStatistics(this->dObj.array(), out, string(", "));
553  out << "> objective value:," << this->obj << std::endl;
554  auto prec = std::cout.precision();
555  std::cout << " conv:" << std::setprecision(3) << std::left << " (vol) " << std::setw(8) << normConstr
556  << " (vel) " << std::setw(8) << normVel << " (Dobj) " << std::setw(8) << normObjDeriv << "; "
557  << std::setprecision(prec) << std::right;
558  }
559  // Same as res but with all the constraint values
560  if (loglvl > 1)
561  {
562  out << "> constraint residuals :, ";
563  StreamOutVector(abs(this->constr.array() - this->constrTarg.array()), out, string(", "));
564 
565  out << "> volume values :, ";
566  StreamOutVector(this->constr.array(), out, string(", "));
567 
568  out << "> constraint deltas :, ";
569  StreamOutVector((this->constr.array() - this->constrTarg.array()), out, string(", "));
570  }
571  if (loglvl > 2)
572  {
573  out << "> snaxel velocity :, ";
574  StreamOutVector(move(deltaDV), out, string(", "));
575  }
576 }
577 
578 void RSVScalc::PrintTimers() const
579 {
580  std::cout << " t1 " << rsvs3d::Clock2ms(this->timer1) << ",";
581  std::cout << " t2 " << rsvs3d::Clock2ms(this->timer2) << ",";
582  std::cout << " t3 " << rsvs3d::Clock2ms(this->timer3) << ",";
583 }
584 
586 {
587  this->limLag = devset.limitlagrangian;
588  this->SetUseSurfCentreDeriv(devset.surfcentrejacobian);
589  this->SetUseSurfCentreHessian(devset.surfcentrehessian);
590  this->SetSparseDVcutoff(devset.mindesvarsparse);
591 }
592 
593 void RSVScalc::CalculateVelocities(triangulation &triRSVS, int calculationMethod, bool calculateDerivatives,
594  int derivativeMethod)
595 {
596  this->CalculateTriangulation(triRSVS, derivativeMethod);
597  // start_s = rsvs3d::TimeStamp(" deriv:", start_s);
598  this->CheckAndCompute(calculationMethod, calculateDerivatives);
599  // Second cycle
600  // start_s=rsvs3d::TimeStamp(" solve:", start_s);
601  // this->CalculateTriangulation(triRSVS);
602  // start_s=rsvs3d::TimeStamp(" deriv:", start_s);
603  // this->CheckAndCompute(
604  // RSVSobj.paramconf.rsvs.solveralgorithm);
605  // End of Second cycle
606  this->ReturnConstrToMesh(triRSVS);
607  this->ReturnVelocities(triRSVS);
608 }
609 
610 void SparseMatrixTriplet::SetEqual(MatrixXd_sparse &targ)
611 {
612  int n = this->nonZeros();
613  targ.setZero();
614  targ.resize(this->nRow, this->nCol);
615  targ.reserve(n);
616  for (int i = 0; i < n; ++i)
617  {
618  auto it = this->operator[](i);
619  targ.insert(it.row(), it.col()) = it.value();
620  }
621 }
622 
623 void SparseMatrixTriplet::SetEqual(Eigen::MatrixXd &targ)
624 {
625  int n = this->nonZeros();
626  targ.resize(this->nRow, this->nCol);
627  targ.setZero(this->nRow, this->nCol);
628  for (int i = 0; i < n; ++i)
629  {
630  auto it = this->operator[](i);
631  targ(it.row(), it.col()) = it.value();
632  }
633 }
634 
635 void SparseMatrixTriplet::reserve(size_t a)
636 {
637  this->TripletMap::reserve(a);
638 }
639 
640 sparsetripletelement<double> SparseMatrixTriplet::operator[](int a)
641 {
642 #ifdef SAFE_ACCESS
643  if (a < 0 || a >= int(this->TripletMap::size()))
644  {
645  RSVS3D_ERROR_RANGE("Indices out of range.");
646  }
647 #endif
648  sparsetripletelement<double> out(this->vec[a] % this->nRow, this->vec[a] / this->nRow, this->targ[a]);
649  return out;
650 }
Provides the infrastructure for calculation of the RSVS equations.
void CalculateMesh(mesh &meshin)
Calculates the mesh volumes.
Definition: RSVScalc.cpp:294
void PrepTriangulationCalc(const triangulation &triRSVS)
Groups actions needed before the calculation of triangular quantities.
Definition: RSVScalc.cpp:35
void CalcTriangle(const triangle &triIn, const triangulation &triRSVS, bool isObj=true, bool isConstr=true, bool isDeriv=true)
Calculates the properties of single triangle.
int BuildDVMap(const std::vector< int > &vecin)
Builds a Design variable map.
Definition: RSVScalc.cpp:522
void ReturnConstrToMesh(triangulation &triRSVS) const
Returns a constraint to the triangulation::meshDep.
Definition: RSVScalc.cpp:400
void BuildConstrMap(const triangulation &triangleRSVS)
Builds the constraint mapping.
Definition: RSVScalc.cpp:488
void CalcTriangleDirectVolume(const triangle &triIn, const triangulation &triRSVS, bool isObj=true, bool isConstr=true, bool isDeriv=true)
Calculates the properties of single triangle using direct calculation.
void CalculateTriangulation(const triangulation &triRSVS, int derivMethod=0)
Calculates the triangulation volume and area derivatives.
Definition: RSVScalc.cpp:95
void setDevParameters(const param::dev::devparam &devset) override
Set the Development parameters of the Calculator object.
Definition: RSVScalc.cpp:585
bool SnakDVcond(const triangulation &triRSVS, int ii)
Returns wether a snaxel is a design variable or not.
Definition: RSVScalc.cpp:73
void Print2Screen(int outType=0) const
Prints different amounts of RSVScalc owned data to the screen.
Definition: RSVScalc.cpp:334
void ReturnVelocities(triangulation &triRSVS)
Returns velocities to the snaxels.
Definition: RSVScalc.cpp:143
void BuildMathArrays(int nDv, int nConstr)
Builds mathematics arrays.
Definition: RSVScalc.cpp:443
void CalcTriangleFD(const triangle &triIn, const triangulation &triRSVS, bool isObj=true, bool isConstr=true, bool isDeriv=true)
Calculates the properties of single triangle using Finite difference.
void ConvergenceLog(std::ofstream &out, int loglvl=3) const
Print convergence information to file stream.
Definition: RSVScalc.cpp:531
Class for an edge object in a mesh.
Definition: mesh.hpp:353
Class for mesh handling.
Definition: mesh.hpp:592
Class for development parameters.
Definition: parameters.hpp:272
Class for volume cell objects in a mesh.
Definition: mesh.hpp:197
Tools to support conversion, display and derivatives of Eigen matrices.
Parameters for the integrated 3DRSVS.
Provides the core restricted surface snake container.
Provides a triangulation for snake and meshes.
Provides a 2D std::vector based container.
#define RSVS3D_ERROR_LOGIC(M)
Throw a logic_error.
Definition: warning.hpp:139
#define RSVS3D_ERROR_NOTHROW(M)
Generic rsvs warning.
Definition: warning.hpp:120
#define RSVS3D_ERROR_RANGE(M)
Throw a range_error.
Definition: warning.hpp:173