muMECH  1.0
problem.h
Go to the documentation of this file.
1 //********************************************************************************************************
2 // code: ### ### ##### #### ## ##
3 // ## ## ######## ## ## ## ## ##
4 // ## ## ## ## ## ### ## ######
5 // ## ## ## ## ## ## ## ## ##
6 // ##### ## ## ##### #### ## ##
7 // ##
8 //
9 // name: problem.h
10 // author(s): Ladislav Svoboda, Jan Novak
11 // language: C, C++
12 // license: This program is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU Lesser General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 //********************************************************************************************************
31 // *******************************************************************************************************
32 // TADY BUDU ZATIM DRZET OBECNE INFORMACE O KODU
33 // a) FORMATY
34 // TENSOR - symetricke tensory druheho radu, 2x2 pro 2d a 3x3 pro 3d, hlavne strain a stress
35 // - interne jsou ukladany (vetsinou) v 1d poli v TNTV_THEORETICAL_FEEP notaci
36 // - I/O, tj. pri komunikaci s uzivatelem, jsou defaultne v 1d poli v TNTV_THEORETICAL_ROW notaci
37 //
38 //
39 // *******************************************************************************************************
40 
41 
42 
43 
44 #ifndef MUMECH_PROBLEM_H
45 #define MUMECH_PROBLEM_H
46 
47 #include "types.h"
48 #include "macros.h"
49 #include "matrix.h"
50 #include "inclusion.h"
51 
52 
53 
54 namespace mumech {
55 
56 class Inclusion;
57 class Mesh;
58 class MatrixRecord;
59 class Homogenization;
60 
61 
62 class Problems
63 {
64  protected:
65  // INPUT VARIABLES
66  bool twodim;
67 
68  public:
70  Problems () {}
72  virtual ~Problems () {}
73 
75  virtual classID give_classid() const = 0; // { errol; return classVoid; } ///= 0; = 0;
76 
77 
79  virtual bool is_converted_to_equivalent (void) const = 0;
81  virtual int give_nLC (void) const = 0;
82 
84  int give_twodim (void) const { return twodim; }
86  int give_dimension (void) const { return twodim ? 2 : 3; }
87 
88  int ndisplc_one (void) const { return this->give_VECT_RANGE() ; }
89  int nstrain_one (void) const { return this->give_VM_TENS_RANGE() ; }
90 
92  int give_VECT_RANGE (void) const { return (twodim ? 2 : 3); }
94  int give_EA_RANGE (void) const { return (twodim ? 1 : 3); }
96  int give_TENS_RANGE (void) const { return (twodim ? 4 : 9); }
98  int give_VM_TENS_RANGE (void) const { return (twodim ? 3 : 6); }
100  int give_ISO_C_RANGE (void) const { return (twodim ? 5 : 12); }
102  int give_EL_POT_RANGE (void) const { return (twodim ? 0 : 13); }
104  int give_TRNSFM_MTRX_VEC_RANGE (void) const { return (twodim ? 4 : 9); }
106  int give_TRNSFM_MTRX_TENS_RANGE (void) const { return (twodim ? 9 : 36); }
107 
109  void set_dimension (int d)
110  {
111  if (d == 2) twodim = true;
112  else if (d == 3) twodim = false;
113  else _errorr ("wrong dimension number, choose 2 or 3");
114  }
115 
116 };
117 
121 class ProblemFEM : public Problems
122 {
123 private:
124  int nLC;
125 
126 public:
128  ProblemFEM (int d, int n) : Problems () {
129  this->set_dimension(d);
130  this->nLC = n;
131 
132  }
134  virtual ~ProblemFEM () {}
135 
137  virtual classID give_classid() const { return classProblemFEM; }
138 
140  virtual bool is_converted_to_equivalent (void) const { return true; }
142  virtual int give_nLC (void) const { return nLC; }
143 
144 
145 };
146 
154 class Problem : public Problems
155 {
156  friend class Inclusion;
157  friend class InclusionRecord3D;
158  friend class InclusionRecord2D;
159  friend class printBenchmarkResultsVtk;
160  friend class selfBalanceAlgorithm;
163  friend class MatrixRecord;
164  friend class Homogenization;
165  friend class Dilute;
166  friend class DifferentialScheme;
167  friend class RegGrid;
168  friend class Mesh;
169  friend class Point;
170  friend class mNode;
171  friend class mElement;
172 
173 
174  // /** All variables are private. */
175  // ***************************************************************************************************
176  // /** *** @name *** PRIVATE VARIABLES *** */* *** ***
177  // *************************************************-*************************************************
178  // @{
179  private:
180  // STATE VARIABLES
181  bool data_set;
183 
184  // INPUT VARIABLES
185  //bool twodim; ///< 2 dimension problem; 3d is default; twodim == true - 2d, twodim == false - 3d
186 
188  int noIncl;
190 
195 
199 
201 
202  double problem_size_A[3];
203  double problem_size_B[3];
204  double node_dist;
205 
206  int verbose;
207 
208  double min_axes_diff;
209  double max_axes_diff;
210 
213 
214 
215  // COMPUTED VARIABLES
216  double volumeOfIncls;
218 
219  //
220  int nmeshes;
222 
223  int nhomogs;
225  // @}
226 
227 
228  // ***************************************************************************************************
229  // /** *** @name *** PUBLIC FUNCTIONS *** */* *** ***
230  // *************************************************-*************************************************
231  // @{
232  public:
234  Problem (void);
236  virtual ~Problem ();
237 
239  virtual classID give_classid() const { return classProblem; }
240 
242  void read_input_file (const char *filename);
243 
245  void input_data_initialize_and_check_consistency (void);
246 
248  void convert_to_equivalent_problem (void);
249 
251  void print_equivalent_problem (const char *filename);
252 
271  long giveFieldsOfPoint (double **displc, double **strain, double **stress, const double *coords,
272  char ptFlag, int rs, int nrs,
273  PFCmode pfcMode=PFCM_OPTIMIZED, long reqIncl = -3, STRNotation tn = STRN_THEORETICAL_ROW) const;
274 
276  long giveFieldsOfPointOneRS (double *displc, double *strain, double *stress, const double *coords,
277  char ptFlag, int rs,
278  PFCmode pfcMode=PFCM_OPTIMIZED, long reqIncl = -3, STRNotation tn = STRN_THEORETICAL_ROW) const;
279 
293  void printFieldsOnMeshVTK (const char *mesh_file_out, const char *mesh_file,
294  char ptFlag, int rs, int nrs,
295  PFCmode pfcMode=PFCM_OPTIMIZED) const;
296 
313  void printFieldsOnMeshGrid (const char *mesh_file_out, const double *p1, const double *p2, const long *n,
314  char ptFlag, int rs, int nrs,
315  PFCmode pfcMode=PFCM_OPTIMIZED) const;
316 
324  void print_visualization (const char *filename, int n, int dim=0, bool refined=false);
325 
327  void check_overlap (void);
328 
329  void matrix_giveReducedStiffMatrix (double *m) const { this->give_matrix()->giveReducedStiffMatrix(m); }
330  void matrix_giveFullStiffMatrix (double *m) const { this->give_matrix()->giveFullStiffMatrix(m); }
331 
332 
334  virtual int give_nLC (void) const { if (matrix->nRS==0) _errorr("Number of load cases have not been set"); return matrix->nRS; }
336  DiffTypes give_diffType (void) const { return diffType; }
338  //SBAmode give_SBA_mode (void) { return SBA_mode; }
339 
341  // int set_verbose (void) const { return verbose; }
342 
344  Mesh* give_new_mesh(void);
346  Homogenization* give_new_homogenization (HomogenizationType ht);
347 
348  // AGREGATED FUNCTIONS
349 
354  Problem* read_inclusions_plus_initialize_and_print (const char *inclusion_file, const char *equiv_file, DiffTypes dt);
355 
356  // @}
357 
358 
359 
360  // /** Public functions, obsolete or debugging functions. */
361  // ***************************************************************************************************
362  // /** *** @name *** PUBLIC FUNCTIONS - obsolete debug *** */* *** ***
363  // *************************************************-*************************************************
364  // @{
365  public:
366  //
368  void set_SBA_optimized (bool val) { SBA_optimized = val; }
369  void set_SBA_maximumNumberOfIterations (int val) { SBA_maxiters = val; }
370  void set_SBA_requiredNumberOfIterations (int val) { SBA_reqiters = val; }
371  void set_intFieldsShape (int val) { intFieldsShape = val; }
372  void set_SBAM (SBAtype val) { SBA_type = val; }
373 
374  void set_approximation(int val);
375 
376  void set_problem_size(double a1, double a2, double a3, double b1, double b2, double b3, double node_distance) {
377  problem_size_A[0] = a1;
378  problem_size_A[1] = a2;
379  problem_size_A[2] = a3;
380  problem_size_B[0] = b1;
381  problem_size_B[1] = b2;
382  problem_size_B[2] = b3;
383  node_dist = node_distance;
384  }
385 
386  /*void give_inside_strain_of_incl0_on_other_affect(double *strain_others,double *strain) {
387  ((InclusionRecord2D*)inclusions[0])->update_eps_tau(0, strain_others);
388 
389  double **str = AllocateArray2D(1, give_VM_TENS_RANGE());
390  for (int i = 0; i < give_VM_TENS_RANGE(); i++)str[0][i] = 0.;
391  inclusions[0]->give_EshelbyPertStrain_internal(str, 0, 1);
392  for (int i = 0; i < give_VM_TENS_RANGE(); i++)strain[i] = str[0][i]+ strain_others[i];
393  }*/
394 
395 
397  void set_semiaxes_min_difference (double val) { min_axes_diff = val; }
399  void set_semiaxes_max_difference (double val) { max_axes_diff = val; if (val > INFTY) _errorr2("Set max_axes_diff greather then mumech infinity value %lf", INFTY); }
400 
402  Inclusion* give_inclusion (long i) const { return inclusions[i]; }
404  long give_inclusion_with_point_inside (const double *coords, double epsilon = 0.0) const;
406  void give_ovlivneni (const double *coords, double *result);
408  void compute_fields_and_cmp_with_FEM_on_mesh (const char *mesh_file, const char *fem_results, int lc, int nlc, PFCmode pfcMode);
410  double compute_supplement_energy (int lc);
411 
412  // @}
413 
414 
415 
416  // /** Public functions for direct data input, obligatory for correct input. */
417  // ***************************************************************************************************
418  // /** *** @name *** DIRECT INPUT API - obligatory *** */* *** ***
419  // *************************************************-*************************************************
420  // @{
421  public:
423  void set_data_set (void) { data_set = true; }
425  //void set_dimension (int d);
427  void set_matrix_E_nu (double E, double nu) { this->matrix->set_E_nu(E, nu); }
429  void set_numberOfRemoteStrains (int n) { this->matrix->set_nlc(n); }
431  void set_RemoteStrain (int id, const double *rs) { this->matrix->set_Remote_strain_for_lc(id, rs); }
433  void set_number_of_inclusions (long n);
434 
436  void set_inclusion_centroids (long id, double x, double y, double z=0.0) { if (twodim) this->inclusions[id]->set_centroids (x,y); else this->inclusions[id]->set_centroids (x,y,z); }
438  void set_inclusion_E_nu (long id, double E, double nu) { this->inclusions[id]->set_Youngs_modulus(E); this->inclusions[id]->set_Poissons_ratio(nu); }
440  void set_inclusion_semiaxesDimensions (long id, double a1, double a2, double a3=0.0) { if (twodim) this->inclusions[id]->set_Semiaxes_dimensions (a1,a2); else this->inclusions[id]->set_Semiaxes_dimensions (a1,a2,a3); }
442  void set_inclusion_EulerAnglesDEG (long id, double e1, double e2=0.0, double e3=0.0) { if (twodim) this->inclusions[id]->set_Euller_angles_deg (e1); else this->inclusions[id]->set_Euller_angles_deg (e1,e2,e3); }
443  // @}
444 
445 
446  // /** Public functions for direct input of the voluntary data, default values are used if not set. */
447  // ***************************************************************************************************
448  // /** *** @name *** DIRECT INPUT API - voluntary *** */* *** ***
449  // *************************************************-*************************************************
450  // @{
451  public:
453  void set_inclusion_shape (long id, InclusionGeometry shape) { this->inclusions[id]->set_Inclusion_shape(shape); }
455  void set_diffType (DiffTypes val) { diffType = val; }
457  void set_DataDimDiff (int dim, DiffTypes dt) { this->set_data_set(); this->set_dimension(dim); this->set_diffType(dt); }
462  void set_UnitRemoteStrains (void) { this->matrix->set_unit_remote_strain(); }
464  void set_inclusion_all (long id, double x, double y, double e, double n, double a1, double a2, double e1)
465  { this->inclusions[id]->set_all_2d(x, y, e, n, a1, a2, e1); }
466  void set_inclusion_all (long id, double x, double y, double z, double e, double n, double a1, double a2, double a3, double e1, double e2, double e3)
467  { this->inclusions[id]->set_all_3d(x, y, z, e, n, a1, a2, a3, e1, e2, e3); }
468 
469  // allocate and generate a single 2d inclusion 2d problem
470  void generate_equiv_1x2dI_2d (double Em, double num, const double *rs, double x, double y, double E, double nu, double a1, double a2, double ea, DiffTypes dt);
471  // @}
472 
473 
474 
475  // /** */
476  // ***************************************************************************************************
477  // /** *** @name *** PRIVATE FUNCTIONS *** */* *** ***
478  // *************************************************-*************************************************
479  // @{
480  private:
481 
483  virtual bool is_converted_to_equivalent (void) const { return data_equivalent; }
485  //int give_twodim (void) const { return twodim; }
487  int is_twodim (void) const { return twodim; }
489  //virtual int give_dimension (void) const { return twodim ? 2 : 3; }
491  int get_SBA_maxiters (void) { return SBA_maxiters; }
493  int get_SBA_reqiters (void) { return SBA_reqiters; }
494 
496  void check_dim (int i) const { if ( (i != 2 && i != 3) || (i == 2 && twodim==false) || (i == 3 && twodim==true)) _errorr("problem dimension error"); }
497 
499  int give_verbose (void) const { return verbose; }
501  double give_semiaxes_min_difference (void) const { return min_axes_diff; }
503  double give_semiaxes_max_difference (void) const { return max_axes_diff; }
505  bool give_semiaxis_min_difference_change (void) const { return min_axes_diff_change; }
507  bool give_semiaxis_max_difference_change (void) const { return max_axes_diff_change; }
509  MatrixRecord* give_matrix (void) const { return matrix; }
510 
511  // /// Gives vector range, same as dimension.
512  // int give_VECT_RANGE (void) const { return (twodim ? 2 : 3); }
513  // /// Gives vector range, same as dimension.
514  // int give_EA_RANGE (void) const { return (twodim ? 1 : 3); }
515  // /// Gives tensor range, same as dimension^2. Theoretical range of a second order tensor.
516  // int give_TENS_RANGE (void) const { return (twodim ? 4 : 9); }
517  // /// Gives range of a second order tensor in Voigt-Mandel notation.
518  // int give_VM_TENS_RANGE (void) const { return (twodim ? 3 : 6); }
519  // /// Gives range of ...
520  // int give_ISO_C_RANGE (void) const { return (twodim ? 5 : 12); }
521  // /// Gives range of ...
522  // int give_EL_POT_RANGE (void) const { return (twodim ? 0 : 13); }
523  // /// Gives range of ...
524  // int give_TRNSFM_MTRX_VEC_RANGE (void) const { return (twodim ? 4 : 9); }
525  // /// Gives range of ...
526  // int give_TRNSFM_MTRX_TENS_RANGE (void) const { return (twodim ? 9 : 36); }
527 
528 
530  //int ndisplc_one (void) const { return this->give_VECT_RANGE() ; }
531  //int nstrain_one (void) const { return this->give_VM_TENS_RANGE() ; }
532  int ndisplc_all (void) const { return this->give_VECT_RANGE() * matrix->nRS; }
533  int nstrain_all (void) const { return this->give_VM_TENS_RANGE() * matrix->nRS; }
534 
536  bool file_type_s2e (const char *s);
537 
539  int check_lc_nlc (int lc, int nlc) const { return this->check_lc_nlc (lc, nlc, matrix->nRS); }
541  static int check_lc_nlc (int lc, int nlc, int nRS)
542  {
543  if (nlc < 0) _errorr("small nlc");
544  else if (nlc == 0) nlc = nRS;
545  else if (nlc > nRS) _errorr("big nlc");
546  if (lc < 0) _errorr("small lc");
547  else if (lc+nlc > nRS)
548  _errorr("big lc+nlc");
549  return nlc;
550  }
551 
553  PointPositionFlag givePointPosition (const double loc_x[3], const double sort_a[3], InclusionGeometry shape) const;
554 
559  void printVtkFileCompleteInclRec (const char *rsltFileName);
560 
562  void findAffectedInclusions (void);
567  void updateEigenstrainsBySBalgorithm (void);
572  void updateEigenstrainsBySBalgorithm_2D (int strainID);
573 
574  //
575  void updateStrainsInInclRecord (int noUpdate);
576  //void giveTransfEigenstrains();
577 
578  long give_EshelbyPertFieldsOnePoint (const double *coords, double **disp, double **strain, double **stress,
579  int rs, int nrs, PFCmode pfcMode, long reqIncl = -3) const;
580 
581  //long giveEshelbyTotalFields_OnePoint (const double *coords, double **disp, double **strain, double **stress,
582  // int rs, int nrs, PFCmode pfcMode, long reqIncl = -3, TensorNotationTypeInVector tn = TNTV_THEORETICAL_ROW) const;
583 
585  void give_EshelbyPertFieldsOnePoint_external (const double *coords, double **disp, double **strain, double **stress,
586  int lc, int nlc, PFCmode pfcMode, long parent_incl) const;
587 
590  long giveActingInclusions (long * actIncls, const double *coords) const;
591 
592 
593  double updateEpsTauInSBal(int strainID, double **&last_eps_tau);
594 
595  // @}
596 
597 }; // end of class declaration
598 
599 } // end of namespace mumech
600 
601 #endif
602 
603 /*end of file*/
DiffTypes
Definition: types.h:672
MatrixRecord * give_matrix(void) const
Definition: problem.h:509
double node_dist
?
Definition: problem.h:204
void set_Euller_angles_deg(double x)
Definition: inclusion.cpp:239
void set_centroids(double x, double y)
Definition: inclusion.cpp:235
int nmeshes
Number of meshes.
Definition: problem.h:220
classID
Type introduced to distinguish between classes.
Definition: types.h:62
int give_VM_TENS_RANGE(void) const
Gives range of a second order tensor in Voigt-Mandel notation.
Definition: problem.h:98
double volumeOfIncls
Volume of all inclusions.
Definition: problem.h:216
void set_dimension(int d)
Definition: problem.h:109
int give_EL_POT_RANGE(void) const
Gives range of ...
Definition: problem.h:102
int get_SBA_maxiters(void)
Definition: problem.h:491
int give_dimension(void) const
Definition: problem.h:86
file of various types and symbolic constant definitions
virtual int give_nLC(void) const
Give number of load cases, e.i. number of load cases, i.e. number of Remote_strain fields...
Definition: problem.h:334
void set_all_3d(double x, double y, double z, double e, double n, double a1, double a2, double a3, double e1, double e2, double e3)
Definition: inclusion.cpp:250
bool max_axes_diff_change
Permission to change the inclusion shape, when the maximal relative difference of two inclusion semia...
Definition: problem.h:212
int get_SBA_reqiters(void)
Definition: problem.h:493
void set_inclusion_semiaxesDimensions(long id, double a1, double a2, double a3=0.0)
Sets the id -th inclusion sorted semiaxes dimensions [a1,a2,a3]. The a3 dimension is ignored in the c...
Definition: problem.h:440
void matrix_giveReducedStiffMatrix(double *m) const
Definition: problem.h:329
void set_inclusion_shape(long id, InclusionGeometry shape)
Sets the id -th inclusion shape. Default shape is detected automaticly.
Definition: problem.h:453
Mesh ** meshes
Meshes.
Definition: problem.h:221
Class InclusionRecord contains and handles all inclusion data.
Definition: inclusion.h:60
Problem description.
Definition: problem.h:154
int give_TRNSFM_MTRX_TENS_RANGE(void) const
Gives range of ...
Definition: problem.h:106
virtual classID give_classid() const
Returns classID - class identification.
Definition: problem.h:137
int give_EA_RANGE(void) const
Gives vector range, same as dimension.
Definition: problem.h:94
Class of function for Mori-Tanaka homogenization.
void set_unit_remote_strain(void)
Sets a set of unit remote strain.
Definition: matrix.cpp:145
int nstrain_one(void) const
Definition: problem.h:89
int check_lc_nlc(int lc, int nlc) const
Definition: problem.h:539
int verbose
0 - no printing, 1 - basic printing, 3 - debug printing
Definition: problem.h:206
bool twodim
2 dimension problem; 3d is default; twodim == true - 2d, twodim == false - 3d
Definition: problem.h:66
Homogenization ** homogs
Homogenizations.
Definition: problem.h:224
Class mNode contains and handles all mesh node data.
Definition: mnode.h:43
void set_inclusion_E_nu(long id, double E, double nu)
Sets the id -th inclusion material properties, Young&#39;s modulus E and Poissons ratio nu...
Definition: problem.h:438
int give_VECT_RANGE(void) const
Gives vector range, same as dimension.
Definition: problem.h:92
matrix data structure - matrix (infinite medium) record
Definition: matrix.h:46
Class of function for homogenization of stress fields.
void set_problem_size(double a1, double a2, double a3, double b1, double b2, double b3, double node_distance)
Definition: problem.h:376
void set_SBA_requiredNumberOfIterations(int val)
Definition: problem.h:370
bool data_equivalent
Problem converted to equivalent one.
Definition: problem.h:182
Inclusion * give_inclusion(long i) const
debug, for one function in tools
Definition: problem.h:402
void set_inclusion_EulerAnglesDEG(long id, double e1, double e2=0.0, double e3=0.0)
Sets the id -th inclusion Euler angles [e1,e2,e3] given in degrees. The e2 and e3 angles are ignored ...
Definition: problem.h:442
void set_Inclusion_shape(InclusionGeometry val)
Definition: inclusion.h:185
int approximation
Approximation of epsilon tau - 0 = constant, 1 = linear, ...
Definition: problem.h:197
int nstrain_all(void) const
Definition: problem.h:533
virtual int give_nLC(void) const =0
Give number of load cases, e.i. number of load cases, i.e. number of Remote_strain fields...
virtual bool is_converted_to_equivalent(void) const
Give type of ...
Definition: problem.h:483
bool min_axes_diff_change
Permission to change the inclusion shape, when the minimal relative difference of two inclusion semia...
Definition: problem.h:211
void set_Semiaxes_dimensions(double x, double y)
Definition: inclusion.cpp:237
virtual int give_nLC(void) const
Give number of load cases, e.i. number of load cases, i.e. number of Remote_strain fields...
Definition: problem.h:142
void set_RemoteStrain(int id, const double *rs)
Sets the id -th remote strain, rs is row-by-row matrix of dimensions 2x2 or 3x3 for 2d or 3d problem...
Definition: problem.h:431
int ndisplc_one(void) const
Definition: problem.h:88
PFCmode
Algorithm type of a point fields calculation.
Definition: types.h:97
double min_axes_diff
The minimal relative difference of two inclusion semiaxes to guarantee numerical stability; relative ...
Definition: problem.h:208
virtual bool is_converted_to_equivalent(void) const
Give type of ...
Definition: problem.h:140
void set_inclusion_centroids(long id, double x, double y, double z=0.0)
Sets the id -th inclusion centroids [x,y,z]. The z coordinate is ignored in the case of 2 dimensions...
Definition: problem.h:436
virtual classID give_classid() const =0
Returns classID - class identification.
int SBA_reqiters
Number of iterations in SBA.
Definition: problem.h:194
The header file of usefull macros.
3D inclusion record.
Definition: inclusion.h:278
#define _errorr2(_1, _2)
Definition: gelib.h:154
void set_SBA_optimized(bool val)
Set type of self-balancing algorithm.
Definition: problem.h:368
SBAtype
Self-balance algorithm type.
Definition: types.h:88
bool SBA_optimized
SBA optimized (FULL/_OPTIMIZED_)
Definition: problem.h:192
STRNotation
This enum defines a notation how to represent a symmetric second/fourth-order tensor by reducing its ...
Definition: types.h:122
void matrix_giveFullStiffMatrix(double *m) const
Definition: problem.h:330
int give_ISO_C_RANGE(void) const
Gives range of ...
Definition: problem.h:100
int intFieldsShape
Sets the internal fields shape. 0 = basic eshelby solution, 1 = polynomial - if available, 2 = constant, 3 = sum all without any recalculation.
Definition: problem.h:196
void set_SBAM(SBAtype val)
Definition: problem.h:372
SBAtype SBA_type
type of Self balancing algorithm (SBA)
Definition: problem.h:191
void set_semiaxes_max_difference(double val)
Set the variable max_axes_diff.
Definition: problem.h:399
DiffTypes give_diffType(void) const
Give type of ...
Definition: problem.h:336
void set_inclusion_all(long id, double x, double y, double z, double e, double n, double a1, double a2, double a3, double e1, double e2, double e3)
Definition: problem.h:466
void set_all_2d(double x, double y, double e, double n, double a1, double a2, double e1)
Definition: inclusion.cpp:242
Single Point data structure - contribution from Single inclusion.
Definition: matrix.h:133
double give_semiaxes_min_difference(void) const
Give the variable min_axes_diff.
Definition: problem.h:501
int give_verbose(void) const
Give verbose level.
Definition: problem.h:499
virtual ~Problems()
Destructor.
Definition: problem.h:72
PointPositionFlag
Internal (inside the inclusion) / external (outside the inclusion) point position flag...
Definition: types.h:101
void set_data_set(void)
Function switches bool flag data_set on true. That indicates start of the process of data input...
Definition: problem.h:423
Problems()
Constructor.
Definition: problem.h:70
void set_matrix_E_nu(double E, double nu)
Sets problem dimension.
Definition: problem.h:427
int give_TENS_RANGE(void) const
Gives tensor range, same as dimension^2. Theoretical range of a second order tensor.
Definition: problem.h:96
void set_DataDimDiff(int dim, DiffTypes dt)
Function agregates set_data_set, set_dimension and set_diffType functions.
Definition: problem.h:457
HomogenizationType
Definition: types.h:69
Class inclusion contains and handles all inclusion data.
Inclusion ** inclusions
inclusion records - 1d array of pointers to InclusionRecord
Definition: problem.h:189
void check_dim(int i) const
Definition: problem.h:496
Class MatrixRecord.
Class of the functions returning the Eshelby solution of an inclusion of an ellipsoidal shape loaded ...
Definition: esuf.h:46
ProblemFEM(int d, int n)
Constructor.
Definition: problem.h:128
bool data_set
Input data given (direct input or vtk file read) - problem description.
Definition: problem.h:181
void set_diffType(DiffTypes val)
Sets type of differentiation, analytical by default.
Definition: problem.h:455
#define _errorr(_1)
Definition: gelib.h:160
Class of the functions calculating the values of elliptic integrals and its derivatives.
Definition: esei.h:42
InclusionGeometry
Inclusion shapes&#39; type.
Definition: types.h:161
static double epsilon
Definition: meso2d.cpp:172
int is_twodim(void) const
Definition: problem.h:487
int totalNoActingIncls
Total number of acting inclusions, e.i. sum of inclusion[i]->noActingIncls.
Definition: problem.h:217
int give_twodim(void) const
Definition: problem.h:84
void set_inclusion_all(long id, double x, double y, double e, double n, double a1, double a2, double e1)
Agregates ...
Definition: problem.h:464
bool give_semiaxis_max_difference_change(void) const
Give the variable max_axes_diff_change.
Definition: problem.h:507
virtual classID give_classid() const
Returns classID - class identification.
Definition: problem.h:239
void set_SBA_maximumNumberOfIterations(int val)
Definition: problem.h:369
DiffTypes diffType
the type of differentiation actually used. (just for testing purposes)
Definition: problem.h:200
void set_Remote_strain_for_lc(int lc, const double r1[])
r1 se zadava v theoretical row notation prislusne delky, 4 nebo 9
Definition: matrix.cpp:102
double max_axes_diff
The maximal relative difference of two inclusion semiaxes to guarantee numerical stability; relative ...
Definition: problem.h:209
int ndisplc_all(void) const
Definition: problem.h:532
int SBA_maxiters
Number of iterations in SBA.
Definition: problem.h:193
void set_Youngs_modulus(double val)
Definition: inclusion.h:186
int nhomogs
Number of homogenizations.
Definition: problem.h:223
Class of function for ... homogenization.
int give_TRNSFM_MTRX_VEC_RANGE(void) const
Gives range of ...
Definition: problem.h:104
double approx_point_pos1
Definition: problem.h:198
double give_semiaxes_max_difference(void) const
Give the variable max_axes_diff.
Definition: problem.h:503
Class Mesh contains and handles all mesh data.
Definition: mesh.h:52
Class of function for Mori-Tanaka homogenization.
static int check_lc_nlc(int lc, int nlc, int nRS)
Definition: problem.h:541
DEFAULT / INTERNAL FOR muMECH Theoretical notation saved in row-by-row form 2d: {t_11, t_12, t_21, t_22} 2d: {s_11, s_12, s_21, s_22} 3d: {t_11, t_12, t_13, t_21, t_22, t_23, t_31, t_32, t_33} 3d: {s_11, s_12, s_13, s_21, s_22, s_23, s_31, s_32, s_33}.
Definition: types.h:132
int noIncl
number of inclusions
Definition: problem.h:188
void set_nlc(int n)
Definition: matrix.cpp:68
void set_semiaxes_min_difference(double val)
Set the variable min_axes_diff.
Definition: problem.h:397
void set_Poissons_ratio(double val)
Definition: inclusion.h:187
void set_E_nu(double e, double n)
Definition: matrix.cpp:76
int nRS
Number of remote strains.
Definition: matrix.h:57
Problem description for FEM problem with results.
Definition: problem.h:121
void set_intFieldsShape(int val)
Definition: problem.h:371
void set_UnitRemoteStrains(void)
Function sets a set of unit remote strains.
Definition: problem.h:462
Class mElement contains and handles all mesh element data.
Definition: melement.h:42
virtual bool is_converted_to_equivalent(void) const =0
Give type of ...
#define INFTY
Definition: macros.h:143
MatrixRecord * matrix
matrix record
Definition: problem.h:187
void set_numberOfRemoteStrains(int n)
Sets number of remote strains.
Definition: problem.h:429
bool give_semiaxis_min_difference_change(void) const
Give the variable min_axes_diff_change.
Definition: problem.h:505
void e(int i)
virtual ~ProblemFEM()
Destructor.
Definition: problem.h:134