Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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-gdt
Commits
d3962073
Commit
d3962073
authored
5 years ago
by
Tobias Leibner
Browse files
Options
Downloads
Patches
Plain Diff
[momentmodels] fix 2d checkerboard
parent
28e5bc5f
No related branches found
No related tags found
No related merge requests found
Pipeline
#38670
failed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/gdt/test/momentmodels/kineticequation.hh
+1
-0
1 addition, 0 deletions
dune/gdt/test/momentmodels/kineticequation.hh
dune/gdt/test/momentmodels/kinetictransport/base.hh
+9
-7
9 additions, 7 deletions
dune/gdt/test/momentmodels/kinetictransport/base.hh
with
10 additions
and
7 deletions
dune/gdt/test/momentmodels/kineticequation.hh
+
1
−
0
View file @
d3962073
...
@@ -41,6 +41,7 @@ public:
...
@@ -41,6 +41,7 @@ public:
using
BoundaryValueType
=
InitialValueType
;
using
BoundaryValueType
=
InitialValueType
;
using
MatrixType
=
typename
Dune
::
DynamicMatrix
<
RangeFieldType
>
;
using
MatrixType
=
typename
Dune
::
DynamicMatrix
<
RangeFieldType
>
;
using
DomainType
=
typename
InitialValueType
::
DomainType
;
using
DomainType
=
typename
InitialValueType
::
DomainType
;
using
BasisDomainType
=
typename
MomentBasis
::
DomainType
;
using
StateType
=
typename
FluxType
::
StateType
;
using
StateType
=
typename
FluxType
::
StateType
;
using
RangeReturnType
=
typename
InitialValueType
::
RangeReturnType
;
using
RangeReturnType
=
typename
InitialValueType
::
RangeReturnType
;
using
DynamicRangeType
=
Dune
::
DynamicVector
<
RangeFieldType
>
;
using
DynamicRangeType
=
Dune
::
DynamicVector
<
RangeFieldType
>
;
...
...
This diff is collapsed.
Click to expand it.
dune/gdt/test/momentmodels/kinetictransport/base.hh
+
9
−
7
View file @
d3962073
...
@@ -38,6 +38,7 @@ public:
...
@@ -38,6 +38,7 @@ public:
using
BaseType
::
dimFlux
;
using
BaseType
::
dimFlux
;
using
BaseType
::
dimRange
;
using
BaseType
::
dimRange
;
using
BaseType
::
dimRangeCols
;
using
BaseType
::
dimRangeCols
;
using
typename
BaseType
::
BasisDomainType
;
using
typename
BaseType
::
DomainFieldType
;
using
typename
BaseType
::
DomainFieldType
;
using
typename
BaseType
::
DomainType
;
using
typename
BaseType
::
DomainType
;
using
typename
BaseType
::
GenericFluxFunctionType
;
using
typename
BaseType
::
GenericFluxFunctionType
;
...
@@ -57,7 +58,8 @@ public:
...
@@ -57,7 +58,8 @@ public:
using
DynamicFluxJacobianRangeType
=
typename
FluxType
::
LocalFunctionType
::
DynamicJacobianRangeType
;
using
DynamicFluxJacobianRangeType
=
typename
FluxType
::
LocalFunctionType
::
DynamicJacobianRangeType
;
using
GenericScalarFunctionType
=
XT
::
Functions
::
GenericFunction
<
dimFlux
,
1
,
1
,
RangeFieldType
>
;
using
GenericScalarFunctionType
=
XT
::
Functions
::
GenericFunction
<
dimFlux
,
1
,
1
,
RangeFieldType
>
;
using
ConstantScalarFunctionType
=
XT
::
Functions
::
ConstantFunction
<
dimFlux
,
1
,
1
,
RangeFieldType
>
;
using
ConstantScalarFunctionType
=
XT
::
Functions
::
ConstantFunction
<
dimFlux
,
1
,
1
,
RangeFieldType
>
;
using
BoundaryDistributionType
=
std
::
function
<
std
::
function
<
RangeFieldType
(
const
DomainType
&
)
>
(
const
DomainType
&
)
>
;
using
BoundaryDistributionType
=
std
::
function
<
std
::
function
<
RangeFieldType
(
const
BasisDomainType
&
)
>
(
const
DomainType
&
)
>
;
using
BaseType
::
default_boundary_cfg
;
using
BaseType
::
default_boundary_cfg
;
using
BaseType
::
default_grid_cfg
;
using
BaseType
::
default_grid_cfg
;
...
@@ -126,26 +128,26 @@ public:
...
@@ -126,26 +128,26 @@ public:
const
auto
M_T
=
basis_functions_
.
mass_matrix
();
// mass matrix is symmetric
const
auto
M_T
=
basis_functions_
.
mass_matrix
();
// mass matrix is symmetric
// solve
// solve
DynamicVector
<
RangeFieldType
>
tmp_row
(
M_T
.
N
(),
0.
);
DynamicVector
<
RangeFieldType
>
tmp_row
(
M_T
.
N
(),
0.
);
for
(
size_t
dd
=
0
;
dd
<
dim
Domain
;
++
dd
)
{
for
(
size_t
dd
=
0
;
dd
<
dim
Flux
;
++
dd
)
{
for
(
size_t
ii
=
0
;
ii
<
M_T
.
N
();
++
ii
)
{
for
(
size_t
ii
=
0
;
ii
<
M_T
.
N
();
++
ii
)
{
solve
(
M_T
,
tmp_row
,
A
[
dd
][
ii
],
basis_functions_
);
solve
(
M_T
,
tmp_row
,
A
[
dd
][
ii
],
basis_functions_
);
A
[
dd
][
ii
]
=
tmp_row
;
A
[
dd
][
ii
]
=
tmp_row
;
}
}
}
}
auto
order_func
=
[](
const
XT
::
Common
::
Parameter
&
)
->
int
{
return
1
;
};
auto
order_func
=
[](
const
XT
::
Common
::
Parameter
&
)
->
int
{
return
1
;
};
DynamicVector
<
XT
::
LA
::
CommonDenseMatrix
<
RangeFieldType
>>
A_la
(
dim
Domain
);
DynamicVector
<
XT
::
LA
::
CommonDenseMatrix
<
RangeFieldType
>>
A_la
(
dim
Flux
);
for
(
size_t
dd
=
0
;
dd
<
dim
Domain
;
++
dd
)
for
(
size_t
dd
=
0
;
dd
<
dim
Flux
;
++
dd
)
A_la
[
dd
]
=
A
[
dd
];
A_la
[
dd
]
=
A
[
dd
];
auto
eval_func
=
auto
eval_func
=
[
A_la
](
const
DomainType
&
,
const
StateType
&
u
,
DynamicFluxRangeType
&
ret
,
const
XT
::
Common
::
Parameter
&
)
{
[
A_la
](
const
DomainType
&
,
const
StateType
&
u
,
DynamicFluxRangeType
&
ret
,
const
XT
::
Common
::
Parameter
&
)
{
for
(
size_t
dd
=
0
;
dd
<
dim
Domain
;
++
dd
)
{
for
(
size_t
dd
=
0
;
dd
<
dim
Flux
;
++
dd
)
{
auto
row_view
=
ret
[
dd
];
auto
row_view
=
ret
[
dd
];
A_la
[
dd
].
mv
(
u
,
row_view
);
A_la
[
dd
].
mv
(
u
,
row_view
);
}
}
};
};
auto
jacobian_func
=
auto
jacobian_func
=
[
A_la
](
const
DomainType
&
,
const
StateType
&
,
DynamicFluxJacobianRangeType
&
ret
,
const
XT
::
Common
::
Parameter
&
)
{
[
A_la
](
const
DomainType
&
,
const
StateType
&
,
DynamicFluxJacobianRangeType
&
ret
,
const
XT
::
Common
::
Parameter
&
)
{
for
(
size_t
dd
=
0
;
dd
<
dim
Domain
;
++
dd
)
for
(
size_t
dd
=
0
;
dd
<
dim
Flux
;
++
dd
)
ret
[
dd
]
=
A_la
[
dd
];
ret
[
dd
]
=
A_la
[
dd
];
};
};
return
std
::
make_unique
<
GenericFluxFunctionType
>
(
order_func
,
return
std
::
make_unique
<
GenericFluxFunctionType
>
(
order_func
,
...
@@ -177,7 +179,7 @@ public:
...
@@ -177,7 +179,7 @@ public:
virtual
BoundaryDistributionType
boundary_distribution
()
const
virtual
BoundaryDistributionType
boundary_distribution
()
const
{
{
return
[
this
](
const
DomainType
&
)
{
return
[
this
](
const
DomainType
&
)
{
return
this
->
psi_vac_
;
};
};
return
[
this
](
const
DomainType
&
)
{
return
[
this
](
const
Basis
DomainType
&
)
{
return
this
->
psi_vac_
;
};
};
}
}
RangeReturnType
RangeReturnType
...
...
This diff is collapsed.
Click to expand it.
René Fritze
@r_milk01
mentioned in commit
6f378720
·
5 years ago
mentioned in commit
6f378720
mentioned in commit 6f37872086d090277c791b266451d59336cf5a28
Toggle commit list
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