Stiffness.cpp
Go to the documentation of this file.
2 
4 {
5  terminal_output_ = false;
6  file_output_ = false;
7 }
8 
9 
11  :r_(0.6), nr_(0), density_(1210 * 1e-12), g_(-9806.33), G_(1032), E_(1100), v_(0.39), shear_(0)
12 {
13  ptr_dualgraph_ = ptr_dualgraph;
14 
15  Init();
16 
17  terminal_output_ = false;
18  file_output_ = false;
19 }
20 
21 
23  DualGraph *ptr_dualgraph, FiberPrintPARM *ptr_parm, char *ptr_path,
24  bool terminal_output, bool file_output
25  )
26 {
27  /* in use */
28  ptr_dualgraph_ = ptr_dualgraph;
29  ptr_parm_ = ptr_parm;
30  ptr_path_ = ptr_path;
31 
32  r_ = ptr_parm->radius_;
33  nr_ = 0.0;
34  density_ = ptr_parm->density_;
35  g_ = ptr_parm->g_;
36  G_ = ptr_parm->shear_modulus_;
37  E_ = ptr_parm->youngs_modulus_;
38  v_ = ptr_parm->poisson_ratio_;
39 
40  shear_ = 0;
41 
42  Init();
43 
44  terminal_output_ = terminal_output;
45  file_output_ = file_output;
46 }
47 
48 
50 {
51 }
52 
53 
55 {
56  CreateFe();
58 
60 }
61 
62 
64 {
65  if (terminal_output_)
66  {
67  create_fe_.Start();
68  }
69 
70  WireFrame *ptr_frame = ptr_dualgraph_->ptr_frame_;
71  int Nd = ptr_dualgraph_->SizeOfVertList();
72  int Fd = ptr_dualgraph_->SizeOfFaceList();
73 
74  CoordTrans coord_trans;
75  double Ax = M_PI * r_ * r_;
76  double gx = 0;
77  double gy = 0;
78  double gz = g_;
79 
80  Fe_.resize(Nd);
81  for (int i = 0; i < Nd; i++)
82  {
83  Fe_[i].setZero();
84 
85  WF_edge *ei = ptr_frame->GetEdge(ptr_dualgraph_->e_orig_id(i));
86  WF_edge *ej = ei->ppair_;
87  int dual_u = ptr_dualgraph_->v_dual_id(ej->pvert_->ID());
88  int dual_v = ptr_dualgraph_->v_dual_id(ei->pvert_->ID());
89 
90  double t0, t1, t2, t3, t4, t5, t6, t7, t8;
91  coord_trans.CreateTransMatrix(ej->pvert_->Position(), ei->pvert_->Position(),
92  t0, t1, t2, t3, t4, t5, t6, t7, t8, 0.0);
93 
94  VectorXd Fei(12);
95  Fei.setZero();
96 
97  double L = ei->Length();
98  Fei[0] = Fei[6] = density_ * Ax * L * gx / 2.0;
99  Fei[1] = Fei[7] = density_ * Ax * L * gy / 2.0;
100  Fei[2] = Fei[8] = density_ * Ax * L * gz / 2.0;
101 
102  Fei[3] = density_ * Ax * L * L / 12.0 * ((-t3*t7 + t4*t6)*gy + (-t3*t8 + t5*t6)*gz);
103  Fei[4] = density_ * Ax * L * L / 12.0 * ((-t4*t6 + t3*t7)*gx + (-t4*t8 + t5*t7)*gz);
104  Fei[5] = density_ * Ax * L * L / 12.0 * ((-t5*t6 + t3*t8)*gx + (-t5*t7 + t4*t8)*gy);
105 
106  Fei[9] = density_ * Ax * L * L / 12.0 * ((t3*t7 - t4*t6)*gy + (t3*t8 - t5*t6)*gz);
107  Fei[10] = density_ * Ax * L * L / 12.0 * ((t4*t6 - t3*t7)*gx + (t4*t8 - t5*t7)*gz);
108  Fei[11] = density_ * Ax * L * L / 12.0 * ((t5*t6 - t3*t8)*gx + (t5*t7 - t4*t8)*gy);
109 
110  Fe_[i] = Fei;
111  }
112 
113  if (terminal_output_)
114  {
115  create_fe_.Stop();
116  }
117 }
118 
119 
120 void Stiffness::CreateF(VX *ptr_x)
121 {
122  if (terminal_output_)
123  {
124  create_f_.Start();
125  }
126 
127  /* Run only after CreadFe is done! */
128  WireFrame *ptr_frame = ptr_dualgraph_->ptr_frame_;
129  int Nd = ptr_dualgraph_->SizeOfVertList();
130  int Fd = ptr_dualgraph_->SizeOfFaceList();
131 
132  VX x;
133  if (ptr_x == NULL)
134  {
135  ptr_x = &x;
136  ptr_x->resize(Nd);
137  ptr_x->setOnes();
138  }
139 
140  F_.resize(6 * Ns_);
141  F_.setZero();
142 
143  for (int i = 0; i < Nd; i++)
144  {
145  WF_edge *ei = ptr_frame->GetEdge(ptr_dualgraph_->e_orig_id(i));
146  WF_edge *ej = ei->ppair_;
147  int dual_u = ptr_dualgraph_->v_dual_id(ej->pvert_->ID());
148  int dual_v = ptr_dualgraph_->v_dual_id(ei->pvert_->ID());
149 
150  for (int j = 0; j < 6; j++)
151  {
152  // only unrestrained node is added into stiffness equation
153  if (dual_u < Ns_)
154  {
155  F_[dual_u * 6 + j] += (*ptr_x)[i] * Fe_[i][j];
156  }
157  if (dual_v < Ns_)
158  {
159  F_[dual_v * 6 + j] += (*ptr_x)[i] * Fe_[i][j + 6];
160  }
161  }
162  }
163 
164  if (terminal_output_)
165  {
166  create_f_.Stop();
167  }
168 }
169 
170 
172 {
173  if (terminal_output_)
174  {
175  create_ek_.Start();
176  }
177 
178  WireFrame *ptr_frame = ptr_dualgraph_->ptr_frame_;
179  vector<WF_edge *> wf_edge_list = *ptr_frame->GetEdgeList();
180  vector<WF_vert *> wf_vert_list = *ptr_frame->GetVertList();
181 
182  int Nd = ptr_dualgraph_->SizeOfVertList();
183  int Fd = ptr_dualgraph_->SizeOfFaceList();
184 
185  /* ref to Matrix Analysis of Strutures Aslam Kassimali, Section 8.2 Table 8.1*/
186  double Ax = F_PI * r_ * r_;
187  double Asy = Ax * (6 + 12 * v_ + 6 * v_*v_) / (7 + 12 * v_ + 4 * v_*v_);
188  double Asz = Asy;
189 
190  /* torsion constant */
191  double Jxx = 0.5 * F_PI * r_ * r_ * r_ * r_;
192 
193  /* shear deformation constant */
194  double Ksy = 0;
195  double Ksz = 0;
196 
197  /* area moment of inertia (bending about local y,z-axis)
198  * https://en.wikipedia.org/wiki/Bending (beam deflection equation)
199  * https://en.wikipedia.org/wiki/List_of_area_moments_of_inertia (numerical value)
200  * note this is slender rod of length L and Mass M, spinning around end
201  */
202  double Iyy = F_PI * r_ * r_ * r_ * r_ / 4;
203  double Izz = Iyy;
204 
205  double t0, t1, t2, t3, t4, t5, t6, t7, t8; /* coord transf matrix entries */
206 
207  eK_.resize(Nd);
208  for (int i = 0; i < Nd; i++)
209  {
210  eK_[i].setZero();
211 
212  //WF_edge *ei = ptr_frame->GetNeighborEdge(ptr_dualgraph_->v_orig_id(i));
213  WF_edge *ei = wf_edge_list[ptr_dualgraph_->e_orig_id(i)];
214 
215  int u = ei->ppair_->pvert_->ID();
216  int v = ei->pvert_->ID();
217  double L = ei->Length();
218  double Le = L - 2 * nr_;
219 
220  MatrixXd eKuv(12, 12);
221  eKuv.setZero();
222 
223  point node_u = wf_vert_list[u]->Position();
224  point node_v = wf_vert_list[v]->Position();
225 
226  transf_.CreateTransMatrix(node_u, node_v, t0, t1, t2, t3, t4, t5, t6, t7, t8, 0);
227 
228  if (1 == shear_)
229  {
230  /* for circular cross-sections, the shape factor for shear(fs) = 1.2 (ref. Aslam's book) */
231  double fs = 1.2;
232  Ksy = 12. * E_ * Izz * fs / (G_ * Asy * Le * Le);
233  Ksz = 12. * E_ * Iyy * fs / (G_ * Asz * Le * Le);
234  }
235  else
236  {
237  Ksy = 0;
238  Ksz = 0;
239  }
240 
241  int n1 = ptr_dualgraph_->v_dual_id(u);
242  int n2 = ptr_dualgraph_->v_dual_id(v);
243 
244  eKuv(0,0) = eKuv(6,6) = E_ * Ax / Le;
245  eKuv(1,1) = eKuv(7,7) = 12. * E_ * Izz / (Le * Le * Le * (1. + Ksy));
246  eKuv(2,2) = eKuv(8,8) = 12. * E_ * Iyy / (Le * Le * Le * (1. + Ksz));
247  eKuv(3,3) = eKuv(9,9) = G_ * Jxx / Le;
248  eKuv(4,4) = eKuv(10,10) = (4. + Ksz) * E_ * Iyy / (Le * (1. + Ksz));
249  eKuv(5,5) = eKuv(11,11) = (4. + Ksy) * E_ * Izz / (Le * (1. + Ksy));
250 
251  eKuv(4,2) = eKuv(2,4) = -6. * E_ * Iyy / (Le * Le * (1. + Ksz));
252  eKuv(5,1) = eKuv(1,5) = 6. * E_ * Izz / (Le * Le * (1. + Ksy));
253  eKuv(6,0) = eKuv(0,6) = - eKuv(0,0);
254 
255  eKuv(11,7) = eKuv(7,11) = eKuv(7,5) = eKuv(5,7) = -eKuv(5,1);
256  eKuv(10,8) = eKuv(8,10) = eKuv(8,4) = eKuv(4,8) = -eKuv(4,2);
257  eKuv(9,3) = eKuv(3,9) = - eKuv(3,3);
258  eKuv(10, 2) = eKuv(2, 10) = eKuv(4, 2);
259  eKuv(11, 1) = eKuv(1, 11) = eKuv(5, 1);
260 
261  eKuv(7,1) = eKuv(1,7) = -eKuv(1,1);
262  eKuv(8,2) = eKuv(2,8) = -eKuv(2,2);
263  eKuv(10,4) = eKuv(4,10) = (2. - Ksz) * E_ * Iyy / (Le * (1. + Ksz));
264  eKuv(11,5) = eKuv(5,11) = (2. - Ksy) * E_ * Izz / (Le * (1. + Ksy));
265 
266  transf_.TransLocToGlob(t0, t1, t2, t3, t4, t5, t6, t7, t8, eKuv, 0, 0);
267 
268  for (int k = 0; k < 12; k++)
269  {
270  for (int l = k + 1; l < 12; l++)
271  {
272  if (eKuv(k, l) != eKuv(l, k))
273  {
274  if (fabs(eKuv(k,l) / eKuv(l,k) - 1.0) > SPT_EPS
275  &&
276  (fabs(eKuv(k, l) / eKuv(k, k)) > SPT_EPS || fabs(eKuv(l, k) / eKuv(k, k)) > SPT_EPS)
277  )
278  {
279  fprintf(stderr, "elastic_K: element stiffness matrix not symetric ...\n");
280  fprintf(stderr, " ... k[%d][%d] = %15.6e \n", k, l, eKuv(k,l));
281  fprintf(stderr, " ... k[%d][%d] = %15.6e ", l, k, eKuv(l,k));
282  fprintf(stderr, " ... relative error = %e \n", fabs(eKuv(k,l) / eKuv(l,k) - 1.0));
283  }
284 
285  eKuv(k, l) = eKuv(l, k) = (eKuv(k, l) + eKuv(l, k)) / 2;
286  }
287  }
288  }
289 
290  eK_[i] = eKuv;
291  }
292 
293  if (terminal_output_)
294  {
295  create_ek_.Stop();
296  }
297 }
298 
299 
301 {
302  if (terminal_output_)
303  {
304  create_k_.Start();
305  }
306 
307  WireFrame *ptr_frame = ptr_dualgraph_->ptr_frame_;
308  int Nd = ptr_dualgraph_->SizeOfVertList();
309  int Fd = ptr_dualgraph_->SizeOfFaceList();
310 
311  VX x;
312  if (ptr_x == NULL)
313  {
314  ptr_x = &x;
315  ptr_x->resize(Nd);
316  ptr_x->setOnes();
317  }
318 
319  vector<Triplet<double>> K_list;
320 
321  K_.resize(6 * Ns_, 6 * Ns_);
322  for (int i = 0; i < Nd; i++)
323  {
324  WF_edge *ei = ptr_frame->GetEdge(ptr_dualgraph_->e_orig_id(i));
325  WF_edge *ej = ei->ppair_;
326  int u = ej->pvert_->ID();
327  int v = ei->pvert_->ID();
328  int dual_u = ptr_dualgraph_->v_dual_id(u);
329  int dual_v = ptr_dualgraph_->v_dual_id(v);
330 
331  if (dual_u < Ns_ && dual_v < Ns_)
332  {
333  // dual_u and dual_v are both unrestrained node
334  for (int k = 0; k < 6; k++)
335  {
336  for (int l = 0; l < 6; l++)
337  {
338  double tmp;
339 
340  tmp = (*ptr_x)[i] * eK_[i](k, l);
341  if (fabs(tmp) > SPT_EPS)
342  {
343  K_list.push_back(Triplet<double>(dual_u * 6 + k, dual_u * 6 + l, tmp));
344  }
345 
346  tmp = (*ptr_x)[i] * eK_[i](k + 6, l + 6);
347  if (fabs(tmp) > SPT_EPS)
348  {
349  K_list.push_back(Triplet<double>(dual_v * 6 + k, dual_v * 6 + l, tmp));
350  }
351 
352  tmp = (*ptr_x)[i] * eK_[i](k, l + 6);
353  if (fabs(tmp) > SPT_EPS)
354  {
355  K_list.push_back(Triplet<double>(dual_u * 6 + k, dual_v * 6 + l, tmp));
356  }
357 
358  tmp = (*ptr_x)[i] * eK_[i](k + 6, l);
359  if (fabs(tmp) > SPT_EPS)
360  {
361  K_list.push_back(Triplet<double>(dual_v * 6 + k, dual_u * 6 + l, tmp));
362  }
363  }
364  }
365  }
366  else
367  if (dual_u < Ns_)
368  {
369  // dual_u is free while dual_v is restrained
370  for (int k = 0; k < 6; k++)
371  {
372  for (int l = 0; l < 6; l++)
373  {
374  double tmp = (*ptr_x)[i] * eK_[i](k, l);
375  if (fabs(tmp) > SPT_EPS)
376  {
377  K_list.push_back(Triplet<double>(dual_u * 6 + k, dual_u * 6 + l, tmp));
378  }
379  }
380  }
381  }
382  else
383  if (dual_v < Ns_)
384  {
385  for (int k = 0; k < 6; k++)
386  {
387  for (int l = 0; l < 6; l++)
388  {
389  double tmp = (*ptr_x)[i] * eK_[i](k + 6, l + 6);
390  if (fabs(tmp) > SPT_EPS)
391  {
392  K_list.push_back(Triplet<double>(dual_v * 6 + k, dual_v * 6 + l, tmp));
393  }
394  }
395  }
396  }
397  }
398  K_.setFromTriplets(K_list.begin(), K_list.end());
399 
400  if (terminal_output_)
401  {
402  create_k_.Stop();
403  }
404 }
405 
406 
408  VX &D, VX *ptr_x,
409  bool cond_num, int file_id, string file_name
410  )
411 {
412  D.resize(6 * Ns_);
413  D.setZero();
414 
415  CreateGlobalK(ptr_x);
416  CreateF(ptr_x);
417 
418  /* Parameter for StiffnessSolver */
419  int info;
420  IllCondDetector stiff_inspector(K_);
421 
422  /* --- Check Stiffness Matrix Condition Number --- */
423  if (cond_num)
424  {
425  if (!CheckIllCondition(stiff_inspector))
426  {
427  return false;
428  }
429  }
430 
431  /* --- Solving Process --- */
432  if (terminal_output_)
433  {
434  fprintf(stdout, "Stiffness : Linear Elastic Analysis ... Element Gravity Loads\n");
435  }
436 
438  {
439  cout << "Stiffness Solver fail!\n" << endl;
440  return false;
441  }
442 
443  /* --- Equilibrium Error Check --- */
444  if (!CheckError(stiff_inspector, D))
445  {
446  return false;
447  }
448 
449  /* --- Output Process --- */
450  if (file_output_)
451  {
452  WriteData(D, file_id, file_name);
453  }
454 
455  return true;
456 }
457 
458 
460  VX &D, VX &D0, VX *ptr_x,
461  bool cond_num,
462  int file_id, string file_name
463  )
464 {
465  D.resize(6 * Ns_);
466  D.setZero();
467 
468  CreateGlobalK(ptr_x);
469  CreateF(ptr_x);
470 
471  /* --- Check Stiffness Matrix Condition Number --- */
472  IllCondDetector stiff_inspector(K_);
473  if (cond_num)
474  {
475  if (!CheckIllCondition(stiff_inspector))
476  {
477  return false;
478  }
479  }
480 
481  /* --- Solving Process --- */
482  if (terminal_output_)
483  {
484  fprintf(stdout, "Stiffness : Linear Elastic Analysis ... Element Gravity Loads\n");
485  }
486 
487  int info;
488  if (!stiff_solver_.SolveSystem(K_, D, F_, D0, terminal_output_, info))
489  {
490  cout << "Stiffness Solver fail!\n" << endl;
491  return false;
492  }
493 
494  /* --- Equilibrium Error Check --- */
495  if (!CheckError(stiff_inspector, D))
496  {
497  return false;
498  }
499 
500  /* --- Output Process --- */
501  if (file_output_)
502  {
503  WriteData(D, file_id, file_name);
504  }
505 
506  return true;
507 }
508 
509 
511 {
512  if (terminal_output_)
513  {
514  check_ill_.Start();
515  }
516 
517  bool bSuccess = true;
518  double cond_num;
519  cond_num = stiff_inspector.ComputeCondNum();
520  printf("Condition Number = %9.3e\n", cond_num);
521  if (cond_num < MCOND_TOL)
522  {
523  if (terminal_output_)
524  {
525  printf(" < tol = %7.1e\n", MCOND_TOL);
526  printf(" * Acceptable Matrix! *\n");
527  }
528  }
529  else
530  {
531  printf(" > tol = %7.1e\n", MCOND_TOL);
532  printf(" * Ill Conditioned Stiffness Matrix! *\n");
533  printf("Press any key to exit...\n");
534  bSuccess = false;
535  }
536 
537  if (terminal_output_)
538  {
539  check_ill_.Stop();
540  }
541 
542  return bSuccess;
543 }
544 
545 
546 bool Stiffness::CheckError(IllCondDetector &stiff_inspector, VX &D)
547 {
548  if (terminal_output_)
549  {
551  }
552 
553  bool bSuccess = true;
554  double error = stiff_inspector.EquilibriumError(K_, D, F_);
555  if (terminal_output_)
556  {
557  printf("Root Mean Square (RMS) equilibrium error = %9.3e\n", error);
558  }
559  if (error < STIFF_TOL)
560  {
561  if (terminal_output_)
562  {
563  printf(" < tol = %7.1e\n", STIFF_TOL);
564  printf(" * Converged *\n");
565  }
566  }
567  else
568  {
569  printf(" > tol = %7.1e\n", STIFF_TOL);
570  printf(" !! Not Converged !!\n");
571  printf("Press any key to exit...\n");
572  bSuccess = false;
573  }
574 
575  if (terminal_output_)
576  {
577  check_error_.Stop();
578  }
579 
580  return bSuccess;
581 }
582 
583 
584 void Stiffness::WriteData(VectorXd &D, int id, string fname)
585 {
586  if (fname == "")
587  {
588  return;
589  }
590 
591  VX D_joined(ptr_dualgraph_->SizeOfFaceList() * 6);
592  D_joined.setZero();
593 
594  for (int i = 0; i < Ns_ * 6; i++)
595  {
596  D_joined[i] = D[i];
597  }
598 
599 
600  /* --- Gnuplot File Generation --- */
601  char iname[10];
602  sprintf(iname, "%d", id);
603 
604  string path = ptr_path_;
605  string fpath = path + '/' + fname + iname + ".3dd";
606  string meshpath = path + '/' + fname + iname + "-msh";
607  string plotpath = path + '/' + fname + iname + ".plt";
608 
609  double exagg_static = 5;
610  float scale = 1;
611 
613  stiff_io_.GnuPltStaticMesh(fpath.c_str(), meshpath.c_str(), plotpath.c_str(),
614  D_joined, exagg_static, scale, ptr_dualgraph_, ptr_dualgraph_->ptr_frame_);
615 }
616 
617 
618 MatrixXd Stiffness::eKe(int ei)
619 {
620  MX tmpK(6, 6);
621  tmpK.setZero();
622 
623  int dual_id = ptr_dualgraph_->e_dual_id(ei);
624  if (ptr_dualgraph_->e_orig_id(dual_id) == ei)
625  {
626  for (int i = 0; i < 6; i++)
627  {
628  for (int j = 0; j < 6; j++)
629  {
630  tmpK(i, j) = eK_[dual_id](i, j + 6);
631  }
632  }
633  }
634  else
635  {
636  for (int i = 0; i < 6; i++)
637  {
638  for (int j = 0; j < 6; j++)
639  {
640  tmpK(i, j) = eK_[dual_id](i + 6, j);
641  }
642  }
643  }
644 
645  return tmpK;
646 }
647 
648 
649 MatrixXd Stiffness::eKv(int ei)
650 {
651  MX tmpK(6, 6);
652  tmpK.setZero();
653 
654  int dual_id = ptr_dualgraph_->e_dual_id(ei);
655  if (ptr_dualgraph_->e_orig_id(dual_id) == ei)
656  {
657  for (int i = 0; i < 6; i++)
658  {
659  for (int j = 0; j < 6; j++)
660  {
661  tmpK(i, j) = eK_[dual_id](i, j);
662  }
663  }
664  }
665  else
666  {
667  for (int i = 0; i < 6; i++)
668  {
669  for (int j = 0; j < 6; j++)
670  {
671  tmpK(i, j) = eK_[dual_id](i + 6, j + 6);
672  }
673  }
674  }
675 
676  return tmpK;
677 }
678 
679 
680 VectorXd Stiffness::Fe(int ei)
681 {
682  VX tmpF(6);
683  tmpF.setZero();
684 
685  int dual_id = ptr_dualgraph_->e_dual_id(ei);
686  if (ptr_dualgraph_->e_orig_id(dual_id) == ei)
687  {
688  for (int j = 0; j < 6; j++)
689  {
690  tmpF[j] = Fe_[dual_id][j];
691  }
692  }
693  else
694  {
695  for (int j = 0; j < 6; j++)
696  {
697  tmpF[j] = Fe_[dual_id][j + 6];
698  }
699  }
700  return tmpF;
701 }
702 
703 
705 {
706  if (terminal_output_)
707  {
708  printf("***Stiffness timer result:\n");
709  stiff_solver_.compute_k_.Print("ComputeK:");
710  stiff_solver_.solve_d_.Print("SolveD:");
711  create_fe_.Print("CreateFe:");
712  create_f_.Print("CreateF:");
713  create_ek_.Print("CreateElasticK:");
714  create_k_.Print("CreateGlobalK:");
715  check_ill_.Print("CheckIllCond:");
716  check_error_.Print("CheckError:");
717  }
718  else
719  {
720  printf("***Stiffness detailed timing turned off.\n");
721  }
722 }
Timer create_f_
Definition: Stiffness.h:166
MX eKe(int ei)
Definition: Stiffness.cpp:618
double g_
Definition: Stiffness.h:158
bool CheckError(IllCondDetector &stiff_inspector, VX &D)
Definition: Stiffness.cpp:546
bool CalculateD(VX &D, VX *ptr_x=NULL, bool cond_num=false, int file_id=0, string file_name="")
Definition: Stiffness.cpp:407
Timer check_error_
Definition: Stiffness.h:170
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
GLenum GLenum GLenum GLenum GLenum scale
#define SPT_EPS
Definition: GCommon.h:58
Timer create_k_
Definition: Stiffness.h:168
GLsizei const GLchar *const * path
void CreateElasticK()
Definition: Stiffness.cpp:171
void Init()
Definition: Stiffness.cpp:54
void WriteData(VectorXd &D, int id=0, string fname="stiff_data")
Definition: Stiffness.cpp:584
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
WF_edge * GetEdge(int i)
Definition: WireFrame.h:238
void GnuPltStaticMesh(const char *fpath, const char *meshpath, const char *plotpath, VX &D, double exagg_static, float scale, DualGraph *ptr_dualgraph, WireFrame *ptr_frame)
Definition: StiffnessIO.cpp:46
Timer create_ek_
Definition: Stiffness.h:167
double r_
Definition: Stiffness.h:155
int SizeOfFaceList()
Definition: DualGraph.h:147
#define M_PI
StiffnessSolver stiff_solver_
Definition: Stiffness.h:144
vector< VX > Fe_
Definition: Stiffness.h:151
vector< WF_edge * > * GetEdgeList()
Definition: WireFrame.h:236
GLint GLenum GLint x
double EquilibriumError(EigenSp const &K, VX const &D, VX const &F)
void TransLocToGlob(double t0, double t1, double t2, double t3, double t4, double t5, double t6, double t7, double t8, MX &m, float r1, float r2)
Definition: CoordTrans.cpp:108
#define MCOND_TOL
Definition: GCommon.h:70
double Length() const
Definition: WireFrame.h:142
void Stop()
Definition: Timer.cpp:21
int e_orig_id(int u)
Definition: DualGraph.h:152
WF_edge * ppair_
Definition: WireFrame.h:166
DualGraph * ptr_dualgraph_
Definition: Stiffness.h:139
Timer check_ill_
Definition: Stiffness.h:169
void WriteInputData(const char *fpath, DualGraph *ptr_dualgraph, FiberPrintPARM *ptr_parm, int verbose)
bool SolveSystem(SpMat &K, VX &D, VX &F, int verbose, int &info)
int SizeOfFreeFace()
Definition: DualGraph.h:148
double v_
Definition: Stiffness.h:161
#define F_PI
Definition: GCommon.h:54
void CreateGlobalK(VX *ptr_x=NULL)
Definition: Stiffness.cpp:300
double youngs_modulus_
void CreateF(VX *ptr_x=NULL)
Definition: Stiffness.cpp:120
bool shear_
Definition: Stiffness.h:163
vector< WF_vert * > * GetVertList()
Definition: WireFrame.h:235
double shear_modulus_
double poisson_ratio_
vector< MX > eK_
Definition: Stiffness.h:149
Eigen::VectorXd VX
Definition: Stiffness.h:79
bool file_output_
Definition: Stiffness.h:173
VX Fe(int ei)
Definition: Stiffness.cpp:680
void CreateFe()
Definition: Stiffness.cpp:63
void PrintOutTimer()
Definition: Stiffness.cpp:704
FiberPrintPARM * ptr_parm_
Definition: Stiffness.h:140
double nr_
Definition: Stiffness.h:156
Timer create_fe_
Definition: Stiffness.h:165
void Start()
Definition: Timer.cpp:15
int e_dual_id(int u)
Definition: DualGraph.h:153
double G_
Definition: Stiffness.h:159
WireFrame * ptr_frame_
Definition: DualGraph.h:189
int ID() const
Definition: WireFrame.h:80
void CreateTransMatrix(std::vector< V3 > xyz, double L, int n1, int n2, double &t0, double &t1, double &t2, double &t3, double &t4, double &t5, double &t6, double &t7, double &t8, float p)
Definition: CoordTrans.cpp:3
char * ptr_path_
Definition: Stiffness.h:141
StiffnessIO stiff_io_
Definition: Stiffness.h:143
const GLdouble * v
WF_vert * pvert_
Definition: WireFrame.h:164
MX eKv(int ei)
Definition: Stiffness.cpp:649
SpMat K_
Definition: Stiffness.h:148
int v_dual_id(int i)
Definition: DualGraph.h:155
int SizeOfVertList()
Definition: DualGraph.h:145
void Print(char *item)
Definition: Timer.cpp:37
double E_
Definition: Stiffness.h:160
#define STIFF_TOL
Definition: GCommon.h:66
bool terminal_output_
Definition: Stiffness.h:172
double density_
Definition: Stiffness.h:157
CoordTrans transf_
Definition: Stiffness.h:146
Eigen::MatrixXd MX
Definition: Stiffness.h:78
point Position() const
Definition: WireFrame.h:78
bool CheckIllCondition(IllCondDetector &stiff_inspector)
Definition: Stiffness.cpp:510


choreo_task_sequence_planner
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:03:14