Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
dune-fem
dune-fem-dg
Commits
7522677a
Commit
7522677a
authored
6 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
Make sod work
parent
36bf1596
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Latest features added to dune-fem-dg.
Pipeline
#11240
failed
6 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/fem-dg/models/modelwrapper.hh
+1
-9
1 addition, 9 deletions
dune/fem-dg/models/modelwrapper.hh
pydemo/euler/euler.ufl
+6
-2
6 additions, 2 deletions
pydemo/euler/euler.ufl
python/dune/femdg/_operators.py
+10
-0
10 additions, 0 deletions
python/dune/femdg/_operators.py
with
17 additions
and
11 deletions
dune/fem-dg/models/modelwrapper.hh
+
1
−
9
View file @
7522677a
...
...
@@ -338,15 +338,6 @@ namespace Fem
DomainType
&
velocity
)
const
{
velocity
=
AdditionalType
::
velocity
(
en
,
x
,
u
);
/*
for(int i=0; i<dimDomain; ++i)
{
// U = (rho, rho v_0,...,rho v_(d-1), e )
// we store \rho u but do not need to divide by \rho here since only
// sign is needed.
velocity[i] = u[i+1];
}
*/
}
// we have physical check for this model
...
...
@@ -382,6 +373,7 @@ namespace Fem
const
RangeType
&
uRight
,
RangeType
&
jump
)
const
{
jump
=
AdditionalType
::
jump
(
it
,
x
,
uLeft
,
uRight
);
// take pressure as shock detection values
//const RangeFieldType pl = pressure( uLeft );
//const RangeFieldType pr = pressure( uRight );
...
...
This diff is collapsed.
Click to expand it.
pydemo/euler/euler.ufl
+
6
−
2
View file @
7522677a
...
...
@@ -2,7 +2,7 @@ gamma = 1.4
class Compressible2DEuler:
def rhoeps(U):
v = 0.5*(U[1]**2 + U[2]**2)/U[0]
rE = U[
-1
]
rE = U[
3
]
return rE - v
def pressure(U):
return (gamma-1)*Compressible2DEuler.rhoeps(U)
...
...
@@ -12,7 +12,7 @@ class Compressible2DEuler:
return [U[0],U[1]/U[0],U[2]/U[0],Compressible2DEuler.pressure(U)]
def F_c(U):
rho, u,v, p = Compressible2DEuler.toPrim(U)
rE = U[
-1
]
rE = U[
3
]
res = as_matrix( [ [rho*u, rho*v],
[rho*u**2 + p, rho*u*v],
[rho*u*v, rho*v**2 + p],
...
...
@@ -26,6 +26,10 @@ class Compressible2DEuler:
return as_vector( [U[1],U[2]] )
def physical(U):
return conditional( (U[0]>1e-8), conditional( Compressible2DEuler.rhoeps(U) > 1e-8 , 1, 0 ), 0 )
def jump(U,V):
pL = Compressible2DEuler.pressure(U)
pR = Compressible2DEuler.pressure(V)
return (pL - pR)/(0.5*(pL + pR))
Model = Compressible2DEuler
...
...
This diff is collapsed.
Click to expand it.
python/dune/femdg/_operators.py
+
10
−
0
View file @
7522677a
...
...
@@ -234,6 +234,16 @@ def createFemDGSolver(Model, space):
targs
=
[
'
class Entity, class Point
'
],
static
=
True
,
predefined
=
predefined
)
jump
=
getattr
(
Model
,
"
jump
"
,
None
)
jump
=
jump
(
u
,
v
)
generateMethod
(
struct
,
jump
,
'
double
'
,
'
jump
'
,
args
=
[
'
const Intersection& it
'
,
'
const Point &x
'
,
'
const RangeType &u
'
,
'
const RangeType &v
'
],
targs
=
[
'
class Intersection, class Point
'
],
static
=
True
,
predefined
=
predefined
)
writer
=
SourceWriter
(
StringWriter
())
writer
.
emit
([
struct
])
...
...
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