muMECH  1.0
homogenization.h
Go to the documentation of this file.
1 //********************************************************************************************************
2 // code: ### ### ##### #### ## ##
3 // ## ## ######## ## ## ## ## ##
4 // ## ## ## ## ## ### ## ######
5 // ## ## ## ## ## ## ## ## ##
6 // ##### ## ## ##### #### ## ##
7 // ##
8 // name: homogenization.h
9 // author(s): Jan Vorel, Ladislav Svoboda
10 // language: C, C++
11 // license: This program is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Lesser General Public License as published by
13 // the Free Software Foundation; either version 2 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 //********************************************************************************************************
31 #ifndef MUMECH_HOMOGENIZATION_H
32 #define MUMECH_HOMOGENIZATION_H
33 
34 #include "gelib.h"
35 #include "inclusion.h"
36 
37 
38 namespace mumech {
39 
41 
42 class Problem;
43 class Mesh;
44 
47 {
48  protected:
49  long id;
51  double volume;
52  double bb1[3];
53  double bb2[3];
54  bool *inside;
55 
56  public:
58  Homogenization (long i, Problem *p);
60  virtual ~Homogenization ();
61 
64  virtual void giveHomogenizedStiffnessMatrix( double* answer ) = 0;
66  virtual const char *giveClassName() { return "Homogenization"; }
68  virtual const HomogenizationType giveClassID() { return HT_Void; }
69 
71  void set_boundingBox (double x1, double y1, double x2, double y2);
72  void set_boundingBox (double x1, double y1, double z1, double x2, double y2, double z2);
73  void set_boundingBox (const double *p1, const double *p2);
74 
75  const double* give_bb1 (void) const { return bb1; }
76  const double* give_bb2 (void) const { return bb2; }
77 
78  double giveTotalVolumeFractionOfInclusions (void) const;
79 
80  void find_inclusions_in_BB (void);
81 
82 
83  protected:
84  Problem* giveProblem() { return P; }
85 
86  // /** @name Functions to approach Problem Properties **/
87  // @{
88  int giveNumberOfInclusions() const;
90  int giveSizeOfSymVector();
93  double giveTotalVolume() const;
94  // @}
95 
96  // /** @name Functions to approach Inclusion Properties **/
97  // @{
98  void giveFullEshelbyMatrixOfInclusion( double** answer, const long inclusionNumber );
99  void giveReducedEshelbyMatrixOfInclusion( double* answer, const long inclusionNumber );
100  void giveFullStiffnessMatrixOfInclusion( double* answer, const long inclusionNumber );
101  void giveReducedStiffnessMatrixOfInclusion( double* answer, const long inclusionNumber );
102  double giveVolumeFractionOfInclusion( const long inclusionNumber );
103  void giveTransformationMatrixStressStrainG2L( double* answer, const long inclusionNumber );
104  void giveTransformationMatrixStressStrainL2G( double* answer, const long inclusionNumber );
105  void giveFullMatrixInGCSFromFullMatrixInLCS(double* answer, double* ALoc, const long inclusionNumber );
106  void giveFullMatrixInLCSFromFullMatrixInGCS(double* answer, double* AGlob, const long inclusionNumber );
107  void giveFullMatrixInGCSFromReducedMatrixInLCS( double* answer, double* ALoc, const long inclusionNumber );
108  // @}
109 
110  // /** @name General Functions **/
111  // @{
112  void giveInverseOfReducedMatrix( double* answer, const double* rM, ProblemType pT );
113  void giveReducedUnitMatrix( double* answer, ProblemType pT );
114  void giveFullUnitMatrix( double* answer, ProblemType pT );
115  void giveProductOfReducedMatrices( double* answer, double* A, double* B, ProblemType pT );
117  void giveFullMatrixFromReducedMatrix( double* answer, const double* A, ProblemType pT );
119  void giveProductOfRegularMatrixReducedMatrix( double* answer, double* A, double* redB , int n, ProblemType pT );
121  void giveProductOfReducedMatrixRegularMatrix( double* answer, double* redA, double* B, ProblemType pT, int n );
122  // @}
123 
124 };
125 
126 } // end of namespace mumech
127 
128 #endif
129 
130 /*end of file*/
double volume
Total volume of the proble/bounding box.
void giveFullEshelbyMatrixOfInclusion(double **answer, const long inclusionNumber)
void giveReducedUnitMatrix(double *answer, ProblemType pT)
Problem * P
Problem description.
bool * inside
Flag - inclusion inside of the bounding box.
Problem description.
Definition: problem.h:154
General functions.
int giveNumberOfInclusions() const
void find_inclusions_in_BB(void)
Class of function for homogenization of stress fields.
double bb1[3]
Coordinates of lower corner of the bounding box.
void giveTransformationMatrixStressStrainL2G(double *answer, const long inclusionNumber)
double giveTotalVolume() const
ProblemType giveProblemType() const
void giveProductOfReducedMatrixRegularMatrix(double *answer, double *redA, double *B, ProblemType pT, int n)
Function returning full matrix stored row by row in vector array.
virtual ~Homogenization()
Destructor.
void giveTransformationMatrixStressStrainG2L(double *answer, const long inclusionNumber)
answer = full transformation matrix global->local stored row by row
void giveFullStiffnessMatrixOfInclusion(double *answer, const long inclusionNumber)
void giveFullMatrixInGCSFromReducedMatrixInLCS(double *answer, double *ALoc, const long inclusionNumber)
void giveProductOfReducedMatrices(double *answer, double *A, double *B, ProblemType pT)
virtual const HomogenizationType giveClassID()
Function returning class id.
void giveFullMatrixInLCSFromFullMatrixInGCS(double *answer, double *AGlob, const long inclusionNumber)
void set_boundingBox(double x1, double y1, double x2, double y2)
void giveFullUnitMatrix(double *answer, ProblemType pT)
void giveReducedEshelbyMatrixOfInclusion(double *answer, const long inclusionNumber)
void giveFullMatrixFromReducedMatrix(double *answer, const double *A, ProblemType pT)
Function returning full matrix stored row by row in vector array.
double giveTotalVolumeFractionOfInclusions(void) const
HomogenizationType
Definition: types.h:69
void giveFullMatrixInGCSFromFullMatrixInLCS(double *answer, double *ALoc, const long inclusionNumber)
Class inclusion contains and handles all inclusion data.
const double * give_bb1(void) const
long id
Identification number.
double giveVolumeFractionOfInclusion(const long inclusionNumber)
void giveReducedStiffnessMatrixOfInclusion(double *answer, const long inclusionNumber)
virtual void giveHomogenizedStiffnessMatrix(double *answer)=0
Function returning the homogenized stiffness matrix according the defined method termitovo pridat par...
void giveProductOfRegularMatrixReducedMatrix(double *answer, double *A, double *redB, int n, ProblemType pT)
Function returning full matrix stored row by row in vector array.
double bb2[3]
Coordinates of upper corner of the bounding box.
Class Mesh contains and handles all mesh data.
Definition: mesh.h:52
virtual const char * giveClassName()
Function returning class name.
const double * give_bb2(void) const
Homogenization(long i, Problem *p)
Constructor.
void giveInverseOfReducedMatrix(double *answer, const double *rM, ProblemType pT)