Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
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
Model registry
Operate
Environments
Monitor
Incidents
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
Sander, Oliver
dune-gfe
Commits
7c870f03
Commit
7c870f03
authored
9 years ago
by
Sander, Oliver
Browse files
Options
Downloads
Patches
Plain Diff
Introduce a separate 'dimworld' variable
You never know, we may be doing dim!=dimworld grids eventually.
parent
4ac6d164
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gradient-flow.cc
+5
-4
5 additions, 4 deletions
src/gradient-flow.cc
with
5 additions
and
4 deletions
src/gradient-flow.cc
+
5
−
4
View file @
7c870f03
...
...
@@ -47,6 +47,7 @@
// grid dimension
const
int
dim
=
1
;
const
int
dimworld
=
dim
;
// Image space of the geodesic fe functions
// typedef Rotation<double,2> TargetSpace;
...
...
@@ -115,13 +116,13 @@ int main (int argc, char *argv[]) try
typedef
std
::
conditional
<
dim
==
1
,
OneDGrid
,
UGGrid
<
dim
>
>::
type
GridType
;
std
::
shared_ptr
<
GridType
>
grid
;
FieldVector
<
double
,
dim
>
lower
(
0
),
upper
(
1
);
FieldVector
<
double
,
dim
world
>
lower
(
0
),
upper
(
1
);
std
::
array
<
unsigned
int
,
dim
>
elements
;
if
(
parameterSet
.
get
<
bool
>
(
"structuredGrid"
))
{
lower
=
parameterSet
.
get
<
FieldVector
<
double
,
dim
>
>
(
"lower"
);
upper
=
parameterSet
.
get
<
FieldVector
<
double
,
dim
>
>
(
"upper"
);
lower
=
parameterSet
.
get
<
FieldVector
<
double
,
dim
world
>
>
(
"lower"
);
upper
=
parameterSet
.
get
<
FieldVector
<
double
,
dim
world
>
>
(
"upper"
);
elements
=
parameterSet
.
get
<
array
<
unsigned
int
,
dim
>
>
(
"elements"
);
grid
=
StructuredGridFactory
<
GridType
>::
createCubeGrid
(
lower
,
upper
,
elements
);
...
...
@@ -162,7 +163,7 @@ int main (int argc, char *argv[]) try
////////////////////////////
// Read initial iterate into a PythonFunction
typedef
PythonFunction
<
FieldVector
<
double
,
dim
>
,
TargetSpace
::
CoordinateType
>
FBase
;
typedef
PythonFunction
<
FieldVector
<
double
,
dim
world
>
,
TargetSpace
::
CoordinateType
>
FBase
;
Python
::
Module
module
=
Python
::
import
(
parameterSet
.
get
<
std
::
string
>
(
"initialIterate"
));
auto
pythonInitialIterate
=
module
.
get
(
"f"
).
toC
<
std
::
shared_ptr
<
FBase
>>
();
...
...
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