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
3b24fdce
Unverified
Commit
3b24fdce
authored
7 years ago
by
René Fritze
Browse files
Options
Downloads
Patches
Plain Diff
[affine] add a (failing to build) minimal test for an affine function
parent
2b422ca3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/xt/functions/test/affine.cc
+42
-0
42 additions, 0 deletions
dune/xt/functions/test/affine.cc
dune/xt/functions/test/affine.mini
+11
-0
11 additions, 0 deletions
dune/xt/functions/test/affine.mini
dune/xt/functions/test/functions.cc
+6
-0
6 additions, 0 deletions
dune/xt/functions/test/functions.cc
with
59 additions
and
0 deletions
dune/xt/functions/test/affine.cc
0 → 100644
+
42
−
0
View file @
3b24fdce
// This file is part of the dune-xt-functions project:
// https://github.com/dune-community/dune-xt-functions
// Copyright 2009-2017 dune-xt-functions developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
// with "runtime exception" (http://www.dune-project.org/license.html)
// Authors:
// Felix Schindler (2013 - 2017)
// Rene Milk (2013 - 2016)
// Tobias Leibner (2014 - 2016)
#include
<dune/xt/common/test/main.hxx>
#include
<memory>
#include
<dune/xt/common/exceptions.hh>
#include
<dune/xt/grid/grids.hh>
#include
<dune/xt/grid/gridprovider/cube.hh>
#include
<dune/xt/functions/affine.hh>
#include
<dune/xt/functions/test/functions.hh>
using
namespace
Dune
;
using
namespace
Dune
::
XT
;
using
namespace
Dune
::
XT
::
Functions
;
/* we just take the constant function as a container for the types we need */
/* since this one always exists for all combinations */
struct
FunctionsTest
//: public FunctionTest<TESTFUNCTIONTYPE>
{
virtual
void
check
()
const
{
auto
grid
=
XT
::
Grid
::
make_cube_grid
<
GRIDTYPE
>
();
const
auto
testfunction
=
TESTFUNCTIONTYPE
::
create
();
for
(
auto
&&
entity
:
elements
(
grid
.
leaf_view
()))
{
auto
xx_global
=
entity
.
geometry
().
center
();
auto
xx_local
=
entity
.
geometry
().
local
(
xx_global
);
TESTFUNCTIONTYPE
::
JacobianRangeType
jacobian
;
testfunction
->
local_function
(
entity
)
->
jacobian
(
xx_local
);
}
}
};
This diff is collapsed.
Click to expand it.
dune/xt/functions/test/affine.mini
0 → 100644
+
11
−
0
View file @
3b24fdce
__name = functions
__exec_suffix = {gridname}_{dimDomain}d_r{dimRange}_rc{dimRangeCols}
dimRange = 1, 3 | expand
dimRangeCols = 1, 3 | expand
include grids.mini
[__static]
GRIDTYPE = {grid}
TESTFUNCTIONTYPE = Dune::XT::Functions::AffineFunction<{entity_type}, double, {dimDomain}, double, {dimRange}, {dimRangeCols}>
This diff is collapsed.
Click to expand it.
dune/xt/functions/test/functions.cc
+
6
−
0
View file @
3b24fdce
...
...
@@ -16,6 +16,7 @@
#include
<dune/xt/common/exceptions.hh>
#include
<dune/xt/grid/grids.hh>
#include
<dune/xt/functions.hh>
#include
<dune/xt/common/test/gtest/gtest.h>
#include
"functions.hh"
...
...
@@ -42,3 +43,8 @@ struct FunctionsTest : public FunctionTest<TESTFUNCTIONTYPE>
}
}
};
TEST_F
(
FunctionsTest
,
creation_and_evalution
)
{
this
->
check
();
}
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