Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
podlesny
dune-tectonic
Commits
0f3c7854
Commit
0f3c7854
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Adjust octave code to new minimise() interface
parent
1ee8f2a4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/duneminimise.cc
+3
-5
3 additions, 5 deletions
src/duneminimise.cc
src/foo.m
+2
-2
2 additions, 2 deletions
src/foo.m
with
5 additions
and
7 deletions
src/duneminimise.cc
+
3
−
5
View file @
0f3c7854
...
@@ -38,11 +38,9 @@ Make a minimisation step of x -> 1/2<Ax,x> - <b,x> + H(|x|) using DUNE starting
...
@@ -38,11 +38,9 @@ Make a minimisation step of x -> 1/2<Ax,x> - <b,x> + H(|x|) using DUNE starting
Functional
::
SmallVector
start
;
Functional
::
SmallVector
start
;
Dune
::
octaveToDune
<
dim
>
(
current
,
start
);
Dune
::
octaveToDune
<
dim
>
(
current
,
start
);
Functional
::
SmallVector
correction
;
Dune
::
minimise
(
J
,
start
);
Dune
::
minimise
(
J
,
start
,
correction
);
ColumnVector
ret
(
dim
);
Dune
::
duneToOctave
<
dim
>
(
start
,
current
);
Dune
::
duneToOctave
<
dim
>
(
correction
,
ret
);
return
octave_value
(
ret
);
return
octave_value
(
cur
re
n
t
);
}
}
This diff is collapsed.
Click to expand it.
src/foo.m
+
2
−
2
View file @
0f3c7854
...
@@ -26,8 +26,8 @@ oldvec = [279; 0]; # Something random that takes a couple of iterations
...
@@ -26,8 +26,8 @@ oldvec = [279; 0]; # Something random that takes a couple of iterations
olddiff
=
[
0
;
0
];
olddiff
=
[
0
;
0
];
for
i
=
1
:
10
#
Something
random
for
i
=
1
:
10
#
Something
random
new
diff
=
duneminimise
(
oldvec
);
new
vec
=
duneminimise
(
oldvec
);
newvec
=
oldvec
+
newdiff
;
newdiff
=
newvec
-
oldvec
;
line
([
oldvec
(
1
)
newvec
(
1
)],
...
line
([
oldvec
(
1
)
newvec
(
1
)],
...
[
oldvec
(
2
)
newvec
(
2
)],
...
[
oldvec
(
2
)
newvec
(
2
)],
...
[
duneevaluate
(
oldvec
)
duneevaluate
(
newvec
)],
...
[
duneevaluate
(
oldvec
)
duneevaluate
(
newvec
)],
...
...
...
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