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
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
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
agnumpde
dune-tectonic
Commits
8de78cf3
Commit
8de78cf3
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Clean up after 5a7d8c41710b11a1ed3077b258637ba69860145a
Nuke obsoleted template parameter
parent
9580518c
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/samplefunctional.hh
+1
-2
1 addition, 2 deletions
src/samplefunctional.hh
src/test-gradient-method.cc
+7
-8
7 additions, 8 deletions
src/test-gradient-method.cc
with
8 additions
and
10 deletions
src/samplefunctional.hh
+
1
−
2
View file @
8de78cf3
...
@@ -14,8 +14,7 @@
...
@@ -14,8 +14,7 @@
#include
"nicefunction.hh"
#include
"nicefunction.hh"
namespace
Dune
{
namespace
Dune
{
template
<
int
dimension
,
class
Function
=
TrivialFunction
>
template
<
int
dimension
>
class
SampleFunctional
{
class
SampleFunctional
{
public:
public:
typedef
Dune
::
FieldVector
<
double
,
dimension
>
SmallVector
;
typedef
Dune
::
FieldVector
<
double
,
dimension
>
SmallVector
;
typedef
Dune
::
FieldMatrix
<
double
,
dimension
,
dimension
>
SmallMatrix
;
typedef
Dune
::
FieldMatrix
<
double
,
dimension
,
dimension
>
SmallMatrix
;
...
...
This diff is collapsed.
Click to expand it.
src/test-gradient-method.cc
+
7
−
8
View file @
8de78cf3
...
@@ -10,12 +10,11 @@
...
@@ -10,12 +10,11 @@
#include
<cassert>
#include
<cassert>
template
<
int
dim
,
class
Function
>
template
<
int
dim
>
double
functionTester
(
double
functionTester
(
Dune
::
SampleFunctional
<
dim
>
J
,
Dune
::
SampleFunctional
<
dim
,
Function
>
J
,
typename
Dune
::
SampleFunctional
<
dim
>::
SmallVector
&
start
,
typename
Dune
::
SampleFunctional
<
dim
,
Function
>::
SmallVector
&
start
,
size_t
runs
)
{
size_t
runs
)
{
typename
Dune
::
SampleFunctional
<
dim
>::
SmallVector
correction
;
typename
Dune
::
SampleFunctional
<
dim
,
Function
>::
SmallVector
correction
;
std
::
cout
<<
"Old value: J(...) = "
<<
J
(
start
)
<<
std
::
endl
;
std
::
cout
<<
"Old value: J(...) = "
<<
J
(
start
)
<<
std
::
endl
;
for
(
size_t
i
=
1
;
i
<=
runs
;
++
i
)
{
for
(
size_t
i
=
1
;
i
<=
runs
;
++
i
)
{
Dune
::
minimise
(
J
,
start
,
correction
);
Dune
::
minimise
(
J
,
start
,
correction
);
...
@@ -30,7 +29,7 @@ double functionTester(
...
@@ -30,7 +29,7 @@ double functionTester(
void
testSampleFunction
()
{
void
testSampleFunction
()
{
int
const
dim
=
2
;
int
const
dim
=
2
;
typedef
Dune
::
SampleFunctional
<
dim
,
Dune
::
SampleFunction
>
SampleFunctional
;
typedef
Dune
::
SampleFunctional
<
dim
>
SampleFunctional
;
SampleFunctional
::
SmallMatrix
A
;
SampleFunctional
::
SmallMatrix
A
;
A
[
0
][
0
]
=
3
;
A
[
0
][
0
]
=
3
;
...
@@ -78,7 +77,7 @@ void testSampleFunction() {
...
@@ -78,7 +77,7 @@ void testSampleFunction() {
void
testSampleFunctionNonsmooth
()
{
void
testSampleFunctionNonsmooth
()
{
int
const
dim
=
2
;
int
const
dim
=
2
;
typedef
Dune
::
SampleFunctional
<
dim
,
Dune
::
SampleFunction
>
SampleFunctional
;
typedef
Dune
::
SampleFunctional
<
dim
>
SampleFunctional
;
SampleFunctional
::
SmallMatrix
A
;
SampleFunctional
::
SmallMatrix
A
;
A
[
0
][
0
]
=
3
;
A
[
0
][
0
]
=
3
;
...
...
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