From 0a895e94320eaf366a0d449d1ebce35e37b36fcd Mon Sep 17 00:00:00 2001 From: "Jostein R. Natvig" Date: Thu, 19 Nov 2009 17:19:23 +0000 Subject: [PATCH] Remove old Matlab files used for debugging. Use new mex gateway function and MRST for testing. --- make.m | 2 -- makeTest.m | 60 ------------------------------------------------------ test.m | 12 ----------- 3 files changed, 74 deletions(-) delete mode 100644 make.m delete mode 100644 makeTest.m delete mode 100644 test.m diff --git a/make.m b/make.m deleted file mode 100644 index a17cf8a6..00000000 --- a/make.m +++ /dev/null @@ -1,2 +0,0 @@ -mex processgrid.c preprocess.c uniquepoints.c facetopology.c ... - sparsetable.c mxgrdecl.c CFLAGS='$CFLAGS -Wall -fPIC' diff --git a/makeTest.m b/makeTest.m deleted file mode 100644 index 4fa44af4..00000000 --- a/makeTest.m +++ /dev/null @@ -1,60 +0,0 @@ -function g = makeTest(dims, drop) -physDims = [1, 1, 1]; -g.cartDims = reshape(dims, 1, []); - -%% Make pillars - -[X,Y,Z] = ndgrid(linspace(0, physDims(1), dims(1) + 1), ... - linspace(0, physDims(2), dims(2) + 1), ... - linspace(0, physDims(3), 2)); -n = prod(dims(1:2) + 1); - -lines = zeros([n, 6]); -lines(:, [1, 4]) = reshape(X(:,:,[1, end]), [n, 2]); -lines(:, [2, 5]) = reshape(Y(:,:,[1, end]), [n, 2]); -lines(:, [3, 6]) = reshape(Z(:,:,[1, end]), [n, 2]); -g.COORD = reshape(lines.', [], 1); - - -layer_thickness = @(x, y) 0.2+0.4*sin(6*pi*(x+rand)).*sin(2*pi*(y+rand)); -bottom_layer = @(x, y) 0.5+0.02*sin(2*pi*x).*sin(2*pi*y); - - -[X, Y, Z] = ndgrid(linspace(0, physDims(1), dims(1) + 1), ... - linspace(0, physDims(2), dims(2) + 1), ... - zeros(dims(3)+1, 1)); - -Z(:,:,1) = bottom_layer (X(:,:,1) ./ physDims(1), Y(:,:,1) ./ physDims(2)); - -for k = 2 : dims(3) + 1, - xi = X(:,:,k) ./ physDims(1); - eta = Y(:,:,k) ./ physDims(2); - Z(:,:,k) = Z(:,:,k-1) + max(0, layer_thickness(xi, eta)*physDims(3)/dims(3)); -end - - - - -%% Assign z-coordinates -%ind = @(d) [1, rldecode(2:dims(d), repmat(2,[1,dims(d)-1]), 2), dims(d)+1]; -ind = @(d) [1, kron((2:dims(d)), [1,1]), dims(d)+1]; -z = Z(ind(1), ind(2), ind(3)); - -%% Add fault -%if nargin > 1, z(end/2+1:end,:,:) = z(end/2+1:end,:,:) + drop; end -if nargin > 1, z(end/2+1:end,[1:2:end,end],:) =bsxfun(@plus, z(end/2+1:end,[1:2:end,end],:) , drop(linspace(0,physDims(2), dims(2)+1)));end -if nargin > 1, z(end/2+1:end,2:2:end-1,:) =z(end/2+1:end,3:2:end,:);end -g.ZCORN = z(:); - -%% Assign active cells -actnum = reshape(ones(dims, 'int32'), [], 1); - -%[i,j,k] = ndgrid(1:dims(1), 1:dims(2), 1:dims(3)); -%actnum((i-dims(1)/2).^2+(j-dims(2)/2).^2> 4*min(dims(1)/2, dims(2)/2).^2)=0; -z = reshape(g.ZCORN, 2*g.cartDims); - -%actnum(z(1:2:end, 1:2:end,1:2:end)<0.5)=0; - -ix = max(1, round(rand(1,1)*prod(dims))); -actnum(ix)=0; -g.ACTNUM = actnum(:); diff --git a/test.m b/test.m deleted file mode 100644 index 9e2bc9d9..00000000 --- a/test.m +++ /dev/null @@ -1,12 +0,0 @@ -nx = 6; -ny = 6; -nz = 11; -%g=simpleGrdecl([nx, ny, nz], @(x) 0.05+0.11*x+0.011 ); -g = makeModel3([5,5,300]); -%G=processGRDECL(g); -%clf,plotGrid(G);view(3); - -g.ACTNUM=int32(g.ACTNUM); - -grdecl = readGRDECL(fullfile(ROOTDIR, 'examples','grids','GSmodel.grdecl')); -%grdecl = readGRDECL(fullfile(ROOTDIR, 'projects','co2','Sector15.grdecl'));