Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafnuss committed Jul 18, 2018
1 parent 924ed0b commit 6d4c10a
Show file tree
Hide file tree
Showing 8 changed files with 409 additions and 182 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ERT/data_gen/*
HT/data_gen/*
HT/GW/*
*.asv
*.eps
*result/
*.mat

Expand Down
15 changes: 8 additions & 7 deletions ERT/R2/Matlat2R2.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@
d.value = d.rho(:)' ;

elseif d.job_type == 1 % for inversion, only one average value is given...
d.elem_1 = [1 ];% 3461 3509 3557 3605 3653 3701 3749 3797];
d.elem_2 = [(d.numnp_y-1)*(d.numnp_x-1)];% 3472 3520 3568 3616 3664 3712 3760 3808];
d.value = [d.rho_avg ];% 10 10 10 10 10 10 10 10] ;
% d.elem_1 = [1 ];% 3461 3509 3557 3605 3653 3701 3749 3797];
% d.elem_2 = [(d.numnp_y-1)*(d.numnp_x-1)];% 3472 3520 3568 3616 3664 3712 3760 3808];
% d.value = [d.rho_avg ];% 10 10 10 10 10 10 10 10] ;

% d.elem_1 = 1:((d.numnp_y-1)*(d.numnp_x-1));
% d.elem_2 = 1:((d.numnp_y-1)*(d.numnp_x-1));
% d.value = d.rho(:)' ;
warning('check this')
d.elem_1 = 1:((d.numnp_y-1)*(d.numnp_x-1));
d.elem_2 = 1:((d.numnp_y-1)*(d.numnp_x-1));
d.value = d.rho(:)' ;
end
d.num_regions = numel(d.value); % number of resistivity regions

Expand All @@ -78,7 +79,7 @@

%% INVERSE SOLUTION
if d.job_type==1 % inverse solution
% d.inverse_type = 1; % Inverse type: 0-pseudo-Marquardt, 1-regularised solution with linear filter (usual mode),
d.inverse_type = 1; % Inverse type: 0-pseudo-Marquardt, 1-regularised solution with linear filter (usual mode),
d.target_decrease = 0;
% 2-regularised type with quadratic filter, 3-qualitative solution or 4-blocked linear regularised type
if d.mesh_type==4 || d.mesh_type==5 % quadrilateral mesh
Expand Down
4 changes: 2 additions & 2 deletions ERT/R2/readOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
end
end
end
% Data Weight

% Data Weight
data=importdata([d.filepath dataset '_err.dat']);
diagWd=zeros(n_obs,1);
diagWd(sum(abs(output.J))~=0) = data.data(:,5);
Expand Down
2 changes: 1 addition & 1 deletion ERT/data_generation.m
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
A2=[A{:}];
fprintf(fid,'%d\n',A2(1,1));
for u=2:size(A2,1)
fprintf(fid,'%d %d %d %d %d %f %f\n',A2(u,:));
fprintf(fid,'%d %d %d %d %d %.10e %.5f\n',A2(u,:));
end
fclose(fid);

Expand Down
Loading

0 comments on commit 6d4c10a

Please sign in to comment.