Skip to content

Commit cd467dc

Browse files
Add missing N_VDestroy
1 parent 4ade8cb commit cd467dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Solver/Dynamic/Ida.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ namespace AnalysisManager
9999
std::vector<bool>& tag = model_->tag();
100100
if (static_cast<IdxT>(tag.size()) == model_->size())
101101
{
102-
tag_ = N_VClone(yy_);
102+
N_Vector tag_ = N_VClone(yy_);
103103
checkAllocation((void*) tag_, "N_VClone");
104104
model_->tagDifferentiable();
105105
copyVec(tag, tag_);
106106

107107
retval = IDASetId(solver_, tag_);
108+
N_VDestroy(tag_);
108109
checkOutput(retval, "IDASetId");
109110
retval = IDASetSuppressAlg(solver_, SUNTRUE);
110111
checkOutput(retval, "IDASetSuppressAlg");

src/Solver/Dynamic/Ida.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ namespace AnalysisManager
175175

176176
N_Vector yy_{}; ///< Solution vector
177177
N_Vector yp_{}; ///< Solution derivatives vector
178-
N_Vector tag_{}; ///< Tags differential variables
179178
N_Vector q_{}; ///< Integrand vector
180179

181180
N_Vector yy0_{}; ///< Storage for initial values

0 commit comments

Comments
 (0)