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
amdis
amdis-core
Commits
431531db
Commit
431531db
authored
May 08, 2016
by
Praetorius, Simon
Browse files
initial parameters for yasp-grid
parent
7fccb4cf
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
dune/amdis/Mesh.hpp
View file @
431531db
...
...
@@ -7,6 +7,7 @@
#include
<array>
#include
<memory>
#include
<dune/common/array.hh>
#include
<dune/common/fvector.hh>
#include
<dune/grid/albertagrid.hh>
...
...
@@ -146,13 +147,10 @@ namespace AMDiS
Dune
::
FieldVector
<
double
,
dim
>
L
;
L
=
1.0
;
// extension of the domain
Parameters
::
get
(
meshName
+
"->dimension"
,
L
);
AMDIS_MSG
(
"L = "
<<
L
);
std
::
array
<
int
,
dim
>
s
;
// number of cells on coarse mesh in each direction
auto
s
=
Dune
::
fill_array
<
dim
>
(
int
{
2
});
// number of cells on coarse mesh in each direction
Parameters
::
get
(
meshName
+
"->num cells"
,
s
);
// TODO: add more parameters for yasp-grid (see constructor)
return
make_unique
<
Grid
>
(
L
,
s
);
}
};
...
...
@@ -165,16 +163,15 @@ namespace AMDiS
static
unique_ptr
<
Grid
>
create
(
std
::
string
meshName
)
{
Dune
::
FieldVector
<
double
,
dim
>
lowerleft
;
// Lower left corner of the domain
Dune
::
FieldVector
<
double
,
dim
>
upperright
;
// Upper right corner of the domain
Dune
::
FieldVector
<
double
,
dim
>
lowerleft
;
lowerleft
=
0.0
;
// Lower left corner of the domain
Dune
::
FieldVector
<
double
,
dim
>
upperright
;
upperright
=
1.0
;
// Upper right corner of the domain
Parameters
::
get
(
meshName
+
"->min corner"
,
lowerleft
);
Parameters
::
get
(
meshName
+
"->max corner"
,
upperright
);
std
::
array
<
int
,
dim
>
s
;
// number of cells on coarse mesh in each direction
auto
s
=
Dune
::
fill_array
<
dim
>
(
int
{
2
})
;
// number of cells on coarse mesh in each direction
Parameters
::
get
(
meshName
+
"->num cells"
,
s
);
// TODO: add more parameters for yasp-grid (see constructor)
return
make_unique
<
Grid
>
(
lowerleft
,
upperright
,
s
);
}
};
...
...
init/ellipt.json.3d
View file @
431531db
...
...
@@ -3,7 +3,12 @@
"elliptMesh": {
"macro file name": "./macro/BG1_withBoundary.3d",
"global refinements": 0
"global refinements": 5,
"min corner": "0,0,0",
"max corner": "1,1,1",
"num cells": "2,2,2",
"dimension": "1,1,1"
},
"ellipt": {
...
...
matrix.mtx
0 → 100644
View file @
431531db
This diff is collapsed.
Click to expand it.
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