Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tutorials
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
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
conveks
tutorials
Commits
f8b91769
Commit
f8b91769
authored
6 years ago
by
Erin Kuci
Browse files
Options
Downloads
Patches
Plain Diff
some simplifications
parent
a6e2422e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Lbracket/topo.geo
+2
-2
2 additions, 2 deletions
Lbracket/topo.geo
Lbracket/topo.pro
+1
-1
1 addition, 1 deletion
Lbracket/topo.pro
Lbracket/topo.py
+0
-15
0 additions, 15 deletions
Lbracket/topo.py
Team25/shape.py
+0
-2
0 additions, 2 deletions
Team25/shape.py
with
3 additions
and
20 deletions
Lbracket/topo.geo
+
2
−
2
View file @
f8b91769
lc=0.004;
mm=1e-3;
mm=1e-3;
lc=8*mm;
Point(1) = {0, 0, 0, lc};
Point(1) = {0, 0, 0, lc};
Point(2) = {600*mm, 0, 0, lc};
Point(2) = {600*mm, 0, 0, lc};
...
@@ -35,5 +35,5 @@ Physical Line(1003) = {4};
...
@@ -35,5 +35,5 @@ Physical Line(1003) = {4};
Physical Point(1002) = {3};
Physical Point(1002) = {3};
Solver.AutoMesh = 0;
Solver.AutoMesh = 0;
Mesh.Algorithm = 1;
//
Mesh.Algorithm = 1;
This diff is collapsed.
Click to expand it.
Lbracket/topo.pro
+
1
−
1
View file @
f8b91769
...
@@ -4,7 +4,7 @@ DefineConstant [
...
@@ -4,7 +4,7 @@ DefineConstant [
Opt_ResDir
=
"res_opt/"
Opt_ResDir
=
"res_opt/"
Opt_ResDir_Onelab
=
"Optimization/Results/"
Opt_ResDir_Onelab
=
"Optimization/Results/"
densityFieldInit
=
{
0.5
,
Name
"Optimization/3Density/0Inital value"
}
densityFieldInit
=
{
0.5
,
Name
"Optimization/3Density/0Inital value"
}
Opt_filter_radius
=
{
0.00
4
,
Name
"Optimization/3Density/2filter radius"
}
Opt_filter_radius
=
{
0.00
9
,
Name
"Optimization/3Density/2filter radius"
}
Flag_PrintLevel
=
{
1
,
Name
"General/Verbosity"
,
Visible
1
}
Flag_PrintLevel
=
{
1
,
Name
"General/Verbosity"
,
Visible
1
}
Flag_opt_matlaw
=
{
OPT
::
YOUNG_LAW
.
modifiedSimp
,
Flag_opt_matlaw
=
{
OPT
::
YOUNG_LAW
.
modifiedSimp
,
Choices
{
Choices
{
...
...
This diff is collapsed.
Click to expand it.
Lbracket/topo.py
+
0
−
15
View file @
f8b91769
...
@@ -44,11 +44,6 @@ c.runSubClient('myGetDP', mygetdp)
...
@@ -44,11 +44,6 @@ c.runSubClient('myGetDP', mygetdp)
maxIter
=
c
.
defineNumber
(
'
Optimization/00Max iterations
'
,
value
=
1600
)
maxIter
=
c
.
defineNumber
(
'
Optimization/00Max iterations
'
,
value
=
1600
)
maxChange
=
c
.
defineNumber
(
'
Optimization/01Max change
'
,
value
=
1e-2
)
maxChange
=
c
.
defineNumber
(
'
Optimization/01Max change
'
,
value
=
1e-2
)
filtering
=
c
.
defineNumber
(
'
Optimization/02Filtering/00Filter densities
'
,
value
=
1
,
choices
=
[
0
,
1
])
filtering
=
c
.
defineNumber
(
'
Optimization/02Filtering/00Filter densities
'
,
value
=
1
,
choices
=
[
0
,
1
])
filterContinuation
=
c
.
defineNumber
(
'
Optimization/02Filtering/01continuation?
'
,
value
=
0
,
choices
=
[
0
,
1
])
nbLoopReduceFilterRadius
=
c
.
defineNumber
(
'
Optimization/02Filtering/02frequency of radius update
'
,
value
=
40
)
filterRadiusDecrease
=
c
.
defineNumber
(
'
Optimization/02Filtering/03reduce factor
'
,
value
=
0.7
)
filterRadiusMin
=
c
.
defineNumber
(
'
Optimization/02Filtering/04radius min
'
,
value
=
0.0015
)
filterRadius
=
c
.
getNumber
(
'
Optimization/3Density/2filter radius
'
)
# end of check phase. We're done if we do not start the optimization
# end of check phase. We're done if we do not start the optimization
if
c
.
action
==
'
check
'
:
if
c
.
action
==
'
check
'
:
...
@@ -193,15 +188,5 @@ while change > maxChange and it <= maxIter and c.getString('topo/Action') != 'st
...
@@ -193,15 +188,5 @@ while change > maxChange and it <= maxIter and c.getString('topo/Action') != 'st
change
=
optlab
.
mma
.
getDesignChange
()
change
=
optlab
.
mma
.
getDesignChange
()
it
=
optlab
.
mma
.
getOuterIteration
()
it
=
optlab
.
mma
.
getOuterIteration
()
if
filtering
and
filterContinuation
and
\
(
it
%
nbLoopReduceFilterRadius
==
0.0
or
change
<=
maxChange
):
filterRadius
*=
filterRadiusDecrease
print
"
decrease filter radius:
"
,
filterRadius
c
.
setNumber
(
'
Optimization/3Density/2filter radius
'
,
value
=
filterRadius
)
filtering
=
filterRadius
<=
filterRadiusMin
print
"
filtering:
"
,
filtering
c
.
setNumber
(
'
Optimization/02Filtering/00Filter densities
'
,
value
=
filtering
)
change
=
1.0
# This should be called at the end
# This should be called at the end
optlab
.
mma
.
finalize
()
optlab
.
mma
.
finalize
()
This diff is collapsed.
Click to expand it.
Team25/shape.py
+
0
−
2
View file @
f8b91769
...
@@ -168,8 +168,6 @@ while it <= maxIter and c.getString('shape/Action') != 'stop':
...
@@ -168,8 +168,6 @@ while it <= maxIter and c.getString('shape/Action') != 'stop':
print
'
objective:
'
,
objective
print
'
objective:
'
,
objective
print
'
constraints:
'
,
constraints
print
'
constraints:
'
,
constraints
c
.
sendInfo
(
'
Optimization: it. {}, obj. {}, constr. {}
'
.
format
(
it
,
objective
,
constraints
[
0
]))
c
.
sendInfo
(
'
Optimization: it. {}, obj. {}, constr. {}
'
.
format
(
it
,
objective
,
constraints
[
0
]))
#print 'gradient of objective:', grad_objective
#print 'gradient of constraints:', grad_constraints
# call MMA and update the current point
# call MMA and update the current point
optlab
.
mma
.
setMoveLimits
(
lowerBound
,
upperBound
,
1.0e-4
)
optlab
.
mma
.
setMoveLimits
(
lowerBound
,
upperBound
,
1.0e-4
)
...
...
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