Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ag-ohlberger
dune-community
dune-xt
Commits
e0558350
Commit
e0558350
authored
12 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[function] create() returns a raw ptr
parent
d4aeda79
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/stuff/function.hh
+7
-8
7 additions, 8 deletions
dune/stuff/function.hh
with
7 additions
and
8 deletions
dune/stuff/function.hh
+
7
−
8
View file @
e0558350
...
...
@@ -62,21 +62,20 @@ Dune::ParameterTree createSampleDescription(const std::string type)
template
<
class
D
,
int
d
,
class
R
,
int
r
>
Dune
::
shared_ptr
<
Interface
<
D
,
d
,
R
,
r
>>
create
(
const
std
::
string
type
,
const
Dune
::
ParameterTree
description
=
Dune
::
ParameterTree
())
Interface
<
D
,
d
,
R
,
r
>*
create
(
const
std
::
string
type
,
const
Dune
::
ParameterTree
description
=
Dune
::
ParameterTree
())
{
if
(
type
==
"function.checkerboard"
)
{
typedef
Stuff
::
Function
::
Checkerboard
<
D
,
d
,
R
,
r
>
FunctionType
;
return
Dune
::
make_shared
<
FunctionType
>
(
FunctionType
::
createFromDescription
(
description
));
return
new
FunctionType
(
FunctionType
::
createFromDescription
(
description
));
}
else
if
(
type
==
"function.expression"
)
{
typedef
Stuff
::
Function
::
Expression
<
D
,
d
,
R
,
r
>
FunctionType
;
return
Dune
::
make_shared
<
FunctionType
>
(
FunctionType
::
createFromDescription
(
description
));
}
else
if
(
type
==
"function.
parametric.
separable.default"
)
{
return
new
FunctionType
(
FunctionType
::
createFromDescription
(
description
));
}
else
if
(
type
==
"function.separable.default"
)
{
typedef
Stuff
::
Function
::
SeparableDefault
<
D
,
d
,
R
,
r
>
FunctionType
;
return
Dune
::
make_shared
<
FunctionType
>
(
FunctionType
::
createFromDescription
(
description
));
}
else
if
(
type
==
"function.
parametric.
separable.checkerboard"
)
{
return
new
FunctionType
(
FunctionType
::
createFromDescription
(
description
));
}
else
if
(
type
==
"function.separable.checkerboard"
)
{
typedef
Stuff
::
Function
::
SeparableCheckerboard
<
D
,
d
,
R
,
r
>
FunctionType
;
return
Dune
::
make_shared
<
FunctionType
>
(
FunctionType
::
createFromDescription
(
description
));
return
new
FunctionType
(
FunctionType
::
createFromDescription
(
description
));
}
else
DUNE_THROW
(
Dune
::
RangeError
,
"
\n
"
<<
Dune
::
Stuff
::
Common
::
colorStringRed
(
"ERROR:"
)
<<
" unknown function '"
<<
type
...
...
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