muMECH
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
src
libmumech
esei.cpp
Go to the documentation of this file.
1
//********************************************************************************************************
2
// code: ### ### ##### #### ## ##
3
// ## ## ######## ## ## ## ## ##
4
// ## ## ## ## ## ### ## ######
5
// ## ## ## ## ## ## ## ## ##
6
// ##### ## ## ##### #### ## ##
7
// ##
8
//
9
// name: eshelbySoluEllipticalIntegrals.cpp
10
// author(s): 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
//********************************************************************************************************
26
27
// #include <stdio.h>
28
// #include <stdlib.h>
29
// #include <math.h>
30
// #include "macros.h"
31
#include "
esei.h
"
32
// #include "esei_Ellipsoid.h"
33
// #include "esei_Sphere.h"
34
// #include "esei_OblateSpheroid.h"
35
// #include "esei_ProlateSpheroid.h"
36
// #include "esei_Penny.h"
37
// #include "esei_FlatEllipsoid.h"
38
// #include "esei_EllipticCylinder.h"
39
// #include "esei_Cylinder.h"
40
#include "
inclusion.h
"
41
42
43
namespace
mumech
{
44
45
//********************************************************************************************************
46
// PUBLIC FUNCTIONS
47
//********************************************************************************************************
48
49
50
// Computes lambda of each perturbated point.
51
void
eshelbySoluEllipticIntegrals :: getPerturbatedLambdas
(
double
*lambdas,
const
double
loc_x[3])
52
{
53
// Define coordinates of current point
54
double
x = loc_x[0];
55
double
y = loc_x[1];
56
double
z = loc_x[2];
57
double
xp = x +
I
->
ndiff_1
;
58
double
xm = x -
I
->
ndiff_1
;
59
double
yp = y +
I
->
ndiff_1
;
60
double
ym = y -
I
->
ndiff_1
;
61
double
zp = z +
I
->
ndiff_1
;
62
double
zm = z -
I
->
ndiff_1
;
63
64
// Fill the list
65
lambdas[
_CENTER_
] =
getLambda
(
I
->
a
, x, y, z);
66
// X
67
lambdas[
_Xp_
] =
getLambda
(
I
->
a
, xp, y, z);
68
lambdas[
_Xm_
] =
getLambda
(
I
->
a
, xm, y, z);
69
// Y
70
lambdas[
_Yp_
] =
getLambda
(
I
->
a
, x, yp, z);
71
lambdas[
_Ym_
] =
getLambda
(
I
->
a
, x, ym, z);
72
// Z
73
lambdas[
_Zp_
] =
getLambda
(
I
->
a
, x, y, zp);
74
lambdas[
_Zm_
] =
getLambda
(
I
->
a
, x, y, zm);
75
// X, Y
76
lambdas[
_XpYp_
] =
getLambda
(
I
->
a
, xp, yp, z);
77
lambdas[
_XpYm_
] =
getLambda
(
I
->
a
, xp, ym, z);
78
lambdas[
_XmYp_
] =
getLambda
(
I
->
a
, xm, yp, z);
79
lambdas[
_XmYm_
] =
getLambda
(
I
->
a
, xm, ym, z);
80
// X, Z
81
lambdas[
_XpZp_
] =
getLambda
(
I
->
a
, xp, y, zp);
82
lambdas[
_XpZm_
] =
getLambda
(
I
->
a
, xp, y, zm);
83
lambdas[
_XmZp_
] =
getLambda
(
I
->
a
, xm, y, zp);
84
lambdas[
_XmZm_
] =
getLambda
(
I
->
a
, xm, y, zm);
85
// Y, Z
86
lambdas[
_YpZp_
] =
getLambda
(
I
->
a
, x, yp, zp);
87
lambdas[
_YpZm_
] =
getLambda
(
I
->
a
, x, yp, zm);
88
lambdas[
_YmZp_
] =
getLambda
(
I
->
a
, x, ym, zp);
89
lambdas[
_YmZm_
] =
getLambda
(
I
->
a
, x, ym, zm);
90
}
91
92
93
}
// end of namespace mumech
94
95
/*end of file*/
mumech
Definition:
matrix_vector.cpp:6
mumech::_Zm_
Definition:
types.h:741
mumech::_XmZm_
Definition:
types.h:749
mumech::_YmZm_
Definition:
types.h:753
mumech::_Xp_
Definition:
types.h:736
mumech::_YmZp_
Definition:
types.h:752
mumech::_XmYm_
Definition:
types.h:745
mumech::eshelbySoluEllipticIntegrals::I
const InclusionRecord3D * I
Definition:
esei.h:45
esei.h
Class eshelbySoluEllipticIntegrals.
mumech::_CENTER_
Definition:
types.h:735
mumech::eshelbySoluEllipticIntegrals::getPerturbatedLambdas
void getPerturbatedLambdas(double *lambdas, const double loc_x[3])
Helper function.
Definition:
esei.cpp:51
mumech::_YpZp_
Definition:
types.h:750
mumech::_XmYp_
Definition:
types.h:744
mumech::Inclusion::ndiff_1
double ndiff_1
derivative step for the first derivations
Definition:
inclusion.h:108
mumech::_Xm_
Definition:
types.h:737
inclusion.h
Class inclusion contains and handles all inclusion data.
mumech::_Zp_
Definition:
types.h:740
mumech::Inclusion::a
double * a
Inclusion semiaxes' dimensions in global arrangement.
Definition:
inclusion.h:76
mumech::eshelbySoluEllipticIntegrals::getLambda
virtual double getLambda(const double a[3], double x1, double x2, double x3)=0
Returns lambda for a given point (x1, x2, x3)
mumech::_XpYm_
Definition:
types.h:743
mumech::_XpYp_
Definition:
types.h:742
mumech::_XmZp_
Definition:
types.h:748
mumech::_YpZm_
Definition:
types.h:751
mumech::_Ym_
Definition:
types.h:739
mumech::_XpZp_
Definition:
types.h:746
mumech::_XpZm_
Definition:
types.h:747
mumech::_Yp_
Definition:
types.h:738
This reference manual is part of the
muMECH
documentation. Generated on Wed Feb 24 2016 22:50:07 for muMECH by
1.8.11.