Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-elasticity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Ansgar Burchardt
dune-elasticity
Commits
d0523b41
Commit
d0523b41
authored
6 years ago
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
Allow grids that are constructed from parameter file
parent
9a291e80
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nonlinelast.cc
+16
-6
16 additions, 6 deletions
nonlinelast.cc
with
16 additions
and
6 deletions
nonlinelast.cc
+
16
−
6
View file @
d0523b41
...
...
@@ -17,6 +17,7 @@
#include
<dune/fufem/estimators/fractionalmarking.hh>
#include
<dune/fufem/estimators/refinementindicator.hh>
#include
<dune/fufem/utilities/dirichletbcassembler.hh>
#include
<dune/fufem/utilities/gridconstruction.hh>
#ifdef HAVE_IPOPT
#include
<dune/solvers/solvers/quadraticipopt.hh>
...
...
@@ -60,19 +61,28 @@ int main (int argc, char *argv[]) try
// read problem settings
std
::
string
path
=
parameterSet
.
get
<
std
::
string
>
(
"path"
);
std
::
string
resultPath
=
parameterSet
.
get
<
std
::
string
>
(
"resultPath"
);
std
::
string
gridFile
=
parameterSet
.
get
<
std
::
string
>
(
"gridFile"
);
// /////////////////////////////
// Generate the grid
// /////////////////////////////
typedef
UGGrid
<
dim
>
GridType
;
GridType
*
grid
=
new
GridType
;
std
::
unique_ptr
<
GridType
>
grid
;
if
(
parameterSet
.
hasKey
(
"parFile"
))
{
std
::
string
parFile
=
parameterSet
.
get
<
std
::
string
>
(
"parFile"
);
const
auto
&
gridConfig
=
parameterSet
.
sub
(
parameterSet
.
get
<
std
::
string
>
(
"gridName"
));
if
(
gridConfig
.
get
<
bool
>
(
"createGrid"
,
false
))
{
grid
=
GridConstruction
<
GridType
,
dim
>::
createGrid
(
gridConfig
);
}
else
if
(
gridConfig
.
hasKey
(
"amira_parFile"
))
{
#if HAVE_AMIRAMESH
auto
gridFile
=
gridConfig
.
get
<
std
::
string
>
(
"gridFile"
);
auto
parFile
=
gridConfig
.
get
<
std
::
string
>
(
"amira_parFile"
);
grid
=
AmiraMeshReader
<
GridType
>::
read
(
path
+
gridFile
,
PSurfaceBoundary
<
dim
-
1
>::
read
(
path
+
parFile
));
}
else
AmiraMeshReader
<
GridType
>::
read
(
*
grid
,
path
+
gridFile
);
#endif
}
else
{
#if HAVE_AMIRAMESH
grid
=
AmiraMeshReader
<
GridType
>::
read
(
path
+
gridConfig
.
get
<
std
::
string
>
(
"gridFile"
));
#endif
}
// Read coarse Dirichlet boundary values
BitSetVector
<
dim
>
coarseDirichletNodes
;
...
...
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