Skip to content
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
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,17 @@ template_BM:
mkdir ./scripts/
cp ./sample_projects_intracellular/boolean/template_BM/scripts/* ./scripts/

spheroid_tnf:
cp ./sample_projects_intracellular/spheroid_tnf/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects_intracellular/spheroid_tnf/main.cpp ./main.cpp
cp Makefile Makefile-backup
cp ./sample_projects_intracellular/spheroid_tnf/Makefile .
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp -r ./sample_projects_intracellular/spheroid_tnf/config/* ./config/
mkdir ./scripts/
cp ./sample_projects_intracellular/spheroid_tnf/scripts/* ./scripts/

# early examples for convergence testing

physicell_test_mech1: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_1.cpp
Expand Down
25 changes: 21 additions & 4 deletions addons/PhysiBoSS/src/maboss_intracellular.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ MaBoSSIntracellular::MaBoSSIntracellular(pugi::xml_node& node)

MaBoSSIntracellular::MaBoSSIntracellular(MaBoSSIntracellular* copy)
{
pre_update_intracellular = copy->pre_update_intracellular;
post_update_intracellular = copy->post_update_intracellular;
intracellular_type = copy->intracellular_type;
bnd_filename = copy->bnd_filename;
cfg_filename = copy->cfg_filename;
Expand Down Expand Up @@ -424,7 +426,14 @@ void MaBoSSIntracellular::initialize_intracellular_from_pugixml(pugi::xml_node&
}

MaBoSSIntracellular* getMaBoSSModel(PhysiCell::Phenotype& phenotype) {
return static_cast<MaBoSSIntracellular*>(phenotype.intracellular);
for (auto* intracellular : phenotype.intracellulars)
{
if (intracellular->intracellular_type == "maboss")
{
return static_cast<MaBoSSIntracellular*>(intracellular);
}
}
return nullptr;
}

void MaBoSSIntracellular::display(std::ostream& os)
Expand Down Expand Up @@ -480,8 +489,16 @@ void MaBoSSIntracellular::save(std::string filename)
state_file << "ID,state" << std::endl;

for( auto cell : *PhysiCell::all_cells )
if (cell->phenotype.intracellular != NULL && cell->phenotype.intracellular->intracellular_type == "maboss")
state_file << cell->ID << "," << static_cast<MaBoSSIntracellular*>(cell->phenotype.intracellular)->get_state() << std::endl;

{
if (cell->phenotype.intracellulars.size() > 0)
{
// This only works if there is one maboss intracellular model per cell, which is the ok
for (auto& intracellular : cell->phenotype.intracellulars) {
if (intracellular->intracellular_type == "maboss") {
state_file << cell->ID << "," << static_cast<MaBoSSIntracellular*>(intracellular)->get_state() << std::endl;
}
}
}
}
state_file.close();
}
8 changes: 4 additions & 4 deletions addons/PhysiBoSS/src/maboss_intracellular.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class MaBoSSIntracellular : public PhysiCell::Intracellular {
MaBoSSIntracellular(MaBoSSIntracellular* copy);

Intracellular* clone() {
return static_cast<Intracellular*>(new MaBoSSIntracellular(this));
return static_cast<PhysiCell::Intracellular*>(new MaBoSSIntracellular(this));
}
Intracellular* getIntracellularModel() {
return static_cast<Intracellular*>(this);
return static_cast<PhysiCell::Intracellular*>(this);
}

void initialize_intracellular_from_pugixml(pugi::xml_node& node);
Expand All @@ -80,9 +80,9 @@ class MaBoSSIntracellular : public PhysiCell::Intracellular {
return PhysiCell::PhysiCell_globals.current_time >= this->next_physiboss_run;
}

void inherit(PhysiCell::Cell * cell) {
void inherit(PhysiCell::Intracellular* intracellular) {
maboss.inherit_state(
static_cast<MaBoSSIntracellular*>(cell->phenotype.intracellular)->maboss.get_maboss_state(),
static_cast<MaBoSSIntracellular*>(intracellular)->maboss.get_maboss_state(),
inherit_state, inherit_nodes
);
}
Expand Down
2 changes: 1 addition & 1 deletion addons/libRoadrunner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ FetchContent_Declare(
FetchContent_MakeAvailable(roadrunner)

target_include_directories(libRoadrunner
PUBLIC ${roadrunner_SOURCE_DIR}/include/rr/C)
PUBLIC ${roadrunner_SOURCE_DIR}/include/rr)
target_link_directories(libRoadrunner PUBLIC ${roadrunner_SOURCE_DIR}/lib)
target_link_libraries(libRoadrunner PUBLIC roadrunner_c_api)
target_compile_definitions(libRoadrunner PUBLIC ADDON_ROADRUNNER)
Expand Down
Loading
Loading