Skip to content

Commit 4d87045

Browse files
committed
Small adjustments from ResInsight
1 parent c16d0e8 commit 4d87045

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

libslvs/SolveSpaceSystem.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ double SolveSpaceSystem::parameterValue(Slvs_hParam paramId)
9090
return (*m_paramsMemory)[paramId-1].val;
9191
}
9292

93+
//--------------------------------------------------------------------------------------------------
94+
///
95+
//--------------------------------------------------------------------------------------------------
96+
void SolveSpaceSystem::setParameterValue(Slvs_hParam paramId, double value)
97+
{
98+
(*m_paramsMemory)[paramId-1].val = value;
99+
}
100+
93101
//--------------------------------------------------------------------------------------------------
94102
///
95103
//--------------------------------------------------------------------------------------------------
@@ -155,7 +163,7 @@ std::valarray<double> SolveSpaceSystem::global3DPos(Slvs_hEntity pointEntityId)
155163
//--------------------------------------------------------------------------------------------------
156164
///
157165
//--------------------------------------------------------------------------------------------------
158-
Slvs_Constraint SolveSpaceSystem::constraint(Slvs_hConstraint constraintId)
166+
Slvs_Constraint& SolveSpaceSystem::constraint(Slvs_hConstraint constraintId)
159167
{
160168
return (*m_constraintMemory)[constraintId-1];
161169
}

libslvs/include/SolveSpaceSystem.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class DLL SolveSpaceSystem
2727
ResultStatus solve(Slvs_hGroup groupId, bool reportFailedConstraints = true);
2828

2929
double parameterValue(Slvs_hParam paramId);
30+
void setParameterValue(Slvs_hParam paramId, double value);
3031

3132
std::tuple< std::valarray<double>,
3233
std::valarray<double>,
@@ -36,7 +37,7 @@ class DLL SolveSpaceSystem
3637
// Returns point as x, y, z values
3738
std::valarray<double> global3DPos (Slvs_hEntity pointEntityId);
3839

39-
Slvs_Constraint constraint(Slvs_hConstraint constraintId);
40+
Slvs_Constraint & constraint(Slvs_hConstraint constraintId);
4041
std::vector<Slvs_hConstraint> failedConstraints() const;
4142

4243
private:

0 commit comments

Comments
 (0)