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
b70d2d6d
Commit
b70d2d6d
authored
12 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[test.function] update
parent
a08bb842
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/test/function.cc
+9
-11
9 additions, 11 deletions
dune/stuff/test/function.cc
with
9 additions
and
11 deletions
dune/stuff/test/function.cc
+
9
−
11
View file @
b70d2d6d
...
...
@@ -7,11 +7,11 @@
using
namespace
Dune
::
Stuff
;
typedef
testing
::
Types
<
Function
::
Expression
<
double
,
1
,
double
,
1
>
,
Function
::
Checkerboard
<
double
,
1
,
double
,
1
>>
typedef
testing
::
Types
<
FunctionExpression
<
double
,
1
,
double
,
1
>
,
FunctionCheckerboard
<
double
,
1
,
double
,
1
>>
NonparametricFunctions
;
typedef
testing
::
Types
<
Function
::
Separable
Checkerboard
<
double
,
1
,
double
,
1
>
,
Function
::
Separable
Default
<
double
,
1
,
double
,
1
>>
SeparableFunctions
;
typedef
testing
::
Types
<
Function
AffineParametric
Checkerboard
<
double
,
1
,
double
,
1
>
,
Function
AffineParametric
Default
<
double
,
1
,
double
,
1
>>
SeparableFunctions
;
template
<
class
T
>
...
...
@@ -24,13 +24,12 @@ struct NonparametricTest : public ::testing::Test
typedef
typename
FunctionType
::
RangeFieldType
RangeFieldType
;
static
const
int
dimRange
=
FunctionType
::
dimRange
;
typedef
typename
FunctionType
::
RangeType
RangeType
;
typedef
Function
::
Interface
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
InterfaceType
;
typedef
FunctionInterface
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
InterfaceType
;
void
check
()
const
{
const
std
::
unique_ptr
<
InterfaceType
>
function
(
Function
::
create
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
(
FunctionType
::
id
(),
FunctionType
::
createSampleDescription
()));
const
std
::
unique_ptr
<
InterfaceType
>
function
(
createFunction
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
(
FunctionType
::
id
(),
FunctionType
::
createSampleDescription
()));
DomainType
x
(
1
);
RangeType
ret
;
if
(
function
->
parametric
())
...
...
@@ -53,8 +52,8 @@ struct SeparableTest : public ::testing::Test
static
const
int
dimRange
=
FunctionType
::
dimRange
;
typedef
typename
FunctionType
::
RangeType
RangeType
;
typedef
Function
::
Interface
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
InterfaceType
;
typedef
Function
::
Separable
Default
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
DefaultType
;
typedef
FunctionInterface
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
InterfaceType
;
typedef
Function
AffineParametric
Default
<
DomainFieldType
,
dimDomain
,
RangeFieldType
,
dimRange
>
DefaultType
;
typedef
Common
::
Parameter
::
FieldType
ParamFieldType
;
static
const
int
maxParamDim
=
Common
::
Parameter
::
maxDim
;
...
...
@@ -62,8 +61,7 @@ struct SeparableTest : public ::testing::Test
void
check
()
const
{
const
std
::
unique_ptr
<
InterfaceType
>
function
(
FunctionType
::
createFromDescription
(
FunctionType
::
createSampleDescription
()));
const
std
::
unique_ptr
<
InterfaceType
>
function
(
FunctionType
::
create
(
FunctionType
::
createSampleDescription
()));
if
(
!
function
->
parametric
())
DUNE_THROW
(
Dune
::
InvalidStateException
,
"ERROR: separable function returned parametric() == false!"
);
if
(
!
function
->
separable
())
...
...
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