Commit 552b5ca2 authored by gsaxena's avatar gsaxena
Browse files

Prepared the physiboss_tnf_model_mpi for testing, some core files have also...

Prepared the physiboss_tnf_model_mpi for testing, some core files have also changed, most significantly Vincent added more variables to pack and unpack, there was a problem of intracellular_type which was not being packed, now in current code it is packed OUTSIDE maboss, later change this packing on intracellular_type to inside maboss (as Vincent suggest and this is the correct form).
parent 6a2e622c
......@@ -66,7 +66,7 @@ list-projects:
@echo " cancer-immune-sample virus-macrophage-sample template pred-prey-farmer"
@echo ""
@echo "Sample intracellular projects: ode-energy-sample physiboss-cell-lines-sample cancer-metabolism-sample"
@echo "physiboss-cell-lines-mpi"
@echo "physiboss-cell-lines-mpi physiboss-tnf-model physiboss-tnf-model-mpi"
@echo ""
# ---- non-intracellular projects
......@@ -190,6 +190,24 @@ physiboss-cell-lines-mpi:
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/boolean/physiboss_cell_lines_mpi/config/* ./config/
physiboss-tnf-model:
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/main-spheroid_TNF.cpp ./main.cpp
cp Makefile Makefile-backup
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/Makefile .
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/config/* ./config/
physiboss-tnf-model-mpi:
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/main-spheroid_TNF.cpp ./main.cpp
cp Makefile Makefile-backup
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/Makefile .
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/config/* ./config/
ecoli-acetic-switch-sample:
cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
......
......@@ -66,7 +66,7 @@ list-projects:
@echo " cancer-immune-sample virus-macrophage-sample template pred-prey-farmer"
@echo ""
@echo "Sample intracellular projects: ode-energy-sample physiboss-cell-lines-sample cancer-metabolism-sample"
@echo "physiboss-cell-lines-mpi"
@echo "physiboss-cell-lines-mpi physiboss-tnf-model physiboss-tnf-model-mpi"
@echo ""
# ---- non-intracellular projects
......@@ -190,6 +190,24 @@ physiboss-cell-lines-mpi:
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/boolean/physiboss_cell_lines_mpi/config/* ./config/
physiboss-tnf-model:
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/main-spheroid_TNF.cpp ./main.cpp
cp Makefile Makefile-backup
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/Makefile .
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model/config/* ./config/
physiboss-tnf-model-mpi:
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/main-spheroid_TNF.cpp ./main.cpp
cp Makefile Makefile-backup
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/Makefile .
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/boolean/spheroid_tnf_model_mpi/config/* ./config/
ecoli-acetic-switch-sample:
cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
......
......@@ -42,13 +42,16 @@ MaBoSSIntracellular::MaBoSSIntracellular(MaBoSSIntracellular* copy)
}
}
MaBoSSIntracellular::MaBoSSIntracellular(std::vector<char>& buffer, int& len_buffer, int& position) {
MaBoSSIntracellular::MaBoSSIntracellular(std::vector<char>& buffer, int& len_buffer, int& position)
{
// double len_str = 0;
int temp_int;
double temp_double;
std::string temp_str;
int len_str = 0;
// intracellular_type = "maboss"; //<---- Vincent ALSO suggested this, but am doing it in unpacking (Physicell_cell.cpp)
MPI_Unpack(&buffer[0], len_buffer, &position, &len_str, 1, MPI_INT, MPI_COMM_WORLD);
temp_str.resize(len_str);
......@@ -121,6 +124,21 @@ MaBoSSIntracellular::MaBoSSIntracellular(std::vector<char>& buffer, int& len_buf
this->maboss.state.setNodeState(t_nodes[i], t_node == 1?true:false);
}
/* The following is an extra change that Vincent has done */
/* From here */
MPI_Unpack(&buffer[0], len_buffer, &position, &temp_int, 1, MPI_INT, MPI_COMM_WORLD);
SymbolTable* symbol_table = this->maboss.getNetwork()->getSymbolTable();
for (unsigned int i=0; i < temp_int; i++) {
double t_parameter = 0;
MPI_Unpack(&buffer[0], len_buffer, &position, &t_parameter, 1, MPI_DOUBLE, MPI_COMM_WORLD);
symbol_table->setSymbolValue(symbol_table->getSymbol(symbol_table->getSymbolsNames()[i]), t_parameter);
}
/* To here */
}
void MaBoSSIntracellular::pack(std::vector<char>& buffer, int& len_buffer, int& position)
......@@ -252,6 +270,24 @@ void MaBoSSIntracellular::pack(std::vector<char>& buffer, int& len_buffer, int&
temp_int = this->maboss.state.getNodeState(t_nodes[i]) == true ? 1 : 0;
MPI_Pack(&(temp_int), 1, MPI_INT, &buffer[0], len_buffer, &position, MPI_COMM_WORLD);
}
/* Now this is an additional Data Structure which is being packed */
/* corresponding unpacking code is also added */
// The present parameter table
SymbolTable* symbol_table = this->maboss.getNetwork()->getSymbolTable();
len_buffer = position + sizeof(int);
buffer.resize(len_buffer);
temp_int = symbol_table->getSymbolCount();
MPI_Pack(&(temp_int), 1, MPI_INT, &buffer[0], len_buffer, &position, MPI_COMM_WORLD);
for (unsigned int i=0; i < symbol_table->getSymbolCount(); i++) {
len_buffer = position + sizeof(double);
buffer.resize(len_buffer);
temp_double = symbol_table->getSymbolValue(symbol_table->getSymbol(symbol_table->getSymbolsNames()[i]));
MPI_Pack(&(temp_double), 1, MPI_DOUBLE, &buffer[0], len_buffer, &position, MPI_COMM_WORLD);
}
}
......
time total_volume cell_type cycle_model current_phase elapsed_time_in_phase nuclear_volume cytoplasmic_volume fluid_fraction calcified_fraction x_orientation x_orientation y_orientation x_orientation x_orientation polarity migration_speed x_motility_vector x_motility_vector y_motility_vector x_motility_vector x_motility_vector migration_bias x_motility_bias_direction x_motility_bias_direction y_motility_bias_direction x_motility_bias_direction x_motility_bias_direction persistence_time motility_reserved next_physiboss_run TNFR_binding_rate TNFR_endocytosis_rate TNFR_recycling_rate TNFR_activation_threshold TNFR_receptors_per_cell TNF_net_production_rate tnf_node fadd_node nfkb_node external_tnf divide cycle_rate unbound_external_TNFR bound_external_TNFR bound_internal_TNFR TFN_net_production_rate
0 0 2494.0 0.0 5.0 14.0 0.529296214796025 540.0 1954.0 0.75 0.0 0.03251581560544081 0.0078713255500673 0.024315722535253468 0.03251581560544081 0.0078713255500673 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999636 0.12799999999999837 0.29300000000000503 0.5 1.0 0.0 0.0 0.5254833040421792 0.0 0.0 0.0 0.000750000000000004 1.0 0.0 0.0 0.0
1 10 2480.967185009814 0.0 5.0 14.0 10.44910515801023 537.1803041779519 1943.786880831861 0.7499727202489069 0.0 0.03149577946030294 0.0062306614200278495 0.023957907567582412 0.03149577946030294 0.0062306614200278495 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999633 0.1279999999999983 0.29300000000000503 0.5 1.0 0.0 0.0 0.5262237762237763 0.0 0.0 0.0 0.0007500000000000041 1.0 0.0 0.0 0.0
2 20 2463.992348481299 0.0 5.0 14.0 20.224971373758816 533.5249287943712 1930.4674196869291 0.7498436599353079 0.0 0.03161975348469197 0.006692989288766963 0.02157097210647273 0.03161975348469197 0.006692989288766963 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999633 0.12799999999999823 0.29300000000000503 0.5 1.0 0.0 0.0 0.527367506516073 0.0 0.0 0.0 0.0007500000000000044 1.0 0.0 0.0 0.0
3 30 2430.773895734274 0.0 5.0 14.0 29.482951454798922 526.3757325938988 1904.3981631403756 0.7496010638214239 0.0 0.02854691931465831 0.003948386878375839 0.01907264776487619 0.02854691931465831 0.003948386878375839 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999963 0.12799999999999806 0.29300000000000503 0.5 1.0 0.0 0.0 0.5274442538593482 0.0 0.0 0.0 0.0007500000000000046 1.0 0.0 0.0 0.0
4 40 2421.4983139263923 0.0 5.0 14.0 39.17576824242522 524.4458890409182 1897.0524248854754 0.74923606219575 0.0 0.027409410763966576 0.0029534284291068374 0.021494682279429703 0.027409410763966576 0.0029534284291068374 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999963 0.127999999999998 0.29300000000000503 0.5 1.0 0.0 0.0 0.5286080273270709 0.0 0.0 0.0 0.0007500000000000047 1.0 0.0 0.0 0.0
5 50 2412.631834335452 0.0 5.0 14.0 48.78821142399595 522.6197473983075 1890.012086937147 0.7488799650486995 0.0 0.027546385867240827 0.0015431478477818067 0.02007522635652047 0.027546385867240827 0.0015431478477818067 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999963 0.12799999999999798 0.29300000000000503 0.5 1.0 0.0 0.0 0.5280612244897959 0.0 0.0 0.0 0.0007500000000000048 1.0 0.0 0.0 0.0
6 60 2396.059532886967 0.0 5.0 14.0 57.924154379392775 519.1301131769562 1876.9294197100123 0.7485361706508131 0.0 0.02398843051055608 0.00038659927604193427 0.01900133134666345 0.02398843051055608 0.00038659927604193427 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999963 0.12799999999999787 0.2930000000000051 0.5 1.0 0.0 0.0 0.5265822784810127 0.0 0.0 0.0 0.000750000000000005 1.0 0.0 0.0 0.0
7 70 2380.211242177048 0.0 5.0 14.0 66.97804632434926 515.8106816415916 1864.4005605354562 0.7481059947446206 0.0 0.023109040023695036 -0.0023597527261810937 0.01981375884727623 0.023109040023695036 -0.0023597527261810937 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999627 0.12799999999999778 0.2930000000000051 0.5 1.0 0.0 0.0 0.525963149078727 0.0 0.0 0.0 0.0007500000000000052 1.0 0.0 0.0 0.0
8 80 2365.0564669546907 0.0 5.0 14.0 75.90886852357987 512.6555552905182 1852.4009116641714 0.7476612788320893 0.0 0.02357751326895822 -0.0032811493036845824 0.020374504288767106 0.02357751326895822 -0.0032811493036845824 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999627 0.1279999999999977 0.2930000000000051 0.5 1.0 0.0 0.0 0.5245220282626767 0.0 0.0 0.0 0.0007500000000000053 1.0 0.0 0.0 0.0
9 90 2340.9495925880806 0.0 5.0 14.0 84.11664676529955 507.57054748713006 1833.3790451009509 0.7471303323958576 0.0 0.021906042789236784 -0.001517060729724737 0.017606298596850745 0.021906042789236784 -0.001517060729724737 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999625 0.12799999999999756 0.2930000000000051 0.5 1.0 0.0 0.0 0.5283483976992605 0.0 0.0 0.0 0.0007500000000000057 1.0 0.0 0.0 0.0
10 100 2333.093910018274 0.0 5.0 14.0 93.18517515082398 506.02331473579824 1827.0705952824737 0.7465902936257853 0.0 0.022102981869337825 -0.0019630834936961617 0.018617043862767812 0.022102981869337825 -0.0019630834936961617 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999625 0.1279999999999975 0.2930000000000051 0.5 1.0 0.0 0.0 0.5257563368765331 0.0 0.0 0.0 0.0007500000000000058 1.0 0.0 0.0 0.0
11 110 2320.1281996052176 0.0 5.0 14.0 101.70456484030747 503.37385760738533 1816.7543419978317 0.7460814544082286 0.0 0.021908151934548033 -0.003338839937010538 0.019238550540017944 0.021908151934548033 -0.003338839937010538 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999625 0.12799999999999742 0.29300000000000515 0.5 1.0 0.0 0.0 0.5267857142857143 0.0 0.0 0.0 0.0007500000000000059 1.0 0.0 0.0 0.0
12 120 2304.135738009199 0.0 5.0 14.0 109.72222955199071 500.07306231359155 1804.0626756956071 0.7456243971889877 0.0 0.019063634155847952 -0.00451460379353415 0.017897381881376764 0.019063634155847952 -0.00451460379353415 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999622 0.1279999999999973 0.29300000000000515 0.5 1.0 0.0 0.0 0.5237329042638778 0.0 0.0 0.0 0.0007500000000000061 1.0 0.0 0.0 0.0
13 130 2279.687590714928 0.0 5.0 14.0 116.80520917944402 494.9456367732905 1784.7419539416367 0.74510511942423 0.0 0.022194099852511858 -0.0029433249130945754 0.021613296235600148 0.022194099852511858 -0.0029433249130945754 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999622 0.12799999999999717 0.29300000000000515 0.5 1.0 0.0 0.0 0.5246422893481717 0.0 0.0 0.0 0.0007500000000000064 1.0 0.0 0.0 0.0
14 140 2267.3212202465425 0.0 5.0 14.0 124.75615825338528 492.45429084268477 1774.8669294038602 0.7445484847559241 0.0 0.0205744123671973 -0.0024989566483684706 0.02089310033958461 0.0205744123671973 -0.0024989566483684706 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999622 0.1279999999999971 0.29300000000000515 0.5 1.0 0.0 0.0 0.5228706624605678 0.0 0.0 0.0 0.0007500000000000065 1.0 0.0 0.0 0.0
15 150 2234.838143636916 0.0 5.0 14.0 130.08469335695688 485.6071691351264 1749.2309745017872 0.7440195754631687 0.0 0.024015156496236187 0.0009608872870142146 0.020688382360485046 0.024015156496236187 0.0009608872870142146 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999962 0.1279999999999969 0.2930000000000052 0.5 1.0 0.0 0.0 0.5217054263565891 0.0 0.0 0.0 0.000750000000000007 1.0 0.0 0.0 0.0
16 160 2226.2171018264535 0.0 5.0 14.0 138.14731792320916 483.9638205925239 1742.2532812339305 0.743359975100339 0.0 0.024507011787779292 0.0017760072266962594 0.019700845705087098 0.024507011787779292 0.0017760072266962594 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999962 0.1279999999999968 0.2930000000000052 0.5 1.0 0.0 0.0 0.5204003079291762 0.0 0.0 0.0 0.0007500000000000071 1.0 0.0 0.0 0.0
17 170 2224.9677112071263 0.0 5.0 14.0 147.00437716101686 483.91955568151184 1741.048155525611 0.7428320334140069 0.0 0.02303700615362476 0.0010889624531146573 0.018645801611503195 0.02303700615362476 0.0010889624531146573 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999616 0.12799999999999678 0.2930000000000052 0.5 1.0 0.0 0.0 0.5207055214723927 0.0 0.0 0.0 0.0007500000000000072 1.0 0.0 0.0 0.0
18 180 2220.580998407029 0.0 5.0 14.0 155.32186196575907 483.1840149091201 1737.3969834979075 0.7423953134152993 0.0 0.021753644614599135 -0.0012551966389882884 0.017998009816068514 0.021753644614599135 -0.0012551966389882884 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999616 0.12799999999999673 0.2930000000000052 0.5 1.0 0.0 0.0 0.5198473282442748 0.0 0.0 0.0 0.0007500000000000073 1.0 0.0 0.0 0.0
19 190 2220.186896339118 0.0 5.0 14.0 164.05584177090216 483.30486865972017 1736.8820276793974 0.7420207867229845 0.0 0.02272439258824381 -0.0013744914822790334 0.01726589931217209 0.02272439258824381 -0.0013744914822790334 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999616 0.1279999999999967 0.2930000000000052 0.5 1.0 0.0 0.0 0.5193916349809886 0.0 0.0 0.0 0.0007500000000000073 1.0 0.0 0.0 0.0
20 200 2203.5177348214224 0.0 5.0 14.0 170.20429171692214 479.87415148228445 1723.6435833391376 0.7416859631414765 0.0 0.022956047147005647 -0.002881517306432352 0.01756097709843449 0.022956047147005647 -0.002881517306432352 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999616 0.12799999999999656 0.2930000000000052 0.5 1.0 0.0 0.0 0.5165413533834586 0.0 0.0 0.0 0.0007500000000000076 1.0 0.0 0.0 0.0
21 210 2190.5155278512348 0.0 5.0 14.0 176.86924127359686 477.24910712935923 1713.2664207218832 0.7412655383834714 0.0 0.021482448952045173 -0.0012059319263642222 0.017931674757684046 0.021482448952045173 -0.0012059319263642222 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999614 0.12799999999999648 0.2930000000000052 0.5 1.0 0.0 0.0 0.517524235645041 0.0 0.0 0.0 0.0007500000000000077 1.0 0.0 0.0 0.0
22 220 2173.8907522137447 0.0 5.0 14.0 182.91771813233228 473.83455814304136 1700.0561940707016 0.7407109986202515 0.0 0.01817676542098395 -0.0025535090112689452 0.019185335734235004 0.01817676542098395 -0.0025535090112689452 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999614 0.12799999999999637 0.29300000000000526 0.5 1.0 0.0 0.0 0.5187914517317612 0.0 0.0 0.0 0.0007500000000000079 1.0 0.0 0.0 0.0
23 230 2175.2917013153196 0.0 5.0 14.0 191.53616671162305 474.35176592523936 1700.9399353900785 0.7402769329065295 0.0 0.019492010797647206 -0.0020825302328922614 0.018416160040886073 0.019492010797647206 -0.0020825302328922614 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999614 0.1279999999999963 0.29300000000000526 0.5 1.0 0.0 0.0 0.5172667156502572 0.0 0.0 0.0 0.000750000000000008 1.0 0.0 0.0 0.0
24 240 2169.3648265761603 0.0 5.0 14.0 198.80226389005287 473.26080241040466 1696.1040241657563 0.7398733036439293 0.0 0.019171051007040942 -0.001926053174445983 0.016431672849251965 0.019171051007040942 -0.001926053174445983 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999961 0.12799999999999626 0.29300000000000526 0.5 1.0 0.0 0.0 0.5193289569657185 0.0 0.0 0.0 0.0007500000000000081 1.0 0.0 0.0 0.0
25 250 2155.34883889305 0.0 5.0 14.0 204.34551489146887 470.4068599028958 1684.9419789901565 0.7394641940927844 0.0 0.01716357756313239 -0.002829685664465698 0.015047273817149341 0.01716357756313239 -0.002829685664465698 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999961 0.12799999999999614 0.29300000000000526 0.5 1.0 0.0 0.0 0.5184381778741866 0.0 0.0 0.0 0.0007500000000000084 1.0 0.0 0.0 0.0
26 260 2159.1121096407114 0.0 5.0 14.0 212.85766148617685 471.41561872337024 1687.6964909173373 0.7392105202592649 0.0 0.014455973537112162 -0.0029699294435071187 0.014381648154525875 0.014455973537112162 -0.0029699294435071187 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999961 0.12799999999999612 0.29300000000000526 0.5 1.0 0.0 0.0 0.5191059841384282 0.0 0.0 0.0 0.0007500000000000084 1.0 0.0 0.0 0.0
27 270 2157.2205793802354 0.0 5.0 14.0 220.2473436637959 471.1876455153647 1686.0329338648726 0.739022174191735 0.0 0.015967994562032538 -0.004698677458820418 0.014040140318542735 0.015967994562032538 -0.004698677458820418 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.2429999999999961 0.1279999999999961 0.29300000000000526 0.5 1.0 0.0 0.0 0.5186513629842181 0.0 0.0 0.0 0.0007500000000000085 1.0 0.0 0.0 0.0
28 280 2155.853017331245 0.0 5.0 14.0 227.46209339522596 471.06143923353187 1684.7915780977114 0.738907515017797 0.0 0.015710331660398202 -0.006050347125014229 0.011997692192558742 0.015710331660398202 -0.006050347125014229 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999608 0.127999999999996 0.29300000000000526 0.5 1.0 0.0 0.0 0.5178316690442225 0.0 0.0 0.0 0.0007500000000000086 1.0 0.0 0.0 0.0
29 290 2146.9063789216157 0.0 5.0 14.0 233.31222283570744 469.27519967551774 1677.6311792460997 0.7387502171040394 0.0 0.01726509247823571 -0.003893612293510723 0.012168900413075872 0.01726509247823571 -0.003893612293510723 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999608 0.12799999999999592 0.29300000000000526 0.5 1.0 0.0 0.0 0.5183875530410184 0.0 0.0 0.0 0.0007500000000000088 1.0 0.0 0.0 0.0
30 300 2144.6676836036227 0.0 5.0 14.0 239.89491220591276 468.94948369460366 1675.7181999090174 0.7386628587840253 0.0 0.017092127247959076 -0.00648747162156472 0.012698421083020061 0.017092127247959076 -0.00648747162156472 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999608 0.12799999999999587 0.2930000000000053 0.5 1.0 0.0 0.0 0.5179198875614898 0.0 0.0 0.0 0.0007500000000000089 1.0 0.0 0.0 0.0
31 310 2126.4361198822985 0.0 5.0 14.0 242.97436909755146 465.1256003667841 1661.3105195155126 0.7384946645849986 0.0 0.01481121333157772 -0.006943070486882393 0.011720789449983246 0.01481121333157772 -0.006943070486882393 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999605 0.12799999999999573 0.2930000000000053 0.5 1.0 0.0 0.0 0.5190575190575191 0.0 0.0 0.0 0.0007500000000000092 1.0 0.0 0.0 0.0
32 320 2126.5366341042186 0.0 5.0 14.0 250.34055461541152 465.318120668688 1661.218513435532 0.7382118187360811 0.0 0.01410637666347532 -0.005514189763653184 0.012511637344719793 0.01410637666347532 -0.005514189763653184 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999605 0.12799999999999567 0.2930000000000053 0.5 1.0 0.0 0.0 0.5155065472088215 0.0 0.0 0.0 0.0007500000000000093 1.0 0.0 0.0 0.0
33 330 2119.6735442581275 0.0 5.0 14.0 255.55290443086594 463.9823799093134 1655.691164348816 0.7380060012972245 0.0 0.01694692983236693 -0.004616678604293777 0.012619718945900714 0.01694692983236693 -0.004616678604293777 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999605 0.1279999999999956 0.2930000000000053 0.5 1.0 0.0 0.0 0.5157103825136612 0.0 0.0 0.0 0.0007500000000000094 1.0 0.0 0.0 0.0
34 340 2117.5175380222868 0.0 5.0 14.0 261.7916612553309 463.6720526754736 1653.8454853468138 0.7378473246241571 0.0 0.015087167779087585 -0.007603552726348875 0.012264380652807686 0.015087167779087585 -0.007603552726348875 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999605 0.12799999999999553 0.2930000000000053 0.5 1.0 0.0 0.0 0.5169606512890095 0.0 0.0 0.0 0.0007500000000000096 1.0 0.0 0.0 0.0
35 350 2117.1298565495154 0.0 5.0 14.0 268.2858142041286 463.73347140437244 1653.3963851451472 0.7377670058369168 0.0 0.011985096890743167 -0.006849457330594265 0.012562689829325839 0.011985096890743167 -0.006849457330594265 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999602 0.12799999999999548 0.2930000000000053 0.5 1.0 0.0 0.0 0.5138419986495611 0.0 0.0 0.0 0.0007500000000000097 1.0 0.0 0.0 0.0
36 360 2117.2029967570625 0.0 5.0 14.0 274.8066235920904 463.8833860283618 1653.3196107287033 0.737683767649573 0.0 0.010510275387794909 -0.008021215532070166 0.012127469361923313 0.010510275387794909 -0.008021215532070166 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999602 0.12799999999999542 0.2930000000000053 0.5 1.0 0.0 0.0 0.5134408602150538 0.0 0.0 0.0 0.0007500000000000098 1.0 0.0 0.0 0.0
37 370 2119.9619547869993 0.0 5.0 14.0 282.06235970782086 464.621366367821 1655.340588419183 0.7376067807693153 0.0 0.010147973770513586 -0.008494070636350387 0.01381532088063958 0.010147973770513586 -0.008494070636350387 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999602 0.1279999999999954 0.2930000000000053 0.5 1.0 0.0 0.0 0.5140562248995983 0.0 0.0 0.0 0.0007500000000000099 1.0 0.0 0.0 0.0
38 380 2119.7186256739456 0.0 5.0 14.0 288.2732060903204 464.7000827351337 1655.0185429388075 0.7375975750498128 0.0 0.011812883847591762 -0.007907454983161368 0.016322335310028767 0.011812883847591762 -0.007907454983161368 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999602 0.12799999999999534 0.29300000000000537 0.5 1.0 0.0 0.0 0.5126498002663116 0.0 0.0 0.0 0.00075000000000001 1.0 0.0 0.0 0.0
39 390 2121.282499710806 0.0 5.0 14.0 295.34217349012096 465.1623773863697 1656.120122324439 0.737539165065179 0.0 0.012694917065521578 -0.005572742729490956 0.017579139060698253 0.012694917065521578 -0.005572742729490956 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.24299999999999602 0.12799999999999528 0.29300000000000537 0.5 1.0 0.0 0.0 0.5132450331125827 0.0 0.0 0.0 0.00075000000000001 1.0 0.0 0.0 0.0
40 400 2121.481323840121 0.0 5.0 14.0 301.8444412433197 465.3140721467163 1656.167251693402 0.7375601939637682 0.0 0.011971992408403876 -0.00503514687560739 0.018353367762623383 0.011971992408403876 -0.00503514687560739 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 0.242999999999996 0.12799999999999523 0.29300000000000537 0.5 1.0 0.0 0.0 0.5128373930217248 0.0 0.0 0.0 0.0007500000000000101 1.0 0.0 0.0 0.0
%% Automatically generated initial file with PhysiCell_CreateInitFile executable
0;0;-51.2137;-4.55442;-83.2907;8.5;-1;-1;-1;-1;-1;-1;0;1;23.3328;-1
0;0;-37.5888;-33.2832;-84.4271;9.8791;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-37.6541;-13.6737;-86.5638;8.5;-1;-1;-1;-1;-1;-1;0;1;56.6818;-1
0;0;-38.7093;0.223641;-85.6339;8.93259;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-35.4237;20.7316;-84.4495;10.0373;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-21.6863;-40.8023;-87.282;9.31441;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-20.457;-22.107;-86.0417;8.72424;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-21.191;-8.58699;-84.1779;8.68751;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-20.1745;10.7166;-86.0735;8.9461;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-22.5775;28.6424;-83.8703;9.1147;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-9.02799;-49.3179;-83.452;10.3831;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-6.88653;-30.1996;-87.0069;9.25676;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-6.70109;-17.1687;-86.3095;8.92614;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-6.68777;0.159854;-85.1603;10.1914;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-7.77875;19.9209;-83.5472;10.1998;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-7.84761;38.2974;-83.531;9.71243;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;7.60351;-40.894;-85.683;10.0896;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;5.94894;-24.3406;-83.397;10.0954;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;8.5685;-6.01829;-85.6375;8.76963;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;6.47517;10.8833;-86.7981;8.73724;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;7.74972;27.7539;-87.4803;8.84193;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;8.76834;45.41;-83.1479;10.2972;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;19.9542;-48.817;-84.3397;9.44966;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;23.8245;-34.3121;-86.4994;10.0918;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;20.599;-15.664;-85.0455;8.5;-1;-1;-1;-1;-1;-1;0;1;146.084;-1
0;0;22.5894;3.45774;-86.9589;8.58914;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;23.975;20.4049;-84.5403;8.88816;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;23.4088;37.8392;-84.8241;9.8457;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;35.923;-39.8056;-83.6807;9.99562;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;35.2746;-26.0117;-86.1669;8.5;-1;-1;-1;-1;-1;-1;0;1;44.2061;-1
0;0;37.2275;-5.58403;-85.3156;10.2046;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;36.2089;11.1301;-83.5743;10.2277;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;37.3746;26.7552;-83.8608;10.0868;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-70.5057;-14.7296;-69.1699;9.3986;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-57.77;-39.1177;-71.2849;9.97762;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-56.5964;-25.7059;-72.4555;9.30194;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-54.3462;-8.93067;-70.9266;8.5;-1;-1;-1;-1;-1;-1;0;1;30.6006;-1
0;0;-56.197;10.0026;-69.7403;10.3383;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-57.7468;28.4292;-71.3538;8.5;-1;-1;-1;-1;-1;-1;0;1;143.144;-1
0;0;-54.5719;46.9411;-68.3717;9.52835;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-41.4945;-51.2596;-72.7088;9.08313;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-41.2889;-29.884;-71.187;9.44447;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-42.3187;-17.0337;-69.4272;10.4347;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-39.3438;1.83237;-68.9845;8.5;-1;-1;-1;-1;-1;-1;0;1;11.2754;-1
0;0;-42.2973;16.7614;-68.753;8.5;-1;-1;-1;-1;-1;-1;0;1;130.186;-1
0;0;-42.564;34.2374;-69.8245;9.48534;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-41.2197;53.3538;-68.963;8.5;-1;-1;-1;-1;-1;-1;0;1;85.4119;-1
0;0;-26.3138;-57.0233;-70.1267;8.69547;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-28.3779;-42.914;-68.3804;10.4235;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-26.1849;-24.6927;-70.2968;8.78999;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-24.2139;-8.96024;-72.3287;8.5;-1;-1;-1;-1;-1;-1;0;1;52.418;-1
0;0;-26.7609;11.1367;-69.3157;9.33999;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-25.9136;26.784;-69.0695;10.0291;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-27.5315;43.6636;-70.7154;9.33376;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-27.1511;62.3571;-69.6168;9.79464;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-13.7277;-63.7381;-68.929;9.87774;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-13.8522;-48.1681;-68.4329;8.5;-1;-1;-1;-1;-1;-1;0;1;149.794;-1
0;0;-11.2932;-31.1591;-72.7621;8.91585;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-13.0105;-14.8985;-70.9625;9.29638;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-9.69915;2.16642;-72.1614;9.45092;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-11.4425;16.464;-70.5036;8.82064;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-11.6378;36.7025;-71.2798;9.09843;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-10.6213;55.1183;-70.1981;9.75011;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;2.42839;-56.3773;-68.5683;9.01971;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;4.27379;-40.3643;-72.4412;8.76763;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;3.14519;-22.6282;-68.3996;10.2393;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;4.93459;-8.27177;-71.8139;9.90275;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;2.19701;10.0154;-69.0748;8.5;-1;-1;-1;-1;-1;-1;0;1;17.3868;-1
0;0;4.57629;26.7876;-69.6667;8.5;-1;-1;-1;-1;-1;-1;0;1;149.892;-1
0;0;4.80925;45.7232;-70.9163;9.40266;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;3.59107;63.6778;-69.9177;9.87208;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;16.5055;-66.2895;-69.6918;9.33398;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;15.8373;-47.1268;-71.1983;8.71329;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;19.7814;-30.3375;-70.7784;10.2304;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;16.1407;-13.7382;-68.6453;8.5;-1;-1;-1;-1;-1;-1;0;1;151.411;-1
0;0;16.8303;1.02005;-71.2893;9.24351;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;16.0228;18.2707;-69.0918;8.72477;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;17.3892;35.5072;-70.6568;9.03495;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;19.5416;55.1154;-70.1706;10.194;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;31.1732;-57.8128;-69.489;8.5;-1;-1;-1;-1;-1;-1;0;1;160.61;-1
0;0;31.6423;-38.3552;-68.3793;9.87873;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;31.7888;-21.9021;-69.5883;8.5;-1;-1;-1;-1;-1;-1;0;1;154.406;-1
0;0;33.8074;-6.30923;-68.7781;9.53103;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;30.8196;12.4796;-71.8684;9.73152;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;33.8598;28.5021;-68.486;10.0382;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;34.0925;43.6135;-71.9384;8.5;-1;-1;-1;-1;-1;-1;0;1;148.902;-1
0;0;46.518;-51.3474;-68.5256;9.61922;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;46.4042;-30.425;-71.9997;9.01313;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;47.4938;-13.2805;-71.9913;9.9526;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;45.1883;1.43848;-69.0932;8.5;-1;-1;-1;-1;-1;-1;0;1;118.826;-1
0;0;47.6824;16.9535;-68.4544;10.3912;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;49.0084;36.903;-71.9228;10.2103;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;46.9926;54.2787;-68.5909;8.5;-1;-1;-1;-1;-1;-1;0;1;72.4531;-1
0;0;59.7823;-25.7485;-72.1046;10.0688;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;62.6008;-5.53068;-71.9585;8.73835;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;61.2494;9.98591;-68.8134;9.81409;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-80.4536;-8.30731;-55.2779;9.69228;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-80.0676;12.536;-54.4407;8.7296;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-65.6547;-48.1027;-54.3077;10.1245;-1;-1;-1;-1;-1;-1;0;0;0;-1
0;0;-67.905;-34.1545;-55.0026;8.95215;-1;-1;-1;-1;-1;-1;0;0;0;-1
\ No newline at end of file
This diff is collapsed.
......@@ -472,7 +472,21 @@ void Cell_Container::update_all_cells(double t, double phenotype_dt_ , double me
pC->update_position(time_since_last_mechanics, world, cart_topo);
}
}
/* As per David's suggestion, writing "sort of time-step" into the CELLS_RANK_* file for each process */
static int send_recv_counter = 0;
if(no_cells_cross_left > 0 || no_cells_cross_right > 0 || no_of_cells_from_left > 0 || no_of_cells_from_right > 0)
{
std::string filename="CELLS_RANK_";
filename = filename + std::to_string(world.rank);
std::ofstream ofile;
ofile.open(filename,std::ios::app);
ofile<<"--->SENDING RECEIVING CYCLE NO.:"<<send_recv_counter<<std::endl<<std::endl;
send_recv_counter += 1;
ofile.close();
}
pack(all_cells, world, cart_topo);
for(int i=0; i < (*all_cells).size(); i++)
......@@ -489,27 +503,7 @@ void Cell_Container::update_all_cells(double t, double phenotype_dt_ , double me
i = i - 1;
}
/*=======================DELETE LATER===============================================*/
//Checking for uniqueness of IDs - later delete
// for(int temp_rank = 0; temp_rank < world.size; temp_rank++)
// {
// if(temp_rank == world.rank)
// {
// std::cout<<"IDs for Rank = "<<world.rank <<std::endl;
// for(int i=0; i < (*all_cells).size(); i++)
// {
// for(int j=i+1; j < (*all_cells).size(); j++)
// {
// if((*all_cells)[i]->ID == (*all_cells)[j]->ID)
// std::cout<<"Found a duplicate ID on Rank="<<world.rank<<std::endl;
// }
// }
// std::cout<<std::endl;
// }
// MPI_Barrier(cart_topo.mpi_cart_comm);
// }
/*=======================DELETE LATER===============================================*/
//Checking for uniqueness ends
......@@ -521,6 +515,32 @@ void Cell_Container::update_all_cells(double t, double phenotype_dt_ , double me
);
unpack(world, cart_topo);
/*=======================DELETE LATER===============================================*/
//Checking for uniqueness of IDs - later delete
//As per David's suggestion moving this "checking" code to AFTER pack/send/receive/unpack
//to make sure there is no duplicate cell
for(int temp_rank = 0; temp_rank < world.size; temp_rank++)
{
if(temp_rank == world.rank)
{
//std::cout<<"IDs for Rank = "<<world.rank <<std::endl;
for(int i=0; i < (*all_cells).size(); i++)
{
for(int j=i+1; j < (*all_cells).size(); j++)
{
if((*all_cells)[i]->ID == (*all_cells)[j]->ID)
std::cout<<"Found a duplicate ID on Rank="<<world.rank<<std::endl;
}
}
std::cout<<std::endl;
}
MPI_Barrier(cart_topo.mpi_cart_comm);
}
/*=======================DELETE LATER===============================================*/
MPI_Barrier(cart_topo.mpi_cart_comm);
// Update cell indices in the container because some cells 'could' have moved to new voxels
for( int i=0; i < (*all_cells).size(); i++ )
......
import os
import json
import glob
import pandas as pd
from scipy.io import loadmat
import xml.etree.ElementTree as ET
class Metadata(object):
def __init__(self, tree):
root = tree.getroot()
metadata_node = root.findall("metadata")[0]
node = metadata_node.findall("current_time")[0]
self._current_time = int(float(node.text))
self._time_units = node.attrib['units']
node = metadata_node.findall("current_runtime")[0]
self._current_runtime = float(node.text)
self._runtime_units = node.attrib['units']
micro_env_node = root.findall("microenvironment")[0]
node = micro_env_node.findall("domain")[0]
node = node.findall("mesh")[0]
self._spatial_units = node.attrib['units']
@property
def current_time(self):
return self._current_runtime
@property
def time_units(self):
return self._time_units
@property
def current_runtime(self):
return self._current_runtime
@property
def runtime_units(self):
return self._runtime_units
@property
def spatial_units(self):
return self._spatial_units
class MultiCellDS(object):
def __init__(self, output_folder="./", xml_fname="initial.xml", sep="_"):
self._param_folder = os.path.join(os.path.dirname(__file__), "params")
self._globing = os.path.join(output_folder, "output*.xml")
self._separator = sep
self._output_folder = output_folder
self._phases_dict = {}
self._load_defaul_phasedict()
self._phase_grouping = {}
self._load_defaul_phasegrouping()
xml_fname = os.path.join(output_folder, xml_fname)
self._tree = ET.parse(xml_fname)
self._metadata = Metadata(self._tree)
self._cell_columns = self._get_cell_columns()
self._microenvironment_columns = self._get_microenvironment_columns()
def _get_time_units(self):
root = self._tree.getroot()
node = root.findall("metadata")[0]
node = node.findall("current_time")[0]
units = node.attrib['units']
return units
def _get_cell_info_recursive(self, node):
childs = [i for i in node]
if len(childs) == 0:
return None
for child in childs:
if child.tag != "simplified_data":
continue
if child.attrib["source"] == "PhysiCell":
return child
return self._get_cell_info_recursive(childs[0])
def _get_cell_columns(self):
root = self._tree.getroot()
node = root.findall("cellular_information")[0]
node = self._get_cell_info_recursive(node)
cellular_info_node = node.findall("labels")[0]
cell_columns = []
for child in cellular_info_node:
column = child.text
index = child.attrib["index"]
size = int(child.attrib["size"])
if size == 1:
cell_columns.append(column)
continue
for i, v in enumerate(['x', 'y', 'x']):
cell_columns.append(v + self._separator + column)
if i == size:
break
return cell_columns
def _get_microenvironment_columns(self):
root = self._tree.getroot()
node = root.findall("microenvironment")[0]
node = node.findall("domain")[0]
node = node.findall("variables")[0]
columns = []
for child in node.findall("variable"):
name = child.attrib['name']
units = child.attrib['units']
ID = child.attrib['ID']
columns.append((name, units, ID))
return columns
def _load_defaul_phasedict(self):
phasedict_fname = os.path.join(self._param_folder, "cell_phases_dict.json")
phases_dict = {}
with open(phasedict_fname) as fh:
phases_dict = json.load(fh)
phases_dict = {int(k):v for k,v in phases_dict.items()}
self._phases_dict = phases_dict
def _load_defaul_phasegrouping(self):
phasedict_fname = os.path.join(self._param_folder, "phases_grouping_dict.json")
phase_grouping = {}
with open(phasedict_fname) as fh:
phase_grouping = json.load(fh)
self._phase_grouping = phase_grouping
@property
def current_time(self):
return self._metadata.current_runtime
@property
def time_units(self):
return self._metadata.time_units
@property
def current_runtime(self):
return self._metadata.current_runtime
@property
def runtime_units(self):
return self._metadata.runtime_units
@property
def spatial_units(self):
return self._metadata.spatial_units
@property
def cell_columns(self):
return self._cell_columns
@property
def microenvironment_columns(self):
return self._microenvironment_columns
@property
def phases_dict(self):
return self._phases_dict
@property
def phase_grouping(self):
return self._phase_grouping
def read_matlab_mat(self, fname, column):
stru = loadmat(fname)
data = stru[column]
return data
def get_time(self, tree):
root = tree.getroot()
node = root.findall("metadata")[0]
node = node.findall("current_time")[0]
time = int(float(node.text))
return time
def cells_file_count(self):
return len(glob.glob(self._globing))
def get_cells_fname(self, tree):
root = tree.getroot()
node = root.findall("cellular_information")[0]
node = self._get_cell_info_recursive(node)
node = node.findall("filename")[0]
return node.text
def get_cells_matrix(self, tree):
matfile = self.get_cells_fname(tree)
matfile = os.path.join(self._output_folder, matfile)
data = self.read_matlab_mat(matfile, "cells")
return data.T
def cells_as_matrix_iterator(self):
xml_list = sorted(glob.glob(self._globing))
for xml_fname in xml_list:
tree = ET.parse(xml_fname)
cell_matrix = self.get_cells_matrix(tree)
time = self.get_time(tree)
yield (time, cell_matrix)
def cells_as_frames_iterator(self):
xml_list = sorted(glob.glob(self._globing))
for xml_fname in xml_list:
tree = ET.parse(xml_fname)
cell_matrix = self.get_cells_matrix(tree)
df = pd.DataFrame(cell_matrix, columns=self._cell_columns)
df = df.set_index("ID")
time = self.get_time(tree)
yield (time, df)
def get_microenvironment_fname(self, tree):
root = tree.getroot()
node = root.findall("microenvironment")[0]
node = node.findall("domain")[0]
node = node.findall("data")[0]