Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-microstructure-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Klaus Böhnlein
dune-microstructure-backup
Commits
b380b89d
"git@gitlab.mn.tu-dresden.de:iwr/amdis.git" did not exist on "3c9efbebfb5c6a87d53132323c75e982e8026a09"
Commit
b380b89d
authored
3 years ago
by
Klaus Böhnlein
Browse files
Options
Downloads
Patches
Plain Diff
Update plot-q12
parent
bd3a2eff
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
inputs/cellsolver.parset
+5
-5
5 additions, 5 deletions
inputs/cellsolver.parset
src/Plotq12.py
+40
-11
40 additions, 11 deletions
src/Plotq12.py
with
45 additions
and
16 deletions
inputs/cellsolver.parset
+
5
−
5
View file @
b380b89d
...
...
@@ -38,8 +38,8 @@ cellDomain = 1
########################################################################
#numLevels = 1 3 # computes all levels from first to second entry
numLevels = 3 3 # computes all levels from first to second entry
#
numLevels = 4 4 # computes all levels from first to second entry
#
numLevels = 3 3 # computes all levels from first to second entry
numLevels = 4 4 # computes all levels from first to second entry
#numLevels = 1 6
...
...
@@ -68,7 +68,7 @@ gamma=1.0
beta = 2.0 # ratio between material parameters mu1 & mu2 .... beta = 1.0 corresponds to homogeneous case
mu1=1.0
lambda1=
10
.0
lambda1=
5
.0
...
...
@@ -88,8 +88,8 @@ theta = 0.125
#
material_prestrain_imp= "parametrized_Laminate"
material_prestrain_imp= "analytical_Example"
material_prestrain_imp= "parametrized_Laminate"
#
material_prestrain_imp= "analytical_Example"
#material_prestrain_imp ="isotropic_bilayer"
#material_prestrain_imp= "circle_fiber" #TEST
...
...
This diff is collapsed.
Click to expand it.
src/Plotq12.py
+
40
−
11
View file @
b380b89d
...
...
@@ -49,23 +49,52 @@ RUN = True
# RUN = False
# make_Plot = False
# make_Plot = True # vll besser : Plot_muGamma
counter
=
0
#material_prestrain_imp= "analytical_Example"
material_prestrain_imp
=
"
parametrized_Laminate
"
if
RUN
:
for
lambda1
in
Lambda_Values
:
print
(
"
Run Cell-Problem for Lambda =
"
,
lambda1
)
# LOGFILE = "./harmonicmaps_intoR"+ str(targetDim) + "_" + str(order) + "_" + str(numLevels) + ".log"
LOGFILE
=
path
+
"
/outputs/out_lambda
"
+
str
(
counter
)
+
"
.log
"
print
(
"
LOGFILE:
"
,
LOGFILE
)
counter
+=
1
# print('gamma='+str(gamma))
with
open
(
InputFilePath
,
'
r
'
)
as
file
:
filedata
=
file
.
read
()
filedata
=
re
.
sub
(
'
(?m)^lambda1=.*
'
,
'
lambda1=
'
+
str
(
lambda1
),
filedata
)
f
=
open
(
InputFilePath
,
'
w
'
)
f
.
write
(
filedata
)
f
.
close
()
# with open(InputFilePath, 'r') as file:
# filedata = file.read()
# filedata = re.sub('(?m)^lambda1=.*','lambda1='+str(lambda1),filedata)
# f = open(InputFilePath,'w')
# f.write(filedata)
# f.close()
executable
=
'
./build-cmake/src/Cell-Problem
'
# Run Cell-Problem
subprocess
.
run
([
'
./build-cmake/src/Cell-Problem
'
,
'
./inputs/cellsolver.parset
'
],
capture_output
=
True
,
text
=
True
)
#Extract mu_gamma from Output-File
with
open
(
OutputFilePath
,
'
r
'
)
as
file
:
output
=
file
.
read
()
# p = subprocess.Popen(executable + " cellsolver.parset"
# + " -lambda1 " + str(lambda1)
# + " | tee " + LOGFILE, shell=True)
p
=
subprocess
.
Popen
(
executable
+
"
"
+
path
+
"
/inputs/cellsolver.parset
"
+
"
-lambda1
"
+
str
(
lambda1
)
+
"
-material_prestrain_imp
"
+
str
(
material_prestrain_imp
)
+
"
| tee
"
+
LOGFILE
,
shell
=
True
)
p
.
wait
()
# wait
# subprocess.run(['./build-cmake/src/Cell-Problem', './inputs/cellsolver.parset'],
# capture_output=True, text=True)
with
open
(
LOGFILE
,
'
r
'
)
as
file
:
output
=
file
.
read
()
###Extract q12 from Output-File
# with open(OutputFilePath, 'r') as file:
# output = file.read()
tmp
=
re
.
search
(
r
'
(?m)^q_onetwo=.*
'
,
output
).
group
()
s
=
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
tmp
)
q12Value
=
float
(
s
[
0
])
...
...
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