Skip to content

Commit

Permalink
Merge pull request MathCancer#25 from MathCancer/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
MathCancer authored Aug 20, 2019
2 parents 3f6ae1f + 34f0e79 commit bccb5f8
Show file tree
Hide file tree
Showing 44 changed files with 2,318 additions and 1,486 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

*.o
unit-test-conservation.exe
Makefile-backup
*.exe
31 changes: 26 additions & 5 deletions BioFVM/BioFVM_microenvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ void Microenvironment::set_substrate_dirichlet_activation( int substrate_index ,
return;
}

double Microenvironment::get_substrate_dirichlet_activation( int substrate_index )
{
return dirichlet_activation_vector[substrate_index];
}

void Microenvironment::apply_dirichlet_conditions( void )
{
/*
Expand Down Expand Up @@ -716,13 +721,23 @@ void Microenvironment::display_information( std::ostream& os )
os << " " << density_names[i] << ":" << std::endl
<< " units: " << density_units[i] << std::endl
<< " diffusion coefficient: " << diffusion_coefficients[i]
<< " " << spatial_units << "^2 / " << time_units << std::endl
<< " " << spatial_units << "^2 / " << time_units << std::endl
<< " decay rate: " << decay_rates[i]
<< " " << time_units << "^-1" << std::endl
<< " diffusion length scale: " << sqrt( diffusion_coefficients[i] / ( 1e-12 + decay_rates[i] ) ) << " "
<< spatial_units << std::endl << std::endl;
<< " " << time_units << "^-1" << std::endl
<< " diffusion length scale: " << sqrt( diffusion_coefficients[i] / ( 1e-12 + decay_rates[i] ) )
<< " " << spatial_units << std::endl
<< " initial condition: " << default_microenvironment_options.initial_condition_vector[i]
<< " " << density_units[i] << std::endl
<< " boundary condition: " << default_microenvironment_options.Dirichlet_condition_vector[i]
<< " " << density_units[i] << " (enabled: ";
if( dirichlet_activation_vector[i] == true )
{ os << "true"; }
else
{ os << "false"; }
os << ")" << std::endl;
}
os << std::endl;

return;
}

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


return gradient_vectors[n];
}

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

void Microenvironment::compute_all_gradient_vectors( void )
{
//
static double two_dx = mesh.dx;
static double two_dy = mesh.dy;
static double two_dz = mesh.dz;
Expand Down Expand Up @@ -1172,6 +1187,12 @@ void initialize_microenvironment( void )

}

// set the Dirichlet condition activation vector to match the microenvironment options
for( int i=0 ; i < default_microenvironment_options.Dirichlet_activation_vector.size(); i++ )
{
microenvironment.set_substrate_dirichlet_activation( i , default_microenvironment_options.Dirichlet_activation_vector[i] );
}

microenvironment.display_information( std::cout );
return;
}
Expand Down
4 changes: 2 additions & 2 deletions BioFVM/BioFVM_microenvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ class Microenvironment
*/
std::vector< std::vector<double> > dirichlet_value_vectors;
std::vector<bool> dirichlet_activation_vector;

public:
/*! The mesh for the diffusing quantities */
Cartesian_Mesh mesh;
Agent_Container * agent_container;
Expand Down Expand Up @@ -239,6 +238,7 @@ class Microenvironment
void apply_dirichlet_conditions( void );

void set_substrate_dirichlet_activation( int substrate_index , bool new_value );
double get_substrate_dirichlet_activation( int substrate_index );

bool& is_dirichlet_node( int voxel_index );

Expand Down
4 changes: 2 additions & 2 deletions CITATION.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 1.5.2) [1].
We implemented and solved the model using PhysiCell (Version 1.6.0) [1].

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

We implemented and solved the model using PhysiCell (Version 1.5.2) [1],
We implemented and solved the model using PhysiCell (Version 1.6.0) [1],
with BioFVM [2] to solve the transport equations.

[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ reset:
touch ./custom_modules/empty.txt
touch ALL_CITATIONS.txt
rm ALL_CITATIONS.txt
cp ./config/PhysiCell_settings_default.xml ./config/PhysiCell_settings.xml
touch ./output/empty.txt
cp ./config/PhysiCell_settings-backup.xml ./config/PhysiCell_settings.xml

clean:
rm -f *.o
Expand Down
Loading

0 comments on commit bccb5f8

Please sign in to comment.