Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dolfin_dic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
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
Show more breadcrumbs
ALVAREZ BARRIENTOS Felipe
dolfin_dic
Commits
227175fd
Commit
227175fd
authored
6 years ago
by
Martin Genet
Browse files
Options
Downloads
Patches
Plain Diff
first attempt at loading initial displacement
parent
9bd509ef
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ImageIterator.py
+7
-1
7 additions, 1 deletion
ImageIterator.py
fedic2.py
+5
-1
5 additions, 1 deletion
fedic2.py
with
12 additions
and
2 deletions
ImageIterator.py
+
7
−
1
View file @
227175fd
...
...
@@ -34,6 +34,7 @@ class ImageIterator():
self
.
working_folder
=
parameters
[
"
working_folder
"
]
if
(
"
working_folder
"
in
parameters
)
else
"
.
"
self
.
working_basename
=
parameters
[
"
working_basename
"
]
if
(
"
working_basename
"
in
parameters
)
else
"
sol
"
self
.
initialize_U_from_file
=
parameters
[
"
initialize_U_from_file
"
]
if
(
"
initialize_U_from_file
"
in
parameters
)
else
False
self
.
initialize_DU_with_DUold
=
parameters
[
"
initialize_DU_with_DUold
"
]
if
(
"
initialize_DU_with_DUold
"
in
parameters
)
else
False
...
...
@@ -94,7 +95,12 @@ class ImageIterator():
k_frame_old
=
k_frame
+
1
#self.printer.print_var("k_frame_old",k_frame_old,-1)
if
(
self
.
initialize_DU_with_DUold
):
if
(
self
.
initialize_U_from_file
):
xdmf_filename
=
self
.
initialize_U_from_file
+
"
_
"
+
str
(
k_frame
).
zfill
(
2
)
+
"
.xdmf
"
xdmf_file
=
dolfin
.
XDMFFile
(
xdmf_filename
)
xdmf_file
.
read
(
self
.
problem
.
U
,
"
U
"
)
xdmf_file
.
close
()
elif
(
self
.
initialize_DU_with_DUold
):
self
.
problem
.
U
.
vector
().
axpy
(
1.
,
self
.
problem
.
DUold
.
vector
())
self
.
problem
.
call_before_solve
(
...
...
This diff is collapsed.
Click to expand it.
fedic2.py
+
5
−
1
View file @
227175fd
...
...
@@ -41,6 +41,7 @@ def fedic2(
residual_type
=
"
Iref
"
,
# Iref, Iold, Iref-then-Iold
relax_type
=
"
gss
"
,
# constant, aitken, gss
relax_init
=
1.0
,
initialize_U_from_file
=
0
,
initialize_DU_with_DUold
=
0
,
tol_res
=
None
,
tol_res_rel
=
None
,
...
...
@@ -59,6 +60,8 @@ def fedic2(
"
residual_type must be
\"
Iref
\"
. Aborting.
"
assert
(
relax_init
==
1.
),
\
"
relax_init must be 1. Aborting.
"
assert
(
not
((
initialize_U_from_file
)
and
(
initialize_DU_with_DUold
))),
\
"
Cannot initialize U from file and DU with DUold together. Aborting.
"
assert
(
tol_res
is
None
),
\
"
tol_res is deprecated. Aborting.
"
assert
(
tol_im
is
None
),
\
...
...
@@ -135,6 +138,7 @@ def fedic2(
parameters
=
{
"
working_folder
"
:
working_folder
,
"
working_basename
"
:
working_basename
,
"
initialize_DU_with_DUold
"
:
initialize_DU_with_DUold
})
"
initialize_DU_with_DUold
"
:
initialize_DU_with_DUold
,
"
initialize_U_from_file
"
:
initialize_U_from_file
})
image_iterator
.
iterate
()
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