Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only saving cells data when there are cells #348

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/PhysiCell_MultiCellDS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void add_PhysiCell_cells_to_open_xml_pugi_v2( pugi::xml_document& xml_dom, std::
// get number of cell types
static int n = cell_definition_indices_by_name.size(); // number_of_cell_types
// get number of death models
static int nd = (*all_cells)[0]->phenotype.death.rates.size(); //
static int nd = cell_defaults.phenotype.death.rates.size(); //
// get number of custom data
static int nc = 0; //
static int nc_scalar = 0;
Expand Down Expand Up @@ -587,7 +587,7 @@ void add_PhysiCell_cells_to_open_xml_pugi_v2( pugi::xml_document& xml_dom, std::
"damage_repair_rate" , "1/min" , 1 );

// custom
for( int j=0 ; j < (*all_cells)[0]->custom_data.variables.size(); j++ )
for( int j=0 ; j < cell_defaults.custom_data.variables.size(); j++ )
{
name = (*all_cells)[0]->custom_data.variables[j].name;
units = (*all_cells)[0]->custom_data.variables[j].units;
Expand All @@ -596,7 +596,7 @@ void add_PhysiCell_cells_to_open_xml_pugi_v2( pugi::xml_document& xml_dom, std::
}

// custom vector variables
for( int j=0 ; j < (*all_cells)[0]->custom_data.vector_variables.size(); j++ )
for( int j=0 ; j < cell_defaults.custom_data.vector_variables.size(); j++ )
{
name = (*all_cells)[0]->custom_data.vector_variables[j].name;
units = (*all_cells)[0]->custom_data.vector_variables[j].units;
Expand Down Expand Up @@ -995,11 +995,11 @@ void add_PhysiCell_cells_to_open_xml_pugi_v2( pugi::xml_document& xml_dom, std::

// custom
// custom scalar variables
for( int j=0 ; j < (*all_cells)[0]->custom_data.variables.size(); j++ )
for( int j=0 ; j < cell_defaults.custom_data.variables.size(); j++ )
{ std::fwrite( &( pCell->custom_data.variables[j].value ) , sizeof(double) , 1 , fp ); }

// custom vector variables
for( int j=0 ; j < (*all_cells)[0]->custom_data.vector_variables.size(); j++ )
for( int j=0 ; j < cell_defaults.custom_data.vector_variables.size(); j++ )
{
int size_temp = pCell->custom_data.vector_variables[j].value.size();
std::fwrite( pCell->custom_data.vector_variables[j].value.data() , sizeof(double) , size_temp , fp );
Expand Down
2 changes: 1 addition & 1 deletion modules/PhysiCell_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ bool create_directories(const std::string &path)

bool create_directory(const std::string &path)
{
#if defined(__MINGW32__) || defined(__MINGW64__)
#if defined(_WIN32)
bool success = mkdir(path.c_str()) == 0;
#else
bool success = mkdir(path.c_str(), 0755) == 0;
Expand Down