Skip to content

Commit

Permalink
try to fix memory issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
tupek2 committed Sep 13, 2024
1 parent 34da99e commit c96517d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/serac/physics/solid_mechanics_contact.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class SolidMechanicsContact<order, dim, Parameters<parameter_space...>,
r_blk = res;
mfem::Vector uPlusShapeDisp(u.Size());
uPlusShapeDisp = u;
uPlusShapeDisp += shape_displacement_;
uPlusShapeDisp.Add(1.0, shape_displacement_);

contact_.residualFunction(uPlusShapeDisp, r);
r_blk.SetSubVector(bcs_.allEssentialTrueDofs(), 0.0);
Expand All @@ -143,7 +143,7 @@ class SolidMechanicsContact<order, dim, Parameters<parameter_space...>,

mfem::Vector uPlusShapeDisp(u.Size());
uPlusShapeDisp = u;
uPlusShapeDisp += shape_displacement_;
uPlusShapeDisp.Add(1.0, shape_displacement_);

// create block operator holding jacobian contributions
J_constraint_ = contact_.jacobianFunction(uPlusShapeDisp, J_.release());
Expand Down Expand Up @@ -183,7 +183,7 @@ class SolidMechanicsContact<order, dim, Parameters<parameter_space...>,

mfem::Vector uPlusShapeDisp(u.Size());
uPlusShapeDisp = u;
uPlusShapeDisp += shape_displacement_;
uPlusShapeDisp.Add(1.0, shape_displacement_);

// get 11-block holding jacobian contributions
auto block_J = contact_.jacobianFunction(uPlusShapeDisp, J_.release());
Expand Down Expand Up @@ -281,7 +281,7 @@ class SolidMechanicsContact<order, dim, Parameters<parameter_space...>,

mfem::Vector uPlusShapeDisp(displacement_.Size());
uPlusShapeDisp = displacement_;
uPlusShapeDisp += shape_displacement_;
uPlusShapeDisp.Add(1.0, shape_displacement_);

auto block_J = contact_.jacobianFunction(uPlusShapeDisp, jacobian.release());
block_J->owns_blocks = false;
Expand All @@ -308,7 +308,7 @@ class SolidMechanicsContact<order, dim, Parameters<parameter_space...>,

mfem::Vector uPlusShapeDisp(displacement_.Size());
uPlusShapeDisp = displacement_;
uPlusShapeDisp += shape_displacement_;
uPlusShapeDisp.Add(1.0, shape_displacement_);

auto block_J = contact_.jacobianFunction(uPlusShapeDisp, drdshape_mat.release());
block_J->owns_blocks = false;
Expand Down

0 comments on commit c96517d

Please sign in to comment.