Skip to content
Snippets Groups Projects
Commit dc36cadb authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use absolute path for res_opt

parent 66f0bcc3
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ while it <= maxIter and c.getString('shape/Action') != 'stop':
# generate the velocity field of each design variable
getVelocityField(x)
# compute objective function and constraints
# compute objective function and constraints
c.runSubClient('myGetDP', mygetdp + '-solve GetPerformances')
# as well as their sensitivity with respect to design variables at `x'
......@@ -151,11 +151,11 @@ while it <= maxIter and c.getString('shape/Action') != 'stop':
# get the value of the objective function and of the constraints
# as well as their sensitivity with respect to design variables at `x'
objective = np.sum(readSimpleTable('res_opt/w.txt'))
objective = np.sum(readSimpleTable(c.getPath('res_opt/w.txt')))
constraints = np.array([np.sum(xFromMMA)/100.0-1.0])
grad_objective = np.asarray([np.sum(readSimpleTable('res_opt/Grad_w_wrt_dv_'+str(dv)+'.txt'))\
grad_objective = np.asarray([np.sum(readSimpleTable(c.getPath('res_opt/Grad_w_wrt_dv_'+str(dv)+'.txt')))\
for dv in xrange(numVariables)])
grad_constraints = np.ones(numVariables)/100.0
grad_constraints = np.ones(numVariables)/100.0
if it == 1: fscale = 1.0 / objective
objective *= fscale
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment