Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dg
dg
Commits
6698eb32
Commit
6698eb32
authored
May 11, 2017
by
Matthieu Flamand
Browse files
fix sediment bottom
parent
e6091d1d
Pipeline
#2024
passed with stage
in 36 minutes and 54 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
modules/shallowWater/dgConservationLawSedimentBottom.cpp
View file @
6698eb32
...
...
@@ -3,6 +3,7 @@
void
dgConservationLawSedimentBottom
::
gradPsiTermCB
(
functorCache
&
m
,
fullMatrix
<
double
>
&
val
)
const
{
const
fullMatrix
<
double
>
&
s
=
m
.
get
(
*
_s
);
val
.
resize
(
m
.
nEvaluationPoint
(),
3
,
false
);
for
(
int
i
=
0
;
i
<
m
.
nEvaluationPoint
();
i
++
)
{
val
(
i
,
0
)
=
s
(
i
,
0
);
val
(
i
,
1
)
=
s
(
i
,
1
);
...
...
@@ -13,11 +14,10 @@ void dgConservationLawSedimentBottom::gradPsiTermCB(functorCache &m, fullMatrix<
void
dgConservationLawSedimentBottom
::
interfaceTermCB
(
functorCache
&
m
,
fullMatrix
<
double
>&
val
)
const
{
const
fullMatrix
<
double
>
&
sL
=
m
.
get
(
*
_s
,
0
);
const
fullMatrix
<
double
>
&
sR
=
m
.
get
(
*
_s
,
1
);
const
fullMatrix
<
double
>
&
nL
=
m
.
get
(
*
functor
::
getNormals
(),
0
);
const
fullMatrix
<
double
>
&
nR
=
m
.
get
(
*
functor
::
getNormals
(),
1
);
val
.
resize
(
m
.
nEvaluationPoint
(),
2
);
const
fullMatrix
<
double
>
&
n
=
m
.
get
(
*
functor
::
getNormals
(),
0
);
val
.
resize
(
m
.
nEvaluationPoint
(),
1
);
for
(
int
i
=
0
;
i
<
m
.
nEvaluationPoint
();
i
++
)
{
val
(
i
,
0
)
=
-
(
sL
(
i
,
0
)
*
n
L
(
i
,
0
)
+
sL
(
i
,
1
)
*
n
L
(
i
,
1
)
+
sR
(
i
,
0
)
*
n
R
(
i
,
0
)
+
sR
(
i
,
1
)
*
n
R
(
i
,
1
))
/
2
;
val
(
i
,
0
)
=
-
(
sL
(
i
,
0
)
*
n
(
i
,
0
)
+
sL
(
i
,
1
)
*
n
(
i
,
1
)
+
sR
(
i
,
0
)
*
n
(
i
,
0
)
+
sR
(
i
,
1
)
*
n
(
i
,
1
))
/
2
.
;
}
}
...
...
modules/shallowWater/dgConservationLawSedimentBottom.h
View file @
6698eb32
...
...
@@ -10,6 +10,7 @@ class dgConservationLawSedimentBottom : public dgConservationLawFunction {
void
interfaceTermCB
(
functorCache
&
m
,
fullMatrix
<
double
>
&
val
)
const
;
bool
isConstantJac
()
const
{
return
true
;}
bool
isLinear
()
const
{
return
true
;}
dgBoundaryCondition
*
newBoundaryWall
();
dgBoundaryCondition
*
newBoundaryOpen
();
dgConservationLawSedimentBottom
(
const
functor
*
s
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment