Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project in SciComp - Fall 2020 #26

Open
wants to merge 148 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
36f642b
Added project underfolder, added stenglib files, changed URDME startu…
jfloouf Oct 30, 2020
6a5b6ef
Fixed make file for tprod.c for Mingw64
jfloouf Nov 2, 2020
58918c9
bla
Chrishij Nov 2, 2020
cb99681
Merge branch 'master' of https://github.com/jfloouf/urdme
Chrishij Nov 2, 2020
fc38de5
PDE-proj start
Chrishij Nov 6, 2020
bcc8e6c
U_dead
AliceGrafBrolund Nov 8, 2020
238b421
Added BC that calcs distance from origin, started saving runs in save…
jfloouf Nov 9, 2020
8177904
Removed some temporary code
jfloouf Nov 9, 2020
1d3d186
dying cells
AliceGrafBrolund Nov 9, 2020
00627b8
death+degradation works
AliceGrafBrolund Nov 12, 2020
6bfa5bb
Lot of simulations results, some crap code and started on assemble_Mg…
jfloouf Nov 12, 2020
93659da
Profilerate
Chrishij Nov 12, 2020
d6f9bf8
Non errorness assemble_Mgamma function, under dev
jfloouf Nov 12, 2020
59ec168
Small improvements
Chrishij Nov 13, 2020
a7c7719
Implementing sdof_m movement
Chrishij Nov 13, 2020
da0ac4f
Changed assemble_Mgamma function, some patching functions
jfloouf Nov 13, 2020
ae0140d
Newest: Implemeting Movement
Chrishij Nov 17, 2020
d35362f
add initial condition
Nov 17, 2020
9bb1cf0
Reworked visualization of Data, removed unneeded saveData files
jfloouf Nov 17, 2020
8512c73
Cleaned up in folders, updated structure
jfloouf Nov 17, 2020
06649c7
Some minor changes in Copy2_AvascularTumour, fixed assemble_Mgamma ha…
jfloouf Nov 17, 2020
c2d7d9d
Added initialCondition function to Copy1_AvascularTumour, fixed some viz
jfloouf Nov 17, 2020
7f785cb
Made some changes to Pr viz
jfloouf Nov 17, 2020
c9f7e11
Small changes
Chrishij Nov 17, 2020
797a6b4
add 6th initial condition
Nov 17, 2020
eec0898
add 6th initial condition, fix notation
Nov 17, 2020
d4814ad
Added experimental scatterbar3 for Pr viz
jfloouf Nov 17, 2020
34aacee
Changed Pr viz to better one, added function for additional, wack 3D …
jfloouf Nov 17, 2020
a64b720
Latest: Plotting functions
Chrishij Nov 18, 2020
fef6b6f
New New:
Chrishij Nov 18, 2020
de1f63e
New New:
Chrishij Nov 18, 2020
8e2f1ab
Rearranged the pressure plotting, fixed quiver plot for pressure plot…
jfloouf Nov 18, 2020
0d01060
implementing movement
AliceGrafBrolund Nov 18, 2020
c99a511
Made changes to Mgamma assembling yet again due to possible error, so…
jfloouf Nov 19, 2020
33ab2d0
Added some useful things in plot scripts
jfloouf Nov 19, 2020
e58dcd3
Grows
AliceGrafBrolund Nov 19, 2020
5e68957
growing sdof
AliceGrafBrolund Nov 20, 2020
fe40728
growing sdof+dead appearance
AliceGrafBrolund Nov 23, 2020
aa2cd65
Gradient colors
AliceGrafBrolund Nov 24, 2020
652a917
Copy2 update
Nov 27, 2020
a30a044
TumorGraphics
Chrishij Nov 27, 2020
08199a5
Fixed merge conflicts, added some Mgamma_assemble changes and a Copy3…
jfloouf Nov 27, 2020
eb975c5
Changed/added .gitignore
jfloouf Nov 27, 2020
a7c5b01
U_new
AliceGrafBrolund Nov 27, 2020
1ed486b
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Nov 27, 2020
88eebaa
New Euler Stepping
Chrishij Nov 27, 2020
5ecce58
Cleaned up in rep, removed unused or old scripts
jfloouf Nov 30, 2020
6884ae1
New code
Chrishij Nov 30, 2020
217e690
relaxation_exp
AliceGrafBrolund Nov 30, 2020
235e153
code for label
AliceGrafBrolund Nov 30, 2020
c26e70e
Some more runs with basePr=1 in saveData, some changes in plotFunctions
jfloouf Dec 1, 2020
8e10ebc
experiments, better visuals
AliceGrafBrolund Dec 1, 2020
b60570d
Breakup of AvascularTumor
Chrishij Dec 1, 2020
8265f78
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 1, 2020
5ae4f45
Better visuals
AliceGrafBrolund Dec 1, 2020
42de0a6
Calcs_updated
Chrishij Dec 1, 2020
f053960
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Dec 1, 2020
5f4667d
Added some runs, a flipped_mesh function
jfloouf Dec 1, 2020
80ddd1b
Better visuals igen
AliceGrafBrolund Dec 1, 2020
c8460f4
New calc file
Chrishij Dec 1, 2020
e831142
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 1, 2020
f92aa5b
add basic mesh2, poimesh2
Dec 1, 2020
18266f2
Division of Avascular Tumor
Chrishij Dec 1, 2020
59737f3
figure added
AliceGrafBrolund Dec 1, 2020
82d75d6
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Dec 1, 2020
a01385c
figure added-nrVoxels
AliceGrafBrolund Dec 1, 2020
59a3264
Update dof_calc
Chrishij Dec 1, 2020
9ffa59c
Create AvascExp
Chrishij Dec 1, 2020
ec8c6e2
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 1, 2020
ca04991
right inits
AliceGrafBrolund Dec 1, 2020
26b62d8
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Dec 1, 2020
4da2d64
small changes
AliceGrafBrolund Dec 2, 2020
7028035
Big Restructuring
Chrishij Dec 4, 2020
960a76f
Resolve
Chrishij Dec 4, 2020
f9bd34a
Update Still.m
AliceGrafBrolund Dec 4, 2020
7e547cd
Updated new code
Chrishij Dec 4, 2020
0ab2758
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 4, 2020
64e5a6b
Newest For-loop changes
Chrishij Dec 8, 2020
c632098
update poimesh2
Dec 8, 2020
eacffc7
Changes in Copy3AT, added dwnsclATProblem, changes in different plot …
jfloouf Dec 9, 2020
8b34b0c
Latest version: Working timestep
Chrishij Dec 10, 2020
bc17793
Create 2020-12-14(newdt_noscale).gif
AliceGrafBrolund Dec 14, 2020
779a98e
Create 2020-12-12(newdt_noscale_normal).gif
AliceGrafBrolund Dec 14, 2020
e500e7f
Create 2020-12-15_relax(newdt_noscale).gif
AliceGrafBrolund Dec 15, 2020
33aa177
Pictures
Chrishij Dec 15, 2020
12b4d72
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 15, 2020
53c7332
gifs Tend100 no scale
AliceGrafBrolund Dec 15, 2020
d93a020
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Dec 15, 2020
3f2c00e
New pics
Chrishij Dec 15, 2020
ddec299
More pics
Chrishij Dec 15, 2020
d2cb125
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 15, 2020
2a4e3a2
Create 2020-12-15_relax(newdt_scale).gif
AliceGrafBrolund Dec 15, 2020
98f372a
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Dec 15, 2020
d4604cd
better colourscale oxy
AliceGrafBrolund Dec 15, 2020
c1ef73b
Create 2020-12-15_Oxynormal_scaled.gif
AliceGrafBrolund Dec 15, 2020
08a5dd7
1_T200 pics
Chrishij Dec 16, 2020
1016a75
Code for downscaled problem, som vizualisations, savedata and images
jfloouf Dec 16, 2020
2c72bc3
More pics
Chrishij Dec 16, 2020
be4a42d
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Dec 16, 2020
cf8816d
update
AliceGrafBrolund Dec 16, 2020
e1761a8
more updates
AliceGrafBrolund Dec 16, 2020
074373e
New pics
AliceGrafBrolund Dec 18, 2020
016a551
update test_gamma, assemble_Mgamma2
Dec 23, 2020
77da1e8
Made changes in downscalde problem code, som visualization-stuff, tes…
jfloouf Dec 23, 2020
aaba163
parameter variation figures
AliceGrafBrolund Jan 4, 2021
57c6840
figures and script for schematic figure
AliceGrafBrolund Jan 7, 2021
ee593b4
scripts for relaxation and still growth experiments
AliceGrafBrolund Jan 11, 2021
48124a9
New January
Chrishij Jan 11, 2021
4b0a04d
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
Chrishij Jan 11, 2021
9431fcb
Latest changes in the Copies of avasscularTumour, changes in downscal…
jfloouf Jan 11, 2021
68235c1
Cleaned up version
Chrishij Jan 11, 2021
92bc018
Even newer more enhanced
Chrishij Jan 11, 2021
ecc4210
Incorporated new Robin BC in PDE (more or less), some additional .m-f…
jfloouf Jan 12, 2021
5cb985c
Small fix in still growth script+figures
AliceGrafBrolund Jan 12, 2021
bda92ea
New layout of code
Chrishij Jan 12, 2021
b52cd81
comments and cleanup, copy1
Jan 12, 2021
3e2d215
Added AvascularTumour_RobinBC script with comments
jfloouf Jan 12, 2021
e9971e7
Clean up in code and repositories
jfloouf Jan 12, 2021
a637389
Faster PDE-code
Chrishij Jan 12, 2021
64a33d3
updated pics
AliceGrafBrolund Jan 12, 2021
2232426
Merge branch 'PDE-Proj' of https://github.com/jfloouf/urdme into PDE-…
AliceGrafBrolund Jan 12, 2021
e14d039
cutoff_bdof figures
AliceGrafBrolund Jan 12, 2021
4e804a2
Some changes in AvascularTumour_RobinBC and plots
jfloouf Jan 13, 2021
9746346
Added more plotting scripts, changes in main tumour script
jfloouf Jan 13, 2021
afc2a30
Undergoing analysis of how to incorporate the BC into the PDE-model
jfloouf Jan 14, 2021
e99ac21
Nothing really, made a figure for the presentation
jfloouf Jan 14, 2021
2768be7
Humm humm
jfloouf Jan 14, 2021
e576f45
Generated some more report images
jfloouf Jan 14, 2021
d9a6b6b
Yoyo
jfloouf Jan 14, 2021
b2fe3d2
Update AvascularTumour_Relaxation.m
AliceGrafBrolund Jan 15, 2021
fe7fc15
AvascTumour code
Chrishij Jan 15, 2021
5ef850e
Cleaned up code, added relevant comments; removed saveData, images an…
jfloouf Jan 15, 2021
2d3bf7a
Fixed conflicts with .mex-files
jfloouf Jan 15, 2021
7f77d6d
Minor fixes
jfloouf Jan 15, 2021
0bf787f
Restructured code
Chrishij Jan 15, 2021
4a47180
Cleaned up joined model code
jfloouf Jan 15, 2021
73dc49f
Minor fix
jfloouf Jan 15, 2021
8b690b8
Resolved conflicts
jfloouf Jan 15, 2021
9589f10
Scripts for relaxation and still growth experiments
AliceGrafBrolund Jan 15, 2021
89306b4
Commented code
AliceGrafBrolund Jan 20, 2021
272a587
Update AvascularTumour_commented.m
AliceGrafBrolund Jan 20, 2021
ced2481
Update AvascularTumour_commented.m
AliceGrafBrolund Jan 22, 2021
c868075
Update AvascularTumour_commented.m
AliceGrafBrolund Jan 22, 2021
0c21932
FINAL
Chrishij Jan 29, 2021
6e86f2d
Update AvascularTumour.m
AliceGrafBrolund Jan 29, 2021
578a1c9
Merge branch 'PDE-Proj'
AliceGrafBrolund Jan 29, 2021
a0bad1f
Reordered Final
Chrishij Jan 29, 2021
1b13d57
rename
AliceGrafBrolund Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Windows default autosave extension
*.asv

# OSX / *nix default autosave extension
*.m~

# Compiled MEX binaries (all platforms)
*.mex*

# Packaged app and toolbox files
*.mlappinstall
*.mltbx

# Generated helpsearch folders
helpsearch*/

# Simulink code generation folders
slprj/
sccprj/

# Matlab code generation folders
codegen/

# Simulink autosave extension
*.autosave

# Simulink cache files
*.slxc

# Octave session info
octave-workspace
Binary file added saveData_alpha1e+04_2021-1-29-16-10-32.mat
Binary file not shown.
Binary file added saveData_alpha1e+04_2021-1-29-16-12-3.mat
Binary file not shown.
7 changes: 6 additions & 1 deletion startup.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@

% path to urdme/ folders
addpath(genpath([link 'urdme/']));
addpath(genpath([link 'workflows/']));
addpath(genpath([link 'workflows/']));

% Johannes Dufva 2020-10-30
% path to other functions used
% run('stenglib/make_all.m')
run('stenglib/startup.m')
Binary file added stenglib/.DS_Store
Binary file not shown.
43 changes: 43 additions & 0 deletions stenglib/Fast/clenshaw.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function Y = clenshaw(A,B,C)
%CLENSHAW Evaluation of 3-term recurrences.
% Y = CLENSHAW(A,B) evaluates the 3-term recurrence as defined by the
% matrices A and B.
%
% Let [M,N] be MAX(SIZE(A),SIZE(B)). Then the output Y is M-by-N and, for
% 1 <= j <= N, the recurrence is defined by Y(1,j) = A(1,j)+B(1,j), Y(2,j)
% = A(2,j)*Y(1,j)+B(2,j) and, for i > 2, Y(i,j) =
% A(i,j)Y(i-1,j)+B(i,j)Y(i-2,j).
%
% The dimensions of the matrices A and B must either match or be
% singletons. Singleton dimensions are as usual silently repeated.
%
% Y = CLENSHAW(A,B,C) evaluates the 3-term recurrence defined by A and B,
% multiplies it by the coefficients C and computes the sum of the result
% by means of Clenshaws summation formula. C is M-by-K-by-N and the result
% is K-by-N. The first dimension of C must be M while the second and third
% dimensions of C can be singletons.
%
% Examples:
% % Fibonacci numbers
% n = 10; clenshaw(1,[0; 0; ones(n-2,1)])'
%
% % Legendre polynomials
% x = linspace(-1,1); n = 4; j = [0.5 1:n]';
% A = (2*j-1)./j*x;
% B = (1-j)./j;
% y = clenshaw(A,B);
% figure, plot(x,y);
%
% % two functions defined by Chebyshev coefficients
% x = linspace(-1,1,50);
% n = 4; j = [0; 1; 2*ones(n-1,1)];
% A = j*x; B = [1; 0; -ones(n-1,1)];
% C = [[1 0.75 0.5 0.25 0.125]' [1 -1.75 1.5 -1.25 2.125]'];
% figure, plot(x,clenshaw(A,B,C));
%
% See also FILTER.

% S. Engblom 2007-04-19 (Major revision)
% S. Engblom 2005-07-28

error('.MEX-file not found on path.');
61 changes: 61 additions & 0 deletions stenglib/Fast/frepmat.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
function B = frepmat(A,rep)
%FREPMAT Fast replication of array.
% FREPMAT does the same job as the MATLAB-function REPMAT but runs
% faster since the main part of the code is written in C.
%
% B = FREPMAT(A,[M N]) creates a matrix B consisting of M-by-N
% copies of A.
%
% In general, B = FREPMAT(A,REP) repeats A in the first dimension
% REP(1) times, in the second dimension REP(2) times and so on for
% all of the sizes in REP.
%
% Unlike REPMAT, missing sizes in REP are consistently defined to be
% 1. This means that if m is a scalar, then FREPMAT(A,m) does not
% produce the same result as REPMAT(A,m) (which is defined to be
% REPMAT(A,[m m])). Instead, FREPMAT(A,m) produces the same result
% as would REPMAT(A,[m 1]). Also, the traditional syntax
% FREPMAT(A,M,N,...) is not supported.
%
% Examples:
% a = frepmat(1,1000); % same as ones(1000,1)
% b = frepmat(int8(1),[100 100]); % same as ones(100,100,'int8')
%
% s = sprand(10,10,0.5);
% a1 = frepmat(s,[100 10]); [nnz(a1) nzmax(a1)]
% a2 = repmat(s,[100 10]); [nnz(a2) nzmax(a2)] % overallocation
%
% See also REPMAT.

% - For doubles (real or complex), FREPMAT is about 15-20% faster
% than REPMAT.
%
% - For other numerical types (single precision floats, integers,
% characters and logicals), FREPMAT is about 50% faster than REPMAT.
%
% - For sparse matrices (real, complex or logical), FREPMAT is about
% 85-95% faster than REPMAT and allocates much less memory.
%
% - For other data-types, such as cell-, structure- and
% function-arrays, FREPMAT is about 10% faster than REPMAT.

% S. Engblom 2004-10-28

if isnumeric(A) || ischar(A) || islogical(A)
% runs fast
B = mexfrepmat(A,rep);
else
% general code using the traditional 'indexing' style
rep = rep(:);
lenrep = size(rep,1);
len = max(lenrep,tndims(A));
sizA = int32(tsize(A,1:len));
rep = [rep; ones(len-lenrep,1)];

% while building the indices the speed of mexfrepmat is exploited
ix = cell(1,len);
for i = 1:len
ix{i} = mexfrepmat([1:sizA(i)]',rep(i));
end
B = A(ix{:});
end
102 changes: 102 additions & 0 deletions stenglib/Fast/fsetop.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
function [c,ia,ib] = fsetop(op,a,b)
%FSETOP Fast set operations based on hashing.
% FSETOP(OP,A,B) performs the set operation OP on the columns of the
% arrays A and B. The main differences from the set operations
% implemented in MATLAB are:
% - FSETOP runs faster because it is based on hashing instead of on
% sorting.
%
% - In FSETOP, the order of the elements in the input arrays are
% retained in the output array, in contrast to the corresponding
% MATLAB functions where the result is sorted. This means that all
% indices for new elements are strictly increasing (except for IB
% in the INTERSECT operation and for JA and JB in the UNION
% operation). Also, in case of duplications, the first element
% (lowest column number) is selected.
%
% - FSETOP always uses the columns of its inputs as elements, like the
% 'rows' switch in the MATLAB commands, but for columns instead of
% rows. In particular, column vectors are not special cases, they are
% treated as single elements.
%
% - FSETOP supports the following data types: double, single, char,
% logicals, int8, uint8, int16, uint16, int32, uint32, int64, uint64
% and cell-arrays containing any of the above data types.
%
% Cell-arrays are treated as vectors and all output indices refer to a
% linear ordering. The output C is always a row cell-vector and cells
% containing the same data but of different types or shapes are
% considered unequal.
%
% C = FSETOP('check',A) computes hash-values for each column in A. The
% output C is a row-vector containing uint32-type integers. This is not
% a set-operation but is provided as a useful tool for computing
% check-sums for large data-sets in a uniform way.
%
% [C,IA,IB] = FSETOP('intersect',A,B) returns the columns common to
% both A and B. C = A(:,IA) = B(:,IB).
%
% [C,IA] = FSETOP('setdiff',A,B) returns the columns in A that are
% not in B. C = A(:,IA).
%
% [C,IA,IB] = FSETOP('setxor',A,B) returns the columns that are not
% in the intersection of A and B. C = [A(:,IA) B(:,IB)].
%
% [C,IA,IB,JA,JB] = FSETOP('union',A,B) returns the combined columns
% from A and B but with no repetitions. C = [A(:,IA) B(:,IB)] and A
% = C(:,JA), B = C(:,JB). Note that the outputs JA and JB are not
% produced by the MATLAB-function UNION.
%
% [B,IA,IB] = FSETOP('unique',A) returns the same columns as in A
% but with no repetitions. B = A(:,IA) and A = B(:,IB).
%
% [IA,IB] = FSETOP('ismember',A,B) returns a logical vector IA
% containing 1 where the columns of A are also columns of B and 0
% otherwise. IB contains the index in B of each column in A and zero if
% no such index exists. A(:,IA) = B(:,IB(IA)).
%
% Note: two elements are considered equal if and only if their
% bitwise representations are identical. This can sometimes give
% unexpected results. For example, with doubles, -0.0 ~= 0.0 and NaN
% == NaN.
%
% Examples:
% % intersection of integers
% a = int8(ceil(3*rand(2,10))), b = int8(ceil(3*rand(2,10)))
% aandb = fsetop('intersect',a,b)
%
% % unique strings in cell-array
% strs = {'foobar' 'foo' 'foobar' 'bar' 'barfoo'}
% strsunq = fsetop('unique',strs)
%
% % find indices ix in b = a(ix)
% a = randperm(6), b = ceil(6*rand(1,6))
% [foo,ix] = fsetop('ismember',b,a)
%
% % remove indices from set of indices
% a = {[1 2 4] [2 3 5 6] [4 2 1] [2 3 5 6]' int32([1 2 4])};
% b = {[4 2 1]};
% c = fsetop('setdiff',a,b)
%
% % union of structs
% a = struct('foo',1,'bar',NaN,'foobar','hello')
% b = struct('faa',2,'bar',Inf,'foobar','goodbye')
% [cf,ia,ib] = fsetop('union',fieldnames(a),fieldnames(b));
% ac = struct2cell(a); bc = struct2cell(b);
% c = cell2struct([ac(ia); bc(ib)],cf)
%
% % a single 32-bit checksum from strings
% s = {'check','intersect','setdiff','setxor', ...
% 'union','unique','ismember'};
% c = fsetop('check',fsetop('check',s)')
%
% See also INTERSECT, SETDIFF, SETXOR, UNION, UNIQUE, ISMEMBER.

% S. Engblom 2010-02-09 (Revision)
% S. Engblom 2006-06-13 (Major revision)
% S. Engblom 2005-06-21
% Based on a concept by P-O Persson, COMSOL AB. The internal hash
% function used is based on a code by P. Hsieh, see
% http://www.azillionmonkeys.com/qed/hash.html.

error('.MEX-file not found on path.');
Loading