Commit 7d507970 authored by gsaxena's avatar gsaxena
Browse files

Large commit in the sense that PhysiBoss TNF MPI example is working now :

(1) Multiple problems were there - wrong configuration file (bug chasing for 1.5 months)
(2) Corner case where cell crosses sub-domain AND cell goes out of domain case was not accounted for in update_position() function.
(3) In Miguel's function added : if (pCell->is_out_of_domain) ... in one of his files where he's accessing an index.
parent 552b5ca2
......@@ -378,7 +378,7 @@ int Basic_Agent::get_current_voxel_index( void )
}
std::vector<double>& Basic_Agent::nearest_density_vector( void )
{
{
return microenvironment->nearest_density_vector( current_voxel_index );
}
......
This diff is collapsed.
......@@ -66,7 +66,7 @@ MaBoSSIntracellular::MaBoSSIntracellular(std::vector<char>& buffer, int& len_buf
MPI_Unpack(&buffer[0], len_buffer, &position, &(this->time_step), 1, MPI_DOUBLE, MPI_COMM_WORLD);
MPI_Unpack(&buffer[0], len_buffer, &position, &temp_int, 1, MPI_INT, MPI_COMM_WORLD);
this->discrete_time = temp_int == 1 ? true : false;
this->discrete_time = (temp_int == 1 ? true : false); //Gaurav Saxena added parenthesis for clarity
MPI_Unpack(&buffer[0], len_buffer, &position, &(this->time_tick), 1, MPI_DOUBLE, MPI_COMM_WORLD);
MPI_Unpack(&buffer[0], len_buffer, &position, &(this->scaling), 1, MPI_DOUBLE, MPI_COMM_WORLD);
......@@ -147,7 +147,7 @@ void MaBoSSIntracellular::pack(std::vector<char>& buffer, int& len_buffer, int&
int temp_int;
double temp_double;
std::string temp_str;
unsigned int len_str = 0;
int len_str = 0; //This was unsigned int, Gaurav Saxena changed it to simple int.
temp_str = this->bnd_filename;
len_str = temp_str.length();
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
###############################################################################
# If you use PhysiCell in your project, please cite PhysiCell and the version #
# number, such as below: #
# #
# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. #
# #
# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, #
# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- #
# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 #
# DOI: 10.1371/journal.pcbi.1005991 #
# #
# See VERSION.txt or call get_PhysiCell_version() to get the current version #
# x.y.z. Call display_citations() to get detailed information on all cite-#
# able software used in your PhysiCell application. #
# #
# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM #
# as below: #
# #
# We implemented and solved the model using PhysiCell (Version x.y.z) [1], #
# with BioFVM [2] to solve the transport equations. #
# #
# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, #
# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- #
# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 #
# DOI: 10.1371/journal.pcbi.1005991 #
# #
# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- #
# llelized diffusive transport solver for 3-D biological simulations, #
# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 #
# #
###############################################################################
# #
# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) #
# #
# Copyright (c) 2015-2018, Paul Macklin and the PhysiCell Project #
# All rights reserved. #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided that the following conditions are met: #
# #
# 1. Redistributions of source code must retain the above copyright notice, #
# this list of conditions and the following disclaimer. #
# #
# 2. Redistributions in binary form must reproduce the above copyright #
# notice, this list of conditions and the following disclaimer in the #
# documentation and/or other materials provided with the distribution. #
# #
# 3. Neither the name of the copyright holder nor the names of its #
# contributors may be used to endorse or promote products derived from this #
# software without specific prior written permission. #
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" #
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE #
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE #
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE #
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR #
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS #
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN #
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) #
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE #
# POSSIBILITY OF SUCH DAMAGE. #
# #
###############################################################################
*/
-->
<!--
<user_details />
-->
<PhysiCell_settings version="devel-version">
<domain>
<x_min>-100</x_min>
<x_max>100</x_max>
<y_min>-100</y_min>
<y_max>100</y_max>
<z_min>-100</z_min>
<z_max>100</z_max>
<dx>10</dx>
<dy>10</dy>
<dz>10</dz>
<use_2D>false</use_2D>
</domain>
<overall>
<max_time units="min">800</max_time> <!-- 1400 -->
<time_units>min</time_units>
<space_units>micron</space_units>
<dt_diffusion units="min">0.02</dt_diffusion>
<dt_mechanics units="min">0.1</dt_mechanics>
<dt_phenotype units="min">2</dt_phenotype>
</overall>
<parallel>
<omp_num_threads>1</omp_num_threads>
</parallel>
<save>
<folder>output</folder> <!-- use . for root -->
<full_data>
<interval units="min">100</interval>
<enable>true</enable>
</full_data>
<SVG>
<interval units="min">100</interval>
<enable>true</enable>
</SVG>
<legacy_data>
<enable>true</enable>
</legacy_data>
</save>
<microenvironment_setup>
<variable name="oxygen" units="mmHg" ID="0">
<physical_parameter_set>
<diffusion_coefficient units="micron^2/min">100000.0</diffusion_coefficient>
<decay_rate units="1/min">.1</decay_rate>
</physical_parameter_set>
<initial_condition units="mmHg">38.0</initial_condition>
<Dirichlet_boundary_condition units="mmHg" enabled="true">38.0</Dirichlet_boundary_condition>
</variable>
<variable name="tnf" units="TNF/um^3" ID="1">
<physical_parameter_set>
<diffusion_coefficient units="micron^2/min">1200.0</diffusion_coefficient>
<decay_rate units="1/min">.0275</decay_rate>
</physical_parameter_set>
<initial_condition units="molecules/voxel">0.0</initial_condition>
<Dirichlet_boundary_condition units="molecules/voxel" enabled="false">0.0</Dirichlet_boundary_condition>
</variable>
<options>
<calculate_gradients>true</calculate_gradients>
<track_internalized_substrates_in_each_agent>true</track_internalized_substrates_in_each_agent>
<!-- not yet supported -->
<initial_condition type="matlab" enabled="false">
<filename>./config/initial.mat</filename>
</initial_condition>
<!-- not yet supported -->
<dirichlet_nodes type="matlab" enabled="false">
<filename>./config/dirichlet.mat</filename>
</dirichlet_nodes>
</options>
</microenvironment_setup>
<cell_definitions>
<cell_definition name="default" ID="0">
<phenotype>
<cycle code="5" name="live_cells_cycle_model">
<!-- using higher than normal significant digits to match divisions in default code -->
<transition_rates units="1/min">
<!-- Cycle duration -->
<rate start_index="0" end_index="0" fixed_duration="false">0.00075</rate>
</transition_rates>
</cycle>
<death>
<model code="100" name="apoptosis">
<rate units="1/min">5.31667e-05</rate>
<transition_rates units="1/min">
<rate start_index="0" end_index="1" fixed_duration="true">0.00193798</rate>
</transition_rates>
<parameters>
<unlysed_fluid_change_rate units="1/min">0.05</unlysed_fluid_change_rate>
<lysed_fluid_change_rate units="1/min">0</lysed_fluid_change_rate>
<cytoplasmic_biomass_change_rate units="1/min">1.66667e-02</cytoplasmic_biomass_change_rate>
<nuclear_biomass_change_rate units="1/min">5.83333e-03</nuclear_biomass_change_rate>
<calcification_rate units="1/min">0</calcification_rate>
<relative_rupture_volume units="dimensionless">2.0</relative_rupture_volume>
</parameters>
</model>
<model code="101" name="necrosis">
<rate units="1/min">0.0</rate>
<transition_rates units="1/min">
<rate start_index="0" end_index="1" fixed_duration="false">9e9</rate>
<rate start_index="1" end_index="2" fixed_duration="true">1.15741e-5</rate>
</transition_rates>
<parameters>
<unlysed_fluid_change_rate units="1/min">0.05</unlysed_fluid_change_rate>
<lysed_fluid_change_rate units="1/min">0</lysed_fluid_change_rate>
<cytoplasmic_biomass_change_rate units="1/min">1.66667e-02</cytoplasmic_biomass_change_rate>
<nuclear_biomass_change_rate units="1/min">5.83333e-03</nuclear_biomass_change_rate>
<calcification_rate units="1/min">0</calcification_rate>
<relative_rupture_volume units="dimensionless">2.0</relative_rupture_volume>
</parameters>
</model>
</death>
<secretion>
<substrate name="oxygen">
<secretion_rate units="1/min">0</secretion_rate>
<secretion_target units="substrate density">38</secretion_target>
<uptake_rate units="1/min">10</uptake_rate>
<net_export_rate units="total substrate/min">0</net_export_rate>
</substrate>
<substrate name="tnf">
<secretion_rate units="1/min">0</secretion_rate>
<secretion_target units="substrate density">0</secretion_target>
<uptake_rate units="1/min">0</uptake_rate>
<net_export_rate units="total substrate/min">0</net_export_rate>
</substrate>
</secretion>
<molecular />
<intracellular type="maboss">
<bnd_filename>./config/TNF_nodes.bnd</bnd_filename>
<cfg_filename>./config/TNF_conf.cfg</cfg_filename>
<time_step>10</time_step>
</intracellular>
</phenotype>
<custom_data>
<!-- Time steps for maboss update-->
<next_physiboss_run units="dimensionless">10.</next_physiboss_run>
<!-- Molecular model internal variables-->
<TNFR_binding_rate type="double" units="1/min" description="TNF receptor binding rate">0.243</TNFR_binding_rate> <!-- 0.243 -->
<TNFR_endocytosis_rate type="double" units="1/min" description="TNF receptor-TNF endocytosis rate">0.128</TNFR_endocytosis_rate>
<TNFR_recycling_rate type="double" units="1/min" description="TNF receptor recycling">0.293</TNFR_recycling_rate>
<TNFR_activation_threshold type="double" units="" description="TNFR threshold to update booleano model input">0.5</TNFR_activation_threshold>
<TNFR_receptors_per_cell type="double" units="dimensionless" description="number of TNFR receptors per cell">1.0</TNFR_receptors_per_cell>
<TNF_net_production_rate type="double" units="TNF/cell/min" description="The total TNF produced by the cell when NFkB is active">0</TNF_net_production_rate> <!-- 0.5 ng/mL -->
<!-- Auxiliary variables used to monitorize simulation-->
<tnf_node units="dimensionless">0</tnf_node>
<fadd_node units="dimensionless">0</fadd_node>
<nfkb_node units="dimensionless">0</nfkb_node>
<external_tnf units="TNF/um^3">0</external_tnf>
</custom_data>
</cell_definition>
</cell_definitions>
<user_parameters>
<random_seed type="int" units="dimensionless">0</random_seed>
<!-- example parameters from the template -->
<!-- init file -->
<init_cells_filename type="string" units="">./config/init.txt</init_cells_filename>
<!-- <bnd_file type="string" units="">./config/boolean_network/TNF_nodes.bnd</bnd_file>
<cfg_file type="string" units="">./config/boolean_network/TNF_conf.cfg</cfg_file>
<maboss_time_step type="double" units="dimensionless">10.</maboss_time_step> -->
<time_add_tnf type="int" units="min">50</time_add_tnf> <!-- 150 -->
<duration_add_tnf type="int" units="min">10</duration_add_tnf> <!-- 10 -->
<concentration_tnf type="double" units="TNF/um^3"> 0.02 </concentration_tnf> <!-- 0.5 ng/mL -->
<time_remove_tnf type="int" units="min">100000</time_remove_tnf> <!-- 8000 -->
<membrane_length type="int" units=""> 70 </membrane_length> <!-- 470 -->
<update_pc_parameters_O2_based type="bool" units="">false</update_pc_parameters_O2_based>
</user_parameters>
</PhysiCell_settings>
This diff is collapsed.
%% 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
......@@ -778,7 +778,7 @@ Cell* Cell::divide(int p_ID, mpi_Environment &world, mpi_Cartesian &cart_topo)
is_out_of_domain = true;
is_active = false;
is_movable = false;
std::cout<<"Cell ID"<<this->ID<<" is out of domain"<<std::endl;
//std::cout<<"Cell ID"<<this->ID<<" is out of domain"<<std::endl;
}
/*-----------------------------------------------------------------------------------*/
......@@ -797,10 +797,10 @@ Cell* Cell::divide(int p_ID, mpi_Environment &world, mpi_Cartesian &cart_topo)
// child->set_phenotype( phenotype );
child->phenotype = phenotype;
if (child->phenotype.intracellular)
child->phenotype.intracellular->start();
// #ifdef ADDON_PHYSIDFBA
// child->fba_model = this->fba_model;
// #endif
......@@ -1177,6 +1177,22 @@ void Cell::update_position( double dt, mpi_Environment &world, mpi_Cartesian &ca
//std::cout<<"Rank="<<world.rank<<" Cell ID="<<ID<<" Old Position:("<<old_position[0]<<","<<old_position[1]<<","<<old_position[2]<<")"<<std::endl;
//std::cout<<"Rank="<<world.rank<<" Cell ID="<<ID<<" New Position:("<<position[0]<<","<<position[1]<<","<<position[2]<<")"<<std::endl;
//std::cout<<"Crossed to left ="<<crossed_to_left_subdomain<<" Crossed to right ="<<crossed_to_right_subdomain<<std::endl;
/* There is a possibility that (1) Cell might cross to left/right sub-domain */
/* AND (2) because of the new Y/Z coordinate, it goes out of the domain */
/* In this case, we need to set: crossed_to_left/right_subdomain as false */
/* We do NOT want such a cell to be packed/unpacked as it has gone out of domain */
if(get_container()->underlying_mesh.is_position_valid(position[0],position[1],position[2]) == false)
{
updated_current_mechanics_voxel_index=-1;
is_out_of_domain = true;
is_active = false;
is_movable = false;
crossed_to_left_subdomain = false;
crossed_to_right_subdomain = false;
}
}
......@@ -2199,12 +2215,14 @@ void Cell::print_cell(mpi_Environment &world)
if(this->phenotype.cycle.data.pCycle_Model != NULL)
ofile<<"pCycle_Model is NOT NULL"<<std::endl;
ofile<<"time_units:"<<this->phenotype.cycle.data.time_units<<std::endl;
*/
for(int i=0; i<this->phenotype.cycle.data.transition_rates.size();i++)
{
ofile<<"Transition Rates Vector:"<<i<<std::endl;
for(int j=0; j<this->phenotype.cycle.data.transition_rates[i].size();j++)
ofile<<"rate "<<j<<":"<<this->phenotype.cycle.data.transition_rates[i][j]<<std::endl;
}
/*
ofile<<"current_phase_index:"<<this->phenotype.cycle.data.current_phase_index<<std::endl;
ofile<<"elapsed_time_in_phase:"<<this->phenotype.cycle.data.elapsed_time_in_phase<<std::endl;
......@@ -2304,39 +2322,43 @@ void Cell::print_cell(mpi_Environment &world)
for(int i=0; i<this->phenotype.molecular.fraction_transferred_when_ingested.size();i++)
ofile<<"fraction_transferred_when_ingested "<<i<<":"<<this->phenotype.molecular.fraction_transferred_when_ingested[i]<<std::endl;
// if (this->phenotype.intracellular != NULL) {
// ofile<<"=> class Cell { class Phenotype { class Intracellular { "<<std::endl;
// #ifdef ADDON_PHYSIBOSS
// if (this->phenotype.intracellular->intracellular_type.compare("maboss") == 0) {
//
// MaBoSSIntracellular* t_intracellular = static_cast<MaBoSSIntracellular*>(this->phenotype.intracellular);
//
// ofile<<"bnd_file:"<<t_intracellular->get_bnd_filename()<<std::endl;
// ofile<<"cfg_file:"<<t_intracellular->get_cfg_filename()<<std::endl;
// ofile<<"time_step:"<<t_intracellular->time_step<<std::endl;
// ofile<<"discrete_time:"<<t_intracellular->discrete_time<<std::endl;
// ofile<<"time_tick:"<<t_intracellular->time_tick<<std::endl;
// ofile<<"scaling:"<<t_intracellular->scaling<<std::endl;
//
// for (auto t_mutation: t_intracellular->mutations)
// ofile<<"mutation:"<<t_mutation.first<<"="<<t_mutation.second<<std::endl;
//
// for (auto t_initial_value: t_intracellular->initial_values)
// ofile<<"initial_value:"<<t_initial_value.first<<"="<<t_initial_value.second<<std::endl;
//
// for (auto t_parameter: t_intracellular->parameters)
// ofile<<"parameter:"<<t_parameter.first<<"="<<t_parameter.second<<std::endl;
//
// ofile<<"next_run:"<<t_intracellular->next_physiboss_run<<std::endl;
// ofile<<"time_to_update:"<<t_intracellular->maboss.get_time_to_update()<<std::endl;
// ofile<<"state:"<<t_intracellular->get_state()<<std::endl;
// }
// #endif
// }
*/
if (this->phenotype.intracellular != NULL) {
ofile<<"=> class Cell { class Phenotype { class Intracellular { "<<std::endl;
#ifdef ADDON_PHYSIBOSS
if (this->phenotype.intracellular->intracellular_type.compare("maboss") == 0) {
MaBoSSIntracellular* t_intracellular = static_cast<MaBoSSIntracellular*>(this->phenotype.intracellular);
ofile<<"bnd_file:"<<t_intracellular->get_bnd_filename()<<std::endl;
ofile<<"cfg_file:"<<t_intracellular->get_cfg_filename()<<std::endl;
ofile<<"time_step:"<<t_intracellular->time_step<<std::endl;
ofile<<"discrete_time:"<<t_intracellular->discrete_time<<std::endl;
ofile<<"time_tick:"<<t_intracellular->time_tick<<std::endl;
ofile<<"scaling:"<<t_intracellular->scaling<<std::endl;
for (auto t_mutation: t_intracellular->mutations)
ofile<<"mutation:"<<t_mutation.first<<"="<<t_mutation.second<<std::endl;
for (auto t_initial_value: t_intracellular->initial_values)
ofile<<"initial_value:"<<t_initial_value.first<<"="<<t_initial_value.second<<std::endl;
for (auto t_parameter: t_intracellular->parameters)
ofile<<"parameter:"<<t_parameter.first<<"="<<t_parameter.second<<std::endl;
ofile<<"next_run:"<<t_intracellular->next_physiboss_run<<std::endl;
ofile<<"time_to_update:"<<t_intracellular->maboss.get_time_to_update()<<std::endl;
ofile<<"state:"<<t_intracellular->get_state()<<std::endl;
}
#endif
}
ofile<<"=> class Cell { "<<std::endl;
ofile<<"is_out_of_domain:"<<is_out_of_domain<<std::endl;
ofile<<"is_movable:"<<is_movable<<std::endl;
/*
for(int i=0; i<displacement.size(); i++)
ofile<<"Displacement["<<i<<"]:"<<displacement[i]<<std::endl;
......@@ -2487,7 +2509,6 @@ void Cell_Container::pack(std::vector<Cell*> *all_cells, mpi_Environment &world,
//std::cout<<"Total cells crossing to left in Rank "<<world.rank<<":"<<no_cells_cross_left<<std::endl;
//std::cout<<"Total cells crossing to right in Rank "<<world.rank<<":"<<no_cells_cross_right<<std::endl;
std::vector<int> list_cell_IDs ;
/* IMPORTANT: CANNOT USE #pragma omp for HERE AS ALL THREADS WILL WRITE TO THE SAME SHARED BUFFER */
for(int i=0; i<(*all_cells).size();i++)
{
......@@ -2498,8 +2519,6 @@ void Cell_Container::pack(std::vector<Cell*> *all_cells, mpi_Environment &world,
//pCell->crossed_to_left_subdomain = false; //RESET IT BUT LATER REMOVE THIS LINE
/* Cell ID first - needed to create a cell */
list_cell_IDs.push_back(pCell->ID);
len_snd_buf_left = position_left + sizeof(pCell->ID);
snd_buf_left.resize(len_snd_buf_left);
MPI_Pack(&(pCell->ID), 1, MPI_INT, &snd_buf_left[0], len_snd_buf_left, &position_left, MPI_COMM_WORLD);
......@@ -3341,7 +3360,7 @@ void Cell_Container::pack(std::vector<Cell*> *all_cells, mpi_Environment &world,
MPI_Pack(&len_vector, 1, MPI_INT, &snd_buf_left[0], len_snd_buf_left, &position_left, MPI_COMM_WORLD);
MPI_Pack(&(pCell->velocity[0]), len_vector, MPI_DOUBLE, &snd_buf_left[0], len_snd_buf_left, &position_left, MPI_COMM_WORLD);
pCell->print_cell(world);
//pCell->print_cell(world);
}
......@@ -3355,7 +3374,6 @@ void Cell_Container::pack(std::vector<Cell*> *all_cells, mpi_Environment &world,
//pCell->crossed_to_right_subdomain = false; //RESET IT BUT LATER REMOVE THIS LINE
/* Cell ID first - needed to create a cell */
list_cell_IDs.push_back(pCell->ID);
len_snd_buf_right = position_right + sizeof(pCell->ID);
snd_buf_right.resize(len_snd_buf_right);
......@@ -4192,33 +4210,26 @@ void Cell_Container::pack(std::vector<Cell*> *all_cells, mpi_Environment &world,
MPI_Pack(&len_vector, 1, MPI_INT, &snd_buf_right[0], len_snd_buf_right, &position_right, MPI_COMM_WORLD);
MPI_Pack(&(pCell->velocity[0]), len_vector, MPI_DOUBLE, &snd_buf_right[0], len_snd_buf_right, &position_right, MPI_COMM_WORLD);
pCell->print_cell(world);
//pCell->print_cell(world);
}
}
if(no_cells_cross_left > 0)
{
std::cout<<"+++PACKING+++"<<std::endl;
std::cout<<"Rank = " << world.rank << std::endl;
std::cout<<"Cells going to left = " << no_cells_cross_left << std::endl;
std::cout<<"Buffer size for cells going to left: " << snd_buf_left.size() << std::endl;
}
if(no_cells_cross_right > 0)
{
std::cout<<"+++PACKING+++"<<std::endl;
std::cout<<"Rank = " << world.rank << std::endl;
std::cout<<"Cells going to right = " << no_cells_cross_right << std::endl;
std::cout<<"Buffer size for cells going to right: " << snd_buf_right.size() << std::endl;
}
sort(list_cell_IDs.begin(), list_cell_IDs.end());
for(auto x : list_cell_IDs)
std::cout<< x << "-->";
list_cell_IDs.clear();
// if(no_cells_cross_left > 0)
// {
// std::cout<<"+++PACKING+++"<<std::endl;
// std::cout<<"Rank = " << world.rank << std::endl;
// std::cout<<"Cells going to left = " << no_cells_cross_left << std::endl;
// std::cout<<"Buffer size for cells going to left: " << snd_buf_left.size() << std::endl;
// }
//
// if(no_cells_cross_right > 0)
// {
// std::cout<<"+++PACKING+++"<<std::endl;
// std::cout<<"Rank = " << world.rank << std::endl;
// std::cout<<"Cells going to right = " << no_cells_cross_right << std::endl;
// std::cout<<"Buffer size for cells going to right: " << snd_buf_right.size() << std::endl;
// }
}
......@@ -4260,23 +4271,22 @@ void Cell_Container::unpack(mpi_Environment &world, mpi_Cartesian &cart_topo)
int len_vector = 0;
int len_vector_nest = 0;