From 3fe4c00069280cf0b01e56f8210af4334a229634 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 20 Mar 2024 21:06:10 +0000 Subject: [PATCH] #62 reorder cell_based registrations --- dynamic/wrapper_generators/package_info.yaml | 54 ++++++++-- .../wrappers/cell_based/cell_based.main.cpp | 32 +++--- .../AbstractCellCycleModelOdeSolver.cppwg.cpp | 102 ------------------ .../AbstractCellCycleModelOdeSolver.cppwg.hpp | 6 -- 4 files changed, 62 insertions(+), 132 deletions(-) delete mode 100644 dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp delete mode 100644 dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.hpp diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index 6cf12ef7..569b5b2b 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -181,6 +181,7 @@ modules: - name: AbstractSimpleCellCycleModel - name: AbstractSimplePhaseBasedCellCycleModel - name: AbstractSimpleGenerationalCellCycleModel + - name: AbstractCellCycleModelOdeSolver - name: UniformCellCycleModel - name: SimpleOxygenBasedCellCycleModel - name: UniformG1GenerationalCellCycleModel @@ -199,7 +200,6 @@ modules: - name: FixedSequenceCellCycleModel - name: BernoulliTrialCellCycleModel - name: FixedG1GenerationalCellCycleModel - - name: AbstractCellCycleModelOdeSolver ## - name: CellCycleModelOdeSolver - name: AbstractCellProperty excluded_methods: @@ -604,28 +604,28 @@ modules: - AbstractCellPopulation.hpp - name: AbstractUpdateRule - name: AbstractCaUpdateRule - - name: DiffusionCaUpdateRule - name: AbstractPottsUpdateRule + - name: AbstractCentreBasedDivisionRule + - name: AbstractCaBasedDivisionRule + - name: AbstractCaSwitchingUpdateRule + - name: AbstractImmersedBoundaryDivisionRule + - name: AbstractVertexBasedDivisionRule + - name: DiffusionCaUpdateRule - name: VolumeConstraintPottsUpdateRule - name: SurfaceAreaConstraintPottsUpdateRule - name: AdhesionPottsUpdateRule - name: DifferentialAdhesionPottsUpdateRule - - name: AbstractVertexBasedDivisionRule - name: RandomDirectionVertexBasedDivisionRule - name: VonMisesVertexBasedDivisionRule - name: FixedVertexBasedDivisionRule - - name: AbstractCaBasedDivisionRule - name: ShovingCaBasedDivisionRule - name: ExclusionCaBasedDivisionRule - name: RandomDirectionCentreBasedDivisionRule - name: FixedCentreBasedDivisionRule - - name: AbstractCentreBasedDivisionRule - name: ShortAxisVertexBasedDivisionRule - - name: AbstractImmersedBoundaryDivisionRule - name: ShortAxisImmersedBoundaryDivisionRule - name: RandomCaSwitchingUpdateRule - name: ChemotaxisPottsUpdateRule - - name: AbstractCaSwitchingUpdateRule - name: AbstractForce - name: AbstractTwoBodyInteractionForce - name: BuskeAdhesiveForce @@ -692,7 +692,6 @@ modules: - GetNodeCorrespondingToCell - MarkSpring - UnmarkSpring - - name: NodeBasedCellPopulationWithParticles - name: CaBasedCellPopulation excluded_methods: - rGetMesh @@ -984,6 +983,45 @@ modules: - VertexT2SwapLocationsWriter.hpp - VertexT3SwapLocationsWriter.hpp - VoronoiDataWriter.hpp + - name: NodeBasedCellPopulationWithParticles + excluded_methods: + - rGetMesh + custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py + source_includes: + - CellAgesWriter.hpp + - CellAncestorWriter.hpp + - CellAppliedForceWriter.hpp + - CellCycleModelProteinConcentrationsWriter.hpp + - CellDataItemWriter.hpp + - CellDeltaNotchWriter.hpp + - CellDivisionLocationsWriter.hpp + - CellIdWriter.hpp + - CellLabelWriter.hpp + - CellLocationIndexWriter.hpp + - CellMutationStatesCountWriter.hpp + - CellMutationStatesWriter.hpp + - CellPopulationAdjacencyMatrixWriter.hpp + - CellPopulationAreaWriter.hpp + - CellPopulationElementWriter.hpp + - CellProliferativePhasesCountWriter.hpp + - CellProliferativePhasesWriter.hpp + - CellProliferativeTypesCountWriter.hpp + - CellProliferativeTypesWriter.hpp + - CellRadiusWriter.hpp + - CellRemovalLocationsWriter.hpp + - CellRosetteRankWriter.hpp + - CellVolumesWriter.hpp + - HeterotypicBoundaryLengthWriter.hpp + - LegacyCellProliferativeTypesWriter.hpp + - NodeLocationWriter.hpp + - NodeVelocityWriter.hpp + - PottsMeshWriter.hpp + - RadialCellDataDistributionWriter.hpp + - VertexIntersectionSwapLocationsWriter.hpp + - VertexT1SwapLocationsWriter.hpp + - VertexT2SwapLocationsWriter.hpp + - VertexT3SwapLocationsWriter.hpp + - VoronoiDataWriter.hpp - name: NodeBasedCellPopulationWithBuskeUpdate excluded_methods: - rGetMesh diff --git a/dynamic/wrappers/cell_based/cell_based.main.cpp b/dynamic/wrappers/cell_based/cell_based.main.cpp index a508d7f7..2d750883 100644 --- a/dynamic/wrappers/cell_based/cell_based.main.cpp +++ b/dynamic/wrappers/cell_based/cell_based.main.cpp @@ -388,6 +388,7 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_AbstractSimpleCellCycleModel_class(m); register_AbstractSimplePhaseBasedCellCycleModel_class(m); register_AbstractSimpleGenerationalCellCycleModel_class(m); + register_AbstractCellCycleModelOdeSolver_class(m); register_UniformCellCycleModel_class(m); register_SimpleOxygenBasedCellCycleModel_class(m); register_UniformG1GenerationalCellCycleModel_class(m); @@ -401,12 +402,11 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_GammaG1CellCycleModel_class(m); register_ExponentialG1GenerationalCellCycleModel_class(m); register_AbstractOdeBasedPhaseBasedCellCycleModel_class(m); - register_TysonNovakCellCycleModel_class(m); register_Alarcon2004OxygenBasedCellCycleModel_class(m); register_FixedSequenceCellCycleModel_class(m); register_BernoulliTrialCellCycleModel_class(m); register_FixedG1GenerationalCellCycleModel_class(m); - register_AbstractCellCycleModelOdeSolver_class(m); + register_TysonNovakCellCycleModel_class(m); register_AbstractCellProperty_class(m); register_CellPropertyCollection_class(m); register_AbstractCellProliferativeType_class(m); @@ -591,10 +591,20 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_AbstractUpdateRule3_class(m); register_AbstractCaUpdateRule2_class(m); register_AbstractCaUpdateRule3_class(m); - register_DiffusionCaUpdateRule2_class(m); - register_DiffusionCaUpdateRule3_class(m); register_AbstractPottsUpdateRule2_class(m); register_AbstractPottsUpdateRule3_class(m); + register_AbstractCentreBasedDivisionRule2_2_class(m); + register_AbstractCentreBasedDivisionRule3_3_class(m); + register_AbstractCaBasedDivisionRule2_class(m); + register_AbstractCaBasedDivisionRule3_class(m); + register_AbstractCaSwitchingUpdateRule2_class(m); + register_AbstractCaSwitchingUpdateRule3_class(m); + register_AbstractImmersedBoundaryDivisionRule2_class(m); + register_AbstractImmersedBoundaryDivisionRule3_class(m); + register_AbstractVertexBasedDivisionRule2_class(m); + register_AbstractVertexBasedDivisionRule3_class(m); + register_DiffusionCaUpdateRule2_class(m); + register_DiffusionCaUpdateRule3_class(m); register_VolumeConstraintPottsUpdateRule2_class(m); register_VolumeConstraintPottsUpdateRule3_class(m); register_SurfaceAreaConstraintPottsUpdateRule2_class(m); @@ -603,16 +613,12 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_AdhesionPottsUpdateRule3_class(m); register_DifferentialAdhesionPottsUpdateRule2_class(m); register_DifferentialAdhesionPottsUpdateRule3_class(m); - register_AbstractVertexBasedDivisionRule2_class(m); - register_AbstractVertexBasedDivisionRule3_class(m); register_RandomDirectionVertexBasedDivisionRule2_class(m); register_RandomDirectionVertexBasedDivisionRule3_class(m); register_VonMisesVertexBasedDivisionRule2_class(m); register_VonMisesVertexBasedDivisionRule3_class(m); register_FixedVertexBasedDivisionRule2_class(m); register_FixedVertexBasedDivisionRule3_class(m); - register_AbstractCaBasedDivisionRule2_class(m); - register_AbstractCaBasedDivisionRule3_class(m); register_ShovingCaBasedDivisionRule2_class(m); register_ShovingCaBasedDivisionRule3_class(m); register_ExclusionCaBasedDivisionRule2_class(m); @@ -621,20 +627,14 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_RandomDirectionCentreBasedDivisionRule3_3_class(m); register_FixedCentreBasedDivisionRule2_2_class(m); register_FixedCentreBasedDivisionRule3_3_class(m); - register_AbstractCentreBasedDivisionRule2_2_class(m); - register_AbstractCentreBasedDivisionRule3_3_class(m); register_ShortAxisVertexBasedDivisionRule2_class(m); register_ShortAxisVertexBasedDivisionRule3_class(m); - register_AbstractImmersedBoundaryDivisionRule2_class(m); - register_AbstractImmersedBoundaryDivisionRule3_class(m); register_ShortAxisImmersedBoundaryDivisionRule2_class(m); register_ShortAxisImmersedBoundaryDivisionRule3_class(m); register_RandomCaSwitchingUpdateRule2_class(m); register_RandomCaSwitchingUpdateRule3_class(m); register_ChemotaxisPottsUpdateRule2_class(m); register_ChemotaxisPottsUpdateRule3_class(m); - register_AbstractCaSwitchingUpdateRule2_class(m); - register_AbstractCaSwitchingUpdateRule3_class(m); register_AbstractForce2_2_class(m); register_AbstractForce3_3_class(m); register_AbstractTwoBodyInteractionForce2_2_class(m); @@ -711,8 +711,6 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_AbstractCentreBasedCellPopulation3_3_class(m); register_AbstractOnLatticeCellPopulation2_class(m); register_AbstractOnLatticeCellPopulation3_class(m); - register_NodeBasedCellPopulationWithParticles2_class(m); - register_NodeBasedCellPopulationWithParticles3_class(m); register_CaBasedCellPopulation2_class(m); register_CaBasedCellPopulation3_class(m); register_ImmersedBoundaryCellPopulation2_class(m); @@ -727,6 +725,8 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_PottsBasedCellPopulation3_class(m); register_NodeBasedCellPopulation2_class(m); register_NodeBasedCellPopulation3_class(m); + register_NodeBasedCellPopulationWithParticles2_class(m); + register_NodeBasedCellPopulationWithParticles3_class(m); register_NodeBasedCellPopulationWithBuskeUpdate2_class(m); register_NodeBasedCellPopulationWithBuskeUpdate3_class(m); register_AbstractTargetAreaModifier2_class(m); diff --git a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp deleted file mode 100644 index dce9f232..00000000 --- a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "SmartPointers.hpp" -#include "UblasIncludes.hpp" -#include "AbstractCellCycleModelOdeSolver.hpp" - -#include "AbstractCellCycleModelOdeSolver.cppwg.hpp" - -namespace py = pybind11; -typedef AbstractCellCycleModelOdeSolver AbstractCellCycleModelOdeSolver; -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - -class AbstractCellCycleModelOdeSolver_Overloads : public AbstractCellCycleModelOdeSolver{ - public: - using AbstractCellCycleModelOdeSolver::AbstractCellCycleModelOdeSolver; - bool IsSetUp() override { - PYBIND11_OVERRIDE_PURE( - bool, - AbstractCellCycleModelOdeSolver, - IsSetUp, - ); - } - void Reset() override { - PYBIND11_OVERRIDE_PURE( - void, - AbstractCellCycleModelOdeSolver, - Reset, - ); - } - void Initialise() override { - PYBIND11_OVERRIDE_PURE( - void, - AbstractCellCycleModelOdeSolver, - Initialise, - ); - } - bool IsAdaptive() override { - PYBIND11_OVERRIDE( - bool, - AbstractCellCycleModelOdeSolver, - IsAdaptive, - ); - } - -}; -void register_AbstractCellCycleModelOdeSolver_class(py::module &m){ -py::class_ >(m, "AbstractCellCycleModelOdeSolver") - .def(py::init< >()) - .def( - "IsSetUp", - (bool(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::IsSetUp, - " " ) - .def( - "Reset", - (void(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::Reset, - " " ) - .def( - "SolveAndUpdateStateVariable", - (void(AbstractCellCycleModelOdeSolver::*)(::AbstractOdeSystem *, double, double, double)) &AbstractCellCycleModelOdeSolver::SolveAndUpdateStateVariable, - " " , py::arg("pAbstractOdeSystem"), py::arg("startTime"), py::arg("endTime"), py::arg("timeStep") ) - .def( - "Initialise", - (void(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::Initialise, - " " ) - .def( - "StoppingEventOccurred", - (bool(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::StoppingEventOccurred, - " " ) - .def( - "GetStoppingTime", - (double(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::GetStoppingTime, - " " ) - .def( - "SetSizeOfOdeSystem", - (void(AbstractCellCycleModelOdeSolver::*)(unsigned int)) &AbstractCellCycleModelOdeSolver::SetSizeOfOdeSystem, - " " , py::arg("sizeOfOdeSystem") ) - .def( - "GetSizeOfOdeSystem", - (unsigned int(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::GetSizeOfOdeSystem, - " " ) - .def( - "CheckForStoppingEvents", - (void(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::CheckForStoppingEvents, - " " ) - .def( - "SetMaxSteps", - (void(AbstractCellCycleModelOdeSolver::*)(long int)) &AbstractCellCycleModelOdeSolver::SetMaxSteps, - " " , py::arg("numSteps") ) - .def( - "SetTolerances", - (void(AbstractCellCycleModelOdeSolver::*)(double, double)) &AbstractCellCycleModelOdeSolver::SetTolerances, - " " , py::arg("relTol") = 1.0E-4, py::arg("absTol") = 9.9999999999999995E-7 ) - .def( - "IsAdaptive", - (bool(AbstractCellCycleModelOdeSolver::*)()) &AbstractCellCycleModelOdeSolver::IsAdaptive, - " " ) - ; -} diff --git a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.hpp b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.hpp deleted file mode 100644 index e3168416..00000000 --- a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef AbstractCellCycleModelOdeSolver_hpp__pyplusplus_wrapper -#define AbstractCellCycleModelOdeSolver_hpp__pyplusplus_wrapper - -namespace py = pybind11; -void register_AbstractCellCycleModelOdeSolver_class(py::module &m); -#endif // AbstractCellCycleModelOdeSolver_hpp__pyplusplus_wrapper