MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / AGQIbeginGaussLoop

Method AGQIbeginGaussLoop

SRC/element/shell/ASDShellQ4.cpp:2193–2258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2191}
2192
2193void ASDShellQ4::AGQIbeginGaussLoop(const ASDShellQ4LocalCoordinateSystem& reference_cs)
2194{
2195 // set to zero vectors and matrices for the static condensation
2196 // of internal DOFs before proceeding with gauss integration
2197 m_eas->KQU.Zero();
2198 m_eas->KUQ.Zero();
2199 m_eas->KQQ_inv.Zero();
2200 m_eas->Q_residual.Zero();
2201
2202 // Some matrices/vectors
2203 auto& N = ASDShellQ4Globals::instance().N;
2204 auto& dN = ASDShellQ4Globals::instance().dN;
2205
2206 // Jacobian
2207 auto& jac = ASDShellQ4Globals::instance().jac;
2208
2209 // this one is already computed in the caller method
2210 auto& agq = ASDShellQ4Globals::instance().agq;
2211
2212 // The AGQI uses incompatible modes and only the weak patch test is passed.
2213 // Here we computed the mean Bq matrix for the enhanced strains. It will be subtracted
2214 // from the gauss-wise Bq matrices to make this element pass the strict patch test:
2215 // BQ = BQ - 1/A*int{BQ*dV}
2216 auto& BQ_mean = ASDShellQ4Globals::instance().BQ_mean;
2217 BQ_mean.Zero();
2218 double Atot = 0.0;
2219
2220 // Gauss loop
2221 std::array<double, 4> L;
2222 for (int igauss = 0; igauss < 4; igauss++)
2223 {
2224 // Current integration point data
2225 double xi = XI[igauss];
2226 double eta = ETA[igauss];
2227 double w = WTS[igauss];
2228 shapeFunctions(xi, eta, N);
2229 shapeFunctionsNaturalDerivatives(xi, eta, dN);
2230 jac.calculate(reference_cs, dN);
2231 double dA = w * jac.detJ;
2232 Atot += dA;
2233
2234 // area coordinates of the gauss point (Eq 7)
2235 L[0] = 0.25 * (1.0 - xi) * (agq.g[1] * (1.0 - eta) + agq.g[2] * (1.0 + eta));
2236 L[1] = 0.25 * (1.0 - eta) * (agq.g[3] * (1.0 - xi) + agq.g[2] * (1.0 + xi));
2237 L[2] = 0.25 * (1.0 + xi) * (agq.g[0] * (1.0 - eta) + agq.g[3] * (1.0 + eta));
2238 L[3] = 0.25 * (1.0 + eta) * (agq.g[0] * (1.0 - xi) + agq.g[1] * (1.0 + xi));
2239
2240 // strain matrix for internal dofs
2241 for (int i = 0; i < 2; i++)
2242 {
2243 int j = i + 1; if (j > 3) j = 0;
2244 int k = j + 1; if (k > 3) k = 0;
2245 double NQX = (agq.b[i] * L[k] + agq.b[k] * L[i]) / agq.A / 2.0;
2246 double NQY = (agq.c[i] * L[k] + agq.c[k] * L[i]) / agq.A / 2.0;
2247 int index1 = i * 2;
2248 int index2 = index1 + 1;
2249 BQ_mean(0, index1) += NQX * dA;
2250 BQ_mean(1, index2) += NQY * dA;

Callers

nothing calls this directly

Calls 4

shapeFunctionsFunction · 0.70
ZeroMethod · 0.45
calculateMethod · 0.45

Tested by

no test coverage detected