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
e62bdc74
Commit
e62bdc74
authored
5 years ago
by
Hörl, Maximilian
Browse files
Options
Downloads
Patches
Plain Diff
change problem mmdg6 to allow arbitrary xi
parent
bfe1f4f7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/mmdg/problems/mmdgproblem6.hh
+15
-3
15 additions, 3 deletions
dune/mmdg/problems/mmdgproblem6.hh
src/mmdg.cc
+2
-2
2 additions, 2 deletions
src/mmdg.cc
with
17 additions
and
5 deletions
dune/mmdg/problems/mmdgproblem6.hh
+
15
−
3
View file @
e62bdc74
...
@@ -12,7 +12,10 @@ public:
...
@@ -12,7 +12,10 @@ public:
static
constexpr
int
dim
=
Coordinate
::
dimension
;
static
constexpr
int
dim
=
Coordinate
::
dimension
;
//constructor
//constructor
MMDGProblem6
(
const
Scalar
d0
)
:
d0_
(
d0
)
{}
MMDGProblem6
(
const
Scalar
d0
)
:
d0_
(
d0
),
xi_
(
1.0
)
{}
//constructor
MMDGProblem6
(
const
Scalar
d0
,
const
Scalar
xi
)
:
d0_
(
d0
),
xi_
(
xi
)
{}
//the exact bulk solution at position pos
//the exact bulk solution at position pos
Scalar
exactSolution
(
const
Coordinate
&
pos
)
const
Scalar
exactSolution
(
const
Coordinate
&
pos
)
const
...
@@ -26,7 +29,11 @@ public:
...
@@ -26,7 +29,11 @@ public:
//the exact solution on the interface at position pos
//the exact solution on the interface at position pos
Scalar
exactInterfaceSolution
(
const
Coordinate
&
pos
)
const
Scalar
exactInterfaceSolution
(
const
Coordinate
&
pos
)
const
{
{
return
std
::
cos
(
4.0
*
pos
[
1
]);
constexpr
Scalar
coshsqrt2
=
std
::
cosh
(
sqrt
(
2.0
));
constexpr
Scalar
sinhsqrt2
=
std
::
sinh
(
sqrt
(
2.0
));
return
std
::
cos
(
4.0
*
pos
[
1
])
*
(
coshsqrt2
*
coshsqrt2
-
(
2
*
xi_
-
1
)
*
sinhsqrt2
*
sinhsqrt2
);
}
}
//indicates whether an exact solution is implemented for the problem
//indicates whether an exact solution is implemented for the problem
...
@@ -49,8 +56,12 @@ public:
...
@@ -49,8 +56,12 @@ public:
{
{
const
Scalar
cos4y
=
std
::
cos
(
4.0
*
pos
[
1
]);
const
Scalar
cos4y
=
std
::
cos
(
4.0
*
pos
[
1
]);
constexpr
Scalar
sqrt2
=
2.0
*
sqrt
(
2.0
);
constexpr
Scalar
sqrt2
=
2.0
*
sqrt
(
2.0
);
constexpr
Scalar
coshsqrt2
=
std
::
cosh
(
sqrt
(
2.0
));
constexpr
Scalar
sinhsqrt2
=
std
::
sinh
(
sqrt
(
2.0
));
const
Scalar
hyperbolicFactor
=
(
coshsqrt2
*
coshsqrt2
-
(
2
*
xi_
-
1
)
*
sinhsqrt2
*
sinhsqrt2
);
return
-
48.0
*
d0_
*
d0_
*
std
::
exp
(
-
8.0
*
pos
[
1
])
*
(
cos4y
return
-
48.0
*
d0_
*
d0_
*
std
::
exp
(
-
8.0
*
pos
[
1
])
*
hyperbolicFactor
*
(
cos4y
+
3.0
*
std
::
sin
(
4.0
*
pos
[
1
])
)
-
sqrt2
*
std
::
sinh
(
sqrt2
)
*
cos4y
;
+
3.0
*
std
::
sin
(
4.0
*
pos
[
1
])
)
-
sqrt2
*
std
::
sinh
(
sqrt2
)
*
cos4y
;
}
}
...
@@ -117,6 +128,7 @@ public:
...
@@ -117,6 +128,7 @@ public:
private
:
private
:
Scalar
d0_
;
//prefactor of the aperture
Scalar
d0_
;
//prefactor of the aperture
Scalar
xi_
;
//coupling constant
};
};
...
...
This diff is collapsed.
Click to expand it.
src/mmdg.cc
+
2
−
2
View file @
e62bdc74
...
@@ -95,9 +95,9 @@ int main(int argc, char** argv)
...
@@ -95,9 +95,9 @@ int main(int argc, char** argv)
}
}
else
if
(
pt
[
"problem"
]
==
"mmdg6"
)
else
if
(
pt
[
"problem"
]
==
"mmdg6"
)
{
{
problem
=
new
MMDGProblem6
<
Coordinate
>
(
aperture
);
xi
=
(
pt
.
hasKey
(
"xi"
))
?
std
::
stod
(
pt
[
"xi"
])
:
1.0
;
problem
=
new
MMDGProblem6
<
Coordinate
>
(
aperture
,
xi
);
gridType
=
"mmdg2_5e-2"
;
gridType
=
"mmdg2_5e-2"
;
xi
=
1.0
;
}
}
else
else
{
{
...
...
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