Skip to content

Commit 37b970c

Browse files
authored
Merge pull request #343 from MathCancer/development
PhysiCell 1.14.1 release
2 parents 5055595 + b7d8f15 commit 37b970c

File tree

99 files changed

+6044
-4450
lines changed

Some content is hidden

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

99 files changed

+6044
-4450
lines changed

.github/workflows/build_binaries.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
pull_request:
66
release:
7-
types: [created]
7+
types: [published]
88

99
jobs:
1010

@@ -124,29 +124,34 @@ jobs:
124124
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
125125
]
126126

127-
runs-on: macos-12
127+
runs-on: macos-13
128128

129129
steps:
130130
- uses: actions/checkout@v4
131131

132132
- name: Install dependencies
133-
run : brew install gcc@13
133+
run : |
134+
if ! brew list gcc@13 &>/dev/null; then
135+
brew install gcc@13
136+
else
137+
echo "gcc@13 is already installed."
138+
fi
134139
135140
- name: Build ${{ matrix.projects.name }} project
136141
run: |
137-
export MACOSX_DEPLOYMENT_TARGET=12
142+
export MACOSX_DEPLOYMENT_TARGET=13
138143
make ${{ matrix.projects.project }}
139144
make clean
140145
${{ matrix.projects.extra_run }}
141146
make PHYSICELL_CPP=g++-13 static
142-
cp ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macos12
147+
cp ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macos13
143148
144149
- name: Caching produced project binary
145150
uses: actions/cache@v4
146151
with:
147152
path: |
148-
${{ github.workspace }}/${{ matrix.projects.binary }}_macos12
149-
key: ${{ runner.os }}-macos12-${{ github.run_id }}
153+
${{ github.workspace }}/${{ matrix.projects.binary }}_macos13
154+
key: ${{ runner.os }}-macos13-${{ github.run_id }}
150155

151156
- name: Look at the generated binary
152157
run: |
@@ -174,11 +179,16 @@ jobs:
174179
- uses: actions/checkout@v4
175180

176181
- name: Install dependencies
177-
run : brew install gcc@13
182+
run : |
183+
if ! brew list gcc@13 &>/dev/null; then
184+
brew install gcc@13
185+
else
186+
echo "gcc@13 is already installed."
187+
fi
178188
179189
- name: Build ${{ matrix.projects.name }} project
180190
run: |
181-
export MACOSX_DEPLOYMENT_TARGET=12
191+
export MACOSX_DEPLOYMENT_TARGET=13
182192
make ${{ matrix.projects.project }}
183193
make clean
184194
${{ matrix.projects.extra_run }}
@@ -212,7 +222,7 @@ jobs:
212222
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
213223
]
214224

215-
runs-on: macos-12
225+
runs-on: macos-13
216226
needs: [macos_step0a, macos_step0b]
217227

218228
steps:
@@ -229,12 +239,12 @@ jobs:
229239
uses: actions/cache@v4
230240
with:
231241
path: |
232-
${{ github.workspace }}/${{ matrix.projects.binary }}_macos12
233-
key: ${{ runner.os }}-macos12-${{ github.run_id }}
242+
${{ github.workspace }}/${{ matrix.projects.binary }}_macos13
243+
key: ${{ runner.os }}-macos13-${{ github.run_id }}
234244

235245
- name: Creating universal binary
236246
run: |
237-
lipo -create -output ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macos12 ${{ matrix.projects.binary }}_macosm1
247+
lipo -create -output ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macos13 ${{ matrix.projects.binary }}_macosm1
238248
239249
- name: Checking universal binary
240250
run: |

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix:
1414
os: [
1515
{name: "Ubuntu", os: "ubuntu-latest", shell: "bash", compiler: "g++"},
16-
{name: "MacOS 12", os: "macos-12", shell: "bash", compiler: "g++-12"},
16+
{name: "MacOS 13", os: "macos-13", shell: "bash", compiler: "g++-12"},
1717
{name: "MacOS 14 (M1)", os: "macos-14", shell: "bash", compiler: "g++-13"},
1818
{name: "Windows", os: "windows-latest", shell: "msys2", compiler: "g++"},
1919
]
@@ -32,6 +32,8 @@ jobs:
3232
{project: "custom-division-sample", name: "PhysiCell custom division", binary: "project", config: "config/PhysiCell_settings.xml", max_time: 120, output_folder: ""},
3333
{project: "interaction-sample", name: "PhysiCell interactions", binary: "interaction_demo", config: "config/PhysiCell_settings.xml", max_time: 120, output_folder: ""},
3434
{project: "pred-prey-farmer", name: "PhysiCell prey predator", binary: "pred_prey", config: "config/PhysiCell_settings.xml", max_time: 120, output_folder: ""},
35+
{project: "rules-sample", name: "PhysiCell rules sample", binary: "rules_sample", config: "config/PhysiCell_settings.xml", max_time: 120, output_folder: ""},
36+
{project: "asymmetric-division-sample", name: "PhysiCell asymmetric division", binary: "project", config: "config/PhysiCell_settings.xml", max_time: 120, output_folder: ""}
3537
]
3638

3739
name: Testing ${{ matrix.projects.name }} on ${{ matrix.os.name }}
@@ -53,7 +55,7 @@ jobs:
5355

5456
- name: Build ${{ matrix.projects.name }} project
5557
run: |
56-
make data-cleanup && make ${{ matrix.projects.project }} && make PHYSICELL_CPP=${{ matrix.os.compiler }}
58+
make data-cleanup && make ${{ matrix.projects.project }} && make PHYSICELL_CPP=${{ matrix.os.compiler }} PROGRAM_NAME=${{ matrix.projects.binary }}
5759
5860
- name: Run ${{ matrix.projects.name }} project
5961
run: |

BioFVM/BioFVM_MultiCellDS.cpp

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,21 @@ void set_save_biofvm_cell_data_as_custom_matlab( bool newvalue )
515515

516516
/* writing parts of BioFVM to a MultiCellDS file */
517517

518+
static bool BioFVM_substrates_initialized_in_dom = false;
519+
520+
void reset_BioFVM_substrates_initialized_in_dom( void )
521+
{
522+
BioFVM_substrates_initialized_in_dom = false;
523+
}
524+
525+
518526
void add_BioFVM_substrates_to_open_xml_pugi( pugi::xml_document& xml_dom , std::string filename_base, Microenvironment& M )
519527
{
520528
add_MultiCellDS_main_structure_to_open_xml_pugi( xml_dom );
521529

522530
pugi::xml_node root = biofvm_doc.child( "MultiCellDS" );
523531
pugi::xml_node node = root.child( "microenvironment" );
524532

525-
static bool BioFVM_substrates_initialized_in_dom = false;
526-
527533
// if the TME has not yet been initialized in the DOM, create all the
528534
// right data elements, and populate the meshes.
529535
if( !BioFVM_substrates_initialized_in_dom )
@@ -564,36 +570,9 @@ void add_BioFVM_substrates_to_open_xml_pugi( pugi::xml_document& xml_dom , std::
564570
// if Cartesian, add the x, y, and z coordinates
565571
if( M.mesh.Cartesian_mesh == true )
566572
{
567-
char temp [10240];
568-
int position = 0;
569-
for( unsigned int k=0 ; k < M.mesh.x_coordinates.size()-1 ; k++ )
570-
{ position += sprintf( temp+position, "%f " , M.mesh.x_coordinates[k] ); }
571-
sprintf( temp+position , "%f" , M.mesh.x_coordinates[ M.mesh.x_coordinates.size()-1] );
572-
node = node.append_child( "x_coordinates" );
573-
node.append_child( pugi::node_pcdata ).set_value( temp );
574-
attrib = node.append_attribute("delimiter");
575-
attrib.set_value( " " );
576-
577-
node = node.parent();
578-
position = 0;
579-
for( unsigned int k=0 ; k < M.mesh.y_coordinates.size()-1 ; k++ )
580-
{ position += sprintf( temp+position, "%f " , M.mesh.y_coordinates[k] ); }
581-
sprintf( temp+position , "%f" , M.mesh.y_coordinates[ M.mesh.y_coordinates.size()-1] );
582-
node = node.append_child( "y_coordinates" );
583-
node.append_child( pugi::node_pcdata ).set_value( temp );
584-
attrib = node.append_attribute("delimiter");
585-
attrib.set_value( " " );
586-
587-
node = node.parent();
588-
position = 0;
589-
for( unsigned int k=0 ; k < M.mesh.z_coordinates.size()-1 ; k++ )
590-
{ position += sprintf( temp+position, "%f " , M.mesh.z_coordinates[k] ); }
591-
sprintf( temp+position , "%f" , M.mesh.z_coordinates[ M.mesh.z_coordinates.size()-1] );
592-
node = node.append_child( "z_coordinates" );
593-
node.append_child( pugi::node_pcdata ).set_value( temp );
594-
attrib = node.append_attribute("delimiter");
595-
attrib.set_value( " " );
596-
node = node.parent();
573+
write_coordinates_node(node, M.mesh.x_coordinates, "x_coordinates");
574+
write_coordinates_node(node, M.mesh.y_coordinates, "y_coordinates");
575+
write_coordinates_node(node, M.mesh.z_coordinates, "z_coordinates");
597576
}
598577
// write out the voxels -- minimal data, even if redundant for cartesian
599578
if( save_mesh_as_matlab == false )
@@ -744,7 +723,7 @@ void add_BioFVM_substrates_to_open_xml_pugi( pugi::xml_document& xml_dom , std::
744723
{ filename_start++; }
745724
strcpy( filename_without_pathing , filename_start );
746725

747-
node.append_child( pugi::node_pcdata ).set_value( filename_without_pathing ); // filename );
726+
node.append_child( pugi::node_pcdata ).set_value( filename_without_pathing ); // filename );
748727

749728
node = node.parent();
750729
}
@@ -812,6 +791,21 @@ void add_BioFVM_substrates_to_open_xml_pugi( pugi::xml_document& xml_dom , std::
812791
return;
813792
}
814793

794+
void write_coordinates_node(pugi::xml_node &node, const std::vector<double> &coordinates, std::string name)
795+
{
796+
std::ostringstream oss;
797+
for (size_t i = 0; i < coordinates.size(); ++i)
798+
{
799+
if (i != 0)
800+
{ oss << " "; }
801+
oss << coordinates[i];
802+
}
803+
pugi::xml_node coord_node = node.append_child(name.c_str());
804+
coord_node.append_child(pugi::node_pcdata).set_value(oss.str().c_str());
805+
pugi::xml_attribute attrib = coord_node.append_attribute("delimiter");
806+
attrib.set_value(" ");
807+
}
808+
815809
// not yet implemented
816810
void add_BioFVM_basic_agent_to_open_xml_pugi( pugi::xml_document& xml_dom, Basic_Agent& BA );
817811

BioFVM/BioFVM_MultiCellDS.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,14 @@ void set_save_biofvm_cell_data_as_custom_matlab( bool newvalue ); // default: tr
181181

182182
/* writing parts of BioFVM to a MultiCellDS file */
183183

184+
void reset_BioFVM_substrates_initialized_in_dom( void );
184185
void add_BioFVM_substrates_to_open_xml_pugi( pugi::xml_document& xml_dom , std::string filename_base , Microenvironment& M );
185186
void add_BioFVM_basic_agent_to_open_xml_pugi( pugi::xml_document& xml_dom, Basic_Agent& BA ); // not implemented -- future edition
186187
void add_BioFVM_agents_to_open_xml_pugi( pugi::xml_document& xml_dom, std::string filename_base, Microenvironment& M );
187188
void add_BioFVM_to_open_xml_pugi( pugi::xml_document& xml_dom , std::string filename_base, double current_simulation_time , Microenvironment& M );
188189

190+
void write_coordinates_node(pugi::xml_node &node, const std::vector<double> &coordinates, std::string name);
191+
189192
void save_BioFVM_to_MultiCellDS_xml_pugi( std::string filename_base , Microenvironment& M , double current_simulation_time);
190193

191194
/* beta in PhysiCell 1.11.0 */

BioFVM/BioFVM_basic_agent.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ namespace BioFVM{
5454

5555
std::vector<Basic_Agent*> all_basic_agents(0);
5656

57+
static int max_basic_agent_ID = 0;
58+
59+
void reset_max_basic_agent_ID( void )
60+
{
61+
max_basic_agent_ID = 0;
62+
}
63+
5764
Basic_Agent::Basic_Agent()
5865
{
5966
//give the agent a unique ID
60-
static int max_basic_agent_ID = 0;
6167
ID = max_basic_agent_ID; //
6268
max_basic_agent_ID++;
6369
// initialize position and velocity
@@ -78,7 +84,7 @@ Basic_Agent::Basic_Agent()
7884

7985
internalized_substrates = new std::vector<double>(0); //
8086
fraction_released_at_death = new std::vector<double>(0);
81-
fraction_transferred_when_ingested = new std::vector<double>(0);
87+
fraction_transferred_when_ingested = new std::vector<double>(1.0);
8288
register_microenvironment( get_default_microenvironment() );
8389

8490
// these are done in register_microenvironment
@@ -190,7 +196,7 @@ void Basic_Agent::register_microenvironment( Microenvironment* microenvironment_
190196
total_extracellular_substrate_change.resize( microenvironment->density_vector(0).size() , 1.0 );
191197

192198
fraction_released_at_death->resize( microenvironment->density_vector(0).size() , 0.0 );
193-
fraction_transferred_when_ingested->resize( microenvironment->density_vector(0).size() , 0.0 );
199+
fraction_transferred_when_ingested->resize( microenvironment->density_vector(0).size() , 1.0 );
194200

195201
return;
196202
}
@@ -341,4 +347,4 @@ void Basic_Agent::simulate_secretion_and_uptake( Microenvironment* pS, double dt
341347
return;
342348
}
343349

344-
};
350+
};

BioFVM/BioFVM_basic_agent.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
#include "BioFVM_vector.h"
5656

5757
namespace BioFVM{
58-
58+
59+
void reset_max_basic_agent_ID( void );
60+
5961
class Basic_Agent
6062
{
6163
private:

CITATION.txt

Lines changed: 3 additions & 3 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.14.0) [1].
4+
We implemented and solved the model using PhysiCell (Version 1.14.1) [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.14.0) [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.14.0) [1],
14+
We implemented and solved the model using PhysiCell (Version 1.14.1) [1],
1515
with BioFVM [2] to solve the transport equations.
1616

1717
[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
@@ -25,7 +25,7 @@ with BioFVM [2] to solve the transport equations.
2525

2626
If you use PhysiBoSS, please cite as below:
2727

28-
We implemented and solved the model using PhysiCell (Version 1.14.0) [1],
28+
We implemented and solved the model using PhysiCell (Version 1.14.1) [1],
2929
with PhysiBoSS[2,3] to simulate the intracellular mechanisms.
3030

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

Makefile

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ 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"
7676
@echo " worm-sample interaction-sample mechano-sample rules-sample physimess-sample custom-division-sample"
77+
@echo " asymmetric-division-sample immune-function-sample"
7778
@echo ""
7879
@echo "Sample intracellular projects: template_BM ode-energy-sample physiboss-cell-lines-sample"
7980
@echo " cancer-metabolism-sample physiboss-tutorial physiboss-tutorial-invasion"
@@ -197,15 +198,32 @@ physimess-sample:
197198
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
198199
cp -r ./sample_projects/physimess/config/* ./config/
199200

200-
201201
custom-division-sample:
202-
cp ./sample_projects/custom_division/custom_modules/* ./custom_modules/
202+
cp -r ./sample_projects/custom_division/custom_modules/* ./custom_modules/
203203
touch main.cpp && cp main.cpp main-backup.cpp
204204
cp ./sample_projects/custom_division/main.cpp ./main.cpp
205205
cp Makefile Makefile-backup
206206
cp ./sample_projects/custom_division/Makefile .
207207
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
208-
cp ./sample_projects/custom_division/config/* ./config/
208+
cp -r ./sample_projects/custom_division/config/* ./config/
209+
210+
asymmetric-division-sample:
211+
cp -r ./sample_projects/asymmetric_division/custom_modules/* ./custom_modules/
212+
touch main.cpp && cp main.cpp main-backup.cpp
213+
cp ./sample_projects/asymmetric_division/main.cpp ./main.cpp
214+
cp Makefile Makefile-backup
215+
cp ./sample_projects/asymmetric_division/Makefile .
216+
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
217+
cp -r ./sample_projects/asymmetric_division/config/* ./config/
218+
219+
immune-function-sample:
220+
cp -r ./sample_projects/immune_function/custom_modules/* ./custom_modules/
221+
touch main.cpp && cp main.cpp main-backup.cpp
222+
cp ./sample_projects/immune_function/main.cpp ./main.cpp
223+
cp Makefile Makefile-backup
224+
cp ./sample_projects/immune_function/Makefile .
225+
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
226+
cp -r ./sample_projects/immune_function/config/* ./config/
209227

210228
# ---- intracellular projects
211229
ode-energy-sample:

0 commit comments

Comments
 (0)