Skip to content

Conversation

@asmelko
Copy link

@asmelko asmelko commented Dec 15, 2025

This PR does not include the interface-related CMake changes - those will be brought in when #392 gets merged.

The PR introduces 2 main interface classes:

  • Microenvironment_Interface
  • Basic_Agent_Interface

These interfaces are used throughout the rest of PhysiCell code instead of the concrete BioFVM classes so that we can support multiple BioFVM implementations.

As of now, the interfaces are very close to 1-to-1 copies of the concrete classes. In the next PR, which introduces a new BioFVM implementation, we will refine the interfaces further by removing internal methods.

BioFVM_Implementation class is the pseudo-factory for the new implementation: The new implementation will have to implement the methods of this class that will operate with the concrete classes of the 2 aforementioned interfaces.

The code change is big, but it is mainly just a necessary syntactic change to support proper interface isolation. However, here are the major logic changes:

  • molecular and secretion phenotypes now dont own the data (vector of rates). The code has been refactored such that the data is owned by BioFVM, which removes the confusing synchronization code and leaves the implementation details to the BioFVM implementater for the best possible performance gain.
  • some BioFVM-related functions that are reading settings.xml have been moved from modules to BioFVM directory
  • all sample-projects' main files now start with BioFVM_Implementation::initialize_microenvironment(); that will initialize a BioFVM implementation for the further modification and use
  • all_basic_agents are now only accessible via BioFVM_Implementation::get_all_basic_agents for the sake of hiding implementation details

}

double Basic_Agent::get_total_volume()
double& Basic_Agent::get_total_volume()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a specialized setter for volume that sets the volume_is_changed flag. Are we sure we need to access this by reference?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

void Basic_Agent::set_total_volume(double volume)
{
	this->volume = volume;
	volume_is_changed = true;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants