Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Boeckel
iMSTK
Commits
2f27bd47
Commit
2f27bd47
authored
8 years ago
by
Sreekanth Arikatla
Browse files
Options
Downloads
Patches
Plain Diff
STYLE: Correct style in nonLinearSolver class
Consistent style enforcement in nonLinearSolver class
parent
08c8b050
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Base/Solvers/imstkNonLinearSolver.cpp
+3
-4
3 additions, 4 deletions
Base/Solvers/imstkNonLinearSolver.cpp
Base/Solvers/imstkNonLinearSolver.h
+9
-9
9 additions, 9 deletions
Base/Solvers/imstkNonLinearSolver.h
with
12 additions
and
13 deletions
Base/Solvers/imstkNonLinearSolver.cpp
+
3
−
4
View file @
2f27bd47
...
...
@@ -22,10 +22,9 @@
namespace
imstk
{
NonLinearSolver
::
NonLinearSolver
()
:
m_sigma
(
std
::
array
<
double
,
2
>
{{
0.1
,
0.5
}}),
m_alpha
(
1e-4
),
m_armijoMax
(
30
)
NonLinearSolver
::
NonLinearSolver
()
:
m_sigma
(
std
::
array
<
double
,
2
>
{{
0.1
,
0.5
}}),
m_alpha
(
1e-4
),
m_armijoMax
(
30
)
{
this
->
m_updateIterate
=
[](
const
Vectord
&
dx
,
Vectord
&
x
)
{
...
...
This diff is collapsed.
Click to expand it.
Base/Solvers/imstkNonLinearSolver.h
+
9
−
9
View file @
2f27bd47
...
...
@@ -49,7 +49,7 @@ public:
///
/// \brief Main solve routine.
///
virtual
void
solve
(
Vectord
&
x
)
=
0
;
virtual
void
solve
(
Vectord
&
x
)
=
0
;
///
/// \brief Backtracking line search method based on the Armijo-Goldstein condition
...
...
@@ -57,7 +57,7 @@ public:
/// \param dx Computed direction.
/// \param x Current iterate.
///
double
armijo
(
const
Vectord
&
dx
,
Vectord
&
x
,
const
double
previousFnorm
);
double
armijo
(
const
Vectord
&
dx
,
Vectord
&
x
,
const
double
previousFnorm
);
///
/// \brief Three-point safeguarded parabolic model for a line search. Upon return
...
...
@@ -69,16 +69,16 @@ public:
/// fnorm[1] Value of |F(x + lambda[1]*dx)|^2
/// fnorm[2] Value of |F(x + lambda[2]*dx)|^2
///
void
parabolicModel
(
const
std
::
array
<
double
,
3
>
&
fnorm
,
std
::
array
<
double
,
3
>
&
lambda
);
void
parabolicModel
(
const
std
::
array
<
double
,
3
>&
fnorm
,
std
::
array
<
double
,
3
>&
lambda
);
///
/// \brief Set/Get Sigma. Safeguard parameter for the the line search method.
///
/// \param newSigma New sigma parameter.
///
void
setSigma
(
const
std
::
array
<
double
,
2
>
&
newSigma
);
const
std
::
array
<
double
,
2
>
&
getSigma
()
const
;
void
setSigma
(
const
std
::
array
<
double
,
2
>&
newSigma
);
const
std
::
array
<
double
,
2
>&
getSigma
()
const
;
///
/// \brief Set/Get Alpha. Parameter to measure sufficient decrease in the line search.
...
...
@@ -101,15 +101,15 @@ public:
///
/// \param newSystem Non-linear system replacement.
///
void
setSystem
(
NonLinearSystem
*
newSystem
);
NonLinearSystem
*
getSystem
()
const
;
void
setSystem
(
NonLinearSystem
*
newSystem
);
NonLinearSystem
*
getSystem
()
const
;
///
/// \brief Set a customized iterate update function.
///
/// \param newUpdateIterate Function used to update iterates. Default: x+=dx.
///
void
setUpdateIterate
(
const
UpdateIterateType
&
newUpdateIterate
);
void
setUpdateIterate
(
const
UpdateIterateType
&
newUpdateIterate
);
protected:
std
::
array
<
double
,
2
>
m_sigma
;
///< Safeguarding bounds for the line search
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment