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
BERBEROGLU Ezgi
dolfin_dic
Commits
ef3d0831
Commit
ef3d0831
authored
8 years ago
by
Martin Genet
Browse files
Options
Downloads
Patches
Plain Diff
New print_tools.py file
parent
0f0c9f88
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fedic.py
+2
-11
2 additions, 11 deletions
fedic.py
image_expressions_cpp.py
+0
-0
0 additions, 0 deletions
image_expressions_cpp.py
print_tools.py
+44
-0
44 additions, 0 deletions
print_tools.py
with
46 additions
and
11 deletions
fedic.py
+
2
−
11
View file @
ef3d0831
...
...
@@ -14,22 +14,13 @@ import numpy
import
os
import
myFEniCSPythonLibrary
as
myFEniCS
import
myVTKPythonLibrary
as
myVTK
from
print_tools
import
*
########################################################################
dolfin
.
parameters
[
'
form_compiler
'
][
'
cpp_optimize_flags
'
]
=
'
-O3
'
dolfin
.
parameters
[
"
form_compiler
"
][
"
cpp_optimize
"
]
=
True
dolfin
.
parameters
[
"
form_compiler
"
][
"
optimize
"
]
=
True
def
print_str
(
tab
,
string
):
print
"
|
"
*
tab
+
string
def
print_var
(
tab
,
name
,
val
):
print
"
|
"
*
tab
+
name
+
"
=
"
+
str
(
val
)
def
print_sci
(
tab
,
name
,
val
):
print
"
|
"
*
tab
+
name
.
ljust
(
13
)
+
"
=
"
+
format
(
val
,
"
.4e
"
)
dolfin
.
parameters
[
"
form_compiler
"
][
"
optimize
"
]
=
False
# can't use that for "complex" mechanical models…
########################################################################
...
...
This diff is collapsed.
Click to expand it.
image_expressions.py
→
image_expressions
_cpp
.py
+
0
−
0
View file @
ef3d0831
File moved
This diff is collapsed.
Click to expand it.
print_tools.py
0 → 100644
+
44
−
0
View file @
ef3d0831
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
import
myVTKPythonLibrary
as
myVTK
########################################################################
#class Printer:
#def __init__(self):
#self.cur_level = 0
#def inc(self):
#self.cur_level += 1
#def dec(self):
#self.cur_level -= 1
#def print_str(self, string, var_level=0):
#print " | "*(self.cur_level+var_level) + string
#def print_var(self, name, val, var_level=0):
#print " | "*(self.cur_level+var_level) + name + " = " + str(val)
#def print_sci(self, name, val, var_level=0):
#print " | "*(self.cur_level+var_level) + name.ljust(13) + " = " + format(val,".4e")
########################################################################
def
print_str
(
tab
,
string
):
print
"
|
"
*
tab
+
string
def
print_var
(
tab
,
name
,
val
):
print
"
|
"
*
tab
+
name
+
"
=
"
+
str
(
val
)
def
print_sci
(
tab
,
name
,
val
):
print
"
|
"
*
tab
+
name
.
ljust
(
13
)
+
"
=
"
+
format
(
val
,
"
.4e
"
)
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