Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-fempy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Matthew Collins
dune-fempy
Commits
ef22ce61
Commit
ef22ce61
authored
8 years ago
by
Andreas Dedner
Browse files
Options
Downloads
Patches
Plain Diff
some more cleanup
parent
9812e2e3
Branches
gsoc
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo/space-demo.py
+0
-28
0 additions, 28 deletions
demo/space-demo.py
ls-R
+62
-0
62 additions, 0 deletions
ls-R
with
62 additions
and
28 deletions
demo/space-demo.py
deleted
100644 → 0
+
0
−
28
View file @
9812e2e3
from
__future__
import
print_function
# from mpi4py import MPI
import
dune.fem.grid
as
grid
import
dune.fem.space
as
space
import
math
yaspgrid
=
grid
.
leafGrid
(
"
../data/unitcube-2d.dgf
"
,
"
YaspGrid
"
,
dimgrid
=
2
)
lagrangespace
=
space
.
create
(
"
Lagrange
"
,
yaspgrid
)
def
expr_global
(
x
):
return
[
-
(
x
[
1
]
-
0.5
)
*
math
.
sin
(
x
[
0
]
*
12
)]
gf
=
yaspgrid
.
globalGridFunction
(
"
expr_global
"
,
expr_global
)
df
=
lagrangespace
.
interpolate
(
gf
)
vtk_yaspgrid
=
yaspgrid
.
vtkWriter
()
df
.
addToVTKWriter
(
vtk_yaspgrid
,
vtk_yaspgrid
.
DataType
.
PointData
)
df2
=
lagrangespace
.
interpolate
([
5
])
df2
.
addToVTKWriter
(
vtk_yaspgrid
,
vtk_yaspgrid
.
DataType
.
CellData
)
df3
=
lagrangespace
.
interpolate
(
df
)
df3
.
addToVTKWriter
(
vtk_yaspgrid
,
vtk_yaspgrid
.
DataType
.
PointData
)
vtk_yaspgrid
.
write
(
"
space_demo
"
);
This diff is collapsed.
Click to expand it.
ls-R
0 → 100644
+
62
−
0
View file @
ef22ce61
./data:
circle.dgf
corner.dgf
sphere.dgf
unitcube-1d.dgf
unitcube-2d.dgf
unitcube-3d.dgf
----------------------------------------
./demo:
grid-demo.py
space-demo.py
----------------------------------------
./dune/fempy/function:
gridfunctionview.hh
simplegridfunction.hh
./dune/fempy/py:
grid
grid.hh
./dune/fempy/py/grid:
entity.hh
function.hh
geometry.hh
gridview.hh
hierarchical.hh
range.hh
vtk.hh
---------------------------------------------------
./python/database/grid:
dune-alugrid.db
dune-grid.db
dune-spgrid.db
---------------------------------------------------
./python/dune:
common.cc
function.py
generated
generator
grid.py
__init__.py
mpihelper.cc
./python/dune/generated:
generated_module.cc
__init__.py
model.hh.in
modelimpl.cc
modelimpl.hh.in
./python/dune/generator:
database.py
generator.py
__init__.py
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