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
e2e4b25f
Commit
e2e4b25f
authored
Oct 19, 2016
by
Jonathan Lambrechts
Browse files
remove compilation warning
parent
9d5b1d55
Changes
1
Hide whitespace changes
Inline
Side-by-side
conservationLaw/dgConservationLawFunction.cpp
View file @
e2e4b25f
...
...
@@ -216,19 +216,19 @@ fullMatrix<double> dgConservationLawFunction::maxEdge(functorCache *m)
void
dgConservationLawFunction
::
muFactorFunctor
(
functorCache
&
cache
,
fullMatrix
<
double
>&
val
)
const
{
const
size_t
nQP
=
cache
.
nEvaluationPoint
();
val
.
resize
(
nQP
,
2
);
const
dgGroupOfFaces
&
iGroup
=
*
cache
.
interfaceGroup
();
if
(
!
&
iGroup
)
const
dgGroupOfFaces
*
iGroup
=
cache
.
interfaceGroup
();
if
(
!
iGroup
)
Msg
::
Fatal
(
"dgConservationLawFunction::muFactor can only be used on interfaces"
);
int
connectionR
=
iGroup
.
nConnection
()
==
2
?
1
:
0
;
const
dgGroupOfElements
&
eGroupL
=
iGroup
.
elementGroup
(
0
);
const
dgGroupOfElements
&
eGroupR
=
iGroup
.
elementGroup
(
connectionR
);
int
connectionR
=
iGroup
->
nConnection
()
==
2
?
1
:
0
;
const
dgGroupOfElements
&
eGroupL
=
iGroup
->
elementGroup
(
0
);
const
dgGroupOfElements
&
eGroupR
=
iGroup
->
elementGroup
(
connectionR
);
int
nP
=
cache
.
nPointByElement
();
for
(
int
iFace
=
0
;
iFace
<
cache
.
nElement
();
++
iFace
)
{
int
iElementL
=
iGroup
.
elementId
(
iFace
,
0
);
int
iElementR
=
iGroup
.
elementId
(
iFace
,
connectionR
);
int
iElementL
=
iGroup
->
elementId
(
iFace
,
0
);
int
iElementR
=
iGroup
->
elementId
(
iFace
,
connectionR
);
int
p
=
eGroupL
.
getOrder
();
int
dim
=
eGroupL
.
getDimUVW
();
double
minl
=
std
::
min
(
eGroupL
.
elementVolume
(
cache
.
jacobian
(),
iElementL
),
eGroupR
.
elementVolume
(
cache
.
jacobian
(),
iElementR
))
/
iGroup
.
interfaceSurface
(
cache
.
jacobian
(),
cache
.
interfaceId
(
iFace
));
double
minl
=
std
::
min
(
eGroupL
.
elementVolume
(
cache
.
jacobian
(),
iElementL
),
eGroupR
.
elementVolume
(
cache
.
jacobian
(),
iElementR
))
/
iGroup
->
interfaceSurface
(
cache
.
jacobian
(),
cache
.
interfaceId
(
iFace
));
int
n0
=
std
::
max
(
eGroupL
.
getFunctionSpace
().
numFaces
,
eGroupR
.
getFunctionSpace
().
numFaces
);
for
(
int
iP
=
0
;
iP
<
nP
;
iP
++
)
{
val
(
nP
*
iFace
+
iP
,
0
)
=
(
p
+
1
)
*
(
p
+
dim
)
/
(
dim
*
minl
)
*
n0
/
2
;
...
...
@@ -245,19 +245,19 @@ fullMatrix<double> dgConservationLawFunction::muFactor(functorCache *m) {
functorCache
&
cache
=
*
m
;
const
size_t
nQP
=
cache
.
nEvaluationPoint
();
val
.
resize
(
nQP
,
2
);
const
dgGroupOfFaces
&
iGroup
=
*
cache
.
interfaceGroup
();
if
(
!
&
iGroup
)
const
dgGroupOfFaces
*
iGroup
=
cache
.
interfaceGroup
();
if
(
!
iGroup
)
Msg
::
Fatal
(
"dgConservationLawFunction::muFactor can only be used on interfaces"
);
int
connectionR
=
iGroup
.
nConnection
()
==
2
?
1
:
0
;
const
dgGroupOfElements
&
eGroupL
=
iGroup
.
elementGroup
(
0
);
const
dgGroupOfElements
&
eGroupR
=
iGroup
.
elementGroup
(
connectionR
);
int
connectionR
=
iGroup
->
nConnection
()
==
2
?
1
:
0
;
const
dgGroupOfElements
&
eGroupL
=
iGroup
->
elementGroup
(
0
);
const
dgGroupOfElements
&
eGroupR
=
iGroup
->
elementGroup
(
connectionR
);
int
nP
=
cache
.
nPointByElement
();
for
(
int
iFace
=
0
;
iFace
<
cache
.
nElement
();
++
iFace
)
{
int
iElementL
=
iGroup
.
elementId
(
iFace
,
0
);
int
iElementR
=
iGroup
.
elementId
(
iFace
,
connectionR
);
int
iElementL
=
iGroup
->
elementId
(
iFace
,
0
);
int
iElementR
=
iGroup
->
elementId
(
iFace
,
connectionR
);
int
p
=
eGroupL
.
getOrder
();
int
dim
=
eGroupL
.
getDimUVW
();
double
minl
=
std
::
min
(
eGroupL
.
elementVolume
(
cache
.
jacobian
(),
iElementL
),
eGroupR
.
elementVolume
(
cache
.
jacobian
(),
iElementR
))
/
iGroup
.
interfaceSurface
(
cache
.
jacobian
(),
cache
.
interfaceId
(
iFace
));
double
minl
=
std
::
min
(
eGroupL
.
elementVolume
(
cache
.
jacobian
(),
iElementL
),
eGroupR
.
elementVolume
(
cache
.
jacobian
(),
iElementR
))
/
iGroup
->
interfaceSurface
(
cache
.
jacobian
(),
cache
.
interfaceId
(
iFace
));
int
n0
=
std
::
max
(
eGroupL
.
getFunctionSpace
().
numFaces
,
eGroupR
.
getFunctionSpace
().
numFaces
);
for
(
int
iP
=
0
;
iP
<
nP
;
iP
++
)
{
val
(
nP
*
iFace
+
iP
,
0
)
=
(
p
+
1
)
*
(
p
+
dim
)
/
(
dim
*
minl
)
*
n0
/
2
;
...
...
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