Skip to content

Commit 1a56003

Browse files
authored
Merge pull request #148 from MathCancer/development
Release Version 1.11.0
2 parents bc3b32f + 3bd780a commit 1a56003

113 files changed

Lines changed: 17397 additions & 4326 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- uses: msys2/setup-msys2@v2
2020
with:
2121
update: true
22-
install: base-devel flex bison gcc make diffutils mingw-w64-x86_64-toolchain
23-
22+
install: base-devel flex bison gcc make diffutils mingw-w64-x86_64-toolchain mingw-w64-x86_64-ca-certificates
23+
2424
- name: Build Virus Macrophage project
2525
run: |
2626
make virus-macrophage-sample

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,14 @@ sample_projects/cancer_biorobots/.DS_Store
1111
sample_projects/cancer_immune/.DS_Store
1212
sample_projects/celltypes3/.DS_Store
1313
sample_projects/heterogeneity/.DS_Store
14-
sample_projects/template/.DS_Store
14+
sample_projects/template/.DS_Store
15+
pmb_debug.log
16+
heterogeneity
17+
**/.DS_Store
18+
**/._.DS_Store
19+
cancer_immune_3D
20+
biorobots
21+
project
22+
initial.svg
23+
initial.svg
24+
interaction_demo

BioFVM/BioFVM_MultiCellDS.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,4 +1387,48 @@ void read_microenvironment_from_MultiCellDS_xml( Microenvironment& M_destination
13871387
return;
13881388
}
13891389

1390+
bool read_microenvironment_from_matlab( std::string mat_filename )
1391+
{
1392+
std::cout << std::endl << "Attempting to load the microenvironment from " << mat_filename << " ... " << std::endl;
1393+
1394+
std::vector< std::vector<double> > mat = read_matlab( mat_filename );
1395+
1396+
// row 0 : x
1397+
// row 1 : y
1398+
// row 2 : z
1399+
// row 3 : vol
1400+
// row 4-n : substrate
1401+
int num_rows = mat.size();
1402+
int num_cols = mat[0].size();
1403+
1404+
int number_of_mat_voxels = num_cols;
1405+
int number_of_mat_substrates = num_rows - 3 -1;
1406+
1407+
if( number_of_mat_substrates != microenvironment.number_of_densities() )
1408+
{
1409+
std::cout << "Error reading microenvironment from " << mat_filename << "! ";
1410+
std::cout << "Expected " << microenvironment.number_of_densities() << " substrates but only detected "
1411+
<< number_of_mat_substrates << std::endl;
1412+
return false;
1413+
}
1414+
1415+
if( number_of_mat_voxels != microenvironment.number_of_voxels() )
1416+
{
1417+
std::cout << "Error reading microenvironment from " << mat_filename << "! ";
1418+
std::cout << "Expected " << microenvironment.number_of_voxels() << " voxels but only detected "
1419+
<< number_of_mat_voxels << std::endl;
1420+
return false;
1421+
}
1422+
1423+
for( int n=0 ; n < number_of_mat_voxels ; n++ )
1424+
{
1425+
// std::cout << microenvironment.mesh.voxels[n].center << " vs " << mat[0][n] << " " << mat[1][n] << " " << mat[2][n] << std::endl;
1426+
for( int k=4; k < num_rows ; k++ )
1427+
{ microenvironment(n)[k-4] = mat[k][n]; }
1428+
}
1429+
1430+
std::cout << "done!" << std::endl << std::endl;
1431+
return true;
1432+
}
1433+
13901434
};

BioFVM/BioFVM_MultiCellDS.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ void add_BioFVM_to_open_xml_pugi( pugi::xml_document& xml_dom , std::string file
188188

189189
void save_BioFVM_to_MultiCellDS_xml_pugi( std::string filename_base , Microenvironment& M , double current_simulation_time);
190190

191+
/* beta in PhysiCell 1.11.0 */
192+
193+
bool read_microenvironment_from_matlab( std::string mat_filename );
194+
191195
/* future / not yet supported */
192196

193197
void read_BioFVM_from_open_xml_pugi( pugi::xml_document& xml_dom , std::string filename_base, double& current_simulation_time , Microenvironment& M );

CITATION.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
If you use PhysiCell in your project, please cite PhysiCell and the version
22
number, such as below:
33

4-
We implemented and solved the model using PhysiCell (Version 1.10.4) [1].
4+
We implemented and solved the model using PhysiCell (Version 1.11.0) [1].
55

66
[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
77
PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu-
@@ -11,7 +11,7 @@ We implemented and solved the model using PhysiCell (Version 1.10.4) [1].
1111
Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM
1212
as below:
1313

14-
We implemented and solved the model using PhysiCell (Version 1.10.4) [1],
14+
We implemented and solved the model using PhysiCell (Version 1.11.0) [1],
1515
with BioFVM [2] to solve the transport equations.
1616

1717
[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,

Makefile

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ name:
7373
list-projects:
7474
@echo "Sample projects: template biorobots-sample cancer-biorobots-sample cancer-immune-sample"
7575
@echo " celltypes3-sample heterogeneity-sample pred-prey-farmer virus-macrophage-sample"
76-
@echo " worm-sample interaction-sample"
76+
@echo " worm-sample interaction-sample mechano-sample"
7777
@echo ""
7878
@echo "Sample intracellular projects: ode-energy-sample physiboss-cell-lines-sample cancer-metabolism-sample"
7979
@echo ""
@@ -93,7 +93,7 @@ template:
9393
biorobots-sample:
9494
cp ./sample_projects/biorobots/custom_modules/* ./custom_modules/
9595
touch main.cpp && cp main.cpp main-backup.cpp
96-
cp ./sample_projects/biorobots/main-biorobots.cpp ./main.cpp
96+
cp ./sample_projects/biorobots/main.cpp ./main.cpp
9797
cp Makefile Makefile-backup
9898
cp ./sample_projects/biorobots/Makefile .
9999
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
@@ -102,7 +102,7 @@ biorobots-sample:
102102
cancer-biorobots-sample:
103103
cp ./sample_projects/cancer_biorobots/custom_modules/* ./custom_modules/
104104
touch main.cpp && cp main.cpp main-backup.cpp
105-
cp ./sample_projects/cancer_biorobots/main-cancer_biorobots.cpp ./main.cpp
105+
cp ./sample_projects/cancer_biorobots/main.cpp ./main.cpp
106106
cp Makefile Makefile-backup
107107
cp ./sample_projects/cancer_biorobots/Makefile .
108108
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
@@ -129,7 +129,7 @@ celltypes3-sample:
129129
heterogeneity-sample:
130130
cp ./sample_projects/heterogeneity/custom_modules/* ./custom_modules/
131131
touch main.cpp && cp main.cpp main-backup.cpp
132-
cp ./sample_projects/heterogeneity/main-heterogeneity.cpp ./main.cpp
132+
cp ./sample_projects/heterogeneity/main.cpp ./main.cpp
133133
cp Makefile Makefile-backup
134134
cp ./sample_projects/heterogeneity/Makefile .
135135
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
@@ -208,6 +208,13 @@ cancer-metabolism-sample:
208208
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
209209
cp ./sample_projects_intracellular/fba/cancer_metabolism/config/* ./config/
210210

211+
mechano-sample:
212+
cp ./sample_projects/mechano/custom_modules/* ./custom_modules/
213+
touch main.cpp && cp main.cpp main-backup.cpp
214+
cp ./sample_projects/mechano/main.cpp ./main.cpp
215+
cp Makefile Makefile-backup
216+
cp ./sample_projects/mechano/Makefile .
217+
cp ./sample_projects/mechano/config/* ./config/
211218

212219
# early examples for convergence testing
213220

@@ -422,3 +429,25 @@ upgrade: $(SOURCE)
422429
mv -f PhysiCell/documentation/User_Guide.pdf documentation
423430
rm -f -r PhysiCell
424431
rm -f $(SOURCE)
432+
433+
# use: make save PROJ=your_project_name
434+
PROJ := my_project
435+
436+
save:
437+
echo "Saving project as $(PROJ) ... "
438+
mkdir -p ./user_projects
439+
mkdir -p ./user_projects/$(PROJ)
440+
mkdir -p ./user_projects/$(PROJ)/custom_modules
441+
mkdir -p ./user_projects/$(PROJ)/config
442+
cp main.cpp ./user_projects/$(PROJ)
443+
cp Makefile ./user_projects/$(PROJ)
444+
cp VERSION.txt ./user_projects/$(PROJ)
445+
cp ./config/* ./user_projects/$(PROJ)/config
446+
cp ./custom_modules/* ./user_projects/$(PROJ)/custom_modules
447+
448+
load:
449+
echo "Loading project from $(PROJ) ... "
450+
cp ./user_projects/$(PROJ)/main.cpp .
451+
cp ./user_projects/$(PROJ)/Makefile .
452+
cp ./user_projects/$(PROJ)/config/* ./config/
453+
cp ./user_projects/$(PROJ)/custom_modules/* ./custom_modules/

0 commit comments

Comments
 (0)