Skip to content

Commit bccb5f8

Browse files
authored
Merge pull request MathCancer#25 from MathCancer/development
Development
2 parents 3f6ae1f + 34f0e79 commit bccb5f8

Some content is hidden

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

44 files changed

+2318
-1486
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
*.o
3+
unit-test-conservation.exe
4+
Makefile-backup
5+
*.exe

BioFVM/BioFVM_microenvironment.cpp

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ void Microenvironment::set_substrate_dirichlet_activation( int substrate_index ,
267267
return;
268268
}
269269

270+
double Microenvironment::get_substrate_dirichlet_activation( int substrate_index )
271+
{
272+
return dirichlet_activation_vector[substrate_index];
273+
}
274+
270275
void Microenvironment::apply_dirichlet_conditions( void )
271276
{
272277
/*
@@ -716,13 +721,23 @@ void Microenvironment::display_information( std::ostream& os )
716721
os << " " << density_names[i] << ":" << std::endl
717722
<< " units: " << density_units[i] << std::endl
718723
<< " diffusion coefficient: " << diffusion_coefficients[i]
719-
<< " " << spatial_units << "^2 / " << time_units << std::endl
724+
<< " " << spatial_units << "^2 / " << time_units << std::endl
720725
<< " decay rate: " << decay_rates[i]
721-
<< " " << time_units << "^-1" << std::endl
722-
<< " diffusion length scale: " << sqrt( diffusion_coefficients[i] / ( 1e-12 + decay_rates[i] ) ) << " "
723-
<< spatial_units << std::endl << std::endl;
726+
<< " " << time_units << "^-1" << std::endl
727+
<< " diffusion length scale: " << sqrt( diffusion_coefficients[i] / ( 1e-12 + decay_rates[i] ) )
728+
<< " " << spatial_units << std::endl
729+
<< " initial condition: " << default_microenvironment_options.initial_condition_vector[i]
730+
<< " " << density_units[i] << std::endl
731+
<< " boundary condition: " << default_microenvironment_options.Dirichlet_condition_vector[i]
732+
<< " " << density_units[i] << " (enabled: ";
733+
if( dirichlet_activation_vector[i] == true )
734+
{ os << "true"; }
735+
else
736+
{ os << "false"; }
737+
os << ")" << std::endl;
724738
}
725739
os << std::endl;
740+
726741
return;
727742
}
728743

@@ -862,6 +877,7 @@ std::vector<gradient>& Microenvironment::gradient_vector(int n )
862877
compute_gradient_vector( n );
863878
}
864879

880+
865881
return gradient_vectors[n];
866882
}
867883

@@ -878,7 +894,6 @@ std::vector<gradient>& Microenvironment::nearest_gradient_vector( std::vector<do
878894

879895
void Microenvironment::compute_all_gradient_vectors( void )
880896
{
881-
//
882897
static double two_dx = mesh.dx;
883898
static double two_dy = mesh.dy;
884899
static double two_dz = mesh.dz;
@@ -1172,6 +1187,12 @@ void initialize_microenvironment( void )
11721187

11731188
}
11741189

1190+
// set the Dirichlet condition activation vector to match the microenvironment options
1191+
for( int i=0 ; i < default_microenvironment_options.Dirichlet_activation_vector.size(); i++ )
1192+
{
1193+
microenvironment.set_substrate_dirichlet_activation( i , default_microenvironment_options.Dirichlet_activation_vector[i] );
1194+
}
1195+
11751196
microenvironment.display_information( std::cout );
11761197
return;
11771198
}

BioFVM/BioFVM_microenvironment.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ class Microenvironment
127127
*/
128128
std::vector< std::vector<double> > dirichlet_value_vectors;
129129
std::vector<bool> dirichlet_activation_vector;
130-
131130
public:
132-
131+
133132
/*! The mesh for the diffusing quantities */
134133
Cartesian_Mesh mesh;
135134
Agent_Container * agent_container;
@@ -239,6 +238,7 @@ class Microenvironment
239238
void apply_dirichlet_conditions( void );
240239

241240
void set_substrate_dirichlet_activation( int substrate_index , bool new_value );
241+
double get_substrate_dirichlet_activation( int substrate_index );
242242

243243
bool& is_dirichlet_node( int voxel_index );
244244

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.5.2) [1].
4+
We implemented and solved the model using PhysiCell (Version 1.6.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.5.2) [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.5.2) [1],
14+
We implemented and solved the model using PhysiCell (Version 1.6.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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ reset:
250250
touch ./custom_modules/empty.txt
251251
touch ALL_CITATIONS.txt
252252
rm ALL_CITATIONS.txt
253-
cp ./config/PhysiCell_settings_default.xml ./config/PhysiCell_settings.xml
254-
touch ./output/empty.txt
253+
cp ./config/PhysiCell_settings-backup.xml ./config/PhysiCell_settings.xml
255254

256255
clean:
257256
rm -f *.o

0 commit comments

Comments
 (0)