Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes required by utl::vector refactor #173

Merged
merged 3 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Beam/ElasticBar.C
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ bool ElasticBar::finalizeElement (LocalIntegral& elmInt,
for (size_t a = 1; a < nen; a++)
for (unsigned short int i = 1; i <= npv; i++)
b(npv*a+i) = b(3*a+i);
b.std::vector<double>::resize(npv*nen);
b.resize(npv*nen,utl::RETAIN);
}

return true;
Expand Down
13 changes: 11 additions & 2 deletions Elasticity.C
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,12 @@ bool ElasticityNorm::evalInt (LocalIntegral& elmInt, const FiniteElement& fe,
return false;

bool planeStrain = sigmah.size() == 4 && Cinv.rows() == 3;
if (planeStrain) sigmah.erase(sigmah.begin()+2); // Remove the sigma_zz
if (planeStrain)
{
// Remove the sigma_zz
sigmah(3) = sigmah(4);
sigmah.resize(3,utl::RETAIN);
}

double detJW = fe.detJxW;
if (problem.isAxiSymmetric())
Expand All @@ -1103,7 +1108,11 @@ bool ElasticityNorm::evalInt (LocalIntegral& elmInt, const FiniteElement& fe,
// Evaluate the analytical stress field
sigma = (*anasol)(X);
if (sigma.size() == 4 && Cinv.rows() == 3)
sigma.erase(sigma.begin()+2); // Remove the sigma_zz if plane strain
{
// Remove the sigma_zz when plane strain
sigma(3) = sigma(4);
sigma.resize(3,utl::RETAIN);
}

// Integrate the energy norm a(u,u)
pnorm[ip++] += sigma.dot(Cinv*sigma)*detJW;
Expand Down
2 changes: 1 addition & 1 deletion Linear/KirchhoffLovePlate.C
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ bool KirchhoffLovePlateNorm::evalInt (LocalIntegral& elmInt,
else if (i < prjFld.size() && prjFld[i])
{
prjFld[i]->valueFE(fe,mr); // this projection has its own basis
mr.std::vector<double>::resize(nscmp); // remove shear force components
mr.resize(nscmp,utl::RETAIN); // remove shear force components
}
else
continue;
Expand Down
50 changes: 25 additions & 25 deletions Linear/Test/PipeJoint-NURBS.reg
Original file line number Diff line number Diff line change
Expand Up @@ -110,40 +110,40 @@ Maximum stresses in Gauss points:
2.849161e+08 X = 10 10 0 Patch 4
2.849161e+08 X = 10 10 0 Patch 5
-2.924400e+08 X = 0 0 -*9 Patch 6
-4.227691e+08 X = 0 0 9 Patch 7
-4.246762e+08 X = 0 0 -9 Patch 8
-4.227691e+08 X = 0 0 -9 Patch 9
-4.246762e+08 X = 0 0 9 Patch 10
-4.227691e+08 X = 0 0 -*9 Patch 7
-4.246762e+08 X = 0 0 -*9 Patch 8
-4.227691e+08 X = 0 0 -*9 Patch 9
-4.246762e+08 X = 0 0 -*9 Patch 10
Max s_yz: -6.949937e+07 X = -19.3333 -10 0 Patch 1
-1.808923e+08 X = -6.36396 6.36396 6.36396 Patch 2
1.808923e+08 X = -6.36396 6.36396 -6.36396 Patch 3
-1.780423e+08 X = 6.36396 6.36396 -6.36396 Patch 4
1.780423e+08 X = 6.36396 6.36396 6.36396 Patch 5
-1.808923e+08 X = -6.36396 6.36396 -*6.36396 Patch 2
1.808923e+08 X = -6.36396 6.36396 -*6.36396 Patch 3
-1.780423e+08 X = 6.36396 6.36396 -*6.36396 Patch 4
1.780423e+08 X = 6.36396 6.36396 -*6.36396 Patch 5
[ -]*7.034553e+07 X = 18.3333 0 -*10 Patch 6
-1.934230e+08 X = -6.36396 6.36396 6.36396 Patch 7
-1.934608e+08 X = 6.36396 6.36396 -6.36396 Patch 8
1.934230e+08 X = -6.36396 6.36396 -6.36396 Patch 9
1.934608e+08 X = 6.36396 6.36396 6.36396 Patch 10
Max s_xz: -1.027139e+08 X = 0 -7.07107 7.07107 Patch 1
-7.832311e+07 X = -23.576 6.36396 6.36396 Patch 2
7.832311e+07 X = -23.576 6.36396 -6.36396 Patch 3
8.005224e+07 X = 22.576 6.36396 -6.36396 Patch 4
-8.005224e+07 X = 22.576 6.36396 6.36396 Patch 5
-1.000961e+08 X = 0 -7.07107 7.07107 Patch 6
1.323493e+08 X = -6.36396 15.9093 6.36396 Patch 7
-1.302464e+08 X = 6.36396 15.9093 -6.36396 Patch 8
-1.323493e+08 X = -6.36396 15.9093 -6.36396 Patch 9
1.302464e+08 X = 6.36396 15.9093 6.36396 Patch 10
Max von Mises stress: 4.982327e+08 X = 0 0 9 Patch 1
-1.934230e+08 X = -6.36396 6.36396 -*6.36396 Patch 7
-1.934608e+08 X = 6.36396 6.36396 -*6.36396 Patch 8
1.934230e+08 X = -6.36396 6.36396 -*6.36396 Patch 9
1.934608e+08 X = 6.36396 6.36396 -*6.36396 Patch 10
Max s_xz: -1.027139e+08 X = 0 -7.07107 -*7.07107 Patch 1
-7.832311e+07 X = -23.576 6.36396 -*6.36396 Patch 2
7.832311e+07 X = -23.576 6.36396 -*6.36396 Patch 3
8.005224e+07 X = 22.576 6.36396 -*6.36396 Patch 4
-8.005224e+07 X = 22.576 6.36396 -*6.36396 Patch 5
[ -]*1.000961e+08 X = 0 -7.07107 -*7.07107 Patch 6
1.323493e+08 X = -6.36396 15.9093 -*6.36396 Patch 7
-1.302464e+08 X = 6.36396 15.9093 -*6.36396 Patch 8
-1.323493e+08 X = -6.36396 15.9093 -*6.36396 Patch 9
1.302464e+08 X = 6.36396 15.9093 -*6.36396 Patch 10
Max von Mises stress: 4.982327e+08 X = 0 0 -*9 Patch 1
5.441745e+08 X = -10 10 0 Patch 2
5.441745e+08 X = -10 10 0 Patch 3
5.670892e+08 X = 10 10 0 Patch 4
5.670892e+08 X = 10 10 0 Patch 5
5.087880e+08 X = 0 0 -*9 Patch 6
8.066986e+08 X = -10 10 0 Patch 7
8.080089e+08 X = 0 0 -9 Patch 8
8.080089e+08 X = 0 0 -*9 Patch 8
8.066986e+08 X = -10 10 0 Patch 9
8.080089e+08 X = 0 0 9 Patch 10
8.080089e+08 X = 0 0 -*9 Patch 10
Integrating solution norms (FE solution) ...
Energy norm |u^h| = a(u^h,u^h)^0.5 : 41649
External energy ((f,u^h)+(t,u^h)^0.5 : 41649
Expand Down
50 changes: 25 additions & 25 deletions Linear/Test/SPR/PipeJoint-NURBS.reg
Original file line number Diff line number Diff line change
Expand Up @@ -109,40 +109,40 @@ Maximum stresses in Gauss points:
2.849161e+08 X = 10 10 0 Patch 4
2.849161e+08 X = 10 10 0 Patch 5
-2.924400e+08 X = 0 0 -*9 Patch 6
-4.227691e+08 X = 0 0 9 Patch 7
-4.246762e+08 X = 0 0 -9 Patch 8
-4.227691e+08 X = 0 0 -9 Patch 9
-4.246762e+08 X = 0 0 9 Patch 10
-4.227691e+08 X = 0 0 -*9 Patch 7
-4.246762e+08 X = 0 0 -*9 Patch 8
-4.227691e+08 X = 0 0 -*9 Patch 9
-4.246762e+08 X = 0 0 -*9 Patch 10
Max s_yz: -6.949937e+07 X = -19.3333 -10 0 Patch 1
-1.808923e+08 X = -6.36396 6.36396 6.36396 Patch 2
1.808923e+08 X = -6.36396 6.36396 -6.36396 Patch 3
-1.780423e+08 X = 6.36396 6.36396 -6.36396 Patch 4
1.780423e+08 X = 6.36396 6.36396 6.36396 Patch 5
-1.808923e+08 X = -6.36396 6.36396 -*6.36396 Patch 2
1.808923e+08 X = -6.36396 6.36396 -*6.36396 Patch 3
-1.780423e+08 X = 6.36396 6.36396 -*6.36396 Patch 4
1.780423e+08 X = 6.36396 6.36396 -*6.36396 Patch 5
[ -]*7.034553e+07 X = 18.3333 0 -*10 Patch 6
-1.934230e+08 X = -6.36396 6.36396 6.36396 Patch 7
-1.934608e+08 X = 6.36396 6.36396 -6.36396 Patch 8
1.934230e+08 X = -6.36396 6.36396 -6.36396 Patch 9
1.934608e+08 X = 6.36396 6.36396 6.36396 Patch 10
Max s_xz: -1.027139e+08 X = 0 -7.07107 7.07107 Patch 1
-7.832311e+07 X = -23.576 6.36396 6.36396 Patch 2
7.832311e+07 X = -23.576 6.36396 -6.36396 Patch 3
8.005224e+07 X = 22.576 6.36396 -6.36396 Patch 4
-8.005224e+07 X = 22.576 6.36396 6.36396 Patch 5
-1.000961e+08 X = 0 -7.07107 7.07107 Patch 6
1.323493e+08 X = -6.36396 15.9093 6.36396 Patch 7
-1.302464e+08 X = 6.36396 15.9093 -6.36396 Patch 8
-1.323493e+08 X = -6.36396 15.9093 -6.36396 Patch 9
1.302464e+08 X = 6.36396 15.9093 6.36396 Patch 10
Max von Mises stress: 4.982327e+08 X = 0 0 9 Patch 1
-1.934230e+08 X = -6.36396 6.36396 -*6.36396 Patch 7
-1.934608e+08 X = 6.36396 6.36396 -*6.36396 Patch 8
1.934230e+08 X = -6.36396 6.36396 -*6.36396 Patch 9
1.934608e+08 X = 6.36396 6.36396 -*6.36396 Patch 10
Max s_xz: -1.027139e+08 X = 0 -7.07107 -*7.07107 Patch 1
-7.832311e+07 X = -23.576 6.36396 -*6.36396 Patch 2
7.832311e+07 X = -23.576 6.36396 -*6.36396 Patch 3
8.005224e+07 X = 22.576 6.36396 -*6.36396 Patch 4
-8.005224e+07 X = 22.576 6.36396 -*6.36396 Patch 5
[ -]*1.000961e+08 X = 0 -7.07107 -*7.07107 Patch 6
1.323493e+08 X = -6.36396 15.9093 -*6.36396 Patch 7
-1.302464e+08 X = 6.36396 15.9093 -*6.36396 Patch 8
-1.323493e+08 X = -6.36396 15.9093 -*6.36396 Patch 9
1.302464e+08 X = 6.36396 15.9093 -*6.36396 Patch 10
Max von Mises stress: 4.982327e+08 X = 0 0 -*9 Patch 1
5.441745e+08 X = -10 10 0 Patch 2
5.441745e+08 X = -10 10 0 Patch 3
5.670892e+08 X = 10 10 0 Patch 4
5.670892e+08 X = 10 10 0 Patch 5
5.087880e+08 X = 0 0 -*9 Patch 6
8.066986e+08 X = -10 10 0 Patch 7
8.080089e+08 X = 0 0 -9 Patch 8
8.080089e+08 X = 0 0 -*9 Patch 8
8.066986e+08 X = -10 10 0 Patch 9
8.080089e+08 X = 0 0 9 Patch 10
8.080089e+08 X = 0 0 -*9 Patch 10
Integrating solution norms (FE solution) ...
Energy norm |u^h| = a(u^h,u^h)^0.5 : 41649
External energy ((f,u^h)+(t,u^h)^0.5 : 41649
Expand Down
2 changes: 1 addition & 1 deletion Linear/Test/SSbeamPointLoad-adap.reg
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ L2-norm : 1.08623e+06
Max displacement : 1.60156e+06
Projecting secondary solution ...
Continuous global L2-projection
Point #1: sol1 = 1.601563e+06
Point #1: sol1 = 1.60156.e+06
sol2 = 4.375000e-01 0.000000e+00
exact2 5.000000e-01
Energy norm a(w^h,w^h)^0.5 : 1265.53
Expand Down
4 changes: 2 additions & 2 deletions Linear/Test/ScordelisLo-p4-4x4.reg
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ L2 norm |m^r| = (m^r,m^r)^0.5 : 46322.2
L2 error (e,e)^0.5, e=m^r-m^h : 146.005
relative error (% of |m^r|) : 0.315195
Point #1: sol1 = 1.597647e-01 1.214699e-02 -2.999999e-01
sol2 = 1.313302e+03 7.391233e+04 4.49983.e-02 7.552622e+02 6.523927e+02 -7.96....e-05
sol2 = 1.313302e+03 7.391233e+04 4.4998..e-02 7.552622e+02 6.523927e+02 -7.96....e-05
sol3 = 7.775838e+04 3.582790e+05 1.72348.e-01 3.582790e+05 7.775838e+04 3.264215e+05
sol4 = -6.725197e+04 2.330196e+05 1.8763..e-01 2.330196e+05 -6.725197e+04 2.729322e+05
Point #2: sol1 = -1.597647e-01 1.214699e-02 -2.999999e-01
sol2 = 1.313302e+03 7.391233e+04 -4.49983.e-02 7.552622e+02 6.523927e+02 7.96....e-05
sol2 = 1.313302e+03 7.391233e+04 -4.4998..e-02 7.552622e+02 6.523927e+02 7.96....e-05
sol3 = 7.775838e+04 3.582790e+05 -1.72348.e-01 3.582790e+05 7.775838e+04 3.264215e+05
sol4 = -6.725197e+04 2.330196e+05 -1.8763..e-01 2.330196e+05 -6.725197e+04 2.729322e+05