Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-mmdg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Hörl, Maximilian
dune-mmdg
Commits
21a7a1a5
Commit
21a7a1a5
authored
5 years ago
by
Hörl, Maximilian
Browse files
Options
Downloads
Patches
Plain Diff
use different problem for inhomogeneousbulkproblem
parent
230c53e3
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/mmdg/problems/inhomogeneousbulkproblem.hh
+17
-11
17 additions, 11 deletions
dune/mmdg/problems/inhomogeneousbulkproblem.hh
with
17 additions
and
11 deletions
dune/mmdg/problems/inhomogeneousbulkproblem.hh
+
17
−
11
View file @
21a7a1a5
...
...
@@ -12,12 +12,13 @@ class InhomogeneousBulkProblem : public DGProblem<Coordinate, Scalar>
using
Matrix
=
typename
Base
::
Matrix
;
//the exact solution at position pos
//1d: p(x) = x,
//2d: p(x,y) = x
*y
,
//3d: p(x,y,z) = x
*y*z
virtual
Scalar
exactSolution
(
const
Coordinate
&
pos
)
const
//1d: p(x) = x
^2
,
//2d: p(x,y) = x
^2 + y^2
,
//3d: p(x,y,z) = x
^2 + y^2 + z^2
Scalar
exactSolution
(
const
Coordinate
&
pos
)
const
{
return
pos
*
Coordinate
(
1.0
);
//return pos * Coordinate(1.0);
return
pos
*
pos
;
}
//exact solution is implemented
...
...
@@ -27,14 +28,14 @@ class InhomogeneousBulkProblem : public DGProblem<Coordinate, Scalar>
};
//source term at position pos
virtual
Scalar
q
(
const
Coordinate
&
pos
)
const
Scalar
q
(
const
Coordinate
&
pos
)
const
{
return
-
pos
*
Coordinate
(
2.0
);
return
-
2.0
*
(
dim
+
3.0
*
(
pos
*
pos
)
);
}
//permeability tensor at position pos
virtual
Matrix
K
(
const
Coordinate
&
pos
)
const
{
Matrix
K
(
const
Coordinate
&
pos
)
const
{
//K = diag(1 + x_i^2 : i=1,...,dim)
Matrix
permeability
(
0.0
);
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
...
...
@@ -49,14 +50,19 @@ class InhomogeneousBulkProblem : public DGProblem<Coordinate, Scalar>
//over x * q(x)
int
quadratureOrder_q
()
const
{
return
2
;
return
2
*
dim
+
1
;
}
//returns the recommended quadrature order to compute an integral
//over x * boundary(x) and K(x) * boundary(x)
int
quadratureOrderBoundary
()
const
{
return
1
+
dim
;
if
constexpr
(
dim
==
1
)
{
return
2
;
}
return
4
;
}
//returns the recommended quadrature order to compute an integral
...
...
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