Commit baea9872 authored by alexander.dornheim's avatar alexander.dornheim
Browse files

In phase fixed a bug in calculation of gap_0

parent 086bec98
......@@ -173,16 +173,27 @@ class Phase(Problem):
proj2 = self.config['proxoperators'][1](self.config)
u_2 = proj2.work(u_1);
print(norm(self.config['u_0']))
print(norm(u_1))
print(norm(u_2))
print(norm(u_1-u_2))
print(self.config['norm_rt_data'])
#print(nonzero(u_1))
print(u_1[51,55]);
print(size(self.config['support_idx'][1]))
print(u_2[51,55])
print(proj2)
# estimate the gap in the relevant metric
if self.config['Nx'] ==1 or self.config['Ny']==1 :
tmp_gap = square(norm(u_1-u_2)/self.config['norm_rt_data']);
elif self.config['product_space_dimension'] == 1:
tmp_gap = (norm(u_1-u_2)/square(self.config['norm_rt_data']));
tmp_gap = (norm(u_1-u_2)/self.config['norm_rt_data'])**2
else:
tmp_gap=0;
for j in range(self.config['product_space_dimension']):
# compute (||P_Sx-P_Mx||/normM)^2:
tmp_gap = tmp_gap+(norm(u_1[:,:,j]-u_2[:,:,j])/square(self.config['norm_rt_data']));
tmp_gap = tmp_gap+(norm(u_1[:,:,j]-u_2[:,:,j])/self.config['norm_rt_data'])**2
gap_0=sqrt(tmp_gap);
print(gap_0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment