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 #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions FractureElasticity.C
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ bool FractureElasticity::evalSol (Vector& s, const Vectors& eV,
{
// Insert the sigma_zz component for 2D plane strain
double nu = 0.5*lambda/(lambda+mu);
s.insert(s.begin()+2,nu*(sigma(1,1)+sigma(2,2)));
s.resize(4,utl::RETAIN);
s(4) = s(3);
s(3) = nu * (sigma(1,1)+sigma(2,2));
}

if (toLocal)
Expand All @@ -632,7 +634,7 @@ bool FractureElasticity::evalSol (Vector& s, const Vectors& eV,

if (toLocal)
{
s.insert(s.end(),Phi,Phi+3);
s.append(Phi,Phi+3);
s.push_back(Gc);
}

Expand Down Expand Up @@ -667,11 +669,12 @@ double FractureElasticity::evalPhaseField (Vec3& gradD,

// Invert the nodal phase field values, D = 1 - C,
// since that is the convention used in the Miehe papers
Vector eD(eV[eC].size()), tmp(nsd);
Vector eD(eV[eC].size());
for (size_t i = 0; i < eD.size(); i++)
eD[i] = 1.0 - eV[eC][i];

// Compute the phase field gradient, dD/dX
RealArray tmp(nsd);
if (dNdX.multiply(eD,tmp,true))
gradD = tmp;
else
Expand Down