Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 5 additions & 3 deletions modules/PhysiCell_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ bool load_PhysiCell_config_file( std::string filename )
if (!read_PhysiCell_config_file( filename ))
{ return false; }

PhysiCell_settings.read_from_pugixml();
PhysiCell_settings.read_from_pugixml();

// now read the microenvironment (optional)
// now read the microenvironment (optional)

if( !setup_microenvironment_from_XML( physicell_config_root ) )
{
Expand All @@ -119,7 +119,9 @@ bool load_PhysiCell_config_file( std::string filename )

create_output_directory( PhysiCell_settings.folder );

return true;
copy_file_to_output( filename );

return true;
}

PhysiCell_Settings::PhysiCell_Settings()
Expand Down
10 changes: 2 additions & 8 deletions sample_projects/asymmetric_division/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/biorobots/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/cancer_biorobots/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
6 changes: 0 additions & 6 deletions sample_projects/cancer_immune/main-cancer_immune_3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,17 @@ int main( int argc, char* argv[] )
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/custom_division/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/heterogeneity/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/immune_function/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/interactions/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/mechano/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/physimess/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/pred_prey_farmer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/rules_sample/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/template/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);

Expand Down
10 changes: 2 additions & 8 deletions sample_projects/virus_macrophage/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,17 @@ int main( int argc, char* argv[] )
{
// load and parse settings file(s)

bool XML_status = false;
char copy_command [1024];
bool XML_status = false;
if( argc > 1 )
{
XML_status = load_PhysiCell_config_file( argv[1] );
sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() );
XML_status = load_PhysiCell_config_file( argv[1] );
}
else
{
XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" );
sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() );
}
if( !XML_status )
{ exit(-1); }

// copy config file to output directry
system( copy_command );

// OpenMP setup
omp_set_num_threads(PhysiCell_settings.omp_num_threads);
Expand Down
Loading