52 if( answer == NULL )
_errorr(
"Field for stiffness matrix must be allocated" );
57 double *Ai =
new double[mSize];
58 double *Cm =
new double[mSize];
59 double *CmInv =
new double[mSize];
60 double *Ci_Cm =
new double[mSize];
61 double *Aig =
new double[mSizeFull];
62 double *dum1 =
new double[mSizeFull];
94 _errorr1(
"Volume of inclusions is greater then 1" );
119 if( answer == NULL )
_errorr(
"Field for Eshelby tensor must be allocated" );
120 if( matrix_inclStiffmat == NULL )
_errorr(
"Field for matrix_inclStiffmat tensor must be allocated" );
125 double *AiInv =
new double[mSize];
126 double *Ci =
new double[mSize];
127 double *S =
new double[mSize];
128 double *dum1 =
new double[mSize];
129 double *dum2 =
new double[mSize];
167 if( answer == NULL )
_errorr(
"Field for Eshelby tensor must be allocated" );
168 if( matrix_inclStiffmat == NULL )
_errorr(
"Field for matrix_inclStiffmat tensor must be allocated" );
172 int nElements = mSize * mSize;
174 double *AiInv =
new double[nElements];
175 double *Ci =
new double[nElements];
176 double *S =
new double[nElements];
177 double *dum1 =
new double[nElements];
178 double *dum2 =
new double[nElements];
183 _errorr(
"Unsupported problem type, must be added" );
194 CopyVector(Ci, matrix_inclStiffmat, nElements);
221 if( answer == NULL )
_errorr(
"Field for stiffness matrix must be allocated" );
226 double *Ai =
new double[mSize];
227 double *Cm =
new double[mSize];
228 double *CmInv =
new double[mSize];
229 double *Ci_Cm =
new double[mSize];
230 double *Aig =
new double[mSizeFull];
231 double *dum1 =
new double[mSizeFull];
232 double *O =
new double[mSizeFull];
233 double *I =
new double[mSizeFull];
234 double *U =
new double[mSizeFull];
269 _errorr1(
"Volume of inclusions is greater then 1" );
301 if( answer == NULL )
_errorr(
"Field for stiffness matrix must be allocated" );
305 double *C =
new double[mSize];
306 double *CInv =
new double[mSize];
307 double *answerRedInv =
new double[mSize];
330 _errorr1(
"Volume of inclusions is greater then 1" );
345 delete [] answerRedInv;
357 if( answer == NULL )
_errorr(
"Field for stiffness matrix must be allocated" );
361 double *C =
new double[mSize];
362 double *answerRed =
new double[mSize];
384 _errorr1(
"Volume of inclusions is greater then 1" );
408 if( answer == NULL )
_errorr(
"Field for stiffness matrix must be allocated" );
427 n[0] = n[1] = n[2] = 40;
447 double voli, vol = 0.0;
450 for (i=0; i<mesh->nElems; i++) {
451 if (rmsh) voli = 1.0;
452 else voli = mesh->Elems[i]->give_volume();
459 for (k=0; k<tr; k++) {
460 strain[tr*k+j] += voli * mesh->Elems[i]->strain[0][j][k];
461 stress[tr*k+j] += voli * mesh->Elems[i]->stress[0][j][k];
488 if( answer == NULL )
_errorr(
"Field for stiffness matrix must be allocated" );
492 int nElements = mSize*mSize;
494 double *Ceff =
new double[nElements];
495 double *CeffInv =
new double[nElements];
496 double *CeffLoc =
new double[nElements];
497 double *CeffInvLoc =
new double[nElements];
498 double *Ai =
new double[nElements];
499 double *Ci_Cm =
new double[nElements];
500 double *AiLoc =
new double[nElements];
501 double *Ci_CmLoc =
new double[nElements];
502 double *dum1 =
new double[nElements];
521 int ii = incl[i]->
id;
556 delete [] CeffInvLoc;
MatrixRecord * give_matrix(void) const
Class eshelbySoluUniformField.
int give_VM_TENS_RANGE(void) const
Gives range of a second order tensor in Voigt-Mandel notation.
void generate_regular_mesh(const double *p1, const double *p2, const long *n)
Generate regular mesh geometry of rectangular cuboid shape compound of rectangular cuboid shape eleme...
file of various types and symbolic constant definitions
virtual void giveHomogenizedStiffnessMatrix(double *answer)
Function returning the homogenized stiffness matrix according the defined method. ...
void giveReducedUnitMatrix(double *answer, ProblemType pT)
Problem * P
Problem description.
void matrix_giveReducedStiffMatrix(double *m) const
void AddVectorMultipledBy(double mlt, const double *a, double *b, long n)
Function add given number of components multiplied by 'mlt' from vector 'a' to vector 'b'...
bool * inside
Flag - inclusion inside of the bounding box.
Class InclusionRecord contains and handles all inclusion data.
eshelbySoluUniformField * esuf
int giveNumberOfInclusions() const
Namespace MatrixOperations.
void giveDiluteReducedConcentrationFactorOfInclusionInLC(double *answer, double *matrix_inclStiffmat, double *matrixStiffMat, double *matrixComplMat, const long inclusionNumber)
!!! Everything is calculated in local coordinate system
double bb1[3]
Coordinates of lower corner of the bounding box.
virtual void giveHomogenizedStiffnessMatrix(double *answer)
Function returning the homogenized stiffness matrix according the defined method. ...
void CopyVector(const double *src, double *dest, long n)
Function copy given number of components from vector, 'a' to vector 'b'.
Inclusion * give_inclusion(long i) const
debug, for one function in tools
virtual bool is_converted_to_equivalent(void) const
Give type of ...
bool remote_strain_is_unit(void) const
Check the remote strain is unit.
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.
Class mElement, mesh element.
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 void giveHomogenizedStiffnessMatrix(double *answer)
Function returning the homogenized stiffness matrix according the defined method. ...
void giveFullMatrixInLCSFromFullMatrixInGCS(double *answer, double *AGlob, const long inclusionNumber)
int giveSizeOfFullMatrix()
int giveSizeOfReducedMatrix()
Collection of the functions of basic manipulations, some of them can be used instead of their counter...
double * Allocate1Ddz(long d1)
Function allocates ('new' command) a 1d array of double set to zero.
void matrix_giveFullStiffMatrix(double *m) const
void giveFullUnitMatrix(double *answer, ProblemType pT)
virtual void giveHomogenizedStiffnessMatrix(double *answer)
Function returning the homogenized stiffness matrix according the defined method. ...
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.
void compute_element_fields(char flag, bool displc_flag, bool strain_flag, bool stress_flag, int pid, int lc, int nLC, PFCmode pfcMode)
predpokladame trojuhelnikove nebo tetrahedron prvky, tj. na elementu budeme drzet jednu hodnotu ...
void giveFullMatrixInGCSFromFullMatrixInLCS(double *answer, double *ALoc, const long inclusionNumber)
void giveFullDiluteConcentrationFactorOfInclusionInLC(double *answer, double *matrix_inclStiffmat, double *matrixStiffMat, double *matrixComplMat, const long inclusionNumber)
!!! Everything is calculated in local coordinate system
virtual void giveHomogenizedStiffnessMatrix(double *answer)
Function returning the homogenized stiffness matrix according the defined method. ...
void DivideVector(double *a, long n, double val)
Function divides 'n' components of field 'a' by value 'val'.
void giveMatrixMatrixProduct(const double *mtrx1, const double *mtrx2, double *resMtrx, long n)
Function gives the product of two regular matrices.
Class HomogenizationMethods.
double * a
Inclusion semiaxes' dimensions in global arrangement.
long id
identification number
int give_twodim(void) const
Mesh * give_new_mesh(void)
Give verbose level.
double giveVolumeFractionOfInclusion(const long inclusionNumber)
void giveReducedStiffnessMatrixOfInclusion(double *answer, const long inclusionNumber)
void giveInverseMatrix(double *mtrx, int n)
Function computes inversion of squared matrix mtrx.
double bb2[3]
Coordinates of upper corner of the bounding box.
Class Mesh contains and handles all mesh data.
void CleanVector(double *a, long n)
Functin cleans a 'double' vector, initialize each value being 0-zero.
void AddVector(const double *a, double *b, long n)
Function add given number of components from vector 'a' to vector 'b', b += a.
virtual void giveHomogenizedStiffnessMatrix(double *answer)
Function returning the homogenized stiffness matrix according the defined method. ...
void giveInverseOfReducedMatrix(double *answer, const double *rM, ProblemType pT)