46 P = p;
if (p == NULL)
_errorr(
"Problem not defined");
78 bb1[0] = p1[0];
bb1[1] = p1[1];
bb1[2] = p1[2];
79 bb2[0] = p2[0];
bb2[1] = p2[1];
bb2[2] = p2[2];
175 for (
long i=0; i<
P->
noIncl; i++)
202 if( answer == NULL ) {
203 _errorr(
"Field for answer must be allocated" );
207 double *dumM =
new double[mSize*mSize];
221 if( answer == NULL ) {
222 _errorr(
"Field for answer must be allocated" );
226 double *dumM =
new double[mSize*mSize];
227 double *dumT =
new double[mSize*mSize];
247 if( answer == NULL ) {
248 _errorr(
"Field for answer must be allocated" );
252 double *dumM =
new double[mSize*mSize];
253 double *dumT =
new double[mSize*mSize];
273 if( answer == NULL ) {
274 _errorr(
"Field for answer must be allocated" );
281 _errorr(
"Unsupported problem type" );
288 if( answer == NULL )
_errorr(
"Field for answer must be allocated" );
293 default:
_errorr(
"Unsupported problem type" );
300 if( answer == NULL )
_errorr(
"Field for answer must be allocated" );
305 default:
_errorr(
"Unsupported problem type" );
313 if( answer == NULL ) {
314 _errorr(
"Field for answer must be allocated" );
322 answer[0] = A[0]*B[0] + A[1]*B[2];
323 answer[1] = A[0]*B[1] + A[1]*B[3];
324 answer[2] = A[2]*B[0] + A[3]*B[2];
325 answer[3] = A[2]*B[1] + A[3]*B[3];
326 answer[4] = A[4]*B[4];
331 answer[0] = A[0]*B[0] + A[1]*B[3] + A[2]*B[6];
332 answer[1] = A[0]*B[1] + A[1]*B[4] + A[2]*B[7];
333 answer[2] = A[0]*B[2] + A[1]*B[5] + A[2]*B[8];
334 answer[3] = A[3]*B[0] + A[4]*B[3] + A[5]*B[6];
335 answer[4] = A[3]*B[1] + A[4]*B[4] + A[5]*B[7];
336 answer[5] = A[3]*B[2] + A[4]*B[5] + A[5]*B[8];
337 answer[6] = A[6]*B[0] + A[7]*B[3] + A[8]*B[6];
338 answer[7] = A[6]*B[1] + A[7]*B[4] + A[8]*B[7];
339 answer[8] = A[6]*B[2] + A[7]*B[5] + A[8]*B[8];
340 answer[9] = A[9]*B[9];
341 answer[10] = A[10]*B[10];
342 answer[11] = A[11]*B[11];
347 _errorr(
"Unsupported problem type" );
356 if( answer == NULL )
_errorr(
"Field for answer must be allocated" );
372 _errorr(
"Unsupported problem type" );
380 if( answer == NULL ) {
381 _errorr(
"Field for answer must be allocated" );
386 double *dumB =
new double[n*n];
399 if( answer == NULL ) {
400 _errorr(
"Field for answer must be allocated" );
405 double *dumA =
new double[n*n];
int give_VM_TENS_RANGE(void) const
Gives range of a second order tensor in Voigt-Mandel notation.
double volume
Total volume of the proble/bounding box.
void giveFullEshelbyMatrixOfInclusion(double **answer, const long inclusionNumber)
void copy2DeshelbyTensor_reduced2full(const double *a, double **b)
Function copies and converts 2D eshelby/stiffness tensor saved in reduced row-wise vector 'a' to full...
file of various types and symbolic constant definitions
void giveUnitSMatrixFull_2d(double *m)
Function sets reduced 2d SMatrix to unit matrix.
void giveReducedUnitMatrix(double *answer, ProblemType pT)
Problem * P
Problem description.
bool * inside
Flag - inclusion inside of the bounding box.
Class InclusionRecord contains and handles all inclusion data.
void copy3DeshelbyTensor_reduced2full(const double *a, double **b)
Function copies and converts 3D eshelby/stiffness tensor saved in reduced row-wise vector 'a' to full...
int giveNumberOfInclusions() const
void find_inclusions_in_BB(void)
Namespace MatrixOperations.
int giveSizeOfSymVector()
void give_StiffnessMatrixFull(double *answer) const
Copy stiffness tensor into full matrix answer.
Class of function for homogenization of stress fields.
double bb1[3]
Coordinates of lower corner of the bounding box.
Inclusion * give_inclusion(long i) const
debug, for one function in tools
void giveTransformationMatrixStressStrainL2G(double *answer, const long inclusionNumber)
double giveTotalVolume() const
void give_EshelbyMatrixFull(double **answer) const
Copy Eshelby tensor into full matrix answer.
void giveInverseMatrix6x6to12(double *answer, const double *m)
Function computes inverse of the eshelby-like 3x3 matrix 'm' saved in reduced 6x6to12 form...
void giveInverseMatrix3x3to5(double *answer, const double *m)
Function computes inverse of the eshelby-like 3x3 matrix 'm' saved in reduced 3x3to5 form...
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.
void giveUnitSMatrixReduced_3d(double *m)
Function sets reduced 3d SMatrix to unit matrix.
Class mElement, mesh element.
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)
void giveFullMatrixInLCSFromFullMatrixInGCS(double *answer, double *AGlob, const long inclusionNumber)
void set_boundingBox(double x1, double y1, double x2, double y2)
int giveSizeOfFullMatrix()
int giveSizeOfReducedMatrix()
Collection of the functions of basic manipulations, some of them can be used instead of their counter...
void giveFullUnitMatrix(double *answer, ProblemType pT)
int give_ISO_C_RANGE(void) const
Gives range of ...
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.
bool is_inside_of_BB(const double *bb1, const double *bb2) const
check the receiver is inside of the bounding box defined by lower left bb1 and upper right bb2 corner...
double giveTotalVolumeFractionOfInclusions(void) const
void giveFullMatrixInGCSFromFullMatrixInLCS(double *answer, double *ALoc, const long inclusionNumber)
Inclusion ** inclusions
inclusion records - 1d array of pointers to InclusionRecord
void check_dim(int i) const
void give_TeMatrix_G2L(double *answer) const
Copy Te (G2L strain transformation matrix) tensor into full matrix answer.
void giveMatrixMatrixProduct(const double *mtrx1, const double *mtrx2, double *resMtrx, long n)
Function gives the product of two regular matrices.
int give_twodim(void) const
void give_TeMatrix_L2G(double *answer) const
Copy TeInv (L2G strain transformation matrix) tensor into full matrix answer.
double giveVolumeFractionOfInclusion(const long inclusionNumber)
void giveReducedStiffnessMatrixOfInclusion(double *answer, const long inclusionNumber)
void giveUnitSMatrixReduced_2d(double *m)
Function sets reduced 2d SMatrix to unit matrix.
void giveProductOfRegularMatrixReducedMatrix(double *answer, double *A, double *redB, int n, ProblemType pT)
Function returning full matrix stored row by row in vector array.
void give_EshelbyMatrixReduced(double *answer) const
Copy Eshelby tensor into reduced vector answer.
void giveUnitSMatrixFull_3d(double *m)
Function sets reduced 3d SMatrix to unit matrix.
double bb2[3]
Coordinates of upper corner of the bounding box.
int noIncl
number of inclusions
void CleanVector(double *a, long n)
Functin cleans a 'double' vector, initialize each value being 0-zero.
Homogenization(long i, Problem *p)
Constructor.
void give_StiffnessMatrixReduced(double *answer) const
Copy stiffness tensor into reduced vector answer.
void giveInverseOfReducedMatrix(double *answer, const double *rM, ProblemType pT)