Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
Mpp
Commits
de5f87ba
Commit
de5f87ba
authored
Jan 27, 2022
by
niklas.baumgarten
Browse files
[Hack-For-ST-In-VtuPlot] §$%&/()= fix
parent
d639942d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib4_fem/elements/STDGDGViscoAcousticElement.hpp
View file @
de5f87ba
#ifndef SPACETIME_STDGDGVISCOACOUSTICELEMENT_HPP
#define SPACETIME_STDGDGVISCOACOUSTICELEMENT_HPP
#include "SpaceTimeDiscretization.hpp"
#include "Element.hpp"
#include "SpaceTimeQuadrature.hpp"
#include "SpaceTimeShape.hpp"
class
STDGDGViscoAcousticElement
{
public:
...
...
@@ -117,15 +117,37 @@ public:
}
VectorField
Velocity
(
const
Point
p
,
int
j
)
{
int
shape_idx
=
j
%
shape
.
size
();
int
component
=
j
/
shape
.
size
();
if
(
component
==
0
)
{
return
VectorField
(
shape
(
p
,
shape_idx
),
0.0
);
}
else
if
(
component
==
1
)
{
return
VectorField
(
0.0
,
shape
(
p
,
shape_idx
));
}
else
{
return
VectorField
();
for
(
int
tq
=
0
;
tq
<
quad
.
GetTimeQuad
().
size
();
++
tq
)
{
for
(
int
sq
=
0
;
sq
<
quad
.
GetSpaceQuad
().
size
();
++
sq
)
{
for
(
int
ti
=
0
;
ti
<
shape
.
GetTimeShape
().
size
();
++
ti
)
{
for
(
int
si
=
0
;
si
<
shape
.
GetSpaceShape
().
size
();
++
si
)
{
int
shape_i
=
ti
*
shape
.
GetSpaceShape
().
size
()
+
si
;
for
(
int
k
=
0
;
k
<
dim
;
++
k
)
{
int
index
=
(
tq
*
quad
.
GetSpaceQuad
().
size
()
+
sq
)
*
j_dimension
()
+
ti
*
shape
.
GetSpaceShape
().
size
()
*
(
1
+
numL
+
dim
)
+
k
*
shape
.
GetSpaceShape
().
size
()
+
si
;
if
(
index
==
j
)
{
double
value
=
shape
(
p
,
shape_i
);
if
(
k
==
0
)
return
VectorField
(
value
,
0.0
);
else
return
VectorField
(
0.0
,
value
);
}
}
}
}
}
}
return
zero
;
// int shape_idx = j % shape.size();
// int component = j / shape.size();
// if (component == 0) {
// return VectorField(shape(p, shape_idx), 0.0);
// } else if (component == 1) {
// return VectorField(0.0, shape(p, shape_idx));
// } else {
// return zero;
// }
}
VectorField
Velocity
(
Point
P
,
const
double
*
u
)
{
...
...
@@ -171,12 +193,28 @@ public:
}
double
Pressure
(
const
Point
p
,
int
j
)
{
int
shape_idx
=
j
%
shape
.
size
();
int
component
=
j
/
shape
.
size
();
if
(
component
>
1
)
{
return
shape
(
p
,
shape_idx
);
for
(
int
tq
=
0
;
tq
<
quad
.
GetTimeQuad
().
size
();
++
tq
)
{
for
(
int
sq
=
0
;
sq
<
quad
.
GetSpaceQuad
().
size
();
++
sq
)
{
for
(
int
ti
=
0
;
ti
<
shape
.
GetTimeShape
().
size
();
++
ti
)
{
for
(
int
si
=
0
;
si
<
shape
.
GetSpaceShape
().
size
();
++
si
)
{
int
shape_i
=
ti
*
shape
.
GetSpaceShape
().
size
()
+
si
;
int
index
=
(
tq
*
quad
.
GetSpaceQuad
().
size
()
+
sq
)
*
j_dimension
()
+
ti
*
shape
.
GetSpaceShape
().
size
()
*
(
1
+
numL
+
dim
)
+
dim
*
shape
.
GetSpaceShape
().
size
()
+
si
;
if
(
index
==
j
)
return
shape
(
p
,
shape_i
);
}
}
}
}
return
0.0
;
// int shape_idx = j / (1 + dim + numL);
// int component = j % (1 + dim + numL);
// if (component > 1) {
// return shape(p, shape_idx);
// }
// return 0.0;
}
double
Pressure
(
const
Point
p
,
const
double
*
u
)
{
...
...
@@ -220,5 +258,4 @@ public:
using
SpaceTimeViscoAcousticDGTElement
=
STDGDGViscoAcousticElement
;
#endif //SPACETIME_STDGDGVISCOACOUSTICELEMENT_HPP
Write
Preview
Markdown
is supported
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