Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Sander, Oliver
dune-gfe
Commits
653b0704
Commit
653b0704
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Inject ADOL-C overloads into the std namespace
[[Imported from SVN: r9394]]
parent
640f7e8d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/gfe/Makefile.am
+2
-1
2 additions, 1 deletion
dune/gfe/Makefile.am
dune/gfe/adolcnamespaceinjections.hh
+68
-0
68 additions, 0 deletions
dune/gfe/adolcnamespaceinjections.hh
with
70 additions
and
1 deletion
dune/gfe/Makefile.am
+
2
−
1
View file @
653b0704
...
...
@@ -5,7 +5,8 @@ SUBDIRS = coupling
AM_CPPFLAGS
=
@AM_CPPFLAGS@
-I
$(
top_srcdir
)
/..
srcincludedir
=
$(
includedir
)
/dune/common
srcinclude_HEADERS
=
averagedistanceassembler.hh
\
srcinclude_HEADERS
=
adolcnamespaceinjections.hh
\
averagedistanceassembler.hh
\
averageinterface.hh
\
cosseratvtkwriter.hh
\
geodesicdifference.hh
\
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/adolcnamespaceinjections.hh
0 → 100644
+
68
−
0
View file @
653b0704
#ifndef DUNE_GFE_ADOLC_NAMESPACE_INJECTIONS_HH
#define DUNE_GFE_ADOLC_NAMESPACE_INJECTIONS_HH
adouble
sqrt_hack
(
adouble
a
)
{
return
sqrt
(
a
);
}
adouble
pow_hack
(
const
adouble
&
a
,
const
adouble
&
b
)
{
return
pow
(
a
,
b
);
}
adouble
pow_hack
(
const
adouble
&
a
,
double
b
)
{
return
pow
(
a
,
b
);
}
namespace
std
{
adouble
min
(
adouble
a
,
adouble
b
)
{
return
fmin
(
a
,
b
);
}
adouble
max
(
adouble
a
,
adouble
b
)
{
return
fmax
(
a
,
b
);
}
adouble
sqrt
(
adouble
a
)
{
return
sqrt_hack
(
a
);
}
adouble
abs
(
adouble
a
)
{
return
fabs
(
a
);
}
// adouble fabs(adouble a) {
// return fabs(a);
// }
adouble
pow
(
const
adouble
&
a
,
const
adouble
&
b
)
{
return
pow_hack
(
a
,
b
);
}
adouble
pow
(
const
adouble
&
a
,
double
b
)
{
return
pow_hack
(
a
,
b
);
}
adouble
sin
(
adouble
a
)
{
return
sin
(
a
);
}
adouble
cos
(
adouble
a
)
{
return
cos
(
a
);
}
adouble
acos
(
adouble
a
)
{
return
acos
(
a
);
}
bool
isnan
(
adouble
a
)
{
return
std
::
isnan
(
a
.
value
());
}
bool
isinf
(
adouble
a
)
{
return
std
::
isinf
(
a
.
value
());
}
}
#endif
\ No newline at end of file
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