17 val = localMatrix(0, 0);
23 std::vector<fullMatrix<double> > mv(npts);
24 get(ele, npts, GP, mv);
25 m.
resize(mv[0].size1(), mv[0].size2());
28 for(
int k = 0; k < npts; k++) {
29 const double u = GP[k].
pt[0];
30 const double v = GP[k].
pt[1];
31 const double w = GP[k].
pt[2];
32 const double weight = GP[k].
weight;
34 const double coeff = weight * detJ;
35 for(
int i = 0; i < mv[k].size1(); ++i)
36 for(
int j = 0; j < mv[k].size2(); ++j) m(i, j) += mv[k](i, j) * coeff;
42 double E_,
double nu_)
45 double FACT =
E / (1 +
nu);
46 double C11 = FACT * (1 -
nu) / (1 - 2 *
nu);
47 double C12 = FACT *
nu / (1 - 2 *
nu);
48 double C44 = (C11 - C12) / 2;
50 for(
int i = 0; i < 3; ++i) {
52 H(i + 3, i + 3) = C44;
54 H(1, 0) =
H(0, 1) =
H(2, 0) =
H(0, 2) =
H(1, 2) =
H(2, 1) = C12;
55 sym = (&space1_ == &space2_);
58 double E_,
double nu_)
61 double FACT =
E / (1 +
nu);
62 double C11 = FACT * (1 -
nu) / (1 - 2 *
nu);
63 double C12 = FACT *
nu / (1 - 2 *
nu);
64 double C44 = (C11 - C12) / 2;
70 for(
int i = 0; i < 3; ++i) {
72 H(i + 3, i + 3) = C44;
74 H(1, 0) =
H(0, 1) =
H(2, 0) =
H(0, 2) =
H(1, 2) =
H(2, 1) = C12;
91 for(
int i = 0; i < npts; i++) {
92 const double u = GP[i].
pt[0];
93 const double v = GP[i].
pt[1];
94 const double w = GP[i].
pt[2];
95 const double weight = GP[i].
weight;
97 std::vector<TensorialTraits<SVector3>::GradType> Grads;
100 for(
int j = 0; j < nbFF; j++) {
101 BT(j, 0) = B(0, j) = Grads[j](0, 0);
102 BT(j, 1) = B(1, j) = Grads[j](1, 1);
103 BT(j, 2) = B(2, j) = Grads[j](2, 2);
104 BT(j, 3) = B(3, j) = Grads[j](0, 1) + Grads[j](1, 0);
105 BT(j, 4) = B(4, j) = Grads[j](1, 2) + Grads[j](2, 1);
106 BT(j, 5) = B(5, j) = Grads[j](0, 2) + Grads[j](2, 0);
110 m.
gemm(BTH, B, weight * detJ, 1.);
123 for(
int i = 0; i < npts; i++) {
124 const double u = GP[i].
pt[0];
125 const double v = GP[i].
pt[1];
126 const double w = GP[i].
pt[2];
127 const double weight = GP[i].
weight;
128 const double detJ = ele->
getJacobian(u, v, w, jac);
129 std::vector<TensorialTraits<SVector3>::GradType>
131 std::vector<TensorialTraits<SVector3>::GradType>
135 for(
int j = 0; j < nbFF1; j++) {
136 BT(j, 0) = Grads[j](0, 0);
137 BT(j, 1) = Grads[j](1, 1);
138 BT(j, 2) = Grads[j](2, 2);
139 BT(j, 3) = Grads[j](0, 1) + Grads[j](1, 0);
140 BT(j, 4) = Grads[j](1, 2) + Grads[j](2, 1);
141 BT(j, 5) = Grads[j](0, 2) + Grads[j](2, 0);
143 for(
int j = 0; j < nbFF2; j++) {
144 B(0, j) = GradsT[j](0, 0);
145 B(1, j) = GradsT[j](1, 1);
146 B(2, j) = GradsT[j](2, 2);
147 B(3, j) = GradsT[j](0, 1) + GradsT[j](1, 0);
148 B(4, j) = GradsT[j](1, 2) + GradsT[j](2, 1);
149 B(5, j) = GradsT[j](0, 2) + GradsT[j](2, 0);
154 m.
gemm(BTH, B, weight * detJ, 1.);
169 for(
int i = 0; i < npts; i++) {
170 double u = GP[i].
pt[0];
171 double v = GP[i].
pt[1];
172 double w = GP[i].
pt[2];
173 const double weight = GP[i].
weight;
174 const double detJ = ele->
getJacobian(u, v, w, jac);
175 std::vector<TensorialTraits<SVector3>::ValType> Vals;
176 std::vector<TensorialTraits<SVector3>::ValType> ValsT;
179 for(
int j = 0; j < nbFF1; j++) {
180 for(
int k = 0; k < nbFF2; k++) {
181 m(j, k) +=
_eqfac *
dot(Vals[j], ValsT[k]) * weight * detJ;