Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
8ae96a98
There was an error fetching the commit references. Please try again later.
Commit
8ae96a98
authored
9 years ago
by
Tomas Sobotik
Browse files
Options
Downloads
Patches
Plain Diff
Dimension for added for Fast-sweeping
parent
9437c8d7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/fast-sweeping/fastSweepingConfig.h
+1
-0
1 addition, 0 deletions
examples/fast-sweeping/fastSweepingConfig.h
examples/fast-sweeping/main.h
+28
-8
28 additions, 8 deletions
examples/fast-sweeping/main.h
with
29 additions
and
8 deletions
examples/fast-sweeping/fastSweepingConfig.h
+
1
−
0
View file @
8ae96a98
...
...
@@ -29,6 +29,7 @@ class fastSweepingConfig
config
.
addDelimiter
(
"Parallel Eikonal solver settings:"
);
config
.
addEntry
<
tnlString
>
(
"problem-name"
,
"This defines particular problem."
,
"fast-sweeping"
);
config
.
addRequiredEntry
<
tnlString
>
(
"initial-condition"
,
"Initial condition for solver"
);
config
.
addRequiredEntry
<
tnlString
>
(
"dim"
,
"Dimension of problem."
);
config
.
addEntry
<
tnlString
>
(
"mesh"
,
"Name of mesh."
,
"mesh.tnl"
);
config
.
addEntry
<
tnlString
>
(
"exact-input"
,
"Are the function values near the curve equal to the SDF? (yes/no)"
,
"no"
);
}
...
...
This diff is collapsed.
Click to expand it.
examples/fast-sweeping/main.h
+
28
−
8
View file @
8ae96a98
...
...
@@ -43,16 +43,36 @@ int main( int argc, char* argv[] )
if
(
!
parseCommandLine
(
argc
,
argv
,
configDescription
,
parameters
)
)
return
false
;
tnlFastSweeping
<
tnlGrid
<
3
,
double
,
tnlHost
,
int
>
,
double
,
int
>
solver
;
if
(
!
solver
.
init
(
parameters
))
const
tnlString
&
dim
=
parameters
.
getParameter
<
tnlString
>
(
"dim"
);
if
(
dim
==
"2"
)
{
tnlFastSweeping
<
tnlGrid
<
2
,
double
,
tnlHost
,
int
>
,
double
,
int
>
solver
;
if
(
!
solver
.
init
(
parameters
))
{
cerr
<<
"Solver failed to initialize."
<<
endl
;
return
EXIT_FAILURE
;
}
checkCudaDevice
;
cout
<<
"-------------------------------------------------------------"
<<
endl
;
cout
<<
"Starting solver..."
<<
endl
;
solver
.
run
();
}
else
if
(
dim
==
"3"
)
{
cerr
<<
"Solver failed to initialize."
<<
endl
;
return
EXIT_FAILURE
;
tnlFastSweeping
<
tnlGrid
<
3
,
double
,
tnlHost
,
int
>
,
double
,
int
>
solver
;
if
(
!
solver
.
init
(
parameters
))
{
cerr
<<
"Solver failed to initialize."
<<
endl
;
return
EXIT_FAILURE
;
}
checkCudaDevice
;
cout
<<
"-------------------------------------------------------------"
<<
endl
;
cout
<<
"Starting solver..."
<<
endl
;
solver
.
run
();
}
checkCudaDevice
;
cout
<<
"-------------------------------------------------------------"
<<
endl
;
cout
<<
"Starting solver..."
<<
endl
;
solver
.
run
();
else
cerr
<<
"Unsopported no. of dimensions: "
<<
dim
<<
"!"
<<
endl
;
time
(
&
stop
);
...
...
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