Skip to content

Commit

Permalink
Update MultilinearBackbone.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mhscott authored May 20, 2024
1 parent 279db20 commit eccd8f1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions SRC/material/uniaxial/backbone/MultilinearBackbone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,12 @@ MultilinearBackbone::MultilinearBackbone(int tag, int num,

bool error = false;

int i;

for (i = 1; i <= numPoints; i++) {
for (int i = 1; i <= numPoints; i++) {
e[i] = def(i-1);
s[i] = force(i-1);
}

for (i = 1; i <= numPoints; i++)
for (int i = 1; i <= numPoints; i++)
if (e[i] < e[i-1])
error = true;

Expand All @@ -121,10 +119,11 @@ MultilinearBackbone::MultilinearBackbone(int tag, int num,

opserr << "MultilinearBackbone::MultilinearBackbone -- input backbone is not unique (one-to-one)" << endln;
}

for (i = 1; i <= numPoints; i++) {
E[i-1] = (s[i]-s[i-1])/(e[i]-e[i-1]);
c[i] = c[i-1] + 0.5*(s[i]-s[i-1])*(e[i]-e[i-1]);
else {
for (int i = 1; i <= numPoints; i++) {
E[i-1] = (s[i]-s[i-1])/(e[i]-e[i-1]);
c[i] = c[i-1] + 0.5*(s[i]-s[i-1])*(e[i]-e[i-1]);
}
}
}

Expand Down

0 comments on commit eccd8f1

Please sign in to comment.