From a71cfe6bd73d3d24e19daeb05ea339c1217c94d9 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 29 Feb 2024 16:49:42 +0000 Subject: [PATCH 01/40] #62 Search for castxml on PATH --- WrapPython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WrapPython.cmake b/WrapPython.cmake index ad392565..3956f863 100644 --- a/WrapPython.cmake +++ b/WrapPython.cmake @@ -36,7 +36,7 @@ add_compile_options(-Wno-unused-local-typedefs) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) # Used for binding generation -set(CASTXML_EXE_LOC "/usr/bin/castxml" CACHE FILEPATH "Path to the castxml executable.") +find_program(CASTXML_EXE_LOC castxml) # Find the Chaste and third party dependency header files. include_directories(${Chaste_INCLUDE_DIRS} ${Chaste_THIRD_PARTY_INCLUDE_DIRS}) From cf61be41d44b296d815b9c42a267177675796088 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 29 Feb 2024 16:50:25 +0000 Subject: [PATCH 02/40] #62 Update package_info with immersed boundary --- dynamic/wrapper_generators/package_info.yaml | 83 ++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index b95f0e8a..b39534db 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -119,6 +119,8 @@ modules: - name: NodesOnlyMesh - name: PottsElement - name: PottsMesh + - name: FluidSource + - name: ImmersedBoundaryElement - name: PottsMeshGenerator - name: VertexMesh excluded_methods: @@ -142,6 +144,7 @@ modules: excluded_methods: - GetInstanceOfMismatchedBoundaryNodes - name: Toroidal2dVertexMesh + - name: ImmersedBoundaryMesh - name: HoneycombMeshGenerator - name: HoneycombVertexMeshGenerator - name: CylindricalHoneycombMeshGenerator @@ -149,6 +152,8 @@ modules: - name: ToroidalHoneycombMeshGenerator - name: ToroidalHoneycombVertexMeshGenerator - name: VoronoiVertexMeshGenerator + - name: ImmersedBoundaryHoneycombMeshGenerator + - name: ImmersedBoundaryPalisadeMeshGenerator - name: cell_based source_locations: - cell_based/src @@ -342,6 +347,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: AbstractCellPopulationCountWriter @@ -350,6 +356,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: AbstractCellPopulationEventWriter @@ -358,6 +365,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: BoundaryNodeWriter @@ -366,6 +374,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellAgesWriter @@ -392,6 +401,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellIdWriter @@ -406,6 +416,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellMutationStatesWriter @@ -417,6 +428,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellPopulationAreaWriter @@ -425,6 +437,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellPopulationElementWriter @@ -433,6 +446,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellProliferativePhasesCountWriter @@ -441,6 +455,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellProliferativePhasesWriter @@ -452,6 +467,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellProliferativeTypesWriter @@ -466,6 +482,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: CellRosetteRankWriter @@ -480,6 +497,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: LegacyCellProliferativeTypesWriter @@ -491,6 +509,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: NodeVelocityWriter @@ -499,6 +518,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: PottsMeshWriter @@ -508,6 +528,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: VertexIntersectionSwapLocationsWriter @@ -516,6 +537,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: VertexT1SwapLocationsWriter @@ -524,6 +546,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: VertexT2SwapLocationsWriter @@ -532,6 +555,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: VertexT3SwapLocationsWriter @@ -540,6 +564,7 @@ modules: - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp - name: VoronoiDataWriter @@ -549,6 +574,13 @@ modules: - PottsBasedCellPopulation.hpp - NodeBasedCellPopulation.hpp - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - name: ImmersedBoundaryBoundaryCellWriter + source_includes: + - ImmersedBoundaryCellPopulation.hpp + - name: ImmersedBoundaryNeighbourNumberWriter + source_includes: + - ImmersedBoundaryCellPopulation.hpp - name: CellLabelWriter source_includes: - AbstractCellPopulation.hpp @@ -571,6 +603,8 @@ modules: - name: FixedCentreBasedDivisionRule - name: AbstractCentreBasedDivisionRule - name: ShortAxisVertexBasedDivisionRule + - name: AbstractImmersedBoundaryDivisionRule + - name: ShortAxisImmersedBoundaryDivisionRule - name: RandomCaSwitchingUpdateRule - name: ChemotaxisPottsUpdateRule - name: AbstractCaSwitchingUpdateRule @@ -595,6 +629,13 @@ modules: - name: NagaiHondaDifferentialAdhesionForce excluded_methods: - GetAdhesionParameter + - name: AbstractImmersedBoundaryForce + - name: ImmersedBoundaryKinematicFeedbackForce + - name: ImmersedBoundaryLinearDifferentialAdhesionForce + - name: ImmersedBoundaryLinearInteractionForce + - name: ImmersedBoundaryLinearMembraneForce + - name: ImmersedBoundaryMorseInteractionForce + - name: ImmersedBoundaryMorseMembraneForce - name: AbstractCellKiller - name: PlaneBasedCellKiller - name: ApoptoticCellKiller @@ -672,6 +713,45 @@ modules: - VertexT2SwapLocationsWriter.hpp - VertexT3SwapLocationsWriter.hpp - VoronoiDataWriter.hpp + - name: ImmersedBoundaryCellPopulation + excluded_methods: + - rGetMesh + - GetTetrahedralMeshForPdeModifier + 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 + - 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: MeshBasedCellPopulation excluded_methods: - GetVoronoiTessellation @@ -922,6 +1002,9 @@ modules: - name: TargetAreaLinearGrowthModifier - name: VolumeTrackingModifier - name: VtkSceneModifier + - name: ImmersedBoundarySimulationModifier + - name: ImmersedBoundarySvgWriter + - name: NormallyDistributedTargetAreaModifier - name: AbstractCellBasedSimulation excluded_methods: - GetSimulationModifiers From 615e4fa96a7017fdd8932936462e2e74bb2aa1f4 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 4 Mar 2024 12:45:47 +0000 Subject: [PATCH 03/40] #62 git ignore build directory --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e7597ede..daf9c297 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ src/python/dist* src/python/chaste.egg-info* # No api docs doc/api/build* +# Build folder +build/ \ No newline at end of file From 17e1d2ac368944d24b83c27fb286e6643012d5ce Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 4 Mar 2024 12:48:09 +0000 Subject: [PATCH 04/40] #62 remove empty src/mesh from cmake config --- ProjectIncludes.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectIncludes.cmake b/ProjectIncludes.cmake index cbaea6c3..1e17f456 100644 --- a/ProjectIncludes.cmake +++ b/ProjectIncludes.cmake @@ -34,7 +34,7 @@ set(PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/cell_based) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/ode) -list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/mesh) +# list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/mesh) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/tutorial) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/visualization) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dynamic) \ No newline at end of file From ad7a0e19fc33dc0b04be9876ec4ac2ab4ad8aef6 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Sat, 9 Mar 2024 19:50:08 +0000 Subject: [PATCH 05/40] Prettify package info --- dynamic/wrapper_generators/package_info.yaml | 2037 +++++++++--------- 1 file changed, 1025 insertions(+), 1012 deletions(-) diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index b39534db..ff524da2 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -1,4 +1,11 @@ name: chaste_project_PyChaste + +smart_ptr_type: boost::shared_ptr +pointer_call_policy: reference +reference_call_policy: reference_internal + +common_include_file: OFF + source_includes: - - @@ -6,1021 +13,1027 @@ source_includes: - - SmartPointers.hpp - UblasIncludes.hpp -smart_ptr_type: boost::shared_ptr -common_include_file: OFF + template_substitutions: - - signature: - replacement: [[2, 2], [3, 3]] + - signature: + replacement: [[2], [3]] + - signature: + replacement: [[2], [3]] - signature: replacement: [[2, 2], [3, 3]] - - signature: + - signature: replacement: [[2, 2], [3, 3]] - - signature: - replacement: [[2], [3]] - - signature: + - signature: replacement: [[2], [3]] -pointer_call_policy: reference -reference_call_policy: reference_internal - + modules: -- name: core - source_locations: - - global/src - - io/src - - linalg/src - classes: - - name: Identifiable - - name: PetscTools - excluded_methods: - - GetWorld # MPI not wrapped here - - Destroy # No non-const ref to PETSc types - - ReadPetscObject - - SetupMat - excluded_variables: - - MASTER_RANK # MPI not wrapped here - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: ReplicatableVector - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: Timer - - name: RelativeTo # enum - source_file: FileFinder.hpp - - name: FileFinder - - name: OutputFileHandler - source_includes: - - FileFinder.hpp # forward decl - excluded_methods: - - OpenOutputFile # std io not wrapped - - name: ProgressReporter - - name: RandomNumberGenerator - - name: TimeStepper - - name: ChasteBuildInfo - source_file: Version.hpp -- name: ode - source_locations: - - ode/src - classes: - - name: AbstractOdeSystemInformation - - name: AbstractPythonOdeSystemInformation - - name: AbstractOdeSystem - - name: DeltaNotchEdgeOdeSystem - - name: DeltaNotchInteriorOdeSystem - - name: Alarcon2004OxygenBasedCellCycleOdeSystem - - name: Goldbeter1991OdeSystem - - name: TysonNovak2001OdeSystem - excluded_methods: - - AnalyticJacobian # double ** jacobian - - name: DeltaNotchOdeSystem -- name: pde - source_locations: - - pde/src - classes: - - name: AbstractLinearPde - - name: AbstractLinearParabolicPde - - name: AbstractLinearEllipticPde - - name: AbstractLinearParabolicPdeSystemForCoupledOdeSystem - - name: AbstractNonlinearEllipticPde - - name: AbstractBoundaryCondition - - name: ConstBoundaryCondition - - name: PdeSimulationTime -- name: mesh - source_locations: - - mesh/src - classes: - - name: ChastePoint - - name: AbstractChasteRegion - - name: ChasteCuboid - - name: ChasteEllipsoid - - name: NodeAttributes - - name: Node - - name: Element - excluded_methods: - - CalculateCircumsphereVolume # method not found! - - name: Edge - - name: EdgeHelper - - name: EdgeOperation - - name: AbstractMesh - - name: AbstractTetrahedralMesh - - name: TetrahedralMesh - excluded_methods: - - FreeTriangulateIo - - InitialiseTriangulateIo - - name: MutableMesh - excluded_methods: - - SplitLongEdges # can't work with vec - - RescaleMeshFromBoundaryNode # method not found! - - name: AbstractElement - - name: MutableElement - - name: NodesOnlyMesh - - name: PottsElement - - name: PottsMesh - - name: FluidSource - - name: ImmersedBoundaryElement - - name: PottsMeshGenerator - - name: VertexMesh - excluded_methods: - - GetFace # dont have mixed dim elements - - GetEdgeHelper - constructor_arg_type_excludes: - - TetrahedralMesh<3, 3> - - TetrahedralMesh<2, 2> - - name: MutableVertexMesh - - name: Cylindrical2dVertexMesh - - name: Toroidal2dMesh - excluded_methods: - - GetInstanceOfMismatchedBoundaryNodes - - name: PeriodicNodesOnlyMesh - excluded_methods: - - SetUpBoxCollection # boost::numeric::ublas::zero_vector - - name: Cylindrical2dNodesOnlyMesh - excluded_methods: - - SetUpBoxCollection # boost::numeric::ublas::unit_vector - - name: Cylindrical2dMesh - excluded_methods: - - GetInstanceOfMismatchedBoundaryNodes - - name: Toroidal2dVertexMesh - - name: ImmersedBoundaryMesh - - name: HoneycombMeshGenerator - - name: HoneycombVertexMeshGenerator - - name: CylindricalHoneycombMeshGenerator - - name: CylindricalHoneycombVertexMeshGenerator - - name: ToroidalHoneycombMeshGenerator - - name: ToroidalHoneycombVertexMeshGenerator - - name: VoronoiVertexMeshGenerator - - name: ImmersedBoundaryHoneycombMeshGenerator - - name: ImmersedBoundaryPalisadeMeshGenerator -- name: cell_based - source_locations: - - cell_based/src - classes: - - name: AbstractCellCycleModel - - name: AbstractPhaseBasedCellCycleModel - - name: AbstractSimpleCellCycleModel - - name: AbstractSimplePhaseBasedCellCycleModel - - name: AbstractSimpleGenerationalCellCycleModel - - name: UniformCellCycleModel - - name: SimpleOxygenBasedCellCycleModel - - name: UniformG1GenerationalCellCycleModel - - name: NoCellCycleModel - - name: BiasedBernoulliTrialCellCycleModel - - name: LabelDependentBernoulliTrialCellCycleModel - - name: AlwaysDivideCellCycleModel - - name: AbstractOdeBasedCellCycleModel - - name: ContactInhibitionCellCycleModel - - name: StochasticOxygenBasedCellCycleModel - - name: GammaG1CellCycleModel - - name: ExponentialG1GenerationalCellCycleModel - - name: AbstractOdeBasedPhaseBasedCellCycleModel - - name: TysonNovakCellCycleModel - - name: Alarcon2004OxygenBasedCellCycleModel - - name: FixedSequenceCellCycleModel - - name: BernoulliTrialCellCycleModel - - name: FixedG1GenerationalCellCycleModel - - name: AbstractCellCycleModelOdeSolver - - name: CellCycleModelOdeSolver - - name: AbstractCellProperty - excluded_methods: - - IsType # exclude templated method - - name: CellwiseOdeSystemInformation - - name: CellPropertyCollection - excluded_methods: - - GetCellPropertyRegistry - - name: AbstractCellProliferativeType - - name: StemCellProliferativeType - - name: DefaultCellProliferativeType - - name: TransitCellProliferativeType - - name: DifferentiatedCellProliferativeType - - name: AbstractCellMutationState - - name: ApcOneHitCellMutationState - - name: ApcTwoHitCellMutationState - - name: BetaCateninOneHitCellMutationState - - name: WildTypeCellMutationState - - name: ApoptoticCellProperty - - name: CellData - - name: CellLabel - - name: CellAncestor - - name: CellId - - name: CellEdgeData - - name: CellPropertyRegistry - excluded_methods: - - rGetAllCellProperties - - TakeOwnership - - Get - - name: AbstractSrnModel - - name: AbstractOdeSrnModel - - name: NullSrnModel - - name: CellSrnModel - - name: DeltaNotchSrnModel - - name: DeltaNotchEdgeSrnModel - - name: DeltaNotchInteriorSrnModel - - name: Goldbeter1991SrnModel - - name: VertexBasedPopulationSrn - - name: Cell - excluded_methods: - - rGetCellPropertyCollection - - GetSrnModel - - name: CellsGenerator - template_substitutions: - - signature: - replacement: - - [NoCellCycleModel, 2] - - [NoCellCycleModel, 3] - - [UniformCellCycleModel, 2] - - [UniformCellCycleModel, 3] - - [SimpleOxygenBasedCellCycleModel, 2] - - [SimpleOxygenBasedCellCycleModel, 3] - - [UniformG1GenerationalCellCycleModel, 2] - - [UniformG1GenerationalCellCycleModel, 3] - - [BiasedBernoulliTrialCellCycleModel, 2] - - [BiasedBernoulliTrialCellCycleModel, 3] - - [LabelDependentBernoulliTrialCellCycleModel, 2] - - [LabelDependentBernoulliTrialCellCycleModel, 3] - - [AlwaysDivideCellCycleModel, 2] - - [AlwaysDivideCellCycleModel, 3] - - [ContactInhibitionCellCycleModel, 2] - - [ContactInhibitionCellCycleModel, 3] - - [StochasticOxygenBasedCellCycleModel, 2] - - [StochasticOxygenBasedCellCycleModel, 3] - - [GammaG1CellCycleModel, 2] - - [GammaG1CellCycleModel, 3] - - [ExponentialG1GenerationalCellCycleModel, 2] - - [ExponentialG1GenerationalCellCycleModel, 3] - - [TysonNovakCellCycleModel, 2] - - [TysonNovakCellCycleModel, 3] - - [Alarcon2004OxygenBasedCellCycleModel, 2] - - [Alarcon2004OxygenBasedCellCycleModel, 3] - - [FixedSequenceCellCycleModel, 2] - - [FixedSequenceCellCycleModel, 3] - - [BernoulliTrialCellCycleModel, 2] - - [BernoulliTrialCellCycleModel, 3] - - [FixedG1GenerationalCellCycleModel, 2] - - [FixedG1GenerationalCellCycleModel, 3] - custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/CellsGenerator_custom.py - source_includes: - - NoCellCycleModel.hpp - - UniformCellCycleModel.hpp - - SimpleOxygenBasedCellCycleModel.hpp - - UniformG1GenerationalCellCycleModel.hpp - - BiasedBernoulliTrialCellCycleModel.hpp - - LabelDependentBernoulliTrialCellCycleModel.hpp - - AlwaysDivideCellCycleModel.hpp - - ContactInhibitionCellCycleModel.hpp - - StochasticOxygenBasedCellCycleModel.hpp - - GammaG1CellCycleModel.hpp - - ExponentialG1GenerationalCellCycleModel.hpp - - TysonNovakCellCycleModel.hpp - - Alarcon2004OxygenBasedCellCycleModel.hpp - - FixedSequenceCellCycleModel.hpp - - BernoulliTrialCellCycleModel.hpp - - FixedG1GenerationalCellCycleModel.hpp - - name: CellwiseSourceEllipticPde - - name: AveragedSourceEllipticPde - - name: VolumeDependentAveragedSourceEllipticPde - - name: UniformSourceEllipticPde - - name: CellwiseSourceParabolicPde - - name: UniformSourceParabolicPde - - name: AveragedSourceParabolicPde - - name: CellBasedEllipticPdeSolver - source_includes: - - # forward decl - - # forward decl - - name: CellBasedParabolicPdeSolver - - name: AbstractCellBasedSimulationModifier - - name: AbstractPdeModifier - excluded_methods: - - GetSolution - - GetFeMesh - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: AbstractBoxDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: AbstractGrowingDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: EllipticGrowingDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: ParabolicGrowingDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: EllipticBoxDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: ParabolicBoxDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: AbstractCellBasedWriter - - name: AbstractCellWriter - source_includes: - - AbstractCellPopulation.hpp - - name: AbstractCellPopulationWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: AbstractCellPopulationCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: AbstractCellPopulationEventWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: BoundaryNodeWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellAgesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellAncestorWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellAppliedForceWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellCycleModelProteinConcentrationsWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellDataItemWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellDeltaNotchWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellDivisionLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellIdWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellLocationIndexWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellMutationStatesCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellMutationStatesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellPopulationAdjacencyMatrixWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellPopulationAreaWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellPopulationElementWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellProliferativePhasesCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellProliferativePhasesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellProliferativeTypesCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellProliferativeTypesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellRadiusWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellRemovalLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellRosetteRankWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellVolumesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: HeterotypicBoundaryLengthWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: LegacyCellProliferativeTypesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: NodeLocationWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: NodeVelocityWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: PottsMeshWriter - - name: RadialCellDataDistributionWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: VertexIntersectionSwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: VertexT1SwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: VertexT2SwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: VertexT3SwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: VoronoiDataWriter - source_includes: - - VertexBasedCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - name: ImmersedBoundaryBoundaryCellWriter - source_includes: - - ImmersedBoundaryCellPopulation.hpp - - name: ImmersedBoundaryNeighbourNumberWriter - source_includes: - - ImmersedBoundaryCellPopulation.hpp - - name: CellLabelWriter - source_includes: - - AbstractCellPopulation.hpp - - name: AbstractUpdateRule - - name: AbstractCaUpdateRule - - name: DiffusionCaUpdateRule - - name: AbstractPottsUpdateRule - - 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 - - name: BuskeCompressionForce - - name: BuskeElasticForce - - name: ChemotacticForce - - name: GeneralisedLinearSpringForce - - name: DifferentialAdhesionGeneralisedLinearSpringForce - - name: NagaiHondaForce - - name: DiffusionForce - - name: RepulsionForce - - name: WelikyOsterForce - - name: FarhadifarForce - excluded_methods: - - GetLineTensionParameter - - name: PlanarPolarisedFarhadifarForce - excluded_methods: - - GetLineTensionParameter - - name: NagaiHondaDifferentialAdhesionForce - excluded_methods: - - GetAdhesionParameter - - name: AbstractImmersedBoundaryForce - - name: ImmersedBoundaryKinematicFeedbackForce - - name: ImmersedBoundaryLinearDifferentialAdhesionForce - - name: ImmersedBoundaryLinearInteractionForce - - name: ImmersedBoundaryLinearMembraneForce - - name: ImmersedBoundaryMorseInteractionForce - - name: ImmersedBoundaryMorseMembraneForce - - name: AbstractCellKiller - - name: PlaneBasedCellKiller - - name: ApoptoticCellKiller - - name: TargetedCellKiller - - name: RandomCellKiller - - name: T2SwapCellKiller - - name: IsolatedLabelledCellKiller - - name: AbstractCellPopulationBoundaryCondition - - name: PlaneBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: AttractingPlaneBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: SphereGeometryBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: SlidingBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: AbstractCellPopulation - excluded_methods: - - rGetCells - source_includes: - - AbstractCellBasedSimulation.hpp - - name: AbstractOffLatticeCellPopulation - - name: AbstractCentreBasedCellPopulation - excluded_methods: - - MarkSpring - - UnmarkSpring - - name: AbstractOnLatticeCellPopulation - excluded_methods: - - GetNodeCorrespondingToCell - - MarkSpring - - UnmarkSpring - - name: NodeBasedCellPopulationWithParticles - - name: CaBasedCellPopulation - excluded_methods: - - rGetMesh - - GetTetrahedralMeshForPdeModifier - - GetNodeCorrespondingToCell - - rGetAvailableSpaces - 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 - - 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: ImmersedBoundaryCellPopulation - excluded_methods: - - rGetMesh - - GetTetrahedralMeshForPdeModifier - 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 - - 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: MeshBasedCellPopulation - excluded_methods: - - GetVoronoiTessellation - - rGetNodePairs - - GetTetrahedralMeshForPdeModifier - - 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 - - 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: MeshBasedCellPopulationWithGhostNodes - 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 - - 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: VertexBasedCellPopulation - excluded_methods: - - GetElementCorrespondingToCell - - GetElement - - GetTetrahedralMeshForPdeModifier - - rGetMesh - custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py - source_includes: - - AbstractCellBasedSimulation.hpp - - AbstractVertexBasedDivisionRule.hppBoundaryNodeWriter.hpp - - CellAgesWriter.hpp - - CellAncestorWriter.hpp - - CellAppliedForceWriter.hpp - - CellCycleModelProteinConcentrationsWriter.hpp - - CellDataItemWriter.hpp - - CellDeltaNotchWriter.hpp - - CellDivisionLocationsWriter.hpp - - CellIdWriter.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: PottsBasedCellPopulation - excluded_methods: - - GetElementCorrespondingToCell - - GetElement - - GetTetrahedralMeshForPdeModifier - - rGetMesh - - GetElementTessellation - - GetMutableMesh - 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 - - 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: NodeBasedCellPopulation - excluded_methods: - - rGetNodePairs - - GetTetrahedralMeshForPdeModifier - - 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 - - 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 - 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 - - 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: AbstractTargetAreaModifier - - name: SimpleTargetAreaModifier - - name: DivisionBiasTrackingModifier - - name: ExtrinsicPullModifier - - name: DeltaNotchEdgeInteriorTrackingModifier - - name: DeltaNotchTrackingModifier - - name: TargetAreaLinearGrowthModifier - - name: VolumeTrackingModifier - - name: VtkSceneModifier - - name: ImmersedBoundarySimulationModifier - - name: ImmersedBoundarySvgWriter - - name: NormallyDistributedTargetAreaModifier - - name: AbstractCellBasedSimulation - excluded_methods: - - GetSimulationModifiers - - name: SimulationTime - - name: OnLatticeSimulation - - name: OffLatticeSimulation - - name: PythonSimulationModifier -- name: tutorial - source_locations: - - projects/PyChaste/tutorial/src - classes: - - name: Hello -- name: visualization - source_locations: - - projects/PyChaste/visualization/src - classes: - - name: VtkScene - - name: AbstractPyChasteActorGenerator - - name: CellPopulationPyChasteActorGenerator + - name: core + source_locations: + - global/src + - io/src + - linalg/src + classes: + - name: Identifiable + - name: PetscTools + excluded_methods: + - GetWorld # MPI not wrapped here + - Destroy # No non-const ref to PETSc types + - ReadPetscObject + - SetupMat + excluded_variables: + - MASTER_RANK # MPI not wrapped here + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + - name: ReplicatableVector + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + - name: Timer + - name: RelativeTo # enum + source_file: FileFinder.hpp + - name: FileFinder + - name: OutputFileHandler + source_includes: + - FileFinder.hpp # forward decl + excluded_methods: + - OpenOutputFile # std io not wrapped + - name: ProgressReporter + - name: RandomNumberGenerator + - name: TimeStepper + - name: ChasteBuildInfo + source_file: Version.hpp + - name: ode + source_locations: + - ode/src + classes: + - name: AbstractOdeSystemInformation + - name: AbstractPythonOdeSystemInformation + - name: AbstractOdeSystem + - name: DeltaNotchEdgeOdeSystem + - name: DeltaNotchInteriorOdeSystem + - name: Alarcon2004OxygenBasedCellCycleOdeSystem + - name: Goldbeter1991OdeSystem + - name: TysonNovak2001OdeSystem + excluded_methods: + - AnalyticJacobian # double ** jacobian + - name: DeltaNotchOdeSystem + - name: pde + source_locations: + - pde/src + classes: + - name: AbstractLinearPde + - name: AbstractLinearParabolicPde + - name: AbstractLinearEllipticPde + - name: AbstractLinearParabolicPdeSystemForCoupledOdeSystem + template_substitutions: + - signature: + replacement: [[2, 2, 1], [3, 3, 1]] + - name: AbstractNonlinearEllipticPde + - name: AbstractBoundaryCondition + - name: ConstBoundaryCondition + - name: PdeSimulationTime + - name: mesh + source_locations: + - mesh/src + classes: + - name: ChastePoint + - name: AbstractChasteRegion + - name: ChasteCuboid + - name: ChasteEllipsoid + - name: NodeAttributes + - name: Node + - name: Element + excluded_methods: + - CalculateCircumsphereVolume # method not found! + - name: Edge + - name: EdgeHelper + - name: EdgeOperation + - name: AbstractMesh + - name: AbstractTetrahedralMesh + - name: TetrahedralMesh + excluded_methods: + - FreeTriangulateIo + - InitialiseTriangulateIo + - name: MutableMesh + excluded_methods: + - SplitLongEdges # can't work with vec + - RescaleMeshFromBoundaryNode # method not found! + - name: AbstractElement + - name: MutableElement + - name: NodesOnlyMesh + - name: PottsElement + - name: PottsMesh + - name: FluidSource + - name: ImmersedBoundaryElement + - name: PottsMeshGenerator + - name: VertexMesh + excluded_methods: + - GetFace # dont have mixed dim elements + - GetEdgeHelper + constructor_arg_type_excludes: + - TetrahedralMesh<3, 3> + - TetrahedralMesh<2, 2> + - name: MutableVertexMesh + - name: Cylindrical2dVertexMesh + - name: Toroidal2dMesh + excluded_methods: + - GetInstanceOfMismatchedBoundaryNodes + - name: PeriodicNodesOnlyMesh + excluded_methods: + - SetUpBoxCollection # boost::numeric::ublas::zero_vector + - name: Cylindrical2dNodesOnlyMesh + excluded_methods: + - SetUpBoxCollection # boost::numeric::ublas::unit_vector + - name: Cylindrical2dMesh + excluded_methods: + - GetInstanceOfMismatchedBoundaryNodes + - name: Toroidal2dVertexMesh + - name: ImmersedBoundaryMesh + - name: HoneycombMeshGenerator + - name: HoneycombVertexMeshGenerator + - name: CylindricalHoneycombMeshGenerator + - name: CylindricalHoneycombVertexMeshGenerator + - name: ToroidalHoneycombMeshGenerator + - name: ToroidalHoneycombVertexMeshGenerator + - name: VoronoiVertexMeshGenerator + - name: ImmersedBoundaryHoneycombMeshGenerator + - name: ImmersedBoundaryPalisadeMeshGenerator + - name: cell_based + source_locations: + - cell_based/src + classes: + - name: AbstractCellCycleModel + - name: AbstractPhaseBasedCellCycleModel + - name: AbstractSimpleCellCycleModel + - name: AbstractSimplePhaseBasedCellCycleModel + - name: AbstractSimpleGenerationalCellCycleModel + - name: UniformCellCycleModel + - name: SimpleOxygenBasedCellCycleModel + - name: UniformG1GenerationalCellCycleModel + - name: NoCellCycleModel + - name: BiasedBernoulliTrialCellCycleModel + - name: LabelDependentBernoulliTrialCellCycleModel + - name: AlwaysDivideCellCycleModel + - name: AbstractOdeBasedCellCycleModel + - name: ContactInhibitionCellCycleModel + - name: StochasticOxygenBasedCellCycleModel + - name: GammaG1CellCycleModel + - name: ExponentialG1GenerationalCellCycleModel + - name: AbstractOdeBasedPhaseBasedCellCycleModel + - name: TysonNovakCellCycleModel + - name: Alarcon2004OxygenBasedCellCycleModel + - name: FixedSequenceCellCycleModel + - name: BernoulliTrialCellCycleModel + - name: FixedG1GenerationalCellCycleModel + - name: AbstractCellCycleModelOdeSolver + ## - name: CellCycleModelOdeSolver + - name: AbstractCellProperty + excluded_methods: + - IsType # exclude templated method + ## - name: CellwiseOdeSystemInformation + - name: CellPropertyCollection + excluded_methods: + - GetCellPropertyRegistry + - name: AbstractCellProliferativeType + - name: StemCellProliferativeType + - name: DefaultCellProliferativeType + - name: TransitCellProliferativeType + - name: DifferentiatedCellProliferativeType + - name: AbstractCellMutationState + - name: ApcOneHitCellMutationState + - name: ApcTwoHitCellMutationState + - name: BetaCateninOneHitCellMutationState + - name: WildTypeCellMutationState + - name: ApoptoticCellProperty + - name: CellData + - name: CellLabel + - name: CellAncestor + - name: CellId + - name: CellEdgeData + - name: CellPropertyRegistry + excluded_methods: + - rGetAllCellProperties + - TakeOwnership + - Get + - name: AbstractSrnModel + - name: AbstractOdeSrnModel + - name: NullSrnModel + - name: CellSrnModel + - name: DeltaNotchSrnModel + - name: DeltaNotchEdgeSrnModel + - name: DeltaNotchInteriorSrnModel + - name: Goldbeter1991SrnModel + - name: VertexBasedPopulationSrn + - name: Cell + excluded_methods: + - rGetCellPropertyCollection + - GetSrnModel + - name: CellsGenerator + template_substitutions: + - signature: + replacement: + - [NoCellCycleModel, 2] + - [NoCellCycleModel, 3] + - [UniformCellCycleModel, 2] + - [UniformCellCycleModel, 3] + - [SimpleOxygenBasedCellCycleModel, 2] + - [SimpleOxygenBasedCellCycleModel, 3] + - [UniformG1GenerationalCellCycleModel, 2] + - [UniformG1GenerationalCellCycleModel, 3] + - [BiasedBernoulliTrialCellCycleModel, 2] + - [BiasedBernoulliTrialCellCycleModel, 3] + - [LabelDependentBernoulliTrialCellCycleModel, 2] + - [LabelDependentBernoulliTrialCellCycleModel, 3] + - [AlwaysDivideCellCycleModel, 2] + - [AlwaysDivideCellCycleModel, 3] + - [ContactInhibitionCellCycleModel, 2] + - [ContactInhibitionCellCycleModel, 3] + - [StochasticOxygenBasedCellCycleModel, 2] + - [StochasticOxygenBasedCellCycleModel, 3] + - [GammaG1CellCycleModel, 2] + - [GammaG1CellCycleModel, 3] + - [ExponentialG1GenerationalCellCycleModel, 2] + - [ExponentialG1GenerationalCellCycleModel, 3] + - [TysonNovakCellCycleModel, 2] + - [TysonNovakCellCycleModel, 3] + - [Alarcon2004OxygenBasedCellCycleModel, 2] + - [Alarcon2004OxygenBasedCellCycleModel, 3] + - [FixedSequenceCellCycleModel, 2] + - [FixedSequenceCellCycleModel, 3] + - [BernoulliTrialCellCycleModel, 2] + - [BernoulliTrialCellCycleModel, 3] + - [FixedG1GenerationalCellCycleModel, 2] + - [FixedG1GenerationalCellCycleModel, 3] + custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/CellsGenerator_custom.py + source_includes: + - NoCellCycleModel.hpp + - UniformCellCycleModel.hpp + - SimpleOxygenBasedCellCycleModel.hpp + - UniformG1GenerationalCellCycleModel.hpp + - BiasedBernoulliTrialCellCycleModel.hpp + - LabelDependentBernoulliTrialCellCycleModel.hpp + - AlwaysDivideCellCycleModel.hpp + - ContactInhibitionCellCycleModel.hpp + - StochasticOxygenBasedCellCycleModel.hpp + - GammaG1CellCycleModel.hpp + - ExponentialG1GenerationalCellCycleModel.hpp + - TysonNovakCellCycleModel.hpp + - Alarcon2004OxygenBasedCellCycleModel.hpp + - FixedSequenceCellCycleModel.hpp + - BernoulliTrialCellCycleModel.hpp + - FixedG1GenerationalCellCycleModel.hpp + - name: CellwiseSourceEllipticPde + - name: AveragedSourceEllipticPde + - name: VolumeDependentAveragedSourceEllipticPde + - name: UniformSourceEllipticPde + - name: CellwiseSourceParabolicPde + - name: UniformSourceParabolicPde + - name: AveragedSourceParabolicPde + - name: CellBasedEllipticPdeSolver + source_includes: + - # forward decl + - # forward decl + - name: CellBasedParabolicPdeSolver + - name: AbstractCellBasedSimulationModifier + - name: AbstractPdeModifier + excluded_methods: + - GetSolution + - GetFeMesh + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + - name: AbstractBoxDomainPdeModifier + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + - name: AbstractGrowingDomainPdeModifier + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + - name: EllipticGrowingDomainPdeModifier + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: ParabolicGrowingDomainPdeModifier + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: EllipticBoxDomainPdeModifier + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: ParabolicBoxDomainPdeModifier + source_includes: + - # forward decl + - # forward decl + - "PythonPetscObjectConverters.hpp" + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: AbstractCellBasedWriter + - name: AbstractCellWriter + source_includes: + - AbstractCellPopulation.hpp + - name: AbstractCellPopulationWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: AbstractCellPopulationCountWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: AbstractCellPopulationEventWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: BoundaryNodeWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellAgesWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellAncestorWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellAppliedForceWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellCycleModelProteinConcentrationsWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellDataItemWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellDeltaNotchWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellDivisionLocationsWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellIdWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellLocationIndexWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellMutationStatesCountWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellMutationStatesWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellPopulationAdjacencyMatrixWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellPopulationAreaWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellPopulationElementWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellProliferativePhasesCountWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellProliferativePhasesWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellProliferativeTypesCountWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellProliferativeTypesWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellRadiusWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellRemovalLocationsWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: CellRosetteRankWriter + source_includes: + - AbstractCellPopulation.hpp + - name: CellVolumesWriter + source_includes: + - AbstractCellPopulation.hpp + - name: HeterotypicBoundaryLengthWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: LegacyCellProliferativeTypesWriter + source_includes: + - AbstractCellPopulation.hpp + - name: NodeLocationWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: NodeVelocityWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: PottsMeshWriter + - name: RadialCellDataDistributionWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: VertexIntersectionSwapLocationsWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: VertexT1SwapLocationsWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: VertexT2SwapLocationsWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: VertexT3SwapLocationsWriter + source_includes: + - AbstractCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - VertexBasedCellPopulation.hpp + - name: VoronoiDataWriter + source_includes: + - VertexBasedCellPopulation.hpp + - MeshBasedCellPopulation.hpp + - PottsBasedCellPopulation.hpp + - NodeBasedCellPopulation.hpp + - CaBasedCellPopulation.hpp + - ImmersedBoundaryCellPopulation.hpp + - name: ImmersedBoundaryBoundaryCellWriter + source_includes: + - ImmersedBoundaryCellPopulation.hpp + - name: ImmersedBoundaryNeighbourNumberWriter + source_includes: + - ImmersedBoundaryCellPopulation.hpp + - name: CellLabelWriter + source_includes: + - AbstractCellPopulation.hpp + - name: AbstractUpdateRule + - name: AbstractCaUpdateRule + - name: DiffusionCaUpdateRule + - name: AbstractPottsUpdateRule + - 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 + - name: BuskeCompressionForce + - name: BuskeElasticForce + - name: ChemotacticForce + - name: GeneralisedLinearSpringForce + - name: DifferentialAdhesionGeneralisedLinearSpringForce + - name: NagaiHondaForce + - name: DiffusionForce + - name: RepulsionForce + - name: WelikyOsterForce + - name: FarhadifarForce + excluded_methods: + - GetLineTensionParameter + - name: PlanarPolarisedFarhadifarForce + excluded_methods: + - GetLineTensionParameter + - name: NagaiHondaDifferentialAdhesionForce + excluded_methods: + - GetAdhesionParameter + - name: AbstractImmersedBoundaryForce + - name: ImmersedBoundaryKinematicFeedbackForce + - name: ImmersedBoundaryLinearDifferentialAdhesionForce + - name: ImmersedBoundaryLinearInteractionForce + - name: ImmersedBoundaryLinearMembraneForce + - name: ImmersedBoundaryMorseInteractionForce + - name: ImmersedBoundaryMorseMembraneForce + - name: AbstractCellKiller + - name: PlaneBasedCellKiller + - name: ApoptoticCellKiller + - name: TargetedCellKiller + - name: RandomCellKiller + - name: T2SwapCellKiller + - name: IsolatedLabelledCellKiller + - name: AbstractCellPopulationBoundaryCondition + - name: PlaneBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + - name: AttractingPlaneBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + - name: SphereGeometryBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + - name: SlidingBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + - name: AbstractCellPopulation + excluded_methods: + - rGetCells + source_includes: + - AbstractCellBasedSimulation.hpp + - name: AbstractOffLatticeCellPopulation + - name: AbstractCentreBasedCellPopulation + template_substitutions: + - signature: + replacement: [[2, 2], [3, 3]] + excluded_methods: + - MarkSpring + - UnmarkSpring + - name: AbstractOnLatticeCellPopulation + excluded_methods: + - GetNodeCorrespondingToCell + - MarkSpring + - UnmarkSpring + - name: NodeBasedCellPopulationWithParticles + - name: CaBasedCellPopulation + excluded_methods: + - rGetMesh + - GetTetrahedralMeshForPdeModifier + - GetNodeCorrespondingToCell + - rGetAvailableSpaces + 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 + - 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: ImmersedBoundaryCellPopulation + excluded_methods: + - rGetMesh + - GetTetrahedralMeshForPdeModifier + 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 + - 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: MeshBasedCellPopulation + excluded_methods: + - GetVoronoiTessellation + - rGetNodePairs + - GetTetrahedralMeshForPdeModifier + - 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 + - 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: MeshBasedCellPopulationWithGhostNodes + 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 + - 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: VertexBasedCellPopulation + excluded_methods: + - GetElementCorrespondingToCell + - GetElement + - GetTetrahedralMeshForPdeModifier + - rGetMesh + custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py + source_includes: + - AbstractCellBasedSimulation.hpp + - AbstractVertexBasedDivisionRule.hppBoundaryNodeWriter.hpp + - CellAgesWriter.hpp + - CellAncestorWriter.hpp + - CellAppliedForceWriter.hpp + - CellCycleModelProteinConcentrationsWriter.hpp + - CellDataItemWriter.hpp + - CellDeltaNotchWriter.hpp + - CellDivisionLocationsWriter.hpp + - CellIdWriter.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: PottsBasedCellPopulation + excluded_methods: + - GetElementCorrespondingToCell + - GetElement + - GetTetrahedralMeshForPdeModifier + - rGetMesh + - GetElementTessellation + - GetMutableMesh + 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 + - 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: NodeBasedCellPopulation + excluded_methods: + - rGetNodePairs + - GetTetrahedralMeshForPdeModifier + - 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 + - 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 + 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 + - 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: AbstractTargetAreaModifier + - name: SimpleTargetAreaModifier + - name: DivisionBiasTrackingModifier + - name: ExtrinsicPullModifier + - name: DeltaNotchEdgeInteriorTrackingModifier + - name: DeltaNotchTrackingModifier + - name: TargetAreaLinearGrowthModifier + - name: VolumeTrackingModifier + - name: VtkSceneModifier + - name: ImmersedBoundarySimulationModifier + - name: ImmersedBoundarySvgWriter + - name: NormallyDistributedTargetAreaModifier + - name: AbstractCellBasedSimulation + template_substitutions: + - signature: + replacement: [[2, 2], [3, 3]] + excluded_methods: + - GetSimulationModifiers + - name: SimulationTime + - name: OnLatticeSimulation + - name: OffLatticeSimulation + - name: PythonSimulationModifier + - name: tutorial + source_locations: + - projects/PyChaste/tutorial/src + classes: + - name: Hello + - name: visualization + source_locations: + - projects/PyChaste/visualization/src + classes: + - name: VtkScene + - name: AbstractPyChasteActorGenerator + - name: CellPopulationPyChasteActorGenerator From 5a1c7dfec4ff5695f109016176a088ffe9f117ce Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 11:07:16 +0000 Subject: [PATCH 06/40] #62 restore correct custom population writer --- .../PopulationWriter_custom.py | 73 ++----------------- 1 file changed, 7 insertions(+), 66 deletions(-) diff --git a/dynamic/wrapper_generators/PopulationWriter_custom.py b/dynamic/wrapper_generators/PopulationWriter_custom.py index 7349cab2..bbba4a00 100644 --- a/dynamic/wrapper_generators/PopulationWriter_custom.py +++ b/dynamic/wrapper_generators/PopulationWriter_custom.py @@ -9,81 +9,22 @@ def __init__(self): def get_class_cpp_def_code(self, class_name): - cell_writers = [ - "CellAgesWriter", - "CellAncestorWriter", - "CellAppliedForceWriter", - "CellCycleModelProteinConcentrationsWriter", - "CellDataItemWriter", - "CellDeltaNotchWriter", - "CellIdWriter", - "CellLabelWriter", - "CellLocationIndexWriter", - "CellMutationStatesWriter", - "CellProliferativePhasesWriter", - "CellProliferativeTypesWriter", - "CellRadiusWriter", - "CellRosetteRankWriter", - "CellVolumesWriter", - "LegacyCellProliferativeTypesWriter", - ] - - for eachWriter in cell_writers: - local_reps = {"class_name": class_name, - "writer": eachWriter} - local_code = """\ - .def("AddCellWriter{writer}", &{class_name}::AddCellWriter<{writer}>) -""" - code += local_code.format(**local_reps) - - cell_population_count_writers = [ - "CellMutationStatesCountWriter", - "CellProliferativeTypesCountWriter", - "CellProliferativePhasesCountWriter", - ] - - for eachWriter in cell_population_count_writers: - local_reps = {"class_name": class_name, - "writer": eachWriter} - local_code = """\ - .def("AddCellPopulationCountWriter{writer}", &{class_name}::AddCellPopulationCountWriter<{writer}>) -""" - code += local_code.format(**local_reps) - - cell_population_event_writers = [ - "CellDivisionLocationsWriter", - "CellRemovalLocationsWriter", - ] - for eachWriter in cell_population_event_writers: + code = "" + population_writers = ["VoronoiDataWriter"] + for eachWriter in population_writers: local_reps = {"class_name": class_name, "writer": eachWriter} local_code = """\ - .def("AddCellPopulationEventWriter{writer}", &{class_name}::AddCellPopulationEventWriter<{writer}>) + .def("AddPopulationWriter{writer}", &{class_name}::AddPopulationWriter<{writer}>) """ code += local_code.format(**local_reps) - code = "" - population_writers = [ - "BoundaryNodeWriter", - "CellPopulationAdjacencyMatrixWriter", - "CellPopulationAreaWriter", - "CellPopulationElementWriter", - "HeterotypicBoundaryLengthWriter", - "NodeLocationWriter", - "NodeVelocityWriter", - "RadialCellDataDistributionWriter", - "VertexIntersectionSwapLocationsWriter", - "VertexT1SwapLocationsWriter", - "VertexT2SwapLocationsWriter", - "VertexT3SwapLocationsWriter", - "VoronoiDataWriter", - ] - for eachWriter in population_writers: + cell_writers = ["CellLabelWriter"] + for eachWriter in cell_writers: local_reps = {"class_name": class_name, "writer": eachWriter} local_code = """\ - .def("AddPopulationWriter{writer}", &{class_name}::AddPopulationWriter<{writer}>) + .def("AddCellWriter{writer}", &{class_name}::AddCellWriter<{writer}>) """ code += local_code.format(**local_reps) - return code From d32f6dd251b87a202aa47e66b80431e497fefaf7 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 11:15:06 +0000 Subject: [PATCH 07/40] #62 set generator std=c++17 --- dynamic/wrapper_generators/generate.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dynamic/wrapper_generators/generate.py b/dynamic/wrapper_generators/generate.py index 0df3538f..03a36ec8 100644 --- a/dynamic/wrapper_generators/generate.py +++ b/dynamic/wrapper_generators/generate.py @@ -47,9 +47,12 @@ castxml_binary = sys.argv[4] includes = sys.argv[5:] - generator = CppWrapperGenerator(source_root, - includes, - wrapper_root, - castxml_binary, - package_info_path) + generator = CppWrapperGenerator( + source_root, + includes, + wrapper_root, + castxml_binary, + package_info_path, + castxml_cflags="-std=c++17", + ) generator.generate_wrapper() From fabff5c42fe1674421c29e3d184d97850f9db78c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 12:23:07 +0000 Subject: [PATCH 08/40] #62 update wrapper header collection --- .../wrappers/wrapper_header_collection.hpp | 633 ++++++++++-------- 1 file changed, 369 insertions(+), 264 deletions(-) diff --git a/dynamic/wrappers/wrapper_header_collection.hpp b/dynamic/wrappers/wrapper_header_collection.hpp index 9865dafe..83cd659a 100644 --- a/dynamic/wrappers/wrapper_header_collection.hpp +++ b/dynamic/wrappers/wrapper_header_collection.hpp @@ -7,7 +7,6 @@ #include "ReplicatableVector.hpp" #include "Timer.hpp" #include "FileFinder.hpp" -#include "FileFinder.hpp" #include "OutputFileHandler.hpp" #include "ProgressReporter.hpp" #include "RandomNumberGenerator.hpp" @@ -16,35 +15,41 @@ #include "AbstractOdeSystemInformation.hpp" #include "AbstractPythonOdeSystemInformation.hpp" #include "AbstractOdeSystem.hpp" -#include "AbstractLinearPde.hpp" -#include "AbstractLinearParabolicPde.hpp" #include "DeltaNotchEdgeOdeSystem.hpp" #include "DeltaNotchInteriorOdeSystem.hpp" #include "Alarcon2004OxygenBasedCellCycleOdeSystem.hpp" #include "Goldbeter1991OdeSystem.hpp" #include "TysonNovak2001OdeSystem.hpp" #include "DeltaNotchOdeSystem.hpp" +#include "AbstractLinearPde.hpp" +#include "AbstractLinearParabolicPde.hpp" #include "AbstractLinearEllipticPde.hpp" +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem.hpp" #include "AbstractNonlinearEllipticPde.hpp" #include "AbstractBoundaryCondition.hpp" #include "ConstBoundaryCondition.hpp" #include "PdeSimulationTime.hpp" #include "ChastePoint.hpp" +#include "AbstractChasteRegion.hpp" +#include "ChasteCuboid.hpp" +#include "ChasteEllipsoid.hpp" #include "NodeAttributes.hpp" #include "Node.hpp" #include "Element.hpp" #include "Edge.hpp" #include "EdgeHelper.hpp" #include "EdgeOperation.hpp" -#include "AbstractElement.hpp" -#include "MutableElement.hpp" #include "AbstractMesh.hpp" #include "AbstractTetrahedralMesh.hpp" #include "TetrahedralMesh.hpp" #include "MutableMesh.hpp" +#include "AbstractElement.hpp" +#include "MutableElement.hpp" #include "NodesOnlyMesh.hpp" #include "PottsElement.hpp" #include "PottsMesh.hpp" +#include "FluidSource.hpp" +#include "ImmersedBoundaryElement.hpp" #include "PottsMeshGenerator.hpp" #include "VertexMesh.hpp" #include "MutableVertexMesh.hpp" @@ -54,13 +59,16 @@ #include "Cylindrical2dNodesOnlyMesh.hpp" #include "Cylindrical2dMesh.hpp" #include "Toroidal2dVertexMesh.hpp" +#include "ImmersedBoundaryMesh.hpp" #include "HoneycombMeshGenerator.hpp" #include "HoneycombVertexMeshGenerator.hpp" -#include "CylindricalHoneycombVertexMeshGenerator.hpp" #include "CylindricalHoneycombMeshGenerator.hpp" +#include "CylindricalHoneycombVertexMeshGenerator.hpp" #include "ToroidalHoneycombMeshGenerator.hpp" #include "ToroidalHoneycombVertexMeshGenerator.hpp" #include "VoronoiVertexMeshGenerator.hpp" +#include "ImmersedBoundaryHoneycombMeshGenerator.hpp" +#include "ImmersedBoundaryPalisadeMeshGenerator.hpp" #include "AbstractCellCycleModel.hpp" #include "AbstractPhaseBasedCellCycleModel.hpp" #include "AbstractSimpleCellCycleModel.hpp" @@ -120,11 +128,11 @@ #include "VolumeDependentAveragedSourceEllipticPde.hpp" #include "UniformSourceEllipticPde.hpp" #include "CellwiseSourceParabolicPde.hpp" -#include "AbstractCellBasedSimulationModifier.hpp" #include "UniformSourceParabolicPde.hpp" #include "AveragedSourceParabolicPde.hpp" #include "CellBasedEllipticPdeSolver.hpp" #include "CellBasedParabolicPdeSolver.hpp" +#include "AbstractCellBasedSimulationModifier.hpp" #include "AbstractPdeModifier.hpp" #include "AbstractBoxDomainPdeModifier.hpp" #include "AbstractGrowingDomainPdeModifier.hpp" @@ -132,7 +140,47 @@ #include "ParabolicGrowingDomainPdeModifier.hpp" #include "EllipticBoxDomainPdeModifier.hpp" #include "ParabolicBoxDomainPdeModifier.hpp" +#include "AbstractCellBasedWriter.hpp" +#include "AbstractCellWriter.hpp" +#include "AbstractCellPopulationWriter.hpp" +#include "AbstractCellPopulationCountWriter.hpp" +#include "AbstractCellPopulationEventWriter.hpp" +#include "BoundaryNodeWriter.hpp" +#include "CellAgesWriter.hpp" +#include "CellAncestorWriter.hpp" +#include "CellAppliedForceWriter.hpp" +#include "CellCycleModelProteinConcentrationsWriter.hpp" +#include "CellDataItemWriter.hpp" +#include "CellDeltaNotchWriter.hpp" +#include "CellDivisionLocationsWriter.hpp" +#include "CellIdWriter.hpp" +#include "CellLocationIndexWriter.hpp" +#include "CellMutationStatesCountWriter.hpp" +#include "CellMutationStatesWriter.hpp" +#include "CellPopulationAdjacencyMatrixWriter.hpp" +#include "CellPopulationAreaWriter.hpp" +#include "CellPopulationElementWriter.hpp" +#include "CellProliferativePhasesCountWriter.hpp" +#include "CellProliferativePhasesWriter.hpp" +#include "CellProliferativeTypesCountWriter.hpp" +#include "CellProliferativeTypesWriter.hpp" +#include "CellRadiusWriter.hpp" +#include "CellRemovalLocationsWriter.hpp" +#include "CellRosetteRankWriter.hpp" +#include "CellVolumesWriter.hpp" +#include "HeterotypicBoundaryLengthWriter.hpp" +#include "LegacyCellProliferativeTypesWriter.hpp" +#include "NodeLocationWriter.hpp" +#include "NodeVelocityWriter.hpp" +#include "PottsMeshWriter.hpp" +#include "RadialCellDataDistributionWriter.hpp" +#include "VertexIntersectionSwapLocationsWriter.hpp" +#include "VertexT1SwapLocationsWriter.hpp" +#include "VertexT2SwapLocationsWriter.hpp" +#include "VertexT3SwapLocationsWriter.hpp" #include "VoronoiDataWriter.hpp" +#include "ImmersedBoundaryBoundaryCellWriter.hpp" +#include "ImmersedBoundaryNeighbourNumberWriter.hpp" #include "CellLabelWriter.hpp" #include "AbstractUpdateRule.hpp" #include "AbstractCaUpdateRule.hpp" @@ -143,18 +191,23 @@ #include "AdhesionPottsUpdateRule.hpp" #include "DifferentialAdhesionPottsUpdateRule.hpp" #include "AbstractVertexBasedDivisionRule.hpp" -#include "AbstractForce.hpp" -#include "AbstractTwoBodyInteractionForce.hpp" #include "RandomDirectionVertexBasedDivisionRule.hpp" #include "VonMisesVertexBasedDivisionRule.hpp" #include "FixedVertexBasedDivisionRule.hpp" #include "AbstractCaBasedDivisionRule.hpp" #include "ShovingCaBasedDivisionRule.hpp" #include "ExclusionCaBasedDivisionRule.hpp" +#include "RandomDirectionCentreBasedDivisionRule.hpp" +#include "FixedCentreBasedDivisionRule.hpp" +#include "AbstractCentreBasedDivisionRule.hpp" #include "ShortAxisVertexBasedDivisionRule.hpp" +#include "AbstractImmersedBoundaryDivisionRule.hpp" +#include "ShortAxisImmersedBoundaryDivisionRule.hpp" #include "RandomCaSwitchingUpdateRule.hpp" #include "ChemotaxisPottsUpdateRule.hpp" #include "AbstractCaSwitchingUpdateRule.hpp" +#include "AbstractForce.hpp" +#include "AbstractTwoBodyInteractionForce.hpp" #include "BuskeAdhesiveForce.hpp" #include "BuskeCompressionForce.hpp" #include "BuskeElasticForce.hpp" @@ -168,24 +221,32 @@ #include "FarhadifarForce.hpp" #include "PlanarPolarisedFarhadifarForce.hpp" #include "NagaiHondaDifferentialAdhesionForce.hpp" +#include "AbstractImmersedBoundaryForce.hpp" +#include "ImmersedBoundaryKinematicFeedbackForce.hpp" +#include "ImmersedBoundaryLinearDifferentialAdhesionForce.hpp" +#include "ImmersedBoundaryLinearInteractionForce.hpp" +#include "ImmersedBoundaryLinearMembraneForce.hpp" +#include "ImmersedBoundaryMorseInteractionForce.hpp" +#include "ImmersedBoundaryMorseMembraneForce.hpp" #include "AbstractCellKiller.hpp" #include "PlaneBasedCellKiller.hpp" #include "ApoptoticCellKiller.hpp" -#include "AbstractCellPopulation.hpp" -#include "AbstractCellPopulationBoundaryCondition.hpp" -#include "PlaneBoundaryCondition.hpp" -#include "AttractingPlaneBoundaryCondition.hpp" #include "TargetedCellKiller.hpp" #include "RandomCellKiller.hpp" #include "T2SwapCellKiller.hpp" #include "IsolatedLabelledCellKiller.hpp" +#include "AbstractCellPopulationBoundaryCondition.hpp" +#include "PlaneBoundaryCondition.hpp" +#include "AttractingPlaneBoundaryCondition.hpp" #include "SphereGeometryBoundaryCondition.hpp" +#include "SlidingBoundaryCondition.hpp" +#include "AbstractCellPopulation.hpp" #include "AbstractOffLatticeCellPopulation.hpp" #include "AbstractCentreBasedCellPopulation.hpp" -#include "SlidingBoundaryCondition.hpp" #include "AbstractOnLatticeCellPopulation.hpp" #include "NodeBasedCellPopulationWithParticles.hpp" #include "CaBasedCellPopulation.hpp" +#include "ImmersedBoundaryCellPopulation.hpp" #include "MeshBasedCellPopulation.hpp" #include "MeshBasedCellPopulationWithGhostNodes.hpp" #include "VertexBasedCellPopulation.hpp" @@ -201,6 +262,9 @@ #include "TargetAreaLinearGrowthModifier.hpp" #include "VolumeTrackingModifier.hpp" #include "VtkSceneModifier.hpp" +#include "ImmersedBoundarySimulationModifier.hpp" +#include "ImmersedBoundarySvgWriter.hpp" +#include "NormallyDistributedTargetAreaModifier.hpp" #include "AbstractCellBasedSimulation.hpp" #include "SimulationTime.hpp" #include "OnLatticeSimulation.hpp" @@ -210,49 +274,6 @@ #include "VtkScene.hpp" #include "AbstractPyChasteActorGenerator.hpp" #include "CellPopulationPyChasteActorGenerator.hpp" -#include "AbstractChasteRegion.hpp" -#include "ChastePoint.hpp" -#include "ChasteCuboid.hpp" -#include "ChasteEllipsoid.hpp" -#include "AbstractCellBasedWriter.hpp" -#include "AbstractCellWriter.hpp" -#include "AbstractCellPopulationWriter.hpp" -#include "AbstractCellPopulationCountWriter.hpp" -#include "AbstractCellPopulationEventWriter.hpp" -#include "BoundaryNodeWriter.hpp" -#include "CellAgesWriter.hpp" -#include "CellAncestorWriter.hpp" -#include "CellAppliedForceWriter.hpp" -#include "CellCycleModelProteinConcentrationsWriter.hpp" -#include "CellDataItemWriter.hpp" -#include "CellDeltaNotchWriter.hpp" -#include "CellDivisionLocationsWriter.hpp" -#include "CellIdWriter.hpp" -#include "CellLocationIndexWriter.hpp" -#include "CellMutationStatesCountWriter.hpp" -#include "CellMutationStatesWriter.hpp" -#include "CellPopulationAdjacencyMatrixWriter.hpp" -#include "CellPopulationAreaWriter.hpp" -#include "CellPopulationElementWriter.hpp" -#include "CellProliferativePhasesCountWriter.hpp" -#include "CellProliferativePhasesWriter.hpp" -#include "CellProliferativeTypesCountWriter.hpp" -#include "CellProliferativeTypesWriter.hpp" -#include "CellRadiusWriter.hpp" -#include "CellRemovalLocationsWriter.hpp" -#include "CellRosetteRankWriter.hpp" -#include "CellVolumesWriter.hpp" -#include "HeterotypicBoundaryLengthWriter.hpp" -#include "LegacyCellProliferativeTypesWriter.hpp" -#include "NodeLocationWriter.hpp" -#include "NodeVelocityWriter.hpp" -#include "PottsMeshWriter.hpp" -#include "RadialCellDataDistributionWriter.hpp" -#include "VertexIntersectionSwapLocationsWriter.hpp" -#include "VertexT1SwapLocationsWriter.hpp" -#include "VertexT2SwapLocationsWriter.hpp" -#include "VertexT3SwapLocationsWriter.hpp" - // Instantiate Template Classes template class AbstractLinearPde<2,2>; @@ -261,6 +282,8 @@ template class AbstractLinearParabolicPde<2,2>; template class AbstractLinearParabolicPde<3,3>; template class AbstractLinearEllipticPde<2,2>; template class AbstractLinearEllipticPde<3,3>; +template class AbstractLinearParabolicPdeSystemForCoupledOdeSystem<2,2,1>; +template class AbstractLinearParabolicPdeSystemForCoupledOdeSystem<3,3,1>; template class AbstractNonlinearEllipticPde<2>; template class AbstractNonlinearEllipticPde<3>; template class AbstractBoundaryCondition<2>; @@ -269,6 +292,12 @@ template class ConstBoundaryCondition<2>; template class ConstBoundaryCondition<3>; template class ChastePoint<2>; template class ChastePoint<3>; +template class AbstractChasteRegion<2>; +template class AbstractChasteRegion<3>; +template class ChasteCuboid<2>; +template class ChasteCuboid<3>; +template class ChasteEllipsoid<2>; +template class ChasteEllipsoid<3>; template class NodeAttributes<2>; template class NodeAttributes<3>; template class Node<2>; @@ -279,10 +308,6 @@ template class Edge<2>; template class Edge<3>; template class EdgeHelper<2>; template class EdgeHelper<3>; -template class AbstractElement<2,2>; -template class AbstractElement<3,3>; -template class MutableElement<2,2>; -template class MutableElement<3,3>; template class AbstractMesh<2,2>; template class AbstractMesh<3,3>; template class AbstractTetrahedralMesh<2,2>; @@ -291,12 +316,20 @@ template class TetrahedralMesh<2,2>; template class TetrahedralMesh<3,3>; template class MutableMesh<2,2>; template class MutableMesh<3,3>; +template class AbstractElement<2,2>; +template class AbstractElement<3,3>; +template class MutableElement<2,2>; +template class MutableElement<3,3>; template class NodesOnlyMesh<2>; template class NodesOnlyMesh<3>; template class PottsElement<2>; template class PottsElement<3>; template class PottsMesh<2>; template class PottsMesh<3>; +template class FluidSource<2>; +template class FluidSource<3>; +template class ImmersedBoundaryElement<2,2>; +template class ImmersedBoundaryElement<3,3>; template class PottsMeshGenerator<2>; template class PottsMeshGenerator<3>; template class VertexMesh<2,2>; @@ -305,6 +338,8 @@ template class MutableVertexMesh<2,2>; template class MutableVertexMesh<3,3>; template class PeriodicNodesOnlyMesh<2>; template class PeriodicNodesOnlyMesh<3>; +template class ImmersedBoundaryMesh<2,2>; +template class ImmersedBoundaryMesh<3,3>; template class VertexBasedPopulationSrn<2>; template class VertexBasedPopulationSrn<3>; template class CellsGenerator; @@ -349,8 +384,6 @@ template class UniformSourceEllipticPde<2>; template class UniformSourceEllipticPde<3>; template class CellwiseSourceParabolicPde<2>; template class CellwiseSourceParabolicPde<3>; -template class AbstractCellBasedSimulationModifier<2,2>; -template class AbstractCellBasedSimulationModifier<3,3>; template class UniformSourceParabolicPde<2>; template class UniformSourceParabolicPde<3>; template class AveragedSourceParabolicPde<2>; @@ -359,6 +392,8 @@ template class CellBasedEllipticPdeSolver<2>; template class CellBasedEllipticPdeSolver<3>; template class CellBasedParabolicPdeSolver<2>; template class CellBasedParabolicPdeSolver<3>; +template class AbstractCellBasedSimulationModifier<2,2>; +template class AbstractCellBasedSimulationModifier<3,3>; template class AbstractPdeModifier<2>; template class AbstractPdeModifier<3>; template class AbstractBoxDomainPdeModifier<2>; @@ -373,8 +408,88 @@ template class EllipticBoxDomainPdeModifier<2>; template class EllipticBoxDomainPdeModifier<3>; template class ParabolicBoxDomainPdeModifier<2>; template class ParabolicBoxDomainPdeModifier<3>; +template class AbstractCellBasedWriter<2,2>; +template class AbstractCellBasedWriter<3,3>; +template class AbstractCellWriter<2,2>; +template class AbstractCellWriter<3,3>; +template class AbstractCellPopulationWriter<2,2>; +template class AbstractCellPopulationWriter<3,3>; +template class AbstractCellPopulationCountWriter<2,2>; +template class AbstractCellPopulationCountWriter<3,3>; +template class AbstractCellPopulationEventWriter<2,2>; +template class AbstractCellPopulationEventWriter<3,3>; +template class BoundaryNodeWriter<2,2>; +template class BoundaryNodeWriter<3,3>; +template class CellAgesWriter<2,2>; +template class CellAgesWriter<3,3>; +template class CellAncestorWriter<2,2>; +template class CellAncestorWriter<3,3>; +template class CellAppliedForceWriter<2,2>; +template class CellAppliedForceWriter<3,3>; +template class CellCycleModelProteinConcentrationsWriter<2,2>; +template class CellCycleModelProteinConcentrationsWriter<3,3>; +template class CellDataItemWriter<2,2>; +template class CellDataItemWriter<3,3>; +template class CellDeltaNotchWriter<2,2>; +template class CellDeltaNotchWriter<3,3>; +template class CellDivisionLocationsWriter<2,2>; +template class CellDivisionLocationsWriter<3,3>; +template class CellIdWriter<2,2>; +template class CellIdWriter<3,3>; +template class CellLocationIndexWriter<2,2>; +template class CellLocationIndexWriter<3,3>; +template class CellMutationStatesCountWriter<2,2>; +template class CellMutationStatesCountWriter<3,3>; +template class CellMutationStatesWriter<2,2>; +template class CellMutationStatesWriter<3,3>; +template class CellPopulationAdjacencyMatrixWriter<2,2>; +template class CellPopulationAdjacencyMatrixWriter<3,3>; +template class CellPopulationAreaWriter<2,2>; +template class CellPopulationAreaWriter<3,3>; +template class CellPopulationElementWriter<2,2>; +template class CellPopulationElementWriter<3,3>; +template class CellProliferativePhasesCountWriter<2,2>; +template class CellProliferativePhasesCountWriter<3,3>; +template class CellProliferativePhasesWriter<2,2>; +template class CellProliferativePhasesWriter<3,3>; +template class CellProliferativeTypesCountWriter<2,2>; +template class CellProliferativeTypesCountWriter<3,3>; +template class CellProliferativeTypesWriter<2,2>; +template class CellProliferativeTypesWriter<3,3>; +template class CellRadiusWriter<2,2>; +template class CellRadiusWriter<3,3>; +template class CellRemovalLocationsWriter<2,2>; +template class CellRemovalLocationsWriter<3,3>; +template class CellRosetteRankWriter<2,2>; +template class CellRosetteRankWriter<3,3>; +template class CellVolumesWriter<2,2>; +template class CellVolumesWriter<3,3>; +template class HeterotypicBoundaryLengthWriter<2,2>; +template class HeterotypicBoundaryLengthWriter<3,3>; +template class LegacyCellProliferativeTypesWriter<2,2>; +template class LegacyCellProliferativeTypesWriter<3,3>; +template class NodeLocationWriter<2,2>; +template class NodeLocationWriter<3,3>; +template class NodeVelocityWriter<2,2>; +template class NodeVelocityWriter<3,3>; +template class PottsMeshWriter<2>; +template class PottsMeshWriter<3>; +template class RadialCellDataDistributionWriter<2,2>; +template class RadialCellDataDistributionWriter<3,3>; +template class VertexIntersectionSwapLocationsWriter<2,2>; +template class VertexIntersectionSwapLocationsWriter<3,3>; +template class VertexT1SwapLocationsWriter<2,2>; +template class VertexT1SwapLocationsWriter<3,3>; +template class VertexT2SwapLocationsWriter<2,2>; +template class VertexT2SwapLocationsWriter<3,3>; +template class VertexT3SwapLocationsWriter<2,2>; +template class VertexT3SwapLocationsWriter<3,3>; template class VoronoiDataWriter<2,2>; template class VoronoiDataWriter<3,3>; +template class ImmersedBoundaryBoundaryCellWriter<2,2>; +template class ImmersedBoundaryBoundaryCellWriter<3,3>; +template class ImmersedBoundaryNeighbourNumberWriter<2,2>; +template class ImmersedBoundaryNeighbourNumberWriter<3,3>; template class CellLabelWriter<2,2>; template class CellLabelWriter<3,3>; template class AbstractUpdateRule<2>; @@ -395,10 +510,6 @@ template class DifferentialAdhesionPottsUpdateRule<2>; template class DifferentialAdhesionPottsUpdateRule<3>; template class AbstractVertexBasedDivisionRule<2>; template class AbstractVertexBasedDivisionRule<3>; -template class AbstractForce<2,2>; -template class AbstractForce<3,3>; -template class AbstractTwoBodyInteractionForce<2,2>; -template class AbstractTwoBodyInteractionForce<3,3>; template class RandomDirectionVertexBasedDivisionRule<2>; template class RandomDirectionVertexBasedDivisionRule<3>; template class VonMisesVertexBasedDivisionRule<2>; @@ -411,14 +522,28 @@ template class ShovingCaBasedDivisionRule<2>; template class ShovingCaBasedDivisionRule<3>; template class ExclusionCaBasedDivisionRule<2>; template class ExclusionCaBasedDivisionRule<3>; +template class RandomDirectionCentreBasedDivisionRule<2>; +template class RandomDirectionCentreBasedDivisionRule<3>; +template class FixedCentreBasedDivisionRule<2>; +template class FixedCentreBasedDivisionRule<3>; +template class AbstractCentreBasedDivisionRule<2>; +template class AbstractCentreBasedDivisionRule<3>; template class ShortAxisVertexBasedDivisionRule<2>; template class ShortAxisVertexBasedDivisionRule<3>; +template class AbstractImmersedBoundaryDivisionRule<2>; +template class AbstractImmersedBoundaryDivisionRule<3>; +template class ShortAxisImmersedBoundaryDivisionRule<2>; +template class ShortAxisImmersedBoundaryDivisionRule<3>; template class RandomCaSwitchingUpdateRule<2>; template class RandomCaSwitchingUpdateRule<3>; template class ChemotaxisPottsUpdateRule<2>; template class ChemotaxisPottsUpdateRule<3>; template class AbstractCaSwitchingUpdateRule<2>; template class AbstractCaSwitchingUpdateRule<3>; +template class AbstractForce<2,2>; +template class AbstractForce<3,3>; +template class AbstractTwoBodyInteractionForce<2,2>; +template class AbstractTwoBodyInteractionForce<3,3>; template class BuskeAdhesiveForce<2>; template class BuskeAdhesiveForce<3>; template class BuskeCompressionForce<2>; @@ -445,20 +570,26 @@ template class PlanarPolarisedFarhadifarForce<2>; template class PlanarPolarisedFarhadifarForce<3>; template class NagaiHondaDifferentialAdhesionForce<2>; template class NagaiHondaDifferentialAdhesionForce<3>; +template class AbstractImmersedBoundaryForce<2>; +template class AbstractImmersedBoundaryForce<3>; +template class ImmersedBoundaryKinematicFeedbackForce<2>; +template class ImmersedBoundaryKinematicFeedbackForce<3>; +template class ImmersedBoundaryLinearDifferentialAdhesionForce<2>; +template class ImmersedBoundaryLinearDifferentialAdhesionForce<3>; +template class ImmersedBoundaryLinearInteractionForce<2>; +template class ImmersedBoundaryLinearInteractionForce<3>; +template class ImmersedBoundaryLinearMembraneForce<2>; +template class ImmersedBoundaryLinearMembraneForce<3>; +template class ImmersedBoundaryMorseInteractionForce<2>; +template class ImmersedBoundaryMorseInteractionForce<3>; +template class ImmersedBoundaryMorseMembraneForce<2>; +template class ImmersedBoundaryMorseMembraneForce<3>; template class AbstractCellKiller<2>; template class AbstractCellKiller<3>; template class PlaneBasedCellKiller<2>; template class PlaneBasedCellKiller<3>; template class ApoptoticCellKiller<2>; template class ApoptoticCellKiller<3>; -template class AbstractCellPopulation<2,2>; -template class AbstractCellPopulation<3,3>; -template class AbstractCellPopulationBoundaryCondition<2,2>; -template class AbstractCellPopulationBoundaryCondition<3,3>; -template class PlaneBoundaryCondition<2,2>; -template class PlaneBoundaryCondition<3,3>; -template class AttractingPlaneBoundaryCondition<2,2>; -template class AttractingPlaneBoundaryCondition<3,3>; template class TargetedCellKiller<2>; template class TargetedCellKiller<3>; template class RandomCellKiller<2>; @@ -467,20 +598,30 @@ template class T2SwapCellKiller<2>; template class T2SwapCellKiller<3>; template class IsolatedLabelledCellKiller<2>; template class IsolatedLabelledCellKiller<3>; +template class AbstractCellPopulationBoundaryCondition<2,2>; +template class AbstractCellPopulationBoundaryCondition<3,3>; +template class PlaneBoundaryCondition<2,2>; +template class PlaneBoundaryCondition<3,3>; +template class AttractingPlaneBoundaryCondition<2,2>; +template class AttractingPlaneBoundaryCondition<3,3>; template class SphereGeometryBoundaryCondition<2>; template class SphereGeometryBoundaryCondition<3>; +template class SlidingBoundaryCondition<2>; +template class SlidingBoundaryCondition<3>; +template class AbstractCellPopulation<2,2>; +template class AbstractCellPopulation<3,3>; template class AbstractOffLatticeCellPopulation<2,2>; template class AbstractOffLatticeCellPopulation<3,3>; template class AbstractCentreBasedCellPopulation<2,2>; template class AbstractCentreBasedCellPopulation<3,3>; -template class SlidingBoundaryCondition<2>; -template class SlidingBoundaryCondition<3>; template class AbstractOnLatticeCellPopulation<2>; template class AbstractOnLatticeCellPopulation<3>; template class NodeBasedCellPopulationWithParticles<2>; template class NodeBasedCellPopulationWithParticles<3>; template class CaBasedCellPopulation<2>; template class CaBasedCellPopulation<3>; +template class ImmersedBoundaryCellPopulation<2>; +template class ImmersedBoundaryCellPopulation<3>; template class MeshBasedCellPopulation<2,2>; template class MeshBasedCellPopulation<3,3>; template class MeshBasedCellPopulationWithGhostNodes<2>; @@ -511,6 +652,12 @@ template class VolumeTrackingModifier<2>; template class VolumeTrackingModifier<3>; template class VtkSceneModifier<2>; template class VtkSceneModifier<3>; +template class ImmersedBoundarySimulationModifier<2>; +template class ImmersedBoundarySimulationModifier<3>; +template class ImmersedBoundarySvgWriter<2>; +template class ImmersedBoundarySvgWriter<3>; +template class NormallyDistributedTargetAreaModifier<2>; +template class NormallyDistributedTargetAreaModifier<3>; template class AbstractCellBasedSimulation<2,2>; template class AbstractCellBasedSimulation<3,3>; template class OnLatticeSimulation<2>; @@ -525,90 +672,6 @@ template class AbstractPyChasteActorGenerator<2>; template class AbstractPyChasteActorGenerator<3>; template class CellPopulationPyChasteActorGenerator<2>; template class CellPopulationPyChasteActorGenerator<3>; -template class AbstractChasteRegion<2>; -template class AbstractChasteRegion<3>; -template class ChastePoint<2>; -template class ChastePoint<3>; -template class ChasteCuboid<2>; -template class ChasteCuboid<3>; -template class ChasteEllipsoid<2>; -template class ChasteEllipsoid<3>; -template class AbstractCellBasedWriter<2,2>; -template class AbstractCellBasedWriter<3,3>; -template class AbstractCellWriter<2,2>; -template class AbstractCellWriter<3,3>; -template class AbstractCellPopulationWriter<2,2>; -template class AbstractCellPopulationWriter<3,3>; -template class AbstractCellPopulationCountWriter<2,2>; -template class AbstractCellPopulationCountWriter<3,3>; -template class AbstractCellPopulationEventWriter<2,2>; -template class AbstractCellPopulationEventWriter<3,3>; -template class BoundaryNodeWriter<2,2>; -template class BoundaryNodeWriter<3,3>; -template class CellAgesWriter<2,2>; -template class CellAgesWriter<3,3>; -template class CellAncestorWriter<2,2>; -template class CellAncestorWriter<3,3>; -template class CellAppliedForceWriter<2,2>; -template class CellAppliedForceWriter<3,3>; -template class CellCycleModelProteinConcentrationsWriter<2,2>; -template class CellCycleModelProteinConcentrationsWriter<3,3>; -template class CellDataItemWriter<2,2>; -template class CellDataItemWriter<3,3>; -template class CellDeltaNotchWriter<2,2>; -template class CellDeltaNotchWriter<3,3>; -template class CellDivisionLocationsWriter<2,2>; -template class CellDivisionLocationsWriter<3,3>; -template class CellIdWriter<2,2>; -template class CellIdWriter<3,3>; -template class CellLocationIndexWriter<2,2>; -template class CellLocationIndexWriter<3,3>; -template class CellMutationStatesCountWriter<2,2>; -template class CellMutationStatesCountWriter<3,3>; -template class CellMutationStatesWriter<2,2>; -template class CellMutationStatesWriter<3,3>; -template class CellPopulationAdjacencyMatrixWriter<2,2>; -template class CellPopulationAdjacencyMatrixWriter<3,3>; -template class CellPopulationAreaWriter<2,2>; -template class CellPopulationAreaWriter<3,3>; -template class CellPopulationElementWriter<2,2>; -template class CellPopulationElementWriter<3,3>; -template class CellProliferativePhasesCountWriter<2,2>; -template class CellProliferativePhasesCountWriter<3,3>; -template class CellProliferativePhasesWriter<2,2>; -template class CellProliferativePhasesWriter<3,3>; -template class CellProliferativeTypesCountWriter<2,2>; -template class CellProliferativeTypesCountWriter<3,3>; -template class CellProliferativeTypesWriter<2,2>; -template class CellProliferativeTypesWriter<3,3>; -template class CellRadiusWriter<2,2>; -template class CellRadiusWriter<3,3>; -template class CellRemovalLocationsWriter<2,2>; -template class CellRemovalLocationsWriter<3,3>; -template class CellRosetteRankWriter<2,2>; -template class CellRosetteRankWriter<3,3>; -template class CellVolumesWriter<2,2>; -template class CellVolumesWriter<3,3>; -template class HeterotypicBoundaryLengthWriter<2,2>; -template class HeterotypicBoundaryLengthWriter<3,3>; -template class LegacyCellProliferativeTypesWriter<2,2>; -template class LegacyCellProliferativeTypesWriter<3,3>; -template class NodeLocationWriter<2,2>; -template class NodeLocationWriter<3,3>; -template class NodeVelocityWriter<2,2>; -template class NodeVelocityWriter<3,3>; -template class PottsMeshWriter<2>; -template class PottsMeshWriter<3>; -template class RadialCellDataDistributionWriter<2,2>; -template class RadialCellDataDistributionWriter<3,3>; -template class VertexIntersectionSwapLocationsWriter<2,2>; -template class VertexIntersectionSwapLocationsWriter<3,3>; -template class VertexT1SwapLocationsWriter<2,2>; -template class VertexT1SwapLocationsWriter<3,3>; -template class VertexT2SwapLocationsWriter<2,2>; -template class VertexT2SwapLocationsWriter<3,3>; -template class VertexT3SwapLocationsWriter<2,2>; -template class VertexT3SwapLocationsWriter<3,3>; // Typedef for nicer naming namespace cppwg{ @@ -618,6 +681,8 @@ typedef AbstractLinearParabolicPde<2,2> AbstractLinearParabolicPde2_2; typedef AbstractLinearParabolicPde<3,3> AbstractLinearParabolicPde3_3; typedef AbstractLinearEllipticPde<2,2> AbstractLinearEllipticPde2_2; typedef AbstractLinearEllipticPde<3,3> AbstractLinearEllipticPde3_3; +typedef AbstractLinearParabolicPdeSystemForCoupledOdeSystem<2,2,1> AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1; +typedef AbstractLinearParabolicPdeSystemForCoupledOdeSystem<3,3,1> AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1; typedef AbstractNonlinearEllipticPde<2> AbstractNonlinearEllipticPde2; typedef AbstractNonlinearEllipticPde<3> AbstractNonlinearEllipticPde3; typedef AbstractBoundaryCondition<2> AbstractBoundaryCondition2; @@ -626,6 +691,12 @@ typedef ConstBoundaryCondition<2> ConstBoundaryCondition2; typedef ConstBoundaryCondition<3> ConstBoundaryCondition3; typedef ChastePoint<2> ChastePoint2; typedef ChastePoint<3> ChastePoint3; +typedef AbstractChasteRegion<2> AbstractChasteRegion2; +typedef AbstractChasteRegion<3> AbstractChasteRegion3; +typedef ChasteCuboid<2> ChasteCuboid2; +typedef ChasteCuboid<3> ChasteCuboid3; +typedef ChasteEllipsoid<2> ChasteEllipsoid2; +typedef ChasteEllipsoid<3> ChasteEllipsoid3; typedef NodeAttributes<2> NodeAttributes2; typedef NodeAttributes<3> NodeAttributes3; typedef Node<2> Node2; @@ -636,10 +707,6 @@ typedef Edge<2> Edge2; typedef Edge<3> Edge3; typedef EdgeHelper<2> EdgeHelper2; typedef EdgeHelper<3> EdgeHelper3; -typedef AbstractElement<2,2> AbstractElement2_2; -typedef AbstractElement<3,3> AbstractElement3_3; -typedef MutableElement<2,2> MutableElement2_2; -typedef MutableElement<3,3> MutableElement3_3; typedef AbstractMesh<2,2> AbstractMesh2_2; typedef AbstractMesh<3,3> AbstractMesh3_3; typedef AbstractTetrahedralMesh<2,2> AbstractTetrahedralMesh2_2; @@ -648,12 +715,20 @@ typedef TetrahedralMesh<2,2> TetrahedralMesh2_2; typedef TetrahedralMesh<3,3> TetrahedralMesh3_3; typedef MutableMesh<2,2> MutableMesh2_2; typedef MutableMesh<3,3> MutableMesh3_3; +typedef AbstractElement<2,2> AbstractElement2_2; +typedef AbstractElement<3,3> AbstractElement3_3; +typedef MutableElement<2,2> MutableElement2_2; +typedef MutableElement<3,3> MutableElement3_3; typedef NodesOnlyMesh<2> NodesOnlyMesh2; typedef NodesOnlyMesh<3> NodesOnlyMesh3; typedef PottsElement<2> PottsElement2; typedef PottsElement<3> PottsElement3; typedef PottsMesh<2> PottsMesh2; typedef PottsMesh<3> PottsMesh3; +typedef FluidSource<2> FluidSource2; +typedef FluidSource<3> FluidSource3; +typedef ImmersedBoundaryElement<2,2> ImmersedBoundaryElement2_2; +typedef ImmersedBoundaryElement<3,3> ImmersedBoundaryElement3_3; typedef PottsMeshGenerator<2> PottsMeshGenerator2; typedef PottsMeshGenerator<3> PottsMeshGenerator3; typedef VertexMesh<2,2> VertexMesh2_2; @@ -662,6 +737,8 @@ typedef MutableVertexMesh<2,2> MutableVertexMesh2_2; typedef MutableVertexMesh<3,3> MutableVertexMesh3_3; typedef PeriodicNodesOnlyMesh<2> PeriodicNodesOnlyMesh2; typedef PeriodicNodesOnlyMesh<3> PeriodicNodesOnlyMesh3; +typedef ImmersedBoundaryMesh<2,2> ImmersedBoundaryMesh2_2; +typedef ImmersedBoundaryMesh<3,3> ImmersedBoundaryMesh3_3; typedef VertexBasedPopulationSrn<2> VertexBasedPopulationSrn2; typedef VertexBasedPopulationSrn<3> VertexBasedPopulationSrn3; typedef CellsGenerator CellsGeneratorNoCellCycleModel_2; @@ -706,8 +783,6 @@ typedef UniformSourceEllipticPde<2> UniformSourceEllipticPde2; typedef UniformSourceEllipticPde<3> UniformSourceEllipticPde3; typedef CellwiseSourceParabolicPde<2> CellwiseSourceParabolicPde2; typedef CellwiseSourceParabolicPde<3> CellwiseSourceParabolicPde3; -typedef AbstractCellBasedSimulationModifier<2,2> AbstractCellBasedSimulationModifier2_2; -typedef AbstractCellBasedSimulationModifier<3,3> AbstractCellBasedSimulationModifier3_3; typedef UniformSourceParabolicPde<2> UniformSourceParabolicPde2; typedef UniformSourceParabolicPde<3> UniformSourceParabolicPde3; typedef AveragedSourceParabolicPde<2> AveragedSourceParabolicPde2; @@ -716,6 +791,8 @@ typedef CellBasedEllipticPdeSolver<2> CellBasedEllipticPdeSolver2; typedef CellBasedEllipticPdeSolver<3> CellBasedEllipticPdeSolver3; typedef CellBasedParabolicPdeSolver<2> CellBasedParabolicPdeSolver2; typedef CellBasedParabolicPdeSolver<3> CellBasedParabolicPdeSolver3; +typedef AbstractCellBasedSimulationModifier<2,2> AbstractCellBasedSimulationModifier2_2; +typedef AbstractCellBasedSimulationModifier<3,3> AbstractCellBasedSimulationModifier3_3; typedef AbstractPdeModifier<2> AbstractPdeModifier2; typedef AbstractPdeModifier<3> AbstractPdeModifier3; typedef AbstractBoxDomainPdeModifier<2> AbstractBoxDomainPdeModifier2; @@ -730,8 +807,88 @@ typedef EllipticBoxDomainPdeModifier<2> EllipticBoxDomainPdeModifier2; typedef EllipticBoxDomainPdeModifier<3> EllipticBoxDomainPdeModifier3; typedef ParabolicBoxDomainPdeModifier<2> ParabolicBoxDomainPdeModifier2; typedef ParabolicBoxDomainPdeModifier<3> ParabolicBoxDomainPdeModifier3; +typedef AbstractCellBasedWriter<2,2> AbstractCellBasedWriter2_2; +typedef AbstractCellBasedWriter<3,3> AbstractCellBasedWriter3_3; +typedef AbstractCellWriter<2,2> AbstractCellWriter2_2; +typedef AbstractCellWriter<3,3> AbstractCellWriter3_3; +typedef AbstractCellPopulationWriter<2,2> AbstractCellPopulationWriter2_2; +typedef AbstractCellPopulationWriter<3,3> AbstractCellPopulationWriter3_3; +typedef AbstractCellPopulationCountWriter<2,2> AbstractCellPopulationCountWriter2_2; +typedef AbstractCellPopulationCountWriter<3,3> AbstractCellPopulationCountWriter3_3; +typedef AbstractCellPopulationEventWriter<2,2> AbstractCellPopulationEventWriter2_2; +typedef AbstractCellPopulationEventWriter<3,3> AbstractCellPopulationEventWriter3_3; +typedef BoundaryNodeWriter<2,2> BoundaryNodeWriter2_2; +typedef BoundaryNodeWriter<3,3> BoundaryNodeWriter3_3; +typedef CellAgesWriter<2,2> CellAgesWriter2_2; +typedef CellAgesWriter<3,3> CellAgesWriter3_3; +typedef CellAncestorWriter<2,2> CellAncestorWriter2_2; +typedef CellAncestorWriter<3,3> CellAncestorWriter3_3; +typedef CellAppliedForceWriter<2,2> CellAppliedForceWriter2_2; +typedef CellAppliedForceWriter<3,3> CellAppliedForceWriter3_3; +typedef CellCycleModelProteinConcentrationsWriter<2,2> CellCycleModelProteinConcentrationsWriter2_2; +typedef CellCycleModelProteinConcentrationsWriter<3,3> CellCycleModelProteinConcentrationsWriter3_3; +typedef CellDataItemWriter<2,2> CellDataItemWriter2_2; +typedef CellDataItemWriter<3,3> CellDataItemWriter3_3; +typedef CellDeltaNotchWriter<2,2> CellDeltaNotchWriter2_2; +typedef CellDeltaNotchWriter<3,3> CellDeltaNotchWriter3_3; +typedef CellDivisionLocationsWriter<2,2> CellDivisionLocationsWriter2_2; +typedef CellDivisionLocationsWriter<3,3> CellDivisionLocationsWriter3_3; +typedef CellIdWriter<2,2> CellIdWriter2_2; +typedef CellIdWriter<3,3> CellIdWriter3_3; +typedef CellLocationIndexWriter<2,2> CellLocationIndexWriter2_2; +typedef CellLocationIndexWriter<3,3> CellLocationIndexWriter3_3; +typedef CellMutationStatesCountWriter<2,2> CellMutationStatesCountWriter2_2; +typedef CellMutationStatesCountWriter<3,3> CellMutationStatesCountWriter3_3; +typedef CellMutationStatesWriter<2,2> CellMutationStatesWriter2_2; +typedef CellMutationStatesWriter<3,3> CellMutationStatesWriter3_3; +typedef CellPopulationAdjacencyMatrixWriter<2,2> CellPopulationAdjacencyMatrixWriter2_2; +typedef CellPopulationAdjacencyMatrixWriter<3,3> CellPopulationAdjacencyMatrixWriter3_3; +typedef CellPopulationAreaWriter<2,2> CellPopulationAreaWriter2_2; +typedef CellPopulationAreaWriter<3,3> CellPopulationAreaWriter3_3; +typedef CellPopulationElementWriter<2,2> CellPopulationElementWriter2_2; +typedef CellPopulationElementWriter<3,3> CellPopulationElementWriter3_3; +typedef CellProliferativePhasesCountWriter<2,2> CellProliferativePhasesCountWriter2_2; +typedef CellProliferativePhasesCountWriter<3,3> CellProliferativePhasesCountWriter3_3; +typedef CellProliferativePhasesWriter<2,2> CellProliferativePhasesWriter2_2; +typedef CellProliferativePhasesWriter<3,3> CellProliferativePhasesWriter3_3; +typedef CellProliferativeTypesCountWriter<2,2> CellProliferativeTypesCountWriter2_2; +typedef CellProliferativeTypesCountWriter<3,3> CellProliferativeTypesCountWriter3_3; +typedef CellProliferativeTypesWriter<2,2> CellProliferativeTypesWriter2_2; +typedef CellProliferativeTypesWriter<3,3> CellProliferativeTypesWriter3_3; +typedef CellRadiusWriter<2,2> CellRadiusWriter2_2; +typedef CellRadiusWriter<3,3> CellRadiusWriter3_3; +typedef CellRemovalLocationsWriter<2,2> CellRemovalLocationsWriter2_2; +typedef CellRemovalLocationsWriter<3,3> CellRemovalLocationsWriter3_3; +typedef CellRosetteRankWriter<2,2> CellRosetteRankWriter2_2; +typedef CellRosetteRankWriter<3,3> CellRosetteRankWriter3_3; +typedef CellVolumesWriter<2,2> CellVolumesWriter2_2; +typedef CellVolumesWriter<3,3> CellVolumesWriter3_3; +typedef HeterotypicBoundaryLengthWriter<2,2> HeterotypicBoundaryLengthWriter2_2; +typedef HeterotypicBoundaryLengthWriter<3,3> HeterotypicBoundaryLengthWriter3_3; +typedef LegacyCellProliferativeTypesWriter<2,2> LegacyCellProliferativeTypesWriter2_2; +typedef LegacyCellProliferativeTypesWriter<3,3> LegacyCellProliferativeTypesWriter3_3; +typedef NodeLocationWriter<2,2> NodeLocationWriter2_2; +typedef NodeLocationWriter<3,3> NodeLocationWriter3_3; +typedef NodeVelocityWriter<2,2> NodeVelocityWriter2_2; +typedef NodeVelocityWriter<3,3> NodeVelocityWriter3_3; +typedef PottsMeshWriter<2> PottsMeshWriter2; +typedef PottsMeshWriter<3> PottsMeshWriter3; +typedef RadialCellDataDistributionWriter<2,2> RadialCellDataDistributionWriter2_2; +typedef RadialCellDataDistributionWriter<3,3> RadialCellDataDistributionWriter3_3; +typedef VertexIntersectionSwapLocationsWriter<2,2> VertexIntersectionSwapLocationsWriter2_2; +typedef VertexIntersectionSwapLocationsWriter<3,3> VertexIntersectionSwapLocationsWriter3_3; +typedef VertexT1SwapLocationsWriter<2,2> VertexT1SwapLocationsWriter2_2; +typedef VertexT1SwapLocationsWriter<3,3> VertexT1SwapLocationsWriter3_3; +typedef VertexT2SwapLocationsWriter<2,2> VertexT2SwapLocationsWriter2_2; +typedef VertexT2SwapLocationsWriter<3,3> VertexT2SwapLocationsWriter3_3; +typedef VertexT3SwapLocationsWriter<2,2> VertexT3SwapLocationsWriter2_2; +typedef VertexT3SwapLocationsWriter<3,3> VertexT3SwapLocationsWriter3_3; typedef VoronoiDataWriter<2,2> VoronoiDataWriter2_2; typedef VoronoiDataWriter<3,3> VoronoiDataWriter3_3; +typedef ImmersedBoundaryBoundaryCellWriter<2,2> ImmersedBoundaryBoundaryCellWriter2_2; +typedef ImmersedBoundaryBoundaryCellWriter<3,3> ImmersedBoundaryBoundaryCellWriter3_3; +typedef ImmersedBoundaryNeighbourNumberWriter<2,2> ImmersedBoundaryNeighbourNumberWriter2_2; +typedef ImmersedBoundaryNeighbourNumberWriter<3,3> ImmersedBoundaryNeighbourNumberWriter3_3; typedef CellLabelWriter<2,2> CellLabelWriter2_2; typedef CellLabelWriter<3,3> CellLabelWriter3_3; typedef AbstractUpdateRule<2> AbstractUpdateRule2; @@ -752,10 +909,6 @@ typedef DifferentialAdhesionPottsUpdateRule<2> DifferentialAdhesionPottsUpdateRu typedef DifferentialAdhesionPottsUpdateRule<3> DifferentialAdhesionPottsUpdateRule3; typedef AbstractVertexBasedDivisionRule<2> AbstractVertexBasedDivisionRule2; typedef AbstractVertexBasedDivisionRule<3> AbstractVertexBasedDivisionRule3; -typedef AbstractForce<2,2> AbstractForce2_2; -typedef AbstractForce<3,3> AbstractForce3_3; -typedef AbstractTwoBodyInteractionForce<2,2> AbstractTwoBodyInteractionForce2_2; -typedef AbstractTwoBodyInteractionForce<3,3> AbstractTwoBodyInteractionForce3_3; typedef RandomDirectionVertexBasedDivisionRule<2> RandomDirectionVertexBasedDivisionRule2; typedef RandomDirectionVertexBasedDivisionRule<3> RandomDirectionVertexBasedDivisionRule3; typedef VonMisesVertexBasedDivisionRule<2> VonMisesVertexBasedDivisionRule2; @@ -768,14 +921,28 @@ typedef ShovingCaBasedDivisionRule<2> ShovingCaBasedDivisionRule2; typedef ShovingCaBasedDivisionRule<3> ShovingCaBasedDivisionRule3; typedef ExclusionCaBasedDivisionRule<2> ExclusionCaBasedDivisionRule2; typedef ExclusionCaBasedDivisionRule<3> ExclusionCaBasedDivisionRule3; +typedef RandomDirectionCentreBasedDivisionRule<2> RandomDirectionCentreBasedDivisionRule2; +typedef RandomDirectionCentreBasedDivisionRule<3> RandomDirectionCentreBasedDivisionRule3; +typedef FixedCentreBasedDivisionRule<2> FixedCentreBasedDivisionRule2; +typedef FixedCentreBasedDivisionRule<3> FixedCentreBasedDivisionRule3; +typedef AbstractCentreBasedDivisionRule<2> AbstractCentreBasedDivisionRule2; +typedef AbstractCentreBasedDivisionRule<3> AbstractCentreBasedDivisionRule3; typedef ShortAxisVertexBasedDivisionRule<2> ShortAxisVertexBasedDivisionRule2; typedef ShortAxisVertexBasedDivisionRule<3> ShortAxisVertexBasedDivisionRule3; +typedef AbstractImmersedBoundaryDivisionRule<2> AbstractImmersedBoundaryDivisionRule2; +typedef AbstractImmersedBoundaryDivisionRule<3> AbstractImmersedBoundaryDivisionRule3; +typedef ShortAxisImmersedBoundaryDivisionRule<2> ShortAxisImmersedBoundaryDivisionRule2; +typedef ShortAxisImmersedBoundaryDivisionRule<3> ShortAxisImmersedBoundaryDivisionRule3; typedef RandomCaSwitchingUpdateRule<2> RandomCaSwitchingUpdateRule2; typedef RandomCaSwitchingUpdateRule<3> RandomCaSwitchingUpdateRule3; typedef ChemotaxisPottsUpdateRule<2> ChemotaxisPottsUpdateRule2; typedef ChemotaxisPottsUpdateRule<3> ChemotaxisPottsUpdateRule3; typedef AbstractCaSwitchingUpdateRule<2> AbstractCaSwitchingUpdateRule2; typedef AbstractCaSwitchingUpdateRule<3> AbstractCaSwitchingUpdateRule3; +typedef AbstractForce<2,2> AbstractForce2_2; +typedef AbstractForce<3,3> AbstractForce3_3; +typedef AbstractTwoBodyInteractionForce<2,2> AbstractTwoBodyInteractionForce2_2; +typedef AbstractTwoBodyInteractionForce<3,3> AbstractTwoBodyInteractionForce3_3; typedef BuskeAdhesiveForce<2> BuskeAdhesiveForce2; typedef BuskeAdhesiveForce<3> BuskeAdhesiveForce3; typedef BuskeCompressionForce<2> BuskeCompressionForce2; @@ -802,18 +969,26 @@ typedef PlanarPolarisedFarhadifarForce<2> PlanarPolarisedFarhadifarForce2; typedef PlanarPolarisedFarhadifarForce<3> PlanarPolarisedFarhadifarForce3; typedef NagaiHondaDifferentialAdhesionForce<2> NagaiHondaDifferentialAdhesionForce2; typedef NagaiHondaDifferentialAdhesionForce<3> NagaiHondaDifferentialAdhesionForce3; +typedef AbstractImmersedBoundaryForce<2> AbstractImmersedBoundaryForce2; +typedef AbstractImmersedBoundaryForce<3> AbstractImmersedBoundaryForce3; +typedef ImmersedBoundaryKinematicFeedbackForce<2> ImmersedBoundaryKinematicFeedbackForce2; +typedef ImmersedBoundaryKinematicFeedbackForce<3> ImmersedBoundaryKinematicFeedbackForce3; +typedef ImmersedBoundaryLinearDifferentialAdhesionForce<2> ImmersedBoundaryLinearDifferentialAdhesionForce2; +typedef ImmersedBoundaryLinearDifferentialAdhesionForce<3> ImmersedBoundaryLinearDifferentialAdhesionForce3; +typedef ImmersedBoundaryLinearInteractionForce<2> ImmersedBoundaryLinearInteractionForce2; +typedef ImmersedBoundaryLinearInteractionForce<3> ImmersedBoundaryLinearInteractionForce3; +typedef ImmersedBoundaryLinearMembraneForce<2> ImmersedBoundaryLinearMembraneForce2; +typedef ImmersedBoundaryLinearMembraneForce<3> ImmersedBoundaryLinearMembraneForce3; +typedef ImmersedBoundaryMorseInteractionForce<2> ImmersedBoundaryMorseInteractionForce2; +typedef ImmersedBoundaryMorseInteractionForce<3> ImmersedBoundaryMorseInteractionForce3; +typedef ImmersedBoundaryMorseMembraneForce<2> ImmersedBoundaryMorseMembraneForce2; +typedef ImmersedBoundaryMorseMembraneForce<3> ImmersedBoundaryMorseMembraneForce3; typedef AbstractCellKiller<2> AbstractCellKiller2; typedef AbstractCellKiller<3> AbstractCellKiller3; typedef PlaneBasedCellKiller<2> PlaneBasedCellKiller2; typedef PlaneBasedCellKiller<3> PlaneBasedCellKiller3; typedef ApoptoticCellKiller<2> ApoptoticCellKiller2; typedef ApoptoticCellKiller<3> ApoptoticCellKiller3; -typedef AbstractCellPopulationBoundaryCondition<2,2> AbstractCellPopulationBoundaryCondition2_2; -typedef AbstractCellPopulationBoundaryCondition<3,3> AbstractCellPopulationBoundaryCondition3_3; -typedef PlaneBoundaryCondition<2,2> PlaneBoundaryCondition2_2; -typedef PlaneBoundaryCondition<3,3> PlaneBoundaryCondition3_3; -typedef AttractingPlaneBoundaryCondition<2,2> AttractingPlaneBoundaryCondition2_2; -typedef AttractingPlaneBoundaryCondition<3,3> AttractingPlaneBoundaryCondition3_3; typedef TargetedCellKiller<2> TargetedCellKiller2; typedef TargetedCellKiller<3> TargetedCellKiller3; typedef RandomCellKiller<2> RandomCellKiller2; @@ -822,22 +997,30 @@ typedef T2SwapCellKiller<2> T2SwapCellKiller2; typedef T2SwapCellKiller<3> T2SwapCellKiller3; typedef IsolatedLabelledCellKiller<2> IsolatedLabelledCellKiller2; typedef IsolatedLabelledCellKiller<3> IsolatedLabelledCellKiller3; +typedef AbstractCellPopulationBoundaryCondition<2,2> AbstractCellPopulationBoundaryCondition2_2; +typedef AbstractCellPopulationBoundaryCondition<3,3> AbstractCellPopulationBoundaryCondition3_3; +typedef PlaneBoundaryCondition<2,2> PlaneBoundaryCondition2_2; +typedef PlaneBoundaryCondition<3,3> PlaneBoundaryCondition3_3; +typedef AttractingPlaneBoundaryCondition<2,2> AttractingPlaneBoundaryCondition2_2; +typedef AttractingPlaneBoundaryCondition<3,3> AttractingPlaneBoundaryCondition3_3; typedef SphereGeometryBoundaryCondition<2> SphereGeometryBoundaryCondition2; typedef SphereGeometryBoundaryCondition<3> SphereGeometryBoundaryCondition3; +typedef SlidingBoundaryCondition<2> SlidingBoundaryCondition2; +typedef SlidingBoundaryCondition<3> SlidingBoundaryCondition3; typedef AbstractCellPopulation<2,2> AbstractCellPopulation2_2; typedef AbstractCellPopulation<3,3> AbstractCellPopulation3_3; typedef AbstractOffLatticeCellPopulation<2,2> AbstractOffLatticeCellPopulation2_2; typedef AbstractOffLatticeCellPopulation<3,3> AbstractOffLatticeCellPopulation3_3; typedef AbstractCentreBasedCellPopulation<2,2> AbstractCentreBasedCellPopulation2_2; typedef AbstractCentreBasedCellPopulation<3,3> AbstractCentreBasedCellPopulation3_3; -typedef SlidingBoundaryCondition<2> SlidingBoundaryCondition2; -typedef SlidingBoundaryCondition<3> SlidingBoundaryCondition3; typedef AbstractOnLatticeCellPopulation<2> AbstractOnLatticeCellPopulation2; typedef AbstractOnLatticeCellPopulation<3> AbstractOnLatticeCellPopulation3; typedef NodeBasedCellPopulationWithParticles<2> NodeBasedCellPopulationWithParticles2; typedef NodeBasedCellPopulationWithParticles<3> NodeBasedCellPopulationWithParticles3; typedef CaBasedCellPopulation<2> CaBasedCellPopulation2; typedef CaBasedCellPopulation<3> CaBasedCellPopulation3; +typedef ImmersedBoundaryCellPopulation<2> ImmersedBoundaryCellPopulation2; +typedef ImmersedBoundaryCellPopulation<3> ImmersedBoundaryCellPopulation3; typedef MeshBasedCellPopulation<2,2> MeshBasedCellPopulation2_2; typedef MeshBasedCellPopulation<3,3> MeshBasedCellPopulation3_3; typedef MeshBasedCellPopulationWithGhostNodes<2> MeshBasedCellPopulationWithGhostNodes2; @@ -868,6 +1051,12 @@ typedef VolumeTrackingModifier<2> VolumeTrackingModifier2; typedef VolumeTrackingModifier<3> VolumeTrackingModifier3; typedef VtkSceneModifier<2> VtkSceneModifier2; typedef VtkSceneModifier<3> VtkSceneModifier3; +typedef ImmersedBoundarySimulationModifier<2> ImmersedBoundarySimulationModifier2; +typedef ImmersedBoundarySimulationModifier<3> ImmersedBoundarySimulationModifier3; +typedef ImmersedBoundarySvgWriter<2> ImmersedBoundarySvgWriter2; +typedef ImmersedBoundarySvgWriter<3> ImmersedBoundarySvgWriter3; +typedef NormallyDistributedTargetAreaModifier<2> NormallyDistributedTargetAreaModifier2; +typedef NormallyDistributedTargetAreaModifier<3> NormallyDistributedTargetAreaModifier3; typedef AbstractCellBasedSimulation<2,2> AbstractCellBasedSimulation2_2; typedef AbstractCellBasedSimulation<3,3> AbstractCellBasedSimulation3_3; typedef OnLatticeSimulation<2> OnLatticeSimulation2; @@ -882,90 +1071,6 @@ typedef AbstractPyChasteActorGenerator<2> AbstractPyChasteActorGenerator2; typedef AbstractPyChasteActorGenerator<3> AbstractPyChasteActorGenerator3; typedef CellPopulationPyChasteActorGenerator<2> CellPopulationPyChasteActorGenerator2; typedef CellPopulationPyChasteActorGenerator<3> CellPopulationPyChasteActorGenerator3; -typedef AbstractChasteRegion<2> AbstractChasteRegion2; -typedef AbstractChasteRegion<3> AbstractChasteRegion3; -typedef ChastePoint<2> ChastePoint2; -typedef ChastePoint<3> ChastePoint3; -typedef ChasteCuboid<2> ChasteCuboid2; -typedef ChasteCuboid<3> ChasteCuboid3; -typedef ChasteEllipsoid<2> ChasteEllipsoid2; -typedef ChasteEllipsoid<3> ChasteEllipsoid3; -typedef AbstractCellBasedWriter<2,2> AbstractCellBasedWriter2_2; -typedef AbstractCellBasedWriter<3,3> AbstractCellBasedWriter3_3; -typedef AbstractCellWriter<2,2> AbstractCellWriter2_2; -typedef AbstractCellWriter<3,3> AbstractCellWriter3_3; -typedef AbstractCellPopulationWriter<2,2> AbstractCellPopulationWriter2_2; -typedef AbstractCellPopulationWriter<3,3> AbstractCellPopulationWriter3_3; -typedef AbstractCellPopulationCountWriter<2,2> AbstractCellPopulationCountWriter2_2; -typedef AbstractCellPopulationCountWriter<3,3> AbstractCellPopulationCountWriter3_3; -typedef AbstractCellPopulationEventWriter<2,2> AbstractCellPopulationEventWriter2_2; -typedef AbstractCellPopulationEventWriter<3,3> AbstractCellPopulationEventWriter3_3; -typedef BoundaryNodeWriter<2,2> BoundaryNodeWriter2_2; -typedef BoundaryNodeWriter<3,3> BoundaryNodeWriter3_3; -typedef CellAgesWriter<2,2> CellAgesWriter2_2; -typedef CellAgesWriter<3,3> CellAgesWriter3_3; -typedef CellAncestorWriter<2,2> CellAncestorWriter2_2; -typedef CellAncestorWriter<3,3> CellAncestorWriter3_3; -typedef CellAppliedForceWriter<2,2> CellAppliedForceWriter2_2; -typedef CellAppliedForceWriter<3,3> CellAppliedForceWriter3_3; -typedef CellCycleModelProteinConcentrationsWriter<2,2> CellCycleModelProteinConcentrationsWriter2_2; -typedef CellCycleModelProteinConcentrationsWriter<3,3> CellCycleModelProteinConcentrationsWriter3_3; -typedef CellDataItemWriter<2,2> CellDataItemWriter2_2; -typedef CellDataItemWriter<3,3> CellDataItemWriter3_3; -typedef CellDeltaNotchWriter<2,2> CellDeltaNotchWriter2_2; -typedef CellDeltaNotchWriter<3,3> CellDeltaNotchWriter3_3; -typedef CellDivisionLocationsWriter<2,2> CellDivisionLocationsWriter2_2; -typedef CellDivisionLocationsWriter<3,3> CellDivisionLocationsWriter3_3; -typedef CellIdWriter<2,2> CellIdWriter2_2; -typedef CellIdWriter<3,3> CellIdWriter3_3; -typedef CellLocationIndexWriter<2,2> CellLocationIndexWriter2_2; -typedef CellLocationIndexWriter<3,3> CellLocationIndexWriter3_3; -typedef CellMutationStatesCountWriter<2,2> CellMutationStatesCountWriter2_2; -typedef CellMutationStatesCountWriter<3,3> CellMutationStatesCountWriter3_3; -typedef CellMutationStatesWriter<2,2> CellMutationStatesWriter2_2; -typedef CellMutationStatesWriter<3,3> CellMutationStatesWriter3_3; -typedef CellPopulationAdjacencyMatrixWriter<2,2> CellPopulationAdjacencyMatrixWriter2_2; -typedef CellPopulationAdjacencyMatrixWriter<3,3> CellPopulationAdjacencyMatrixWriter3_3; -typedef CellPopulationAreaWriter<2,2> CellPopulationAreaWriter2_2; -typedef CellPopulationAreaWriter<3,3> CellPopulationAreaWriter3_3; -typedef CellPopulationElementWriter<2,2> CellPopulationElementWriter2_2; -typedef CellPopulationElementWriter<3,3> CellPopulationElementWriter3_3; -typedef CellProliferativePhasesCountWriter<2,2> CellProliferativePhasesCountWriter2_2; -typedef CellProliferativePhasesCountWriter<3,3> CellProliferativePhasesCountWriter3_3; -typedef CellProliferativePhasesWriter<2,2> CellProliferativePhasesWriter2_2; -typedef CellProliferativePhasesWriter<3,3> CellProliferativePhasesWriter3_3; -typedef CellProliferativeTypesCountWriter<2,2> CellProliferativeTypesCountWriter2_2; -typedef CellProliferativeTypesCountWriter<3,3> CellProliferativeTypesCountWriter3_3; -typedef CellProliferativeTypesWriter<2,2> CellProliferativeTypesWriter2_2; -typedef CellProliferativeTypesWriter<3,3> CellProliferativeTypesWriter3_3; -typedef CellRadiusWriter<2,2> CellRadiusWriter2_2; -typedef CellRadiusWriter<3,3> CellRadiusWriter3_3; -typedef CellRemovalLocationsWriter<2,2> CellRemovalLocationsWriter2_2; -typedef CellRemovalLocationsWriter<3,3> CellRemovalLocationsWriter3_3; -typedef CellRosetteRankWriter<2,2> CellRosetteRankWriter2_2; -typedef CellRosetteRankWriter<3,3> CellRosetteRankWriter3_3; -typedef CellVolumesWriter<2,2> CellVolumesWriter2_2; -typedef CellVolumesWriter<3,3> CellVolumesWriter3_3; -typedef HeterotypicBoundaryLengthWriter<2,2> HeterotypicBoundaryLengthWriter2_2; -typedef HeterotypicBoundaryLengthWriter<3,3> HeterotypicBoundaryLengthWriter3_3; -typedef LegacyCellProliferativeTypesWriter<2,2> LegacyCellProliferativeTypesWriter2_2; -typedef LegacyCellProliferativeTypesWriter<3,3> LegacyCellProliferativeTypesWriter3_3; -typedef NodeLocationWriter<2,2> NodeLocationWriter2_2; -typedef NodeLocationWriter<3,3> NodeLocationWriter3_3; -typedef NodeVelocityWriter<2,2> NodeVelocityWriter2_2; -typedef NodeVelocityWriter<3,3> NodeVelocityWriter3_3; -typedef PottsMeshWriter<2> PottsMeshWriter2; -typedef PottsMeshWriter<3> PottsMeshWriter3; -typedef RadialCellDataDistributionWriter<2,2> RadialCellDataDistributionWriter2_2; -typedef RadialCellDataDistributionWriter<3,3> RadialCellDataDistributionWriter3_3; -typedef VertexIntersectionSwapLocationsWriter<2,2> VertexIntersectionSwapLocationsWriter2_2; -typedef VertexIntersectionSwapLocationsWriter<3,3> VertexIntersectionSwapLocationsWriter3_3; -typedef VertexT1SwapLocationsWriter<2,2> VertexT1SwapLocationsWriter2_2; -typedef VertexT1SwapLocationsWriter<3,3> VertexT1SwapLocationsWriter3_3; -typedef VertexT2SwapLocationsWriter<2,2> VertexT2SwapLocationsWriter2_2; -typedef VertexT2SwapLocationsWriter<3,3> VertexT2SwapLocationsWriter3_3; -typedef VertexT3SwapLocationsWriter<2,2> VertexT3SwapLocationsWriter2_2; -typedef VertexT3SwapLocationsWriter<3,3> VertexT3SwapLocationsWriter3_3; -} +} // namespace cppwg #endif // chaste_project_PyChaste_HEADERS_HPP_ From e8975d6ce98e51f6e2c1acdc35e7c00605c7c363 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 12:25:42 +0000 Subject: [PATCH 09/40] #62 update package info yaml --- dynamic/wrapper_generators/package_info.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index ff524da2..4a2a79ad 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -128,6 +128,9 @@ modules: - name: PottsMesh - name: FluidSource - name: ImmersedBoundaryElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: PottsMeshGenerator - name: VertexMesh excluded_methods: @@ -729,6 +732,7 @@ modules: - GetTetrahedralMeshForPdeModifier custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py source_includes: + - AbstractImmersedBoundaryDivisionRule.hpp - CellAgesWriter.hpp - CellAncestorWriter.hpp - CellAppliedForceWriter.hpp From dccf7606cd80bffb90cb61974440e9b8d0018b96 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 12:34:14 +0000 Subject: [PATCH 10/40] #62 update module wrappers --- .../wrappers/cell_based/cell_based.main.cpp | 341 +++++++++++++++--- dynamic/wrappers/core/core.main.cpp | 5 - dynamic/wrappers/mesh/mesh.main.cpp | 37 +- dynamic/wrappers/pde/pde.main.cpp | 14 +- 4 files changed, 317 insertions(+), 80 deletions(-) diff --git a/dynamic/wrappers/cell_based/cell_based.main.cpp b/dynamic/wrappers/cell_based/cell_based.main.cpp index ad22d52d..e80a35e6 100644 --- a/dynamic/wrappers/cell_based/cell_based.main.cpp +++ b/dynamic/wrappers/cell_based/cell_based.main.cpp @@ -1,6 +1,4 @@ #include - -#include "AbstractCellCycleModelOdeSolver.cppwg.hpp" #include "AbstractCellCycleModel.cppwg.hpp" #include "AbstractPhaseBasedCellCycleModel.cppwg.hpp" #include "AbstractSimpleCellCycleModel.cppwg.hpp" @@ -19,11 +17,12 @@ #include "GammaG1CellCycleModel.cppwg.hpp" #include "ExponentialG1GenerationalCellCycleModel.cppwg.hpp" #include "AbstractOdeBasedPhaseBasedCellCycleModel.cppwg.hpp" +#include "TysonNovakCellCycleModel.cppwg.hpp" +#include "Alarcon2004OxygenBasedCellCycleModel.cppwg.hpp" #include "FixedSequenceCellCycleModel.cppwg.hpp" #include "BernoulliTrialCellCycleModel.cppwg.hpp" #include "FixedG1GenerationalCellCycleModel.cppwg.hpp" -#include "TysonNovakCellCycleModel.cppwg.hpp" -#include "Alarcon2004OxygenBasedCellCycleModel.cppwg.hpp" +#include "AbstractCellCycleModelOdeSolver.cppwg.hpp" #include "AbstractCellProperty.cppwg.hpp" #include "CellPropertyCollection.cppwg.hpp" #include "AbstractCellProliferativeType.cppwg.hpp" @@ -76,16 +75,16 @@ #include "CellsGeneratorGammaG1CellCycleModel_3.cppwg.hpp" #include "CellsGeneratorExponentialG1GenerationalCellCycleModel_2.cppwg.hpp" #include "CellsGeneratorExponentialG1GenerationalCellCycleModel_3.cppwg.hpp" +#include "CellsGeneratorTysonNovakCellCycleModel_2.cppwg.hpp" +#include "CellsGeneratorTysonNovakCellCycleModel_3.cppwg.hpp" +#include "CellsGeneratorAlarcon2004OxygenBasedCellCycleModel_2.cppwg.hpp" +#include "CellsGeneratorAlarcon2004OxygenBasedCellCycleModel_3.cppwg.hpp" #include "CellsGeneratorFixedSequenceCellCycleModel_2.cppwg.hpp" #include "CellsGeneratorFixedSequenceCellCycleModel_3.cppwg.hpp" #include "CellsGeneratorBernoulliTrialCellCycleModel_2.cppwg.hpp" #include "CellsGeneratorBernoulliTrialCellCycleModel_3.cppwg.hpp" #include "CellsGeneratorFixedG1GenerationalCellCycleModel_2.cppwg.hpp" #include "CellsGeneratorFixedG1GenerationalCellCycleModel_3.cppwg.hpp" -#include "CellsGeneratorTysonNovakCellCycleModel_2.cppwg.hpp" -#include "CellsGeneratorTysonNovakCellCycleModel_3.cppwg.hpp" -#include "CellsGeneratorAlarcon2004OxygenBasedCellCycleModel_2.cppwg.hpp" -#include "CellsGeneratorAlarcon2004OxygenBasedCellCycleModel_3.cppwg.hpp" #include "CellwiseSourceEllipticPde2.cppwg.hpp" #include "CellwiseSourceEllipticPde3.cppwg.hpp" #include "AveragedSourceEllipticPde2.cppwg.hpp" @@ -96,8 +95,6 @@ #include "UniformSourceEllipticPde3.cppwg.hpp" #include "CellwiseSourceParabolicPde2.cppwg.hpp" #include "CellwiseSourceParabolicPde3.cppwg.hpp" -#include "AbstractCellBasedSimulationModifier2_2.cppwg.hpp" -#include "AbstractCellBasedSimulationModifier3_3.cppwg.hpp" #include "UniformSourceParabolicPde2.cppwg.hpp" #include "UniformSourceParabolicPde3.cppwg.hpp" #include "AveragedSourceParabolicPde2.cppwg.hpp" @@ -106,6 +103,8 @@ #include "CellBasedEllipticPdeSolver3.cppwg.hpp" #include "CellBasedParabolicPdeSolver2.cppwg.hpp" #include "CellBasedParabolicPdeSolver3.cppwg.hpp" +#include "AbstractCellBasedSimulationModifier2.cppwg.hpp" +#include "AbstractCellBasedSimulationModifier3.cppwg.hpp" #include "AbstractPdeModifier2.cppwg.hpp" #include "AbstractPdeModifier3.cppwg.hpp" #include "AbstractBoxDomainPdeModifier2.cppwg.hpp" @@ -120,8 +119,88 @@ #include "EllipticBoxDomainPdeModifier3.cppwg.hpp" #include "ParabolicBoxDomainPdeModifier2.cppwg.hpp" #include "ParabolicBoxDomainPdeModifier3.cppwg.hpp" +#include "AbstractCellBasedWriter2_2.cppwg.hpp" +#include "AbstractCellBasedWriter3_3.cppwg.hpp" +#include "AbstractCellWriter2_2.cppwg.hpp" +#include "AbstractCellWriter3_3.cppwg.hpp" +#include "AbstractCellPopulationWriter2_2.cppwg.hpp" +#include "AbstractCellPopulationWriter3_3.cppwg.hpp" +#include "AbstractCellPopulationCountWriter2_2.cppwg.hpp" +#include "AbstractCellPopulationCountWriter3_3.cppwg.hpp" +#include "AbstractCellPopulationEventWriter2_2.cppwg.hpp" +#include "AbstractCellPopulationEventWriter3_3.cppwg.hpp" +#include "BoundaryNodeWriter2_2.cppwg.hpp" +#include "BoundaryNodeWriter3_3.cppwg.hpp" +#include "CellAgesWriter2_2.cppwg.hpp" +#include "CellAgesWriter3_3.cppwg.hpp" +#include "CellAncestorWriter2_2.cppwg.hpp" +#include "CellAncestorWriter3_3.cppwg.hpp" +#include "CellAppliedForceWriter2_2.cppwg.hpp" +#include "CellAppliedForceWriter3_3.cppwg.hpp" +#include "CellCycleModelProteinConcentrationsWriter2_2.cppwg.hpp" +#include "CellCycleModelProteinConcentrationsWriter3_3.cppwg.hpp" +#include "CellDataItemWriter2_2.cppwg.hpp" +#include "CellDataItemWriter3_3.cppwg.hpp" +#include "CellDeltaNotchWriter2_2.cppwg.hpp" +#include "CellDeltaNotchWriter3_3.cppwg.hpp" +#include "CellDivisionLocationsWriter2_2.cppwg.hpp" +#include "CellDivisionLocationsWriter3_3.cppwg.hpp" +#include "CellIdWriter2_2.cppwg.hpp" +#include "CellIdWriter3_3.cppwg.hpp" +#include "CellLocationIndexWriter2_2.cppwg.hpp" +#include "CellLocationIndexWriter3_3.cppwg.hpp" +#include "CellMutationStatesCountWriter2_2.cppwg.hpp" +#include "CellMutationStatesCountWriter3_3.cppwg.hpp" +#include "CellMutationStatesWriter2_2.cppwg.hpp" +#include "CellMutationStatesWriter3_3.cppwg.hpp" +#include "CellPopulationAdjacencyMatrixWriter2_2.cppwg.hpp" +#include "CellPopulationAdjacencyMatrixWriter3_3.cppwg.hpp" +#include "CellPopulationAreaWriter2_2.cppwg.hpp" +#include "CellPopulationAreaWriter3_3.cppwg.hpp" +#include "CellPopulationElementWriter2_2.cppwg.hpp" +#include "CellPopulationElementWriter3_3.cppwg.hpp" +#include "CellProliferativePhasesCountWriter2_2.cppwg.hpp" +#include "CellProliferativePhasesCountWriter3_3.cppwg.hpp" +#include "CellProliferativePhasesWriter2_2.cppwg.hpp" +#include "CellProliferativePhasesWriter3_3.cppwg.hpp" +#include "CellProliferativeTypesCountWriter2_2.cppwg.hpp" +#include "CellProliferativeTypesCountWriter3_3.cppwg.hpp" +#include "CellProliferativeTypesWriter2_2.cppwg.hpp" +#include "CellProliferativeTypesWriter3_3.cppwg.hpp" +#include "CellRadiusWriter2_2.cppwg.hpp" +#include "CellRadiusWriter3_3.cppwg.hpp" +#include "CellRemovalLocationsWriter2_2.cppwg.hpp" +#include "CellRemovalLocationsWriter3_3.cppwg.hpp" +#include "CellRosetteRankWriter2_2.cppwg.hpp" +#include "CellRosetteRankWriter3_3.cppwg.hpp" +#include "CellVolumesWriter2_2.cppwg.hpp" +#include "CellVolumesWriter3_3.cppwg.hpp" +#include "HeterotypicBoundaryLengthWriter2_2.cppwg.hpp" +#include "HeterotypicBoundaryLengthWriter3_3.cppwg.hpp" +#include "LegacyCellProliferativeTypesWriter2_2.cppwg.hpp" +#include "LegacyCellProliferativeTypesWriter3_3.cppwg.hpp" +#include "NodeLocationWriter2_2.cppwg.hpp" +#include "NodeLocationWriter3_3.cppwg.hpp" +#include "NodeVelocityWriter2_2.cppwg.hpp" +#include "NodeVelocityWriter3_3.cppwg.hpp" +#include "PottsMeshWriter2.cppwg.hpp" +#include "PottsMeshWriter3.cppwg.hpp" +#include "RadialCellDataDistributionWriter2_2.cppwg.hpp" +#include "RadialCellDataDistributionWriter3_3.cppwg.hpp" +#include "VertexIntersectionSwapLocationsWriter2_2.cppwg.hpp" +#include "VertexIntersectionSwapLocationsWriter3_3.cppwg.hpp" +#include "VertexT1SwapLocationsWriter2_2.cppwg.hpp" +#include "VertexT1SwapLocationsWriter3_3.cppwg.hpp" +#include "VertexT2SwapLocationsWriter2_2.cppwg.hpp" +#include "VertexT2SwapLocationsWriter3_3.cppwg.hpp" +#include "VertexT3SwapLocationsWriter2_2.cppwg.hpp" +#include "VertexT3SwapLocationsWriter3_3.cppwg.hpp" #include "VoronoiDataWriter2_2.cppwg.hpp" #include "VoronoiDataWriter3_3.cppwg.hpp" +#include "ImmersedBoundaryBoundaryCellWriter2_2.cppwg.hpp" +#include "ImmersedBoundaryBoundaryCellWriter3_3.cppwg.hpp" +#include "ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.hpp" +#include "ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.hpp" #include "CellLabelWriter2_2.cppwg.hpp" #include "CellLabelWriter3_3.cppwg.hpp" #include "AbstractUpdateRule2.cppwg.hpp" @@ -142,10 +221,6 @@ #include "DifferentialAdhesionPottsUpdateRule3.cppwg.hpp" #include "AbstractVertexBasedDivisionRule2.cppwg.hpp" #include "AbstractVertexBasedDivisionRule3.cppwg.hpp" -#include "AbstractForce2_2.cppwg.hpp" -#include "AbstractForce3_3.cppwg.hpp" -#include "AbstractTwoBodyInteractionForce2_2.cppwg.hpp" -#include "AbstractTwoBodyInteractionForce3_3.cppwg.hpp" #include "RandomDirectionVertexBasedDivisionRule2.cppwg.hpp" #include "RandomDirectionVertexBasedDivisionRule3.cppwg.hpp" #include "VonMisesVertexBasedDivisionRule2.cppwg.hpp" @@ -158,14 +233,28 @@ #include "ShovingCaBasedDivisionRule3.cppwg.hpp" #include "ExclusionCaBasedDivisionRule2.cppwg.hpp" #include "ExclusionCaBasedDivisionRule3.cppwg.hpp" +#include "RandomDirectionCentreBasedDivisionRule2.cppwg.hpp" +#include "RandomDirectionCentreBasedDivisionRule3.cppwg.hpp" +#include "FixedCentreBasedDivisionRule2.cppwg.hpp" +#include "FixedCentreBasedDivisionRule3.cppwg.hpp" +#include "AbstractCentreBasedDivisionRule2.cppwg.hpp" +#include "AbstractCentreBasedDivisionRule3.cppwg.hpp" #include "ShortAxisVertexBasedDivisionRule2.cppwg.hpp" #include "ShortAxisVertexBasedDivisionRule3.cppwg.hpp" +#include "AbstractImmersedBoundaryDivisionRule2.cppwg.hpp" +#include "AbstractImmersedBoundaryDivisionRule3.cppwg.hpp" +#include "ShortAxisImmersedBoundaryDivisionRule2.cppwg.hpp" +#include "ShortAxisImmersedBoundaryDivisionRule3.cppwg.hpp" +#include "RandomCaSwitchingUpdateRule2.cppwg.hpp" +#include "RandomCaSwitchingUpdateRule3.cppwg.hpp" #include "ChemotaxisPottsUpdateRule2.cppwg.hpp" #include "ChemotaxisPottsUpdateRule3.cppwg.hpp" #include "AbstractCaSwitchingUpdateRule2.cppwg.hpp" #include "AbstractCaSwitchingUpdateRule3.cppwg.hpp" -#include "RandomCaSwitchingUpdateRule2.cppwg.hpp" -#include "RandomCaSwitchingUpdateRule3.cppwg.hpp" +#include "AbstractForce2.cppwg.hpp" +#include "AbstractForce3.cppwg.hpp" +#include "AbstractTwoBodyInteractionForce2.cppwg.hpp" +#include "AbstractTwoBodyInteractionForce3.cppwg.hpp" #include "BuskeAdhesiveForce2.cppwg.hpp" #include "BuskeAdhesiveForce3.cppwg.hpp" #include "BuskeCompressionForce2.cppwg.hpp" @@ -174,10 +263,10 @@ #include "BuskeElasticForce3.cppwg.hpp" #include "ChemotacticForce2.cppwg.hpp" #include "ChemotacticForce3.cppwg.hpp" -#include "GeneralisedLinearSpringForce2_2.cppwg.hpp" -#include "GeneralisedLinearSpringForce3_3.cppwg.hpp" -#include "DifferentialAdhesionGeneralisedLinearSpringForce2_2.cppwg.hpp" -#include "DifferentialAdhesionGeneralisedLinearSpringForce3_3.cppwg.hpp" +#include "GeneralisedLinearSpringForce2.cppwg.hpp" +#include "GeneralisedLinearSpringForce3.cppwg.hpp" +#include "DifferentialAdhesionGeneralisedLinearSpringForce2.cppwg.hpp" +#include "DifferentialAdhesionGeneralisedLinearSpringForce3.cppwg.hpp" #include "NagaiHondaForce2.cppwg.hpp" #include "NagaiHondaForce3.cppwg.hpp" #include "DiffusionForce2.cppwg.hpp" @@ -192,16 +281,26 @@ #include "PlanarPolarisedFarhadifarForce3.cppwg.hpp" #include "NagaiHondaDifferentialAdhesionForce2.cppwg.hpp" #include "NagaiHondaDifferentialAdhesionForce3.cppwg.hpp" +#include "AbstractImmersedBoundaryForce2.cppwg.hpp" +#include "AbstractImmersedBoundaryForce3.cppwg.hpp" +#include "ImmersedBoundaryKinematicFeedbackForce2.cppwg.hpp" +#include "ImmersedBoundaryKinematicFeedbackForce3.cppwg.hpp" +#include "ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.hpp" +#include "ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.hpp" +#include "ImmersedBoundaryLinearInteractionForce2.cppwg.hpp" +#include "ImmersedBoundaryLinearInteractionForce3.cppwg.hpp" +#include "ImmersedBoundaryLinearMembraneForce2.cppwg.hpp" +#include "ImmersedBoundaryLinearMembraneForce3.cppwg.hpp" +#include "ImmersedBoundaryMorseInteractionForce2.cppwg.hpp" +#include "ImmersedBoundaryMorseInteractionForce3.cppwg.hpp" +#include "ImmersedBoundaryMorseMembraneForce2.cppwg.hpp" +#include "ImmersedBoundaryMorseMembraneForce3.cppwg.hpp" #include "AbstractCellKiller2.cppwg.hpp" #include "AbstractCellKiller3.cppwg.hpp" #include "PlaneBasedCellKiller2.cppwg.hpp" #include "PlaneBasedCellKiller3.cppwg.hpp" #include "ApoptoticCellKiller2.cppwg.hpp" #include "ApoptoticCellKiller3.cppwg.hpp" -#include "AbstractCellPopulationBoundaryCondition2_2.cppwg.hpp" -#include "AbstractCellPopulationBoundaryCondition3_3.cppwg.hpp" -#include "AttractingPlaneBoundaryCondition2_2.cppwg.hpp" -#include "AttractingPlaneBoundaryCondition3_3.cppwg.hpp" #include "TargetedCellKiller2.cppwg.hpp" #include "TargetedCellKiller3.cppwg.hpp" #include "RandomCellKiller2.cppwg.hpp" @@ -210,24 +309,32 @@ #include "T2SwapCellKiller3.cppwg.hpp" #include "IsolatedLabelledCellKiller2.cppwg.hpp" #include "IsolatedLabelledCellKiller3.cppwg.hpp" +#include "AbstractCellPopulationBoundaryCondition2.cppwg.hpp" +#include "AbstractCellPopulationBoundaryCondition3.cppwg.hpp" +#include "PlaneBoundaryCondition2.cppwg.hpp" +#include "PlaneBoundaryCondition3.cppwg.hpp" +#include "AttractingPlaneBoundaryCondition2.cppwg.hpp" +#include "AttractingPlaneBoundaryCondition3.cppwg.hpp" #include "SphereGeometryBoundaryCondition2.cppwg.hpp" #include "SphereGeometryBoundaryCondition3.cppwg.hpp" -#include "AbstractCellPopulation2_2.cppwg.hpp" -#include "AbstractCellPopulation3_3.cppwg.hpp" -#include "AbstractOffLatticeCellPopulation2_2.cppwg.hpp" -#include "AbstractOffLatticeCellPopulation3_3.cppwg.hpp" -#include "AbstractCentreBasedCellPopulation2_2.cppwg.hpp" -#include "AbstractCentreBasedCellPopulation3_3.cppwg.hpp" -#include "PlaneBoundaryCondition2_2.cppwg.hpp" -#include "PlaneBoundaryCondition3_3.cppwg.hpp" #include "SlidingBoundaryCondition2.cppwg.hpp" #include "SlidingBoundaryCondition3.cppwg.hpp" +#include "AbstractCellPopulation2.cppwg.hpp" +#include "AbstractCellPopulation3.cppwg.hpp" +#include "AbstractOffLatticeCellPopulation2.cppwg.hpp" +#include "AbstractOffLatticeCellPopulation3.cppwg.hpp" +#include "AbstractCentreBasedCellPopulation2_2.cppwg.hpp" +#include "AbstractCentreBasedCellPopulation3_3.cppwg.hpp" #include "AbstractOnLatticeCellPopulation2.cppwg.hpp" #include "AbstractOnLatticeCellPopulation3.cppwg.hpp" +#include "NodeBasedCellPopulationWithParticles2.cppwg.hpp" +#include "NodeBasedCellPopulationWithParticles3.cppwg.hpp" #include "CaBasedCellPopulation2.cppwg.hpp" #include "CaBasedCellPopulation3.cppwg.hpp" -#include "MeshBasedCellPopulation2_2.cppwg.hpp" -#include "MeshBasedCellPopulation3_3.cppwg.hpp" +#include "ImmersedBoundaryCellPopulation2.cppwg.hpp" +#include "ImmersedBoundaryCellPopulation3.cppwg.hpp" +#include "MeshBasedCellPopulation2.cppwg.hpp" +#include "MeshBasedCellPopulation3.cppwg.hpp" #include "MeshBasedCellPopulationWithGhostNodes2.cppwg.hpp" #include "MeshBasedCellPopulationWithGhostNodes3.cppwg.hpp" #include "VertexBasedCellPopulation2.cppwg.hpp" @@ -238,8 +345,6 @@ #include "NodeBasedCellPopulation3.cppwg.hpp" #include "NodeBasedCellPopulationWithBuskeUpdate2.cppwg.hpp" #include "NodeBasedCellPopulationWithBuskeUpdate3.cppwg.hpp" -#include "NodeBasedCellPopulationWithParticles2.cppwg.hpp" -#include "NodeBasedCellPopulationWithParticles3.cppwg.hpp" #include "AbstractTargetAreaModifier2.cppwg.hpp" #include "AbstractTargetAreaModifier3.cppwg.hpp" #include "SimpleTargetAreaModifier2.cppwg.hpp" @@ -258,13 +363,19 @@ #include "VolumeTrackingModifier3.cppwg.hpp" #include "VtkSceneModifier2.cppwg.hpp" #include "VtkSceneModifier3.cppwg.hpp" +#include "ImmersedBoundarySimulationModifier2.cppwg.hpp" +#include "ImmersedBoundarySimulationModifier3.cppwg.hpp" +#include "ImmersedBoundarySvgWriter2.cppwg.hpp" +#include "ImmersedBoundarySvgWriter3.cppwg.hpp" +#include "NormallyDistributedTargetAreaModifier2.cppwg.hpp" +#include "NormallyDistributedTargetAreaModifier3.cppwg.hpp" #include "AbstractCellBasedSimulation2_2.cppwg.hpp" #include "AbstractCellBasedSimulation3_3.cppwg.hpp" #include "SimulationTime.cppwg.hpp" #include "OnLatticeSimulation2.cppwg.hpp" #include "OnLatticeSimulation3.cppwg.hpp" -#include "OffLatticeSimulation2_2.cppwg.hpp" -#include "OffLatticeSimulation3_3.cppwg.hpp" +#include "OffLatticeSimulation2.cppwg.hpp" +#include "OffLatticeSimulation3.cppwg.hpp" #include "PythonSimulationModifier2.cppwg.hpp" #include "PythonSimulationModifier3.cppwg.hpp" @@ -272,7 +383,6 @@ namespace py = pybind11; PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) { - register_AbstractCellCycleModelOdeSolver_class(m); register_AbstractCellCycleModel_class(m); register_AbstractPhaseBasedCellCycleModel_class(m); register_AbstractSimpleCellCycleModel_class(m); @@ -291,11 +401,12 @@ 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_TysonNovakCellCycleModel_class(m); - register_Alarcon2004OxygenBasedCellCycleModel_class(m); + register_AbstractCellCycleModelOdeSolver_class(m); register_AbstractCellProperty_class(m); register_CellPropertyCollection_class(m); register_AbstractCellProliferativeType_class(m); @@ -368,8 +479,6 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_UniformSourceEllipticPde3_class(m); register_CellwiseSourceParabolicPde2_class(m); register_CellwiseSourceParabolicPde3_class(m); - register_AbstractCellBasedSimulationModifier2_2_class(m); - register_AbstractCellBasedSimulationModifier3_3_class(m); register_UniformSourceParabolicPde2_class(m); register_UniformSourceParabolicPde3_class(m); register_AveragedSourceParabolicPde2_class(m); @@ -378,6 +487,8 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_CellBasedEllipticPdeSolver3_class(m); register_CellBasedParabolicPdeSolver2_class(m); register_CellBasedParabolicPdeSolver3_class(m); + register_AbstractCellBasedSimulationModifier2_2_class(m); + register_AbstractCellBasedSimulationModifier3_3_class(m); register_AbstractPdeModifier2_class(m); register_AbstractPdeModifier3_class(m); register_AbstractBoxDomainPdeModifier2_class(m); @@ -392,8 +503,88 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_EllipticBoxDomainPdeModifier3_class(m); register_ParabolicBoxDomainPdeModifier2_class(m); register_ParabolicBoxDomainPdeModifier3_class(m); + register_AbstractCellBasedWriter2_2_class(m); + register_AbstractCellBasedWriter3_3_class(m); + register_AbstractCellWriter2_2_class(m); + register_AbstractCellWriter3_3_class(m); + register_AbstractCellPopulationWriter2_2_class(m); + register_AbstractCellPopulationWriter3_3_class(m); + register_AbstractCellPopulationCountWriter2_2_class(m); + register_AbstractCellPopulationCountWriter3_3_class(m); + register_AbstractCellPopulationEventWriter2_2_class(m); + register_AbstractCellPopulationEventWriter3_3_class(m); + register_BoundaryNodeWriter2_2_class(m); + register_BoundaryNodeWriter3_3_class(m); + register_CellAgesWriter2_2_class(m); + register_CellAgesWriter3_3_class(m); + register_CellAncestorWriter2_2_class(m); + register_CellAncestorWriter3_3_class(m); + register_CellAppliedForceWriter2_2_class(m); + register_CellAppliedForceWriter3_3_class(m); + register_CellCycleModelProteinConcentrationsWriter2_2_class(m); + register_CellCycleModelProteinConcentrationsWriter3_3_class(m); + register_CellDataItemWriter2_2_class(m); + register_CellDataItemWriter3_3_class(m); + register_CellDeltaNotchWriter2_2_class(m); + register_CellDeltaNotchWriter3_3_class(m); + register_CellDivisionLocationsWriter2_2_class(m); + register_CellDivisionLocationsWriter3_3_class(m); + register_CellIdWriter2_2_class(m); + register_CellIdWriter3_3_class(m); + register_CellLocationIndexWriter2_2_class(m); + register_CellLocationIndexWriter3_3_class(m); + register_CellMutationStatesCountWriter2_2_class(m); + register_CellMutationStatesCountWriter3_3_class(m); + register_CellMutationStatesWriter2_2_class(m); + register_CellMutationStatesWriter3_3_class(m); + register_CellPopulationAdjacencyMatrixWriter2_2_class(m); + register_CellPopulationAdjacencyMatrixWriter3_3_class(m); + register_CellPopulationAreaWriter2_2_class(m); + register_CellPopulationAreaWriter3_3_class(m); + register_CellPopulationElementWriter2_2_class(m); + register_CellPopulationElementWriter3_3_class(m); + register_CellProliferativePhasesCountWriter2_2_class(m); + register_CellProliferativePhasesCountWriter3_3_class(m); + register_CellProliferativePhasesWriter2_2_class(m); + register_CellProliferativePhasesWriter3_3_class(m); + register_CellProliferativeTypesCountWriter2_2_class(m); + register_CellProliferativeTypesCountWriter3_3_class(m); + register_CellProliferativeTypesWriter2_2_class(m); + register_CellProliferativeTypesWriter3_3_class(m); + register_CellRadiusWriter2_2_class(m); + register_CellRadiusWriter3_3_class(m); + register_CellRemovalLocationsWriter2_2_class(m); + register_CellRemovalLocationsWriter3_3_class(m); + register_CellRosetteRankWriter2_2_class(m); + register_CellRosetteRankWriter3_3_class(m); + register_CellVolumesWriter2_2_class(m); + register_CellVolumesWriter3_3_class(m); + register_HeterotypicBoundaryLengthWriter2_2_class(m); + register_HeterotypicBoundaryLengthWriter3_3_class(m); + register_LegacyCellProliferativeTypesWriter2_2_class(m); + register_LegacyCellProliferativeTypesWriter3_3_class(m); + register_NodeLocationWriter2_2_class(m); + register_NodeLocationWriter3_3_class(m); + register_NodeVelocityWriter2_2_class(m); + register_NodeVelocityWriter3_3_class(m); + register_PottsMeshWriter2_class(m); + register_PottsMeshWriter3_class(m); + register_RadialCellDataDistributionWriter2_2_class(m); + register_RadialCellDataDistributionWriter3_3_class(m); + register_VertexIntersectionSwapLocationsWriter2_2_class(m); + register_VertexIntersectionSwapLocationsWriter3_3_class(m); + register_VertexT1SwapLocationsWriter2_2_class(m); + register_VertexT1SwapLocationsWriter3_3_class(m); + register_VertexT2SwapLocationsWriter2_2_class(m); + register_VertexT2SwapLocationsWriter3_3_class(m); + register_VertexT3SwapLocationsWriter2_2_class(m); + register_VertexT3SwapLocationsWriter3_3_class(m); register_VoronoiDataWriter2_2_class(m); register_VoronoiDataWriter3_3_class(m); + register_ImmersedBoundaryBoundaryCellWriter2_2_class(m); + register_ImmersedBoundaryBoundaryCellWriter3_3_class(m); + register_ImmersedBoundaryNeighbourNumberWriter2_2_class(m); + register_ImmersedBoundaryNeighbourNumberWriter3_3_class(m); register_CellLabelWriter2_2_class(m); register_CellLabelWriter3_3_class(m); register_AbstractUpdateRule2_class(m); @@ -414,10 +605,6 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_DifferentialAdhesionPottsUpdateRule3_class(m); register_AbstractVertexBasedDivisionRule2_class(m); register_AbstractVertexBasedDivisionRule3_class(m); - register_AbstractForce2_2_class(m); - register_AbstractForce3_3_class(m); - register_AbstractTwoBodyInteractionForce2_2_class(m); - register_AbstractTwoBodyInteractionForce3_3_class(m); register_RandomDirectionVertexBasedDivisionRule2_class(m); register_RandomDirectionVertexBasedDivisionRule3_class(m); register_VonMisesVertexBasedDivisionRule2_class(m); @@ -430,14 +617,28 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_ShovingCaBasedDivisionRule3_class(m); register_ExclusionCaBasedDivisionRule2_class(m); register_ExclusionCaBasedDivisionRule3_class(m); + register_RandomDirectionCentreBasedDivisionRule2_class(m); + register_RandomDirectionCentreBasedDivisionRule3_class(m); + register_FixedCentreBasedDivisionRule2_class(m); + register_FixedCentreBasedDivisionRule3_class(m); + register_AbstractCentreBasedDivisionRule2_class(m); + register_AbstractCentreBasedDivisionRule3_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_RandomCaSwitchingUpdateRule2_class(m); - register_RandomCaSwitchingUpdateRule3_class(m); + register_AbstractForce2_2_class(m); + register_AbstractForce3_3_class(m); + register_AbstractTwoBodyInteractionForce2_2_class(m); + register_AbstractTwoBodyInteractionForce3_3_class(m); register_BuskeAdhesiveForce2_class(m); register_BuskeAdhesiveForce3_class(m); register_BuskeCompressionForce2_class(m); @@ -464,18 +665,26 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_PlanarPolarisedFarhadifarForce3_class(m); register_NagaiHondaDifferentialAdhesionForce2_class(m); register_NagaiHondaDifferentialAdhesionForce3_class(m); + register_AbstractImmersedBoundaryForce2_class(m); + register_AbstractImmersedBoundaryForce3_class(m); + register_ImmersedBoundaryKinematicFeedbackForce2_class(m); + register_ImmersedBoundaryKinematicFeedbackForce3_class(m); + register_ImmersedBoundaryLinearDifferentialAdhesionForce2_class(m); + register_ImmersedBoundaryLinearDifferentialAdhesionForce3_class(m); + register_ImmersedBoundaryLinearInteractionForce2_class(m); + register_ImmersedBoundaryLinearInteractionForce3_class(m); + register_ImmersedBoundaryLinearMembraneForce2_class(m); + register_ImmersedBoundaryLinearMembraneForce3_class(m); + register_ImmersedBoundaryMorseInteractionForce2_class(m); + register_ImmersedBoundaryMorseInteractionForce3_class(m); + register_ImmersedBoundaryMorseMembraneForce2_class(m); + register_ImmersedBoundaryMorseMembraneForce3_class(m); register_AbstractCellKiller2_class(m); register_AbstractCellKiller3_class(m); register_PlaneBasedCellKiller2_class(m); register_PlaneBasedCellKiller3_class(m); register_ApoptoticCellKiller2_class(m); register_ApoptoticCellKiller3_class(m); - register_AbstractCellPopulationBoundaryCondition2_2_class(m); - register_AbstractCellPopulationBoundaryCondition3_3_class(m); - register_PlaneBoundaryCondition2_2_class(m); - register_PlaneBoundaryCondition3_3_class(m); - register_AttractingPlaneBoundaryCondition2_2_class(m); - register_AttractingPlaneBoundaryCondition3_3_class(m); register_TargetedCellKiller2_class(m); register_TargetedCellKiller3_class(m); register_RandomCellKiller2_class(m); @@ -484,20 +693,30 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_T2SwapCellKiller3_class(m); register_IsolatedLabelledCellKiller2_class(m); register_IsolatedLabelledCellKiller3_class(m); + register_AbstractCellPopulationBoundaryCondition2_2_class(m); + register_AbstractCellPopulationBoundaryCondition3_3_class(m); + register_PlaneBoundaryCondition2_2_class(m); + register_PlaneBoundaryCondition3_3_class(m); + register_AttractingPlaneBoundaryCondition2_2_class(m); + register_AttractingPlaneBoundaryCondition3_3_class(m); register_SphereGeometryBoundaryCondition2_class(m); register_SphereGeometryBoundaryCondition3_class(m); + register_SlidingBoundaryCondition2_class(m); + register_SlidingBoundaryCondition3_class(m); register_AbstractCellPopulation2_2_class(m); register_AbstractCellPopulation3_3_class(m); register_AbstractOffLatticeCellPopulation2_2_class(m); register_AbstractOffLatticeCellPopulation3_3_class(m); register_AbstractCentreBasedCellPopulation2_2_class(m); register_AbstractCentreBasedCellPopulation3_3_class(m); - register_SlidingBoundaryCondition2_class(m); - register_SlidingBoundaryCondition3_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); + register_ImmersedBoundaryCellPopulation3_class(m); register_MeshBasedCellPopulation2_2_class(m); register_MeshBasedCellPopulation3_3_class(m); register_MeshBasedCellPopulationWithGhostNodes2_class(m); @@ -510,8 +729,6 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_NodeBasedCellPopulation3_class(m); register_NodeBasedCellPopulationWithBuskeUpdate2_class(m); register_NodeBasedCellPopulationWithBuskeUpdate3_class(m); - register_NodeBasedCellPopulationWithParticles2_class(m); - register_NodeBasedCellPopulationWithParticles3_class(m); register_AbstractTargetAreaModifier2_class(m); register_AbstractTargetAreaModifier3_class(m); register_SimpleTargetAreaModifier2_class(m); @@ -530,6 +747,12 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_VolumeTrackingModifier3_class(m); register_VtkSceneModifier2_class(m); register_VtkSceneModifier3_class(m); + register_ImmersedBoundarySimulationModifier2_class(m); + register_ImmersedBoundarySimulationModifier3_class(m); + register_ImmersedBoundarySvgWriter2_class(m); + register_ImmersedBoundarySvgWriter3_class(m); + register_NormallyDistributedTargetAreaModifier2_class(m); + register_NormallyDistributedTargetAreaModifier3_class(m); register_AbstractCellBasedSimulation2_2_class(m); register_AbstractCellBasedSimulation3_3_class(m); register_SimulationTime_class(m); diff --git a/dynamic/wrappers/core/core.main.cpp b/dynamic/wrappers/core/core.main.cpp index 9407366f..bbdb2312 100644 --- a/dynamic/wrappers/core/core.main.cpp +++ b/dynamic/wrappers/core/core.main.cpp @@ -1,6 +1,4 @@ #include -#include -#include #include "Identifiable.cppwg.hpp" #include "PetscTools.cppwg.hpp" #include "ReplicatableVector.cppwg.hpp" @@ -17,9 +15,6 @@ namespace py = pybind11; PYBIND11_MODULE(_chaste_project_PyChaste_core, m) { - py::class_<_p_Mat>(m, "_p_Mat", py::module_local()); - py::class_<_p_Vec>(m, "_p_Vec", py::module_local()); - register_Identifiable_class(m); register_PetscTools_class(m); register_ReplicatableVector_class(m); diff --git a/dynamic/wrappers/mesh/mesh.main.cpp b/dynamic/wrappers/mesh/mesh.main.cpp index c1530c47..858b9726 100644 --- a/dynamic/wrappers/mesh/mesh.main.cpp +++ b/dynamic/wrappers/mesh/mesh.main.cpp @@ -1,5 +1,4 @@ #include - #include "ChastePoint2.cppwg.hpp" #include "ChastePoint3.cppwg.hpp" #include "AbstractChasteRegion2.cppwg.hpp" @@ -19,10 +18,6 @@ #include "EdgeHelper2.cppwg.hpp" #include "EdgeHelper3.cppwg.hpp" #include "EdgeOperation.cppwg.hpp" -#include "AbstractElement2_2.cppwg.hpp" -#include "AbstractElement3_3.cppwg.hpp" -#include "MutableElement2_2.cppwg.hpp" -#include "MutableElement3_3.cppwg.hpp" #include "AbstractMesh2_2.cppwg.hpp" #include "AbstractMesh3_3.cppwg.hpp" #include "AbstractTetrahedralMesh2_2.cppwg.hpp" @@ -31,12 +26,20 @@ #include "TetrahedralMesh3_3.cppwg.hpp" #include "MutableMesh2_2.cppwg.hpp" #include "MutableMesh3_3.cppwg.hpp" +#include "AbstractElement2_2.cppwg.hpp" +#include "AbstractElement3_3.cppwg.hpp" +#include "MutableElement2_2.cppwg.hpp" +#include "MutableElement3_3.cppwg.hpp" #include "NodesOnlyMesh2.cppwg.hpp" #include "NodesOnlyMesh3.cppwg.hpp" #include "PottsElement2.cppwg.hpp" #include "PottsElement3.cppwg.hpp" #include "PottsMesh2.cppwg.hpp" #include "PottsMesh3.cppwg.hpp" +#include "FluidSource2.cppwg.hpp" +#include "FluidSource3.cppwg.hpp" +#include "ImmersedBoundaryElement2_2.cppwg.hpp" +#include "ImmersedBoundaryElement3_3.cppwg.hpp" #include "PottsMeshGenerator2.cppwg.hpp" #include "PottsMeshGenerator3.cppwg.hpp" #include "VertexMesh2_2.cppwg.hpp" @@ -50,13 +53,17 @@ #include "Cylindrical2dNodesOnlyMesh.cppwg.hpp" #include "Cylindrical2dMesh.cppwg.hpp" #include "Toroidal2dVertexMesh.cppwg.hpp" +#include "ImmersedBoundaryMesh2_2.cppwg.hpp" +#include "ImmersedBoundaryMesh3_3.cppwg.hpp" #include "HoneycombMeshGenerator.cppwg.hpp" #include "HoneycombVertexMeshGenerator.cppwg.hpp" -#include "CylindricalHoneycombVertexMeshGenerator.cppwg.hpp" #include "CylindricalHoneycombMeshGenerator.cppwg.hpp" +#include "CylindricalHoneycombVertexMeshGenerator.cppwg.hpp" #include "ToroidalHoneycombMeshGenerator.cppwg.hpp" #include "ToroidalHoneycombVertexMeshGenerator.cppwg.hpp" #include "VoronoiVertexMeshGenerator.cppwg.hpp" +#include "ImmersedBoundaryHoneycombMeshGenerator.cppwg.hpp" +#include "ImmersedBoundaryPalisadeMeshGenerator.cppwg.hpp" namespace py = pybind11; @@ -81,10 +88,6 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_EdgeHelper2_class(m); register_EdgeHelper3_class(m); register_EdgeOperation_class(m); - register_AbstractElement2_2_class(m); - register_AbstractElement3_3_class(m); - register_MutableElement2_2_class(m); - register_MutableElement3_3_class(m); register_AbstractMesh2_2_class(m); register_AbstractMesh3_3_class(m); register_AbstractTetrahedralMesh2_2_class(m); @@ -93,12 +96,20 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_TetrahedralMesh3_3_class(m); register_MutableMesh2_2_class(m); register_MutableMesh3_3_class(m); + register_AbstractElement2_2_class(m); + register_AbstractElement3_3_class(m); + register_MutableElement2_2_class(m); + register_MutableElement3_3_class(m); register_NodesOnlyMesh2_class(m); register_NodesOnlyMesh3_class(m); register_PottsElement2_class(m); register_PottsElement3_class(m); register_PottsMesh2_class(m); register_PottsMesh3_class(m); + register_FluidSource2_class(m); + register_FluidSource3_class(m); + register_ImmersedBoundaryElement2_2_class(m); + register_ImmersedBoundaryElement3_3_class(m); register_PottsMeshGenerator2_class(m); register_PottsMeshGenerator3_class(m); register_VertexMesh2_2_class(m); @@ -112,11 +123,15 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_Cylindrical2dNodesOnlyMesh_class(m); register_Cylindrical2dMesh_class(m); register_Toroidal2dVertexMesh_class(m); + register_ImmersedBoundaryMesh2_2_class(m); + register_ImmersedBoundaryMesh3_3_class(m); register_HoneycombMeshGenerator_class(m); register_HoneycombVertexMeshGenerator_class(m); - register_CylindricalHoneycombVertexMeshGenerator_class(m); register_CylindricalHoneycombMeshGenerator_class(m); + register_CylindricalHoneycombVertexMeshGenerator_class(m); register_ToroidalHoneycombMeshGenerator_class(m); register_ToroidalHoneycombVertexMeshGenerator_class(m); register_VoronoiVertexMeshGenerator_class(m); + register_ImmersedBoundaryHoneycombMeshGenerator_class(m); + register_ImmersedBoundaryPalisadeMeshGenerator_class(m); } diff --git a/dynamic/wrappers/pde/pde.main.cpp b/dynamic/wrappers/pde/pde.main.cpp index 48d3ff46..39bd6090 100644 --- a/dynamic/wrappers/pde/pde.main.cpp +++ b/dynamic/wrappers/pde/pde.main.cpp @@ -1,10 +1,12 @@ #include -#include "AbstractLinearPde2_2.cppwg.hpp" -#include "AbstractLinearPde3_3.cppwg.hpp" -#include "AbstractLinearParabolicPde2_2.cppwg.hpp" -#include "AbstractLinearParabolicPde3_3.cppwg.hpp" +#include "AbstractLinearPde2.cppwg.hpp" +#include "AbstractLinearPde3.cppwg.hpp" +#include "AbstractLinearParabolicPde2.cppwg.hpp" +#include "AbstractLinearParabolicPde3.cppwg.hpp" #include "AbstractLinearEllipticPde2_2.cppwg.hpp" #include "AbstractLinearEllipticPde3_3.cppwg.hpp" +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp" +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.hpp" #include "AbstractNonlinearEllipticPde2.cppwg.hpp" #include "AbstractNonlinearEllipticPde3.cppwg.hpp" #include "AbstractBoundaryCondition2.cppwg.hpp" @@ -18,11 +20,13 @@ namespace py = pybind11; PYBIND11_MODULE(_chaste_project_PyChaste_pde, m) { register_AbstractLinearPde2_2_class(m); - register_AbstractLinearPde3_3_class(m); + register_AbstractLinearPde3_2_class(m); register_AbstractLinearParabolicPde2_2_class(m); register_AbstractLinearParabolicPde3_3_class(m); register_AbstractLinearEllipticPde2_2_class(m); register_AbstractLinearEllipticPde3_3_class(m); + register_AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_class(m); + register_AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_class(m); register_AbstractNonlinearEllipticPde2_class(m); register_AbstractNonlinearEllipticPde3_class(m); register_AbstractBoundaryCondition2_class(m); From 8d4045d5846a6e5981f5fef52b48546b4e76ec84 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 15:58:42 +0000 Subject: [PATCH 11/40] #62 update wrapper header collection --- dynamic/wrapper_generators/package_info.yaml | 16 +++++++ .../wrappers/cell_based/cell_based.main.cpp | 48 +++++++++---------- dynamic/wrappers/mesh/mesh.main.cpp | 12 +++++ dynamic/wrappers/pde/pde.main.cpp | 10 ++-- .../wrappers/wrapper_header_collection.hpp | 10 ++++ 5 files changed, 67 insertions(+), 29 deletions(-) diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index 4a2a79ad..b0d694d0 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -122,7 +122,13 @@ modules: - SplitLongEdges # can't work with vec - RescaleMeshFromBoundaryNode # method not found! - name: AbstractElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: MutableElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: NodesOnlyMesh - name: PottsElement - name: PottsMesh @@ -131,6 +137,8 @@ modules: template_substitutions: - signature: replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] + excluded_methods: + AddCornerNode # not implemented in 1D - name: PottsMeshGenerator - name: VertexMesh excluded_methods: @@ -701,6 +709,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -741,6 +750,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -782,6 +792,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -818,6 +829,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -861,6 +873,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -904,6 +917,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -944,6 +958,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp @@ -982,6 +997,7 @@ modules: - CellDeltaNotchWriter.hpp - CellDivisionLocationsWriter.hpp - CellIdWriter.hpp + - CellLabelWriter.hpp - CellLocationIndexWriter.hpp - CellMutationStatesCountWriter.hpp - CellMutationStatesWriter.hpp diff --git a/dynamic/wrappers/cell_based/cell_based.main.cpp b/dynamic/wrappers/cell_based/cell_based.main.cpp index e80a35e6..51a30703 100644 --- a/dynamic/wrappers/cell_based/cell_based.main.cpp +++ b/dynamic/wrappers/cell_based/cell_based.main.cpp @@ -103,8 +103,8 @@ #include "CellBasedEllipticPdeSolver3.cppwg.hpp" #include "CellBasedParabolicPdeSolver2.cppwg.hpp" #include "CellBasedParabolicPdeSolver3.cppwg.hpp" -#include "AbstractCellBasedSimulationModifier2.cppwg.hpp" -#include "AbstractCellBasedSimulationModifier3.cppwg.hpp" +#include "AbstractCellBasedSimulationModifier2_2.cppwg.hpp" +#include "AbstractCellBasedSimulationModifier3_3.cppwg.hpp" #include "AbstractPdeModifier2.cppwg.hpp" #include "AbstractPdeModifier3.cppwg.hpp" #include "AbstractBoxDomainPdeModifier2.cppwg.hpp" @@ -251,10 +251,10 @@ #include "ChemotaxisPottsUpdateRule3.cppwg.hpp" #include "AbstractCaSwitchingUpdateRule2.cppwg.hpp" #include "AbstractCaSwitchingUpdateRule3.cppwg.hpp" -#include "AbstractForce2.cppwg.hpp" -#include "AbstractForce3.cppwg.hpp" -#include "AbstractTwoBodyInteractionForce2.cppwg.hpp" -#include "AbstractTwoBodyInteractionForce3.cppwg.hpp" +#include "AbstractForce2_2.cppwg.hpp" +#include "AbstractForce3_3.cppwg.hpp" +#include "AbstractTwoBodyInteractionForce2_2.cppwg.hpp" +#include "AbstractTwoBodyInteractionForce3_3.cppwg.hpp" #include "BuskeAdhesiveForce2.cppwg.hpp" #include "BuskeAdhesiveForce3.cppwg.hpp" #include "BuskeCompressionForce2.cppwg.hpp" @@ -263,10 +263,10 @@ #include "BuskeElasticForce3.cppwg.hpp" #include "ChemotacticForce2.cppwg.hpp" #include "ChemotacticForce3.cppwg.hpp" -#include "GeneralisedLinearSpringForce2.cppwg.hpp" -#include "GeneralisedLinearSpringForce3.cppwg.hpp" -#include "DifferentialAdhesionGeneralisedLinearSpringForce2.cppwg.hpp" -#include "DifferentialAdhesionGeneralisedLinearSpringForce3.cppwg.hpp" +#include "GeneralisedLinearSpringForce2_2.cppwg.hpp" +#include "GeneralisedLinearSpringForce3_3.cppwg.hpp" +#include "DifferentialAdhesionGeneralisedLinearSpringForce2_2.cppwg.hpp" +#include "DifferentialAdhesionGeneralisedLinearSpringForce3_3.cppwg.hpp" #include "NagaiHondaForce2.cppwg.hpp" #include "NagaiHondaForce3.cppwg.hpp" #include "DiffusionForce2.cppwg.hpp" @@ -309,20 +309,20 @@ #include "T2SwapCellKiller3.cppwg.hpp" #include "IsolatedLabelledCellKiller2.cppwg.hpp" #include "IsolatedLabelledCellKiller3.cppwg.hpp" -#include "AbstractCellPopulationBoundaryCondition2.cppwg.hpp" -#include "AbstractCellPopulationBoundaryCondition3.cppwg.hpp" -#include "PlaneBoundaryCondition2.cppwg.hpp" -#include "PlaneBoundaryCondition3.cppwg.hpp" -#include "AttractingPlaneBoundaryCondition2.cppwg.hpp" -#include "AttractingPlaneBoundaryCondition3.cppwg.hpp" +#include "AbstractCellPopulationBoundaryCondition2_2.cppwg.hpp" +#include "AbstractCellPopulationBoundaryCondition3_3.cppwg.hpp" +#include "PlaneBoundaryCondition2_2.cppwg.hpp" +#include "PlaneBoundaryCondition3_3.cppwg.hpp" +#include "AttractingPlaneBoundaryCondition2_2.cppwg.hpp" +#include "AttractingPlaneBoundaryCondition3_3.cppwg.hpp" #include "SphereGeometryBoundaryCondition2.cppwg.hpp" #include "SphereGeometryBoundaryCondition3.cppwg.hpp" #include "SlidingBoundaryCondition2.cppwg.hpp" #include "SlidingBoundaryCondition3.cppwg.hpp" -#include "AbstractCellPopulation2.cppwg.hpp" -#include "AbstractCellPopulation3.cppwg.hpp" -#include "AbstractOffLatticeCellPopulation2.cppwg.hpp" -#include "AbstractOffLatticeCellPopulation3.cppwg.hpp" +#include "AbstractCellPopulation2_2.cppwg.hpp" +#include "AbstractCellPopulation3_3.cppwg.hpp" +#include "AbstractOffLatticeCellPopulation2_2.cppwg.hpp" +#include "AbstractOffLatticeCellPopulation3_3.cppwg.hpp" #include "AbstractCentreBasedCellPopulation2_2.cppwg.hpp" #include "AbstractCentreBasedCellPopulation3_3.cppwg.hpp" #include "AbstractOnLatticeCellPopulation2.cppwg.hpp" @@ -333,8 +333,8 @@ #include "CaBasedCellPopulation3.cppwg.hpp" #include "ImmersedBoundaryCellPopulation2.cppwg.hpp" #include "ImmersedBoundaryCellPopulation3.cppwg.hpp" -#include "MeshBasedCellPopulation2.cppwg.hpp" -#include "MeshBasedCellPopulation3.cppwg.hpp" +#include "MeshBasedCellPopulation2_2.cppwg.hpp" +#include "MeshBasedCellPopulation3_3.cppwg.hpp" #include "MeshBasedCellPopulationWithGhostNodes2.cppwg.hpp" #include "MeshBasedCellPopulationWithGhostNodes3.cppwg.hpp" #include "VertexBasedCellPopulation2.cppwg.hpp" @@ -374,8 +374,8 @@ #include "SimulationTime.cppwg.hpp" #include "OnLatticeSimulation2.cppwg.hpp" #include "OnLatticeSimulation3.cppwg.hpp" -#include "OffLatticeSimulation2.cppwg.hpp" -#include "OffLatticeSimulation3.cppwg.hpp" +#include "OffLatticeSimulation2_2.cppwg.hpp" +#include "OffLatticeSimulation3_3.cppwg.hpp" #include "PythonSimulationModifier2.cppwg.hpp" #include "PythonSimulationModifier3.cppwg.hpp" diff --git a/dynamic/wrappers/mesh/mesh.main.cpp b/dynamic/wrappers/mesh/mesh.main.cpp index 858b9726..235e7531 100644 --- a/dynamic/wrappers/mesh/mesh.main.cpp +++ b/dynamic/wrappers/mesh/mesh.main.cpp @@ -26,9 +26,13 @@ #include "TetrahedralMesh3_3.cppwg.hpp" #include "MutableMesh2_2.cppwg.hpp" #include "MutableMesh3_3.cppwg.hpp" +#include "AbstractElement1_2.cppwg.hpp" #include "AbstractElement2_2.cppwg.hpp" +#include "AbstractElement2_3.cppwg.hpp" #include "AbstractElement3_3.cppwg.hpp" +#include "MutableElement1_2.cppwg.hpp" #include "MutableElement2_2.cppwg.hpp" +#include "MutableElement2_3.cppwg.hpp" #include "MutableElement3_3.cppwg.hpp" #include "NodesOnlyMesh2.cppwg.hpp" #include "NodesOnlyMesh3.cppwg.hpp" @@ -38,7 +42,9 @@ #include "PottsMesh3.cppwg.hpp" #include "FluidSource2.cppwg.hpp" #include "FluidSource3.cppwg.hpp" +#include "ImmersedBoundaryElement1_2.cppwg.hpp" #include "ImmersedBoundaryElement2_2.cppwg.hpp" +#include "ImmersedBoundaryElement2_3.cppwg.hpp" #include "ImmersedBoundaryElement3_3.cppwg.hpp" #include "PottsMeshGenerator2.cppwg.hpp" #include "PottsMeshGenerator3.cppwg.hpp" @@ -96,9 +102,13 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_TetrahedralMesh3_3_class(m); register_MutableMesh2_2_class(m); register_MutableMesh3_3_class(m); + register_AbstractElement1_2_class(m); register_AbstractElement2_2_class(m); + register_AbstractElement2_3_class(m); register_AbstractElement3_3_class(m); + register_MutableElement1_2_class(m); register_MutableElement2_2_class(m); + register_MutableElement2_3_class(m); register_MutableElement3_3_class(m); register_NodesOnlyMesh2_class(m); register_NodesOnlyMesh3_class(m); @@ -108,7 +118,9 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_PottsMesh3_class(m); register_FluidSource2_class(m); register_FluidSource3_class(m); + register_ImmersedBoundaryElement1_2_class(m); register_ImmersedBoundaryElement2_2_class(m); + register_ImmersedBoundaryElement2_3_class(m); register_ImmersedBoundaryElement3_3_class(m); register_PottsMeshGenerator2_class(m); register_PottsMeshGenerator3_class(m); diff --git a/dynamic/wrappers/pde/pde.main.cpp b/dynamic/wrappers/pde/pde.main.cpp index 39bd6090..1267775c 100644 --- a/dynamic/wrappers/pde/pde.main.cpp +++ b/dynamic/wrappers/pde/pde.main.cpp @@ -1,8 +1,8 @@ #include -#include "AbstractLinearPde2.cppwg.hpp" -#include "AbstractLinearPde3.cppwg.hpp" -#include "AbstractLinearParabolicPde2.cppwg.hpp" -#include "AbstractLinearParabolicPde3.cppwg.hpp" +#include "AbstractLinearPde2_2.cppwg.hpp" +#include "AbstractLinearPde3_3.cppwg.hpp" +#include "AbstractLinearParabolicPde2_2.cppwg.hpp" +#include "AbstractLinearParabolicPde3_3.cppwg.hpp" #include "AbstractLinearEllipticPde2_2.cppwg.hpp" #include "AbstractLinearEllipticPde3_3.cppwg.hpp" #include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp" @@ -20,7 +20,7 @@ namespace py = pybind11; PYBIND11_MODULE(_chaste_project_PyChaste_pde, m) { register_AbstractLinearPde2_2_class(m); - register_AbstractLinearPde3_2_class(m); + register_AbstractLinearPde3_3_class(m); register_AbstractLinearParabolicPde2_2_class(m); register_AbstractLinearParabolicPde3_3_class(m); register_AbstractLinearEllipticPde2_2_class(m); diff --git a/dynamic/wrappers/wrapper_header_collection.hpp b/dynamic/wrappers/wrapper_header_collection.hpp index 83cd659a..1f8799aa 100644 --- a/dynamic/wrappers/wrapper_header_collection.hpp +++ b/dynamic/wrappers/wrapper_header_collection.hpp @@ -318,7 +318,9 @@ template class MutableMesh<2,2>; template class MutableMesh<3,3>; template class AbstractElement<2,2>; template class AbstractElement<3,3>; +template class MutableElement<1,2>; template class MutableElement<2,2>; +template class MutableElement<2,3>; template class MutableElement<3,3>; template class NodesOnlyMesh<2>; template class NodesOnlyMesh<3>; @@ -328,7 +330,9 @@ template class PottsMesh<2>; template class PottsMesh<3>; template class FluidSource<2>; template class FluidSource<3>; +template class ImmersedBoundaryElement<1,2>; template class ImmersedBoundaryElement<2,2>; +template class ImmersedBoundaryElement<2,3>; template class ImmersedBoundaryElement<3,3>; template class PottsMeshGenerator<2>; template class PottsMeshGenerator<3>; @@ -715,9 +719,13 @@ typedef TetrahedralMesh<2,2> TetrahedralMesh2_2; typedef TetrahedralMesh<3,3> TetrahedralMesh3_3; typedef MutableMesh<2,2> MutableMesh2_2; typedef MutableMesh<3,3> MutableMesh3_3; +typedef AbstractElement<1,2> AbstractElement1_2; typedef AbstractElement<2,2> AbstractElement2_2; +typedef AbstractElement<2,3> AbstractElement2_3; typedef AbstractElement<3,3> AbstractElement3_3; +typedef MutableElement<1,2> MutableElement1_2; typedef MutableElement<2,2> MutableElement2_2; +typedef MutableElement<2,3> MutableElement2_3; typedef MutableElement<3,3> MutableElement3_3; typedef NodesOnlyMesh<2> NodesOnlyMesh2; typedef NodesOnlyMesh<3> NodesOnlyMesh3; @@ -727,7 +735,9 @@ typedef PottsMesh<2> PottsMesh2; typedef PottsMesh<3> PottsMesh3; typedef FluidSource<2> FluidSource2; typedef FluidSource<3> FluidSource3; +typedef ImmersedBoundaryElement<1,2> ImmersedBoundaryElement1_2; typedef ImmersedBoundaryElement<2,2> ImmersedBoundaryElement2_2; +typedef ImmersedBoundaryElement<2,3> ImmersedBoundaryElement2_3; typedef ImmersedBoundaryElement<3,3> ImmersedBoundaryElement3_3; typedef PottsMeshGenerator<2> PottsMeshGenerator2; typedef PottsMeshGenerator<3> PottsMeshGenerator3; From 39c51a159f90f05a6e83399e555f2239197f9d91 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 16:56:46 +0000 Subject: [PATCH 12/40] #62 update wrapper header collection --- dynamic/wrapper_generators/package_info.yaml | 2 +- .../wrappers/cell_based/cell_based.main.cpp | 24 +++++++++---------- .../wrappers/wrapper_header_collection.hpp | 20 ++++++++-------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index b0d694d0..6cf12ef7 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -24,7 +24,7 @@ template_substitutions: - signature: replacement: [[2, 2], [3, 3]] - signature: - replacement: [[2], [3]] + replacement: [[2, 2], [3, 3]] modules: - name: core diff --git a/dynamic/wrappers/cell_based/cell_based.main.cpp b/dynamic/wrappers/cell_based/cell_based.main.cpp index 51a30703..a508d7f7 100644 --- a/dynamic/wrappers/cell_based/cell_based.main.cpp +++ b/dynamic/wrappers/cell_based/cell_based.main.cpp @@ -233,12 +233,12 @@ #include "ShovingCaBasedDivisionRule3.cppwg.hpp" #include "ExclusionCaBasedDivisionRule2.cppwg.hpp" #include "ExclusionCaBasedDivisionRule3.cppwg.hpp" -#include "RandomDirectionCentreBasedDivisionRule2.cppwg.hpp" -#include "RandomDirectionCentreBasedDivisionRule3.cppwg.hpp" -#include "FixedCentreBasedDivisionRule2.cppwg.hpp" -#include "FixedCentreBasedDivisionRule3.cppwg.hpp" -#include "AbstractCentreBasedDivisionRule2.cppwg.hpp" -#include "AbstractCentreBasedDivisionRule3.cppwg.hpp" +#include "RandomDirectionCentreBasedDivisionRule2_2.cppwg.hpp" +#include "RandomDirectionCentreBasedDivisionRule3_3.cppwg.hpp" +#include "FixedCentreBasedDivisionRule2_2.cppwg.hpp" +#include "FixedCentreBasedDivisionRule3_3.cppwg.hpp" +#include "AbstractCentreBasedDivisionRule2_2.cppwg.hpp" +#include "AbstractCentreBasedDivisionRule3_3.cppwg.hpp" #include "ShortAxisVertexBasedDivisionRule2.cppwg.hpp" #include "ShortAxisVertexBasedDivisionRule3.cppwg.hpp" #include "AbstractImmersedBoundaryDivisionRule2.cppwg.hpp" @@ -617,12 +617,12 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_ShovingCaBasedDivisionRule3_class(m); register_ExclusionCaBasedDivisionRule2_class(m); register_ExclusionCaBasedDivisionRule3_class(m); - register_RandomDirectionCentreBasedDivisionRule2_class(m); - register_RandomDirectionCentreBasedDivisionRule3_class(m); - register_FixedCentreBasedDivisionRule2_class(m); - register_FixedCentreBasedDivisionRule3_class(m); - register_AbstractCentreBasedDivisionRule2_class(m); - register_AbstractCentreBasedDivisionRule3_class(m); + register_RandomDirectionCentreBasedDivisionRule2_2_class(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); diff --git a/dynamic/wrappers/wrapper_header_collection.hpp b/dynamic/wrappers/wrapper_header_collection.hpp index 1f8799aa..bd82d80d 100644 --- a/dynamic/wrappers/wrapper_header_collection.hpp +++ b/dynamic/wrappers/wrapper_header_collection.hpp @@ -526,12 +526,12 @@ template class ShovingCaBasedDivisionRule<2>; template class ShovingCaBasedDivisionRule<3>; template class ExclusionCaBasedDivisionRule<2>; template class ExclusionCaBasedDivisionRule<3>; -template class RandomDirectionCentreBasedDivisionRule<2>; -template class RandomDirectionCentreBasedDivisionRule<3>; +template class RandomDirectionCentreBasedDivisionRule<2,2>; +template class RandomDirectionCentreBasedDivisionRule<3,3>; template class FixedCentreBasedDivisionRule<2>; template class FixedCentreBasedDivisionRule<3>; -template class AbstractCentreBasedDivisionRule<2>; -template class AbstractCentreBasedDivisionRule<3>; +template class AbstractCentreBasedDivisionRule<2,2>; +template class AbstractCentreBasedDivisionRule<3,3>; template class ShortAxisVertexBasedDivisionRule<2>; template class ShortAxisVertexBasedDivisionRule<3>; template class AbstractImmersedBoundaryDivisionRule<2>; @@ -931,12 +931,12 @@ typedef ShovingCaBasedDivisionRule<2> ShovingCaBasedDivisionRule2; typedef ShovingCaBasedDivisionRule<3> ShovingCaBasedDivisionRule3; typedef ExclusionCaBasedDivisionRule<2> ExclusionCaBasedDivisionRule2; typedef ExclusionCaBasedDivisionRule<3> ExclusionCaBasedDivisionRule3; -typedef RandomDirectionCentreBasedDivisionRule<2> RandomDirectionCentreBasedDivisionRule2; -typedef RandomDirectionCentreBasedDivisionRule<3> RandomDirectionCentreBasedDivisionRule3; -typedef FixedCentreBasedDivisionRule<2> FixedCentreBasedDivisionRule2; -typedef FixedCentreBasedDivisionRule<3> FixedCentreBasedDivisionRule3; -typedef AbstractCentreBasedDivisionRule<2> AbstractCentreBasedDivisionRule2; -typedef AbstractCentreBasedDivisionRule<3> AbstractCentreBasedDivisionRule3; +typedef RandomDirectionCentreBasedDivisionRule<2,2> RandomDirectionCentreBasedDivisionRule2_2; +typedef RandomDirectionCentreBasedDivisionRule<3,3> RandomDirectionCentreBasedDivisionRule3_3; +typedef FixedCentreBasedDivisionRule<2,2> FixedCentreBasedDivisionRule2_2; +typedef FixedCentreBasedDivisionRule<3,3> FixedCentreBasedDivisionRule3_3; +typedef AbstractCentreBasedDivisionRule<2,2> AbstractCentreBasedDivisionRule2_2; +typedef AbstractCentreBasedDivisionRule<3,3> AbstractCentreBasedDivisionRule3_3; typedef ShortAxisVertexBasedDivisionRule<2> ShortAxisVertexBasedDivisionRule2; typedef ShortAxisVertexBasedDivisionRule<3> ShortAxisVertexBasedDivisionRule3; typedef AbstractImmersedBoundaryDivisionRule<2> AbstractImmersedBoundaryDivisionRule2; From 3d7191933fc466b7464af706f11619bd1a1e899c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 17:45:31 +0000 Subject: [PATCH 13/40] #62 add immersed boundary wrappers --- ...stractCentreBasedDivisionRule2_2.cppwg.cpp | 50 ++ ...stractCentreBasedDivisionRule2_2.cppwg.hpp | 6 + ...stractCentreBasedDivisionRule3_3.cppwg.cpp | 50 ++ ...stractCentreBasedDivisionRule3_3.cppwg.hpp | 6 + ...actImmersedBoundaryDivisionRule2.cppwg.cpp | 50 ++ ...actImmersedBoundaryDivisionRule2.cppwg.hpp | 6 + ...actImmersedBoundaryDivisionRule3.cppwg.cpp | 50 ++ ...actImmersedBoundaryDivisionRule3.cppwg.hpp | 6 + .../AbstractImmersedBoundaryForce2.cppwg.cpp | 73 +++ .../AbstractImmersedBoundaryForce2.cppwg.hpp | 6 + .../AbstractImmersedBoundaryForce3.cppwg.cpp | 73 +++ .../AbstractImmersedBoundaryForce3.cppwg.hpp | 6 + .../FixedCentreBasedDivisionRule2_2.cppwg.cpp | 43 ++ .../FixedCentreBasedDivisionRule2_2.cppwg.hpp | 6 + .../FixedCentreBasedDivisionRule3_3.cppwg.cpp | 43 ++ .../FixedCentreBasedDivisionRule3_3.cppwg.hpp | 6 + ...sedBoundaryBoundaryCellWriter2_2.cppwg.cpp | 51 ++ ...sedBoundaryBoundaryCellWriter2_2.cppwg.hpp | 6 + ...sedBoundaryBoundaryCellWriter3_3.cppwg.cpp | 51 ++ ...sedBoundaryBoundaryCellWriter3_3.cppwg.hpp | 6 + .../ImmersedBoundaryCellPopulation2.cppwg.cpp | 443 ++++++++++++++++++ .../ImmersedBoundaryCellPopulation2.cppwg.hpp | 6 + .../ImmersedBoundaryCellPopulation3.cppwg.cpp | 443 ++++++++++++++++++ .../ImmersedBoundaryCellPopulation3.cppwg.hpp | 6 + ...dBoundaryKinematicFeedbackForce2.cppwg.cpp | 57 +++ ...dBoundaryKinematicFeedbackForce2.cppwg.hpp | 6 + ...dBoundaryKinematicFeedbackForce3.cppwg.cpp | 57 +++ ...dBoundaryKinematicFeedbackForce3.cppwg.hpp | 6 + ...LinearDifferentialAdhesionForce2.cppwg.cpp | 81 ++++ ...LinearDifferentialAdhesionForce2.cppwg.hpp | 6 + ...LinearDifferentialAdhesionForce3.cppwg.cpp | 81 ++++ ...LinearDifferentialAdhesionForce3.cppwg.hpp | 6 + ...dBoundaryLinearInteractionForce2.cppwg.cpp | 81 ++++ ...dBoundaryLinearInteractionForce2.cppwg.hpp | 6 + ...dBoundaryLinearInteractionForce3.cppwg.cpp | 81 ++++ ...dBoundaryLinearInteractionForce3.cppwg.hpp | 6 + ...rsedBoundaryLinearMembraneForce2.cppwg.cpp | 81 ++++ ...rsedBoundaryLinearMembraneForce2.cppwg.hpp | 6 + ...rsedBoundaryLinearMembraneForce3.cppwg.cpp | 81 ++++ ...rsedBoundaryLinearMembraneForce3.cppwg.hpp | 6 + ...edBoundaryMorseInteractionForce2.cppwg.cpp | 89 ++++ ...edBoundaryMorseInteractionForce2.cppwg.hpp | 6 + ...edBoundaryMorseInteractionForce3.cppwg.cpp | 89 ++++ ...edBoundaryMorseInteractionForce3.cppwg.hpp | 6 + ...ersedBoundaryMorseMembraneForce2.cppwg.cpp | 89 ++++ ...ersedBoundaryMorseMembraneForce2.cppwg.hpp | 6 + ...ersedBoundaryMorseMembraneForce3.cppwg.cpp | 89 ++++ ...ersedBoundaryMorseMembraneForce3.cppwg.hpp | 6 + ...BoundaryNeighbourNumberWriter2_2.cppwg.cpp | 51 ++ ...BoundaryNeighbourNumberWriter2_2.cppwg.hpp | 6 + ...BoundaryNeighbourNumberWriter3_3.cppwg.cpp | 51 ++ ...BoundaryNeighbourNumberWriter3_3.cppwg.hpp | 6 + ...ersedBoundarySimulationModifier2.cppwg.cpp | 124 +++++ ...ersedBoundarySimulationModifier2.cppwg.hpp | 6 + ...ersedBoundarySimulationModifier3.cppwg.cpp | 124 +++++ ...ersedBoundarySimulationModifier3.cppwg.hpp | 6 + .../ImmersedBoundarySvgWriter2.cppwg.cpp | 80 ++++ .../ImmersedBoundarySvgWriter2.cppwg.hpp | 6 + .../ImmersedBoundarySvgWriter3.cppwg.cpp | 80 ++++ .../ImmersedBoundarySvgWriter3.cppwg.hpp | 6 + ...lyDistributedTargetAreaModifier2.cppwg.cpp | 56 +++ ...lyDistributedTargetAreaModifier2.cppwg.hpp | 6 + ...lyDistributedTargetAreaModifier3.cppwg.cpp | 56 +++ ...lyDistributedTargetAreaModifier3.cppwg.hpp | 6 + ...ectionCentreBasedDivisionRule2_2.cppwg.cpp | 39 ++ ...ectionCentreBasedDivisionRule2_2.cppwg.hpp | 6 + ...ectionCentreBasedDivisionRule3_3.cppwg.cpp | 39 ++ ...ectionCentreBasedDivisionRule3_3.cppwg.hpp | 6 + ...xisImmersedBoundaryDivisionRule2.cppwg.cpp | 39 ++ ...xisImmersedBoundaryDivisionRule2.cppwg.hpp | 6 + ...xisImmersedBoundaryDivisionRule3.cppwg.cpp | 39 ++ ...xisImmersedBoundaryDivisionRule3.cppwg.hpp | 6 + .../mesh/AbstractElement1_2.cppwg.cpp | 133 ++++++ .../mesh/AbstractElement1_2.cppwg.hpp | 6 + .../mesh/AbstractElement2_3.cppwg.cpp | 133 ++++++ .../mesh/AbstractElement2_3.cppwg.hpp | 6 + dynamic/wrappers/mesh/FluidSource2.cppwg.cpp | 67 +++ dynamic/wrappers/mesh/FluidSource2.cppwg.hpp | 6 + dynamic/wrappers/mesh/FluidSource3.cppwg.cpp | 67 +++ dynamic/wrappers/mesh/FluidSource3.cppwg.hpp | 6 + .../mesh/ImmersedBoundaryElement1_2.cppwg.cpp | 61 +++ .../mesh/ImmersedBoundaryElement1_2.cppwg.hpp | 6 + .../mesh/ImmersedBoundaryElement2_2.cppwg.cpp | 61 +++ .../mesh/ImmersedBoundaryElement2_2.cppwg.hpp | 6 + .../mesh/ImmersedBoundaryElement2_3.cppwg.cpp | 61 +++ .../mesh/ImmersedBoundaryElement2_3.cppwg.hpp | 6 + .../mesh/ImmersedBoundaryElement3_3.cppwg.cpp | 61 +++ .../mesh/ImmersedBoundaryElement3_3.cppwg.hpp | 6 + ...edBoundaryHoneycombMeshGenerator.cppwg.cpp | 30 ++ ...edBoundaryHoneycombMeshGenerator.cppwg.hpp | 6 + .../mesh/ImmersedBoundaryMesh2_2.cppwg.cpp | 357 ++++++++++++++ .../mesh/ImmersedBoundaryMesh2_2.cppwg.hpp | 6 + .../mesh/ImmersedBoundaryMesh3_3.cppwg.cpp | 357 ++++++++++++++ .../mesh/ImmersedBoundaryMesh3_3.cppwg.hpp | 6 + ...sedBoundaryPalisadeMeshGenerator.cppwg.cpp | 26 + ...sedBoundaryPalisadeMeshGenerator.cppwg.hpp | 6 + .../wrappers/mesh/MutableElement1_2.cppwg.cpp | 132 ++++++ .../wrappers/mesh/MutableElement1_2.cppwg.hpp | 6 + .../wrappers/mesh/MutableElement2_3.cppwg.cpp | 132 ++++++ .../wrappers/mesh/MutableElement2_3.cppwg.hpp | 6 + .../AbstractCellCycleModelOdeSolver.cppwg.cpp | 102 ++++ .../AbstractCellCycleModelOdeSolver.cppwg.hpp | 6 + ...deSystemForCoupledOdeSystem2_2_1.cppwg.cpp | 80 ++++ ...deSystemForCoupledOdeSystem2_2_1.cppwg.hpp | 6 + ...deSystemForCoupledOdeSystem3_3_1.cppwg.cpp | 80 ++++ ...deSystemForCoupledOdeSystem3_3_1.cppwg.hpp | 6 + 106 files changed, 5412 insertions(+) create mode 100644 dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/AbstractElement1_2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/AbstractElement2_3.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/FluidSource2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/FluidSource2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/FluidSource3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/FluidSource3.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp create mode 100644 dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp create mode 100644 dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.hpp create mode 100644 dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp create mode 100644 dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp create mode 100644 dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp create mode 100644 dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.hpp diff --git a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp new file mode 100644 index 00000000..8ab05c0d --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractCentreBasedDivisionRule.hpp" + +#include "AbstractCentreBasedDivisionRule2_2.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractCentreBasedDivisionRule<2 > AbstractCentreBasedDivisionRule2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::std::pair, boost::numeric::ublas::c_vector> _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_; + +class AbstractCentreBasedDivisionRule2_2_Overloads : public AbstractCentreBasedDivisionRule2_2{ + public: + using AbstractCentreBasedDivisionRule2_2::AbstractCentreBasedDivisionRule; + ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<2, 2> & rCellPopulation) override { + PYBIND11_OVERLOAD_PURE( + _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_, + AbstractCentreBasedDivisionRule2_2, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + void OutputCellCentreBasedDivisionRuleParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + AbstractCentreBasedDivisionRule2_2, + OutputCellCentreBasedDivisionRuleParameters, + rParamsFile); + } + +}; +void register_AbstractCentreBasedDivisionRule2_2_class(py::module &m){ +py::class_ >(m, "AbstractCentreBasedDivisionRule2_2") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::std::pair, boost::numeric::ublas::c_vector>(AbstractCentreBasedDivisionRule2_2::*)(::CellPtr, ::AbstractCentreBasedCellPopulation<2, 2> &)) &AbstractCentreBasedDivisionRule2_2::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + .def( + "OutputCellCentreBasedDivisionRuleInfo", + (void(AbstractCentreBasedDivisionRule2_2::*)(::out_stream &)) &AbstractCentreBasedDivisionRule2_2::OutputCellCentreBasedDivisionRuleInfo, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.hpp new file mode 100644 index 00000000..7a78e450 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper +#define AbstractCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractCentreBasedDivisionRule2_2_class(py::module &m); +#endif // AbstractCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp new file mode 100644 index 00000000..c1f1720c --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractCentreBasedDivisionRule.hpp" + +#include "AbstractCentreBasedDivisionRule3_3.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractCentreBasedDivisionRule<3 > AbstractCentreBasedDivisionRule3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::std::pair, boost::numeric::ublas::c_vector> _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_; + +class AbstractCentreBasedDivisionRule3_3_Overloads : public AbstractCentreBasedDivisionRule3_3{ + public: + using AbstractCentreBasedDivisionRule3_3::AbstractCentreBasedDivisionRule; + ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<3, 3> & rCellPopulation) override { + PYBIND11_OVERLOAD_PURE( + _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_, + AbstractCentreBasedDivisionRule3_3, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + void OutputCellCentreBasedDivisionRuleParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + AbstractCentreBasedDivisionRule3_3, + OutputCellCentreBasedDivisionRuleParameters, + rParamsFile); + } + +}; +void register_AbstractCentreBasedDivisionRule3_3_class(py::module &m){ +py::class_ >(m, "AbstractCentreBasedDivisionRule3_3") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::std::pair, boost::numeric::ublas::c_vector>(AbstractCentreBasedDivisionRule3_3::*)(::CellPtr, ::AbstractCentreBasedCellPopulation<3, 3> &)) &AbstractCentreBasedDivisionRule3_3::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + .def( + "OutputCellCentreBasedDivisionRuleInfo", + (void(AbstractCentreBasedDivisionRule3_3::*)(::out_stream &)) &AbstractCentreBasedDivisionRule3_3::OutputCellCentreBasedDivisionRuleInfo, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.hpp new file mode 100644 index 00000000..c520a5ef --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper +#define AbstractCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractCentreBasedDivisionRule3_3_class(py::module &m); +#endif // AbstractCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp new file mode 100644 index 00000000..6bc96ff0 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractImmersedBoundaryDivisionRule.hpp" + +#include "AbstractImmersedBoundaryDivisionRule2.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractImmersedBoundaryDivisionRule<2 > AbstractImmersedBoundaryDivisionRule2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_2_gt_; + +class AbstractImmersedBoundaryDivisionRule2_Overloads : public AbstractImmersedBoundaryDivisionRule2{ + public: + using AbstractImmersedBoundaryDivisionRule2::AbstractImmersedBoundaryDivisionRule; + ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD_PURE( + _boost_numeric_ublas_c_vector_lt_double_2_gt_, + AbstractImmersedBoundaryDivisionRule2, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + void OutputCellImmersedBoundaryDivisionRuleParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + AbstractImmersedBoundaryDivisionRule2, + OutputCellImmersedBoundaryDivisionRuleParameters, + rParamsFile); + } + +}; +void register_AbstractImmersedBoundaryDivisionRule2_class(py::module &m){ +py::class_ >(m, "AbstractImmersedBoundaryDivisionRule2") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::boost::numeric::ublas::c_vector(AbstractImmersedBoundaryDivisionRule2::*)(::CellPtr, ::ImmersedBoundaryCellPopulation<2> &)) &AbstractImmersedBoundaryDivisionRule2::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + .def( + "OutputCellImmersedBoundaryDivisionRuleInfo", + (void(AbstractImmersedBoundaryDivisionRule2::*)(::out_stream &)) &AbstractImmersedBoundaryDivisionRule2::OutputCellImmersedBoundaryDivisionRuleInfo, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.hpp new file mode 100644 index 00000000..6aeb9eb8 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractImmersedBoundaryDivisionRule2_hpp__pyplusplus_wrapper +#define AbstractImmersedBoundaryDivisionRule2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractImmersedBoundaryDivisionRule2_class(py::module &m); +#endif // AbstractImmersedBoundaryDivisionRule2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp new file mode 100644 index 00000000..4ec3cc48 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractImmersedBoundaryDivisionRule.hpp" + +#include "AbstractImmersedBoundaryDivisionRule3.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractImmersedBoundaryDivisionRule<3 > AbstractImmersedBoundaryDivisionRule3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; + +class AbstractImmersedBoundaryDivisionRule3_Overloads : public AbstractImmersedBoundaryDivisionRule3{ + public: + using AbstractImmersedBoundaryDivisionRule3::AbstractImmersedBoundaryDivisionRule; + ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD_PURE( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + AbstractImmersedBoundaryDivisionRule3, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + void OutputCellImmersedBoundaryDivisionRuleParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + AbstractImmersedBoundaryDivisionRule3, + OutputCellImmersedBoundaryDivisionRuleParameters, + rParamsFile); + } + +}; +void register_AbstractImmersedBoundaryDivisionRule3_class(py::module &m){ +py::class_ >(m, "AbstractImmersedBoundaryDivisionRule3") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::boost::numeric::ublas::c_vector(AbstractImmersedBoundaryDivisionRule3::*)(::CellPtr, ::ImmersedBoundaryCellPopulation<3> &)) &AbstractImmersedBoundaryDivisionRule3::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + .def( + "OutputCellImmersedBoundaryDivisionRuleInfo", + (void(AbstractImmersedBoundaryDivisionRule3::*)(::out_stream &)) &AbstractImmersedBoundaryDivisionRule3::OutputCellImmersedBoundaryDivisionRuleInfo, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.hpp new file mode 100644 index 00000000..09b36588 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractImmersedBoundaryDivisionRule3_hpp__pyplusplus_wrapper +#define AbstractImmersedBoundaryDivisionRule3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractImmersedBoundaryDivisionRule3_class(py::module &m); +#endif // AbstractImmersedBoundaryDivisionRule3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp new file mode 100644 index 00000000..9ebbbd42 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractImmersedBoundaryForce.hpp" + +#include "AbstractImmersedBoundaryForce2.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractImmersedBoundaryForce<2 > AbstractImmersedBoundaryForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class AbstractImmersedBoundaryForce2_Overloads : public AbstractImmersedBoundaryForce2{ + public: + using AbstractImmersedBoundaryForce2::AbstractImmersedBoundaryForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractImmersedBoundaryForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractImmersedBoundaryForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_AbstractImmersedBoundaryForce2_class(py::module &m){ +py::class_ >(m, "AbstractImmersedBoundaryForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(AbstractImmersedBoundaryForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &AbstractImmersedBoundaryForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(AbstractImmersedBoundaryForce2::*)(::out_stream &)) &AbstractImmersedBoundaryForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetAdditiveNormalNoise", + (bool(AbstractImmersedBoundaryForce2::*)() const ) &AbstractImmersedBoundaryForce2::GetAdditiveNormalNoise, + " " ) + .def( + "SetAdditiveNormalNoise", + (void(AbstractImmersedBoundaryForce2::*)(bool)) &AbstractImmersedBoundaryForce2::SetAdditiveNormalNoise, + " " , py::arg("additiveNormalNoise") ) + .def( + "GetNormalNoiseMean", + (double(AbstractImmersedBoundaryForce2::*)() const ) &AbstractImmersedBoundaryForce2::GetNormalNoiseMean, + " " ) + .def( + "SetNormalNoiseMean", + (void(AbstractImmersedBoundaryForce2::*)(double)) &AbstractImmersedBoundaryForce2::SetNormalNoiseMean, + " " , py::arg("normalNoiseMean") ) + .def( + "GetNormalNoiseStdDev", + (double(AbstractImmersedBoundaryForce2::*)() const ) &AbstractImmersedBoundaryForce2::GetNormalNoiseStdDev, + " " ) + .def( + "SetNormalNoiseStdDev", + (void(AbstractImmersedBoundaryForce2::*)(double)) &AbstractImmersedBoundaryForce2::SetNormalNoiseStdDev, + " " , py::arg("normalNoiseStdDev") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.hpp new file mode 100644 index 00000000..a442dae0 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractImmersedBoundaryForce2_hpp__pyplusplus_wrapper +#define AbstractImmersedBoundaryForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractImmersedBoundaryForce2_class(py::module &m); +#endif // AbstractImmersedBoundaryForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp new file mode 100644 index 00000000..823c673f --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractImmersedBoundaryForce.hpp" + +#include "AbstractImmersedBoundaryForce3.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractImmersedBoundaryForce<3 > AbstractImmersedBoundaryForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class AbstractImmersedBoundaryForce3_Overloads : public AbstractImmersedBoundaryForce3{ + public: + using AbstractImmersedBoundaryForce3::AbstractImmersedBoundaryForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractImmersedBoundaryForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractImmersedBoundaryForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_AbstractImmersedBoundaryForce3_class(py::module &m){ +py::class_ >(m, "AbstractImmersedBoundaryForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(AbstractImmersedBoundaryForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &AbstractImmersedBoundaryForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(AbstractImmersedBoundaryForce3::*)(::out_stream &)) &AbstractImmersedBoundaryForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetAdditiveNormalNoise", + (bool(AbstractImmersedBoundaryForce3::*)() const ) &AbstractImmersedBoundaryForce3::GetAdditiveNormalNoise, + " " ) + .def( + "SetAdditiveNormalNoise", + (void(AbstractImmersedBoundaryForce3::*)(bool)) &AbstractImmersedBoundaryForce3::SetAdditiveNormalNoise, + " " , py::arg("additiveNormalNoise") ) + .def( + "GetNormalNoiseMean", + (double(AbstractImmersedBoundaryForce3::*)() const ) &AbstractImmersedBoundaryForce3::GetNormalNoiseMean, + " " ) + .def( + "SetNormalNoiseMean", + (void(AbstractImmersedBoundaryForce3::*)(double)) &AbstractImmersedBoundaryForce3::SetNormalNoiseMean, + " " , py::arg("normalNoiseMean") ) + .def( + "GetNormalNoiseStdDev", + (double(AbstractImmersedBoundaryForce3::*)() const ) &AbstractImmersedBoundaryForce3::GetNormalNoiseStdDev, + " " ) + .def( + "SetNormalNoiseStdDev", + (void(AbstractImmersedBoundaryForce3::*)(double)) &AbstractImmersedBoundaryForce3::SetNormalNoiseStdDev, + " " , py::arg("normalNoiseStdDev") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.hpp new file mode 100644 index 00000000..ec43503e --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractImmersedBoundaryForce3_hpp__pyplusplus_wrapper +#define AbstractImmersedBoundaryForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractImmersedBoundaryForce3_class(py::module &m); +#endif // AbstractImmersedBoundaryForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp new file mode 100644 index 00000000..c7f058c4 --- /dev/null +++ b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "FixedCentreBasedDivisionRule.hpp" + +#include "FixedCentreBasedDivisionRule2_2.cppwg.hpp" + +namespace py = pybind11; +typedef FixedCentreBasedDivisionRule<2 > FixedCentreBasedDivisionRule2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::std::pair, boost::numeric::ublas::c_vector> _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_; + +class FixedCentreBasedDivisionRule2_2_Overloads : public FixedCentreBasedDivisionRule2_2{ + public: + using FixedCentreBasedDivisionRule2_2::FixedCentreBasedDivisionRule; + ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<2, 2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_, + FixedCentreBasedDivisionRule2_2, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + +}; +void register_FixedCentreBasedDivisionRule2_2_class(py::module &m){ +py::class_ , AbstractCentreBasedDivisionRule<2> >(m, "FixedCentreBasedDivisionRule2_2") + .def(py::init<::boost::numeric::ublas::c_vector & >(), py::arg("rDaughterLocation")) + .def( + "rGetDaughterLocation", + (::boost::numeric::ublas::c_vector const &(FixedCentreBasedDivisionRule2_2::*)() const ) &FixedCentreBasedDivisionRule2_2::rGetDaughterLocation, + " " , py::return_value_policy::reference_internal) + .def( + "CalculateCellDivisionVector", + (::std::pair, boost::numeric::ublas::c_vector>(FixedCentreBasedDivisionRule2_2::*)(::CellPtr, ::AbstractCentreBasedCellPopulation<2, 2> &)) &FixedCentreBasedDivisionRule2_2::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.hpp b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.hpp new file mode 100644 index 00000000..42ed2320 --- /dev/null +++ b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef FixedCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper +#define FixedCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_FixedCentreBasedDivisionRule2_2_class(py::module &m); +#endif // FixedCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp new file mode 100644 index 00000000..c8aa20f1 --- /dev/null +++ b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "FixedCentreBasedDivisionRule.hpp" + +#include "FixedCentreBasedDivisionRule3_3.cppwg.hpp" + +namespace py = pybind11; +typedef FixedCentreBasedDivisionRule<3 > FixedCentreBasedDivisionRule3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::std::pair, boost::numeric::ublas::c_vector> _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_; + +class FixedCentreBasedDivisionRule3_3_Overloads : public FixedCentreBasedDivisionRule3_3{ + public: + using FixedCentreBasedDivisionRule3_3::FixedCentreBasedDivisionRule; + ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<3, 3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_, + FixedCentreBasedDivisionRule3_3, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + +}; +void register_FixedCentreBasedDivisionRule3_3_class(py::module &m){ +py::class_ , AbstractCentreBasedDivisionRule<3> >(m, "FixedCentreBasedDivisionRule3_3") + .def(py::init<::boost::numeric::ublas::c_vector & >(), py::arg("rDaughterLocation")) + .def( + "rGetDaughterLocation", + (::boost::numeric::ublas::c_vector const &(FixedCentreBasedDivisionRule3_3::*)() const ) &FixedCentreBasedDivisionRule3_3::rGetDaughterLocation, + " " , py::return_value_policy::reference_internal) + .def( + "CalculateCellDivisionVector", + (::std::pair, boost::numeric::ublas::c_vector>(FixedCentreBasedDivisionRule3_3::*)(::CellPtr, ::AbstractCentreBasedCellPopulation<3, 3> &)) &FixedCentreBasedDivisionRule3_3::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.hpp b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.hpp new file mode 100644 index 00000000..1142c372 --- /dev/null +++ b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef FixedCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper +#define FixedCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_FixedCentreBasedDivisionRule3_3_class(py::module &m); +#endif // FixedCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp new file mode 100644 index 00000000..86a2c1d5 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp @@ -0,0 +1,51 @@ +#include +#include +#include "ImmersedBoundaryCellPopulation.hpp" +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryBoundaryCellWriter.hpp" + +#include "ImmersedBoundaryBoundaryCellWriter2_2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryBoundaryCellWriter<2,2 > ImmersedBoundaryBoundaryCellWriter2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryBoundaryCellWriter2_2_Overloads : public ImmersedBoundaryBoundaryCellWriter2_2{ + public: + using ImmersedBoundaryBoundaryCellWriter2_2::ImmersedBoundaryBoundaryCellWriter; + double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryBoundaryCellWriter2_2, + GetCellDataForVtkOutput, + pCell, +pCellPopulation); + } + void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryBoundaryCellWriter2_2, + VisitCell, + pCell, +pCellPopulation); + } + +}; +void register_ImmersedBoundaryBoundaryCellWriter2_2_class(py::module &m){ +py::class_ , AbstractCellWriter<2, 2> >(m, "ImmersedBoundaryBoundaryCellWriter2_2") + .def(py::init< >()) + .def( + "GetCellDataForVtkOutput", + (double(ImmersedBoundaryBoundaryCellWriter2_2::*)(::CellPtr, ::AbstractCellPopulation<2> *)) &ImmersedBoundaryBoundaryCellWriter2_2::GetCellDataForVtkOutput, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + .def( + "VisitCell", + (void(ImmersedBoundaryBoundaryCellWriter2_2::*)(::CellPtr, ::AbstractCellPopulation<2> *)) &ImmersedBoundaryBoundaryCellWriter2_2::VisitCell, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.hpp new file mode 100644 index 00000000..7d47cd85 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryBoundaryCellWriter2_2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryBoundaryCellWriter2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryBoundaryCellWriter2_2_class(py::module &m); +#endif // ImmersedBoundaryBoundaryCellWriter2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp new file mode 100644 index 00000000..94c01e57 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp @@ -0,0 +1,51 @@ +#include +#include +#include "ImmersedBoundaryCellPopulation.hpp" +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryBoundaryCellWriter.hpp" + +#include "ImmersedBoundaryBoundaryCellWriter3_3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryBoundaryCellWriter<3,3 > ImmersedBoundaryBoundaryCellWriter3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryBoundaryCellWriter3_3_Overloads : public ImmersedBoundaryBoundaryCellWriter3_3{ + public: + using ImmersedBoundaryBoundaryCellWriter3_3::ImmersedBoundaryBoundaryCellWriter; + double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryBoundaryCellWriter3_3, + GetCellDataForVtkOutput, + pCell, +pCellPopulation); + } + void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryBoundaryCellWriter3_3, + VisitCell, + pCell, +pCellPopulation); + } + +}; +void register_ImmersedBoundaryBoundaryCellWriter3_3_class(py::module &m){ +py::class_ , AbstractCellWriter<3, 3> >(m, "ImmersedBoundaryBoundaryCellWriter3_3") + .def(py::init< >()) + .def( + "GetCellDataForVtkOutput", + (double(ImmersedBoundaryBoundaryCellWriter3_3::*)(::CellPtr, ::AbstractCellPopulation<3> *)) &ImmersedBoundaryBoundaryCellWriter3_3::GetCellDataForVtkOutput, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + .def( + "VisitCell", + (void(ImmersedBoundaryBoundaryCellWriter3_3::*)(::CellPtr, ::AbstractCellPopulation<3> *)) &ImmersedBoundaryBoundaryCellWriter3_3::VisitCell, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.hpp new file mode 100644 index 00000000..6d162e87 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryBoundaryCellWriter3_3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryBoundaryCellWriter3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryBoundaryCellWriter3_3_class(py::module &m); +#endif // ImmersedBoundaryBoundaryCellWriter3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp new file mode 100644 index 00000000..d49cbda8 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp @@ -0,0 +1,443 @@ +#include +#include +#include "AbstractImmersedBoundaryDivisionRule.hpp" +#include "CellAgesWriter.hpp" +#include "CellAncestorWriter.hpp" +#include "CellAppliedForceWriter.hpp" +#include "CellCycleModelProteinConcentrationsWriter.hpp" +#include "CellDataItemWriter.hpp" +#include "CellDeltaNotchWriter.hpp" +#include "CellDivisionLocationsWriter.hpp" +#include "CellIdWriter.hpp" +#include "CellLabelWriter.hpp" +#include "CellLocationIndexWriter.hpp" +#include "CellMutationStatesCountWriter.hpp" +#include "CellMutationStatesWriter.hpp" +#include "CellPopulationAdjacencyMatrixWriter.hpp" +#include "CellPopulationAreaWriter.hpp" +#include "CellPopulationElementWriter.hpp" +#include "CellProliferativePhasesCountWriter.hpp" +#include "CellProliferativePhasesWriter.hpp" +#include "CellProliferativeTypesCountWriter.hpp" +#include "CellProliferativeTypesWriter.hpp" +#include "CellRadiusWriter.hpp" +#include "CellRemovalLocationsWriter.hpp" +#include "CellRosetteRankWriter.hpp" +#include "CellVolumesWriter.hpp" +#include "HeterotypicBoundaryLengthWriter.hpp" +#include "LegacyCellProliferativeTypesWriter.hpp" +#include "NodeLocationWriter.hpp" +#include "NodeVelocityWriter.hpp" +#include "PottsMeshWriter.hpp" +#include "RadialCellDataDistributionWriter.hpp" +#include "VertexIntersectionSwapLocationsWriter.hpp" +#include "VertexT1SwapLocationsWriter.hpp" +#include "VertexT2SwapLocationsWriter.hpp" +#include "VertexT3SwapLocationsWriter.hpp" +#include "VoronoiDataWriter.hpp" +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryCellPopulation.hpp" + +#include "ImmersedBoundaryCellPopulation2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryCellPopulation<2 > ImmersedBoundaryCellPopulation2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef unsigned int unsignedint; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_2_gt_; +typedef ::Node<2> * _Node_lt_2_gt_Ptr; +typedef ::std::set _std_set_lt_unsignedint_gt_; +typedef unsigned int unsignedint; +typedef ::CellPtr _CellPtr; +typedef unsigned int unsignedint; +typedef ::std::set _std_set_lt_unsignedint_gt_; +typedef ::TetrahedralMesh<2, 2> * _TetrahedralMesh_lt_2_2_gt_Ptr; + +class ImmersedBoundaryCellPopulation2_Overloads : public ImmersedBoundaryCellPopulation2{ + public: + using ImmersedBoundaryCellPopulation2::ImmersedBoundaryCellPopulation; + double GetDampingConstant(unsigned int nodeIndex) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation2, + GetDampingConstant, + nodeIndex); + } + unsigned int GetNumNodes() override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryCellPopulation2, + GetNumNodes, + ); + } + ::boost::numeric::ublas::c_vector GetLocationOfCellCentre(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_2_gt_, + ImmersedBoundaryCellPopulation2, + GetLocationOfCellCentre, + pCell); + } + ::Node<2> * GetNode(unsigned int index) override { + PYBIND11_OVERLOAD( + _Node_lt_2_gt_Ptr, + ImmersedBoundaryCellPopulation2, + GetNode, + index); + } + ::std::set GetNeighbouringLocationIndices(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + _std_set_lt_unsignedint_gt_, + ImmersedBoundaryCellPopulation2, + GetNeighbouringLocationIndices, + pCell); + } + unsigned int AddNode(::Node<2> * pNewNode) override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryCellPopulation2, + AddNode, + pNewNode); + } + void UpdateNodeLocations(double dt) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + UpdateNodeLocations, + dt); + } + void SetNode(unsigned int index, ::ChastePoint<2> & rNewLocation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + SetNode, + index, +rNewLocation); + } + ::CellPtr AddCell(::CellPtr pNewCell, ::CellPtr pParentCell) override { + PYBIND11_OVERLOAD( + _CellPtr, + ImmersedBoundaryCellPopulation2, + AddCell, + pNewCell, +pParentCell); + } + unsigned int RemoveDeadCells() override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryCellPopulation2, + RemoveDeadCells, + ); + } + bool IsCellAssociatedWithADeletedLocation(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryCellPopulation2, + IsCellAssociatedWithADeletedLocation, + pCell); + } + void Update(bool hasHadBirthsOrDeaths) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + Update, + hasHadBirthsOrDeaths); + } + void OpenWritersFiles(::OutputFileHandler & rOutputFileHandler) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + OpenWritersFiles, + rOutputFileHandler); + } + void AcceptPopulationWriter(::boost::shared_ptr> pPopulationWriter) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + AcceptPopulationWriter, + pPopulationWriter); + } + void AcceptPopulationEventWriter(::boost::shared_ptr> pPopulationEventWriter) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + AcceptPopulationEventWriter, + pPopulationEventWriter); + } + void AcceptPopulationCountWriter(::boost::shared_ptr> pPopulationCountWriter) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + AcceptPopulationCountWriter, + pPopulationCountWriter); + } + void AcceptCellWriter(::boost::shared_ptr> pCellWriter, ::CellPtr pCell) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + AcceptCellWriter, + pCellWriter, +pCell); + } + double GetVolumeOfCell(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation2, + GetVolumeOfCell, + pCell); + } + void OutputCellPopulationParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + OutputCellPopulationParameters, + rParamsFile); + } + double GetWidth(unsigned int const & rDimension) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation2, + GetWidth, + rDimension); + } + ::std::set GetNeighbouringNodeIndices(unsigned int index) override { + PYBIND11_OVERLOAD( + _std_set_lt_unsignedint_gt_, + ImmersedBoundaryCellPopulation2, + GetNeighbouringNodeIndices, + index); + } + ::TetrahedralMesh<2, 2> * GetTetrahedralMeshForPdeModifier() override { + PYBIND11_OVERLOAD( + _TetrahedralMesh_lt_2_2_gt_Ptr, + ImmersedBoundaryCellPopulation2, + GetTetrahedralMeshForPdeModifier, + ); + } + bool IsPdeNodeAssociatedWithNonApoptoticCell(unsigned int pdeNodeIndex) override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryCellPopulation2, + IsPdeNodeAssociatedWithNonApoptoticCell, + pdeNodeIndex); + } + double GetCellDataItemAtPdeNode(unsigned int pdeNodeIndex, ::std::string & rVariableName, bool dirichletBoundaryConditionApplies, double dirichletBoundaryValue) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation2, + GetCellDataItemAtPdeNode, + pdeNodeIndex, +rVariableName, +dirichletBoundaryConditionApplies, +dirichletBoundaryValue); + } + void CheckForStepSizeException(unsigned int nodeIndex, ::boost::numeric::ublas::c_vector & rDisplacement, double dt) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation2, + CheckForStepSizeException, + nodeIndex, +rDisplacement, +dt); + } + double GetDefaultTimeStep() override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation2, + GetDefaultTimeStep, + ); + } + +}; +void register_ImmersedBoundaryCellPopulation2_class(py::module &m){ +py::class_ , AbstractOffLatticeCellPopulation<2> >(m, "ImmersedBoundaryCellPopulation2") + .def(py::init<::ImmersedBoundaryMesh<2, 2> &, ::std::vector> &, bool, bool, ::std::vector const >(), py::arg("rMesh"), py::arg("rCells"), py::arg("deleteMesh") = false, py::arg("validate") = true, py::arg("locationIndices") = std::vector()) + .def(py::init<::ImmersedBoundaryMesh<2, 2> & >(), py::arg("rMesh")) + .def( + "GetDampingConstant", + (double(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::GetDampingConstant, + " " , py::arg("nodeIndex") ) + .def( + "GetElement", + (::ImmersedBoundaryElement<2, 2> *(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::GetElement, + " " , py::arg("elementIndex") , py::return_value_policy::reference) + .def( + "GetLamina", + (::ImmersedBoundaryElement<1, 2> *(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::GetLamina, + " " , py::arg("laminaIndex") , py::return_value_policy::reference) + .def( + "GetNumElements", + (unsigned int(ImmersedBoundaryCellPopulation2::*)()) &ImmersedBoundaryCellPopulation2::GetNumElements, + " " ) + .def( + "GetNumLaminas", + (unsigned int(ImmersedBoundaryCellPopulation2::*)()) &ImmersedBoundaryCellPopulation2::GetNumLaminas, + " " ) + .def( + "GetNumNodes", + (unsigned int(ImmersedBoundaryCellPopulation2::*)()) &ImmersedBoundaryCellPopulation2::GetNumNodes, + " " ) + .def( + "SetInteractionDistance", + (void(ImmersedBoundaryCellPopulation2::*)(double)) &ImmersedBoundaryCellPopulation2::SetInteractionDistance, + " " , py::arg("newDistance") ) + .def( + "GetInteractionDistance", + (double(ImmersedBoundaryCellPopulation2::*)() const ) &ImmersedBoundaryCellPopulation2::GetInteractionDistance, + " " ) + .def( + "SetReMeshFrequency", + (void(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::SetReMeshFrequency, + " " , py::arg("newFrequency") ) + .def( + "GetReMeshFrequency", + (unsigned int(ImmersedBoundaryCellPopulation2::*)() const ) &ImmersedBoundaryCellPopulation2::GetReMeshFrequency, + " " ) + .def( + "SetThrowsStepSizeException", + (void(ImmersedBoundaryCellPopulation2::*)(bool)) &ImmersedBoundaryCellPopulation2::SetThrowsStepSizeException, + " " , py::arg("throws") ) + .def( + "ThrowsStepSizeException", + (bool(ImmersedBoundaryCellPopulation2::*)() const ) &ImmersedBoundaryCellPopulation2::ThrowsStepSizeException, + " " ) + .def( + "GetIntrinsicSpacing", + (double(ImmersedBoundaryCellPopulation2::*)() const ) &ImmersedBoundaryCellPopulation2::GetIntrinsicSpacing, + " " ) + .def( + "SetCellRearrangementThreshold", + (void(ImmersedBoundaryCellPopulation2::*)(double)) &ImmersedBoundaryCellPopulation2::SetCellRearrangementThreshold, + " " , py::arg("newThreshold") ) + .def( + "GetCellRearrangementThreshold", + (double(ImmersedBoundaryCellPopulation2::*)() const ) &ImmersedBoundaryCellPopulation2::GetCellRearrangementThreshold, + " " ) + .def( + "GetLocationOfCellCentre", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryCellPopulation2::*)(::CellPtr)) &ImmersedBoundaryCellPopulation2::GetLocationOfCellCentre, + " " , py::arg("pCell") ) + .def( + "GetNode", + (::Node<2> *(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::GetNode, + " " , py::arg("index") , py::return_value_policy::reference) + .def( + "GetNeighbouringLocationIndices", + (::std::set(ImmersedBoundaryCellPopulation2::*)(::CellPtr)) &ImmersedBoundaryCellPopulation2::GetNeighbouringLocationIndices, + " " , py::arg("pCell") ) + .def( + "AddNode", + (unsigned int(ImmersedBoundaryCellPopulation2::*)(::Node<2> *)) &ImmersedBoundaryCellPopulation2::AddNode, + " " , py::arg("pNewNode") ) + .def( + "UpdateNodeLocations", + (void(ImmersedBoundaryCellPopulation2::*)(double)) &ImmersedBoundaryCellPopulation2::UpdateNodeLocations, + " " , py::arg("dt") ) + .def( + "SetNode", + (void(ImmersedBoundaryCellPopulation2::*)(unsigned int, ::ChastePoint<2> &)) &ImmersedBoundaryCellPopulation2::SetNode, + " " , py::arg("index"), py::arg("rNewLocation") ) + .def( + "GetElementCorrespondingToCell", + (::ImmersedBoundaryElement<2, 2> *(ImmersedBoundaryCellPopulation2::*)(::CellPtr)) &ImmersedBoundaryCellPopulation2::GetElementCorrespondingToCell, + " " , py::arg("pCell") , py::return_value_policy::reference) + .def( + "AddCell", + (::CellPtr(ImmersedBoundaryCellPopulation2::*)(::CellPtr, ::CellPtr)) &ImmersedBoundaryCellPopulation2::AddCell, + " " , py::arg("pNewCell"), py::arg("pParentCell") = ::CellPtr( ) ) + .def( + "RemoveDeadCells", + (unsigned int(ImmersedBoundaryCellPopulation2::*)()) &ImmersedBoundaryCellPopulation2::RemoveDeadCells, + " " ) + .def( + "IsCellAssociatedWithADeletedLocation", + (bool(ImmersedBoundaryCellPopulation2::*)(::CellPtr)) &ImmersedBoundaryCellPopulation2::IsCellAssociatedWithADeletedLocation, + " " , py::arg("pCell") ) + .def( + "Update", + (void(ImmersedBoundaryCellPopulation2::*)(bool)) &ImmersedBoundaryCellPopulation2::Update, + " " , py::arg("hasHadBirthsOrDeaths") = true ) + .def( + "OpenWritersFiles", + (void(ImmersedBoundaryCellPopulation2::*)(::OutputFileHandler &)) &ImmersedBoundaryCellPopulation2::OpenWritersFiles, + " " , py::arg("rOutputFileHandler") ) + .def( + "AcceptPopulationWriter", + (void(ImmersedBoundaryCellPopulation2::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation2::AcceptPopulationWriter, + " " , py::arg("pPopulationWriter") ) + .def( + "AcceptPopulationEventWriter", + (void(ImmersedBoundaryCellPopulation2::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation2::AcceptPopulationEventWriter, + " " , py::arg("pPopulationEventWriter") ) + .def( + "AcceptPopulationCountWriter", + (void(ImmersedBoundaryCellPopulation2::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation2::AcceptPopulationCountWriter, + " " , py::arg("pPopulationCountWriter") ) + .def( + "AcceptCellWriter", + (void(ImmersedBoundaryCellPopulation2::*)(::boost::shared_ptr>, ::CellPtr)) &ImmersedBoundaryCellPopulation2::AcceptCellWriter, + " " , py::arg("pCellWriter"), py::arg("pCell") ) + .def( + "GetVolumeOfCell", + (double(ImmersedBoundaryCellPopulation2::*)(::CellPtr)) &ImmersedBoundaryCellPopulation2::GetVolumeOfCell, + " " , py::arg("pCell") ) + .def( + "OutputCellPopulationParameters", + (void(ImmersedBoundaryCellPopulation2::*)(::out_stream &)) &ImmersedBoundaryCellPopulation2::OutputCellPopulationParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetWidth", + (double(ImmersedBoundaryCellPopulation2::*)(unsigned int const &)) &ImmersedBoundaryCellPopulation2::GetWidth, + " " , py::arg("rDimension") ) + .def( + "GetNeighbouringNodeIndices", + (::std::set(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::GetNeighbouringNodeIndices, + " " , py::arg("index") ) + .def( + "IsPdeNodeAssociatedWithNonApoptoticCell", + (bool(ImmersedBoundaryCellPopulation2::*)(unsigned int)) &ImmersedBoundaryCellPopulation2::IsPdeNodeAssociatedWithNonApoptoticCell, + " " , py::arg("pdeNodeIndex") ) + .def( + "GetCellDataItemAtPdeNode", + (double(ImmersedBoundaryCellPopulation2::*)(unsigned int, ::std::string &, bool, double)) &ImmersedBoundaryCellPopulation2::GetCellDataItemAtPdeNode, + " " , py::arg("pdeNodeIndex"), py::arg("rVariableName"), py::arg("dirichletBoundaryConditionApplies") = false, py::arg("dirichletBoundaryValue") = 0. ) + .def( + "GetImmersedBoundaryDivisionRule", + (::boost::shared_ptr >(ImmersedBoundaryCellPopulation2::*)()) &ImmersedBoundaryCellPopulation2::GetImmersedBoundaryDivisionRule, + " " ) + .def( + "SetImmersedBoundaryDivisionRule", + (void(ImmersedBoundaryCellPopulation2::*)(::boost::shared_ptr >)) &ImmersedBoundaryCellPopulation2::SetImmersedBoundaryDivisionRule, + " " , py::arg("pImmersedBoundaryDivisionRule") ) + .def( + "DoesPopulationHaveActiveSources", + (bool(ImmersedBoundaryCellPopulation2::*)() const ) &ImmersedBoundaryCellPopulation2::DoesPopulationHaveActiveSources, + " " ) + .def( + "IsCellOnBoundary", + (bool(ImmersedBoundaryCellPopulation2::*)(::CellPtr)) &ImmersedBoundaryCellPopulation2::IsCellOnBoundary, + " " , py::arg("pCell") ) + .def( + "SetIfPopulationHasActiveSources", + (void(ImmersedBoundaryCellPopulation2::*)(bool)) &ImmersedBoundaryCellPopulation2::SetIfPopulationHasActiveSources, + " " , py::arg("hasActiveSources") ) + .def( + "SetOutputNodeRegionToVtk", + (void(ImmersedBoundaryCellPopulation2::*)(bool)) &ImmersedBoundaryCellPopulation2::SetOutputNodeRegionToVtk, + " " , py::arg("outputNodeRegionsToVtk") ) + .def( + "CheckForStepSizeException", + (void(ImmersedBoundaryCellPopulation2::*)(unsigned int, ::boost::numeric::ublas::c_vector &, double)) &ImmersedBoundaryCellPopulation2::CheckForStepSizeException, + " " , py::arg("nodeIndex"), py::arg("rDisplacement"), py::arg("dt") ) + .def( + "GetDefaultTimeStep", + (double(ImmersedBoundaryCellPopulation2::*)()) &ImmersedBoundaryCellPopulation2::GetDefaultTimeStep, + " " ) + .def("AddPopulationWriterVoronoiDataWriter", &ImmersedBoundaryCellPopulation2::AddPopulationWriter) + .def("AddCellWriterCellLabelWriter", &ImmersedBoundaryCellPopulation2::AddCellWriter) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.hpp new file mode 100644 index 00000000..7b850ef5 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryCellPopulation2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryCellPopulation2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryCellPopulation2_class(py::module &m); +#endif // ImmersedBoundaryCellPopulation2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp new file mode 100644 index 00000000..4c126ee0 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp @@ -0,0 +1,443 @@ +#include +#include +#include "AbstractImmersedBoundaryDivisionRule.hpp" +#include "CellAgesWriter.hpp" +#include "CellAncestorWriter.hpp" +#include "CellAppliedForceWriter.hpp" +#include "CellCycleModelProteinConcentrationsWriter.hpp" +#include "CellDataItemWriter.hpp" +#include "CellDeltaNotchWriter.hpp" +#include "CellDivisionLocationsWriter.hpp" +#include "CellIdWriter.hpp" +#include "CellLabelWriter.hpp" +#include "CellLocationIndexWriter.hpp" +#include "CellMutationStatesCountWriter.hpp" +#include "CellMutationStatesWriter.hpp" +#include "CellPopulationAdjacencyMatrixWriter.hpp" +#include "CellPopulationAreaWriter.hpp" +#include "CellPopulationElementWriter.hpp" +#include "CellProliferativePhasesCountWriter.hpp" +#include "CellProliferativePhasesWriter.hpp" +#include "CellProliferativeTypesCountWriter.hpp" +#include "CellProliferativeTypesWriter.hpp" +#include "CellRadiusWriter.hpp" +#include "CellRemovalLocationsWriter.hpp" +#include "CellRosetteRankWriter.hpp" +#include "CellVolumesWriter.hpp" +#include "HeterotypicBoundaryLengthWriter.hpp" +#include "LegacyCellProliferativeTypesWriter.hpp" +#include "NodeLocationWriter.hpp" +#include "NodeVelocityWriter.hpp" +#include "PottsMeshWriter.hpp" +#include "RadialCellDataDistributionWriter.hpp" +#include "VertexIntersectionSwapLocationsWriter.hpp" +#include "VertexT1SwapLocationsWriter.hpp" +#include "VertexT2SwapLocationsWriter.hpp" +#include "VertexT3SwapLocationsWriter.hpp" +#include "VoronoiDataWriter.hpp" +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryCellPopulation.hpp" + +#include "ImmersedBoundaryCellPopulation3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryCellPopulation<3 > ImmersedBoundaryCellPopulation3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef unsigned int unsignedint; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; +typedef ::Node<3> * _Node_lt_3_gt_Ptr; +typedef ::std::set _std_set_lt_unsignedint_gt_; +typedef unsigned int unsignedint; +typedef ::CellPtr _CellPtr; +typedef unsigned int unsignedint; +typedef ::std::set _std_set_lt_unsignedint_gt_; +typedef ::TetrahedralMesh<3, 3> * _TetrahedralMesh_lt_3_3_gt_Ptr; + +class ImmersedBoundaryCellPopulation3_Overloads : public ImmersedBoundaryCellPopulation3{ + public: + using ImmersedBoundaryCellPopulation3::ImmersedBoundaryCellPopulation; + double GetDampingConstant(unsigned int nodeIndex) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation3, + GetDampingConstant, + nodeIndex); + } + unsigned int GetNumNodes() override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryCellPopulation3, + GetNumNodes, + ); + } + ::boost::numeric::ublas::c_vector GetLocationOfCellCentre(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + ImmersedBoundaryCellPopulation3, + GetLocationOfCellCentre, + pCell); + } + ::Node<3> * GetNode(unsigned int index) override { + PYBIND11_OVERLOAD( + _Node_lt_3_gt_Ptr, + ImmersedBoundaryCellPopulation3, + GetNode, + index); + } + ::std::set GetNeighbouringLocationIndices(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + _std_set_lt_unsignedint_gt_, + ImmersedBoundaryCellPopulation3, + GetNeighbouringLocationIndices, + pCell); + } + unsigned int AddNode(::Node<3> * pNewNode) override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryCellPopulation3, + AddNode, + pNewNode); + } + void UpdateNodeLocations(double dt) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + UpdateNodeLocations, + dt); + } + void SetNode(unsigned int index, ::ChastePoint<3> & rNewLocation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + SetNode, + index, +rNewLocation); + } + ::CellPtr AddCell(::CellPtr pNewCell, ::CellPtr pParentCell) override { + PYBIND11_OVERLOAD( + _CellPtr, + ImmersedBoundaryCellPopulation3, + AddCell, + pNewCell, +pParentCell); + } + unsigned int RemoveDeadCells() override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryCellPopulation3, + RemoveDeadCells, + ); + } + bool IsCellAssociatedWithADeletedLocation(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryCellPopulation3, + IsCellAssociatedWithADeletedLocation, + pCell); + } + void Update(bool hasHadBirthsOrDeaths) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + Update, + hasHadBirthsOrDeaths); + } + void OpenWritersFiles(::OutputFileHandler & rOutputFileHandler) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + OpenWritersFiles, + rOutputFileHandler); + } + void AcceptPopulationWriter(::boost::shared_ptr> pPopulationWriter) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + AcceptPopulationWriter, + pPopulationWriter); + } + void AcceptPopulationEventWriter(::boost::shared_ptr> pPopulationEventWriter) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + AcceptPopulationEventWriter, + pPopulationEventWriter); + } + void AcceptPopulationCountWriter(::boost::shared_ptr> pPopulationCountWriter) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + AcceptPopulationCountWriter, + pPopulationCountWriter); + } + void AcceptCellWriter(::boost::shared_ptr> pCellWriter, ::CellPtr pCell) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + AcceptCellWriter, + pCellWriter, +pCell); + } + double GetVolumeOfCell(::CellPtr pCell) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation3, + GetVolumeOfCell, + pCell); + } + void OutputCellPopulationParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + OutputCellPopulationParameters, + rParamsFile); + } + double GetWidth(unsigned int const & rDimension) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation3, + GetWidth, + rDimension); + } + ::std::set GetNeighbouringNodeIndices(unsigned int index) override { + PYBIND11_OVERLOAD( + _std_set_lt_unsignedint_gt_, + ImmersedBoundaryCellPopulation3, + GetNeighbouringNodeIndices, + index); + } + ::TetrahedralMesh<3, 3> * GetTetrahedralMeshForPdeModifier() override { + PYBIND11_OVERLOAD( + _TetrahedralMesh_lt_3_3_gt_Ptr, + ImmersedBoundaryCellPopulation3, + GetTetrahedralMeshForPdeModifier, + ); + } + bool IsPdeNodeAssociatedWithNonApoptoticCell(unsigned int pdeNodeIndex) override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryCellPopulation3, + IsPdeNodeAssociatedWithNonApoptoticCell, + pdeNodeIndex); + } + double GetCellDataItemAtPdeNode(unsigned int pdeNodeIndex, ::std::string & rVariableName, bool dirichletBoundaryConditionApplies, double dirichletBoundaryValue) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation3, + GetCellDataItemAtPdeNode, + pdeNodeIndex, +rVariableName, +dirichletBoundaryConditionApplies, +dirichletBoundaryValue); + } + void CheckForStepSizeException(unsigned int nodeIndex, ::boost::numeric::ublas::c_vector & rDisplacement, double dt) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryCellPopulation3, + CheckForStepSizeException, + nodeIndex, +rDisplacement, +dt); + } + double GetDefaultTimeStep() override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryCellPopulation3, + GetDefaultTimeStep, + ); + } + +}; +void register_ImmersedBoundaryCellPopulation3_class(py::module &m){ +py::class_ , AbstractOffLatticeCellPopulation<3> >(m, "ImmersedBoundaryCellPopulation3") + .def(py::init<::ImmersedBoundaryMesh<3, 3> &, ::std::vector> &, bool, bool, ::std::vector const >(), py::arg("rMesh"), py::arg("rCells"), py::arg("deleteMesh") = false, py::arg("validate") = true, py::arg("locationIndices") = std::vector()) + .def(py::init<::ImmersedBoundaryMesh<3, 3> & >(), py::arg("rMesh")) + .def( + "GetDampingConstant", + (double(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::GetDampingConstant, + " " , py::arg("nodeIndex") ) + .def( + "GetElement", + (::ImmersedBoundaryElement<3, 3> *(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::GetElement, + " " , py::arg("elementIndex") , py::return_value_policy::reference) + .def( + "GetLamina", + (::ImmersedBoundaryElement<2, 3> *(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::GetLamina, + " " , py::arg("laminaIndex") , py::return_value_policy::reference) + .def( + "GetNumElements", + (unsigned int(ImmersedBoundaryCellPopulation3::*)()) &ImmersedBoundaryCellPopulation3::GetNumElements, + " " ) + .def( + "GetNumLaminas", + (unsigned int(ImmersedBoundaryCellPopulation3::*)()) &ImmersedBoundaryCellPopulation3::GetNumLaminas, + " " ) + .def( + "GetNumNodes", + (unsigned int(ImmersedBoundaryCellPopulation3::*)()) &ImmersedBoundaryCellPopulation3::GetNumNodes, + " " ) + .def( + "SetInteractionDistance", + (void(ImmersedBoundaryCellPopulation3::*)(double)) &ImmersedBoundaryCellPopulation3::SetInteractionDistance, + " " , py::arg("newDistance") ) + .def( + "GetInteractionDistance", + (double(ImmersedBoundaryCellPopulation3::*)() const ) &ImmersedBoundaryCellPopulation3::GetInteractionDistance, + " " ) + .def( + "SetReMeshFrequency", + (void(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::SetReMeshFrequency, + " " , py::arg("newFrequency") ) + .def( + "GetReMeshFrequency", + (unsigned int(ImmersedBoundaryCellPopulation3::*)() const ) &ImmersedBoundaryCellPopulation3::GetReMeshFrequency, + " " ) + .def( + "SetThrowsStepSizeException", + (void(ImmersedBoundaryCellPopulation3::*)(bool)) &ImmersedBoundaryCellPopulation3::SetThrowsStepSizeException, + " " , py::arg("throws") ) + .def( + "ThrowsStepSizeException", + (bool(ImmersedBoundaryCellPopulation3::*)() const ) &ImmersedBoundaryCellPopulation3::ThrowsStepSizeException, + " " ) + .def( + "GetIntrinsicSpacing", + (double(ImmersedBoundaryCellPopulation3::*)() const ) &ImmersedBoundaryCellPopulation3::GetIntrinsicSpacing, + " " ) + .def( + "SetCellRearrangementThreshold", + (void(ImmersedBoundaryCellPopulation3::*)(double)) &ImmersedBoundaryCellPopulation3::SetCellRearrangementThreshold, + " " , py::arg("newThreshold") ) + .def( + "GetCellRearrangementThreshold", + (double(ImmersedBoundaryCellPopulation3::*)() const ) &ImmersedBoundaryCellPopulation3::GetCellRearrangementThreshold, + " " ) + .def( + "GetLocationOfCellCentre", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryCellPopulation3::*)(::CellPtr)) &ImmersedBoundaryCellPopulation3::GetLocationOfCellCentre, + " " , py::arg("pCell") ) + .def( + "GetNode", + (::Node<3> *(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::GetNode, + " " , py::arg("index") , py::return_value_policy::reference) + .def( + "GetNeighbouringLocationIndices", + (::std::set(ImmersedBoundaryCellPopulation3::*)(::CellPtr)) &ImmersedBoundaryCellPopulation3::GetNeighbouringLocationIndices, + " " , py::arg("pCell") ) + .def( + "AddNode", + (unsigned int(ImmersedBoundaryCellPopulation3::*)(::Node<3> *)) &ImmersedBoundaryCellPopulation3::AddNode, + " " , py::arg("pNewNode") ) + .def( + "UpdateNodeLocations", + (void(ImmersedBoundaryCellPopulation3::*)(double)) &ImmersedBoundaryCellPopulation3::UpdateNodeLocations, + " " , py::arg("dt") ) + .def( + "SetNode", + (void(ImmersedBoundaryCellPopulation3::*)(unsigned int, ::ChastePoint<3> &)) &ImmersedBoundaryCellPopulation3::SetNode, + " " , py::arg("index"), py::arg("rNewLocation") ) + .def( + "GetElementCorrespondingToCell", + (::ImmersedBoundaryElement<3, 3> *(ImmersedBoundaryCellPopulation3::*)(::CellPtr)) &ImmersedBoundaryCellPopulation3::GetElementCorrespondingToCell, + " " , py::arg("pCell") , py::return_value_policy::reference) + .def( + "AddCell", + (::CellPtr(ImmersedBoundaryCellPopulation3::*)(::CellPtr, ::CellPtr)) &ImmersedBoundaryCellPopulation3::AddCell, + " " , py::arg("pNewCell"), py::arg("pParentCell") = ::CellPtr( ) ) + .def( + "RemoveDeadCells", + (unsigned int(ImmersedBoundaryCellPopulation3::*)()) &ImmersedBoundaryCellPopulation3::RemoveDeadCells, + " " ) + .def( + "IsCellAssociatedWithADeletedLocation", + (bool(ImmersedBoundaryCellPopulation3::*)(::CellPtr)) &ImmersedBoundaryCellPopulation3::IsCellAssociatedWithADeletedLocation, + " " , py::arg("pCell") ) + .def( + "Update", + (void(ImmersedBoundaryCellPopulation3::*)(bool)) &ImmersedBoundaryCellPopulation3::Update, + " " , py::arg("hasHadBirthsOrDeaths") = true ) + .def( + "OpenWritersFiles", + (void(ImmersedBoundaryCellPopulation3::*)(::OutputFileHandler &)) &ImmersedBoundaryCellPopulation3::OpenWritersFiles, + " " , py::arg("rOutputFileHandler") ) + .def( + "AcceptPopulationWriter", + (void(ImmersedBoundaryCellPopulation3::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation3::AcceptPopulationWriter, + " " , py::arg("pPopulationWriter") ) + .def( + "AcceptPopulationEventWriter", + (void(ImmersedBoundaryCellPopulation3::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation3::AcceptPopulationEventWriter, + " " , py::arg("pPopulationEventWriter") ) + .def( + "AcceptPopulationCountWriter", + (void(ImmersedBoundaryCellPopulation3::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation3::AcceptPopulationCountWriter, + " " , py::arg("pPopulationCountWriter") ) + .def( + "AcceptCellWriter", + (void(ImmersedBoundaryCellPopulation3::*)(::boost::shared_ptr>, ::CellPtr)) &ImmersedBoundaryCellPopulation3::AcceptCellWriter, + " " , py::arg("pCellWriter"), py::arg("pCell") ) + .def( + "GetVolumeOfCell", + (double(ImmersedBoundaryCellPopulation3::*)(::CellPtr)) &ImmersedBoundaryCellPopulation3::GetVolumeOfCell, + " " , py::arg("pCell") ) + .def( + "OutputCellPopulationParameters", + (void(ImmersedBoundaryCellPopulation3::*)(::out_stream &)) &ImmersedBoundaryCellPopulation3::OutputCellPopulationParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetWidth", + (double(ImmersedBoundaryCellPopulation3::*)(unsigned int const &)) &ImmersedBoundaryCellPopulation3::GetWidth, + " " , py::arg("rDimension") ) + .def( + "GetNeighbouringNodeIndices", + (::std::set(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::GetNeighbouringNodeIndices, + " " , py::arg("index") ) + .def( + "IsPdeNodeAssociatedWithNonApoptoticCell", + (bool(ImmersedBoundaryCellPopulation3::*)(unsigned int)) &ImmersedBoundaryCellPopulation3::IsPdeNodeAssociatedWithNonApoptoticCell, + " " , py::arg("pdeNodeIndex") ) + .def( + "GetCellDataItemAtPdeNode", + (double(ImmersedBoundaryCellPopulation3::*)(unsigned int, ::std::string &, bool, double)) &ImmersedBoundaryCellPopulation3::GetCellDataItemAtPdeNode, + " " , py::arg("pdeNodeIndex"), py::arg("rVariableName"), py::arg("dirichletBoundaryConditionApplies") = false, py::arg("dirichletBoundaryValue") = 0. ) + .def( + "GetImmersedBoundaryDivisionRule", + (::boost::shared_ptr>(ImmersedBoundaryCellPopulation3::*)()) &ImmersedBoundaryCellPopulation3::GetImmersedBoundaryDivisionRule, + " " ) + .def( + "SetImmersedBoundaryDivisionRule", + (void(ImmersedBoundaryCellPopulation3::*)(::boost::shared_ptr>)) &ImmersedBoundaryCellPopulation3::SetImmersedBoundaryDivisionRule, + " " , py::arg("pImmersedBoundaryDivisionRule") ) + .def( + "DoesPopulationHaveActiveSources", + (bool(ImmersedBoundaryCellPopulation3::*)() const ) &ImmersedBoundaryCellPopulation3::DoesPopulationHaveActiveSources, + " " ) + .def( + "IsCellOnBoundary", + (bool(ImmersedBoundaryCellPopulation3::*)(::CellPtr)) &ImmersedBoundaryCellPopulation3::IsCellOnBoundary, + " " , py::arg("pCell") ) + .def( + "SetIfPopulationHasActiveSources", + (void(ImmersedBoundaryCellPopulation3::*)(bool)) &ImmersedBoundaryCellPopulation3::SetIfPopulationHasActiveSources, + " " , py::arg("hasActiveSources") ) + .def( + "SetOutputNodeRegionToVtk", + (void(ImmersedBoundaryCellPopulation3::*)(bool)) &ImmersedBoundaryCellPopulation3::SetOutputNodeRegionToVtk, + " " , py::arg("outputNodeRegionsToVtk") ) + .def( + "CheckForStepSizeException", + (void(ImmersedBoundaryCellPopulation3::*)(unsigned int, ::boost::numeric::ublas::c_vector &, double)) &ImmersedBoundaryCellPopulation3::CheckForStepSizeException, + " " , py::arg("nodeIndex"), py::arg("rDisplacement"), py::arg("dt") ) + .def( + "GetDefaultTimeStep", + (double(ImmersedBoundaryCellPopulation3::*)()) &ImmersedBoundaryCellPopulation3::GetDefaultTimeStep, + " " ) + .def("AddPopulationWriterVoronoiDataWriter", &ImmersedBoundaryCellPopulation3::AddPopulationWriter) + .def("AddCellWriterCellLabelWriter", &ImmersedBoundaryCellPopulation3::AddCellWriter) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.hpp new file mode 100644 index 00000000..b6d94022 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryCellPopulation3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryCellPopulation3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryCellPopulation3_class(py::module &m); +#endif // ImmersedBoundaryCellPopulation3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp new file mode 100644 index 00000000..e9ad5d7e --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryKinematicFeedbackForce.hpp" + +#include "ImmersedBoundaryKinematicFeedbackForce2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryKinematicFeedbackForce<2 > ImmersedBoundaryKinematicFeedbackForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryKinematicFeedbackForce2_Overloads : public ImmersedBoundaryKinematicFeedbackForce2{ + public: + using ImmersedBoundaryKinematicFeedbackForce2::ImmersedBoundaryKinematicFeedbackForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryKinematicFeedbackForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryKinematicFeedbackForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryKinematicFeedbackForce2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<2> >(m, "ImmersedBoundaryKinematicFeedbackForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryKinematicFeedbackForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &ImmersedBoundaryKinematicFeedbackForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryKinematicFeedbackForce2::*)(::out_stream &)) &ImmersedBoundaryKinematicFeedbackForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetSpringConst", + (double(ImmersedBoundaryKinematicFeedbackForce2::*)() const ) &ImmersedBoundaryKinematicFeedbackForce2::GetSpringConst, + " " ) + .def( + "SetSpringConst", + (void(ImmersedBoundaryKinematicFeedbackForce2::*)(double)) &ImmersedBoundaryKinematicFeedbackForce2::SetSpringConst, + " " , py::arg("springConst") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.hpp new file mode 100644 index 00000000..aed2c12b --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryKinematicFeedbackForce2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryKinematicFeedbackForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryKinematicFeedbackForce2_class(py::module &m); +#endif // ImmersedBoundaryKinematicFeedbackForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp new file mode 100644 index 00000000..53e2da16 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryKinematicFeedbackForce.hpp" + +#include "ImmersedBoundaryKinematicFeedbackForce3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryKinematicFeedbackForce<3 > ImmersedBoundaryKinematicFeedbackForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryKinematicFeedbackForce3_Overloads : public ImmersedBoundaryKinematicFeedbackForce3{ + public: + using ImmersedBoundaryKinematicFeedbackForce3::ImmersedBoundaryKinematicFeedbackForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryKinematicFeedbackForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryKinematicFeedbackForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryKinematicFeedbackForce3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<3> >(m, "ImmersedBoundaryKinematicFeedbackForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryKinematicFeedbackForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &ImmersedBoundaryKinematicFeedbackForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryKinematicFeedbackForce3::*)(::out_stream &)) &ImmersedBoundaryKinematicFeedbackForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetSpringConst", + (double(ImmersedBoundaryKinematicFeedbackForce3::*)() const ) &ImmersedBoundaryKinematicFeedbackForce3::GetSpringConst, + " " ) + .def( + "SetSpringConst", + (void(ImmersedBoundaryKinematicFeedbackForce3::*)(double)) &ImmersedBoundaryKinematicFeedbackForce3::SetSpringConst, + " " , py::arg("springConst") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.hpp new file mode 100644 index 00000000..b67c7797 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryKinematicFeedbackForce3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryKinematicFeedbackForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryKinematicFeedbackForce3_class(py::module &m); +#endif // ImmersedBoundaryKinematicFeedbackForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp new file mode 100644 index 00000000..f2f8d144 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryLinearDifferentialAdhesionForce.hpp" + +#include "ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryLinearDifferentialAdhesionForce<2 > ImmersedBoundaryLinearDifferentialAdhesionForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryLinearDifferentialAdhesionForce2_Overloads : public ImmersedBoundaryLinearDifferentialAdhesionForce2{ + public: + using ImmersedBoundaryLinearDifferentialAdhesionForce2::ImmersedBoundaryLinearDifferentialAdhesionForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearDifferentialAdhesionForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearDifferentialAdhesionForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryLinearDifferentialAdhesionForce2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<2> >(m, "ImmersedBoundaryLinearDifferentialAdhesionForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &ImmersedBoundaryLinearDifferentialAdhesionForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)(::out_stream &)) &ImmersedBoundaryLinearDifferentialAdhesionForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetLabelledCellToLabelledCellSpringConst", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce2::GetLabelledCellToLabelledCellSpringConst, + " " ) + .def( + "SetLabelledCellToLabelledCellSpringConst", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce2::SetLabelledCellToLabelledCellSpringConst, + " " , py::arg("labelledCellToLabelledCellSpringConst") ) + .def( + "GetLabelledCellToCellSpringConst", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce2::GetLabelledCellToCellSpringConst, + " " ) + .def( + "SetLabelledCellToCellSpringConst", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce2::SetLabelledCellToCellSpringConst, + " " , py::arg("labelledCellToCellSpringConst") ) + .def( + "GetCellToCellSpringConst", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce2::GetCellToCellSpringConst, + " " ) + .def( + "SetCellToCellSpringConst", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce2::SetCellToCellSpringConst, + " " , py::arg("cellToCellSpringConst") ) + .def( + "GetRestLength", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce2::GetRestLength, + " " ) + .def( + "SetRestLength", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce2::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce2::SetRestLength, + " " , py::arg("restLength") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.hpp new file mode 100644 index 00000000..77ac16e4 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryLinearDifferentialAdhesionForce2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryLinearDifferentialAdhesionForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryLinearDifferentialAdhesionForce2_class(py::module &m); +#endif // ImmersedBoundaryLinearDifferentialAdhesionForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp new file mode 100644 index 00000000..c78ea789 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryLinearDifferentialAdhesionForce.hpp" + +#include "ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryLinearDifferentialAdhesionForce<3 > ImmersedBoundaryLinearDifferentialAdhesionForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryLinearDifferentialAdhesionForce3_Overloads : public ImmersedBoundaryLinearDifferentialAdhesionForce3{ + public: + using ImmersedBoundaryLinearDifferentialAdhesionForce3::ImmersedBoundaryLinearDifferentialAdhesionForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearDifferentialAdhesionForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearDifferentialAdhesionForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryLinearDifferentialAdhesionForce3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<3> >(m, "ImmersedBoundaryLinearDifferentialAdhesionForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &ImmersedBoundaryLinearDifferentialAdhesionForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)(::out_stream &)) &ImmersedBoundaryLinearDifferentialAdhesionForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetLabelledCellToLabelledCellSpringConst", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce3::GetLabelledCellToLabelledCellSpringConst, + " " ) + .def( + "SetLabelledCellToLabelledCellSpringConst", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce3::SetLabelledCellToLabelledCellSpringConst, + " " , py::arg("labelledCellToLabelledCellSpringConst") ) + .def( + "GetLabelledCellToCellSpringConst", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce3::GetLabelledCellToCellSpringConst, + " " ) + .def( + "SetLabelledCellToCellSpringConst", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce3::SetLabelledCellToCellSpringConst, + " " , py::arg("labelledCellToCellSpringConst") ) + .def( + "GetCellToCellSpringConst", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce3::GetCellToCellSpringConst, + " " ) + .def( + "SetCellToCellSpringConst", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce3::SetCellToCellSpringConst, + " " , py::arg("cellToCellSpringConst") ) + .def( + "GetRestLength", + (double(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)() const ) &ImmersedBoundaryLinearDifferentialAdhesionForce3::GetRestLength, + " " ) + .def( + "SetRestLength", + (void(ImmersedBoundaryLinearDifferentialAdhesionForce3::*)(double)) &ImmersedBoundaryLinearDifferentialAdhesionForce3::SetRestLength, + " " , py::arg("restLength") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.hpp new file mode 100644 index 00000000..2eed97d1 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryLinearDifferentialAdhesionForce3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryLinearDifferentialAdhesionForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryLinearDifferentialAdhesionForce3_class(py::module &m); +#endif // ImmersedBoundaryLinearDifferentialAdhesionForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp new file mode 100644 index 00000000..63896b56 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryLinearInteractionForce.hpp" + +#include "ImmersedBoundaryLinearInteractionForce2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryLinearInteractionForce<2 > ImmersedBoundaryLinearInteractionForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryLinearInteractionForce2_Overloads : public ImmersedBoundaryLinearInteractionForce2{ + public: + using ImmersedBoundaryLinearInteractionForce2::ImmersedBoundaryLinearInteractionForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearInteractionForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearInteractionForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryLinearInteractionForce2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<2> >(m, "ImmersedBoundaryLinearInteractionForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryLinearInteractionForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &ImmersedBoundaryLinearInteractionForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryLinearInteractionForce2::*)(::out_stream &)) &ImmersedBoundaryLinearInteractionForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetSpringConst", + (double(ImmersedBoundaryLinearInteractionForce2::*)() const ) &ImmersedBoundaryLinearInteractionForce2::GetSpringConst, + " " ) + .def( + "SetSpringConst", + (void(ImmersedBoundaryLinearInteractionForce2::*)(double)) &ImmersedBoundaryLinearInteractionForce2::SetSpringConst, + " " , py::arg("springConst") ) + .def( + "GetRestLength", + (double(ImmersedBoundaryLinearInteractionForce2::*)() const ) &ImmersedBoundaryLinearInteractionForce2::GetRestLength, + " " ) + .def( + "SetRestLength", + (void(ImmersedBoundaryLinearInteractionForce2::*)(double)) &ImmersedBoundaryLinearInteractionForce2::SetRestLength, + " " , py::arg("restLength") ) + .def( + "GetLaminaSpringConstMult", + (double(ImmersedBoundaryLinearInteractionForce2::*)() const ) &ImmersedBoundaryLinearInteractionForce2::GetLaminaSpringConstMult, + " " ) + .def( + "SetLaminaSpringConstMult", + (void(ImmersedBoundaryLinearInteractionForce2::*)(double)) &ImmersedBoundaryLinearInteractionForce2::SetLaminaSpringConstMult, + " " , py::arg("laminaSpringConstMult") ) + .def( + "GetLaminaRestLengthMult", + (double(ImmersedBoundaryLinearInteractionForce2::*)() const ) &ImmersedBoundaryLinearInteractionForce2::GetLaminaRestLengthMult, + " " ) + .def( + "SetLaminaRestLengthMult", + (void(ImmersedBoundaryLinearInteractionForce2::*)(double)) &ImmersedBoundaryLinearInteractionForce2::SetLaminaRestLengthMult, + " " , py::arg("laminaRestLengthMult") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.hpp new file mode 100644 index 00000000..1b282923 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryLinearInteractionForce2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryLinearInteractionForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryLinearInteractionForce2_class(py::module &m); +#endif // ImmersedBoundaryLinearInteractionForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp new file mode 100644 index 00000000..6762d720 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryLinearInteractionForce.hpp" + +#include "ImmersedBoundaryLinearInteractionForce3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryLinearInteractionForce<3 > ImmersedBoundaryLinearInteractionForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryLinearInteractionForce3_Overloads : public ImmersedBoundaryLinearInteractionForce3{ + public: + using ImmersedBoundaryLinearInteractionForce3::ImmersedBoundaryLinearInteractionForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearInteractionForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearInteractionForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryLinearInteractionForce3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<3> >(m, "ImmersedBoundaryLinearInteractionForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryLinearInteractionForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &ImmersedBoundaryLinearInteractionForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryLinearInteractionForce3::*)(::out_stream &)) &ImmersedBoundaryLinearInteractionForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetSpringConst", + (double(ImmersedBoundaryLinearInteractionForce3::*)() const ) &ImmersedBoundaryLinearInteractionForce3::GetSpringConst, + " " ) + .def( + "SetSpringConst", + (void(ImmersedBoundaryLinearInteractionForce3::*)(double)) &ImmersedBoundaryLinearInteractionForce3::SetSpringConst, + " " , py::arg("springConst") ) + .def( + "GetRestLength", + (double(ImmersedBoundaryLinearInteractionForce3::*)() const ) &ImmersedBoundaryLinearInteractionForce3::GetRestLength, + " " ) + .def( + "SetRestLength", + (void(ImmersedBoundaryLinearInteractionForce3::*)(double)) &ImmersedBoundaryLinearInteractionForce3::SetRestLength, + " " , py::arg("restLength") ) + .def( + "GetLaminaSpringConstMult", + (double(ImmersedBoundaryLinearInteractionForce3::*)() const ) &ImmersedBoundaryLinearInteractionForce3::GetLaminaSpringConstMult, + " " ) + .def( + "SetLaminaSpringConstMult", + (void(ImmersedBoundaryLinearInteractionForce3::*)(double)) &ImmersedBoundaryLinearInteractionForce3::SetLaminaSpringConstMult, + " " , py::arg("laminaSpringConstMult") ) + .def( + "GetLaminaRestLengthMult", + (double(ImmersedBoundaryLinearInteractionForce3::*)() const ) &ImmersedBoundaryLinearInteractionForce3::GetLaminaRestLengthMult, + " " ) + .def( + "SetLaminaRestLengthMult", + (void(ImmersedBoundaryLinearInteractionForce3::*)(double)) &ImmersedBoundaryLinearInteractionForce3::SetLaminaRestLengthMult, + " " , py::arg("laminaRestLengthMult") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.hpp new file mode 100644 index 00000000..6ee4fbaf --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryLinearInteractionForce3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryLinearInteractionForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryLinearInteractionForce3_class(py::module &m); +#endif // ImmersedBoundaryLinearInteractionForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp new file mode 100644 index 00000000..9c368612 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryLinearMembraneForce.hpp" + +#include "ImmersedBoundaryLinearMembraneForce2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryLinearMembraneForce<2 > ImmersedBoundaryLinearMembraneForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryLinearMembraneForce2_Overloads : public ImmersedBoundaryLinearMembraneForce2{ + public: + using ImmersedBoundaryLinearMembraneForce2::ImmersedBoundaryLinearMembraneForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearMembraneForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearMembraneForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryLinearMembraneForce2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<2> >(m, "ImmersedBoundaryLinearMembraneForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryLinearMembraneForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &ImmersedBoundaryLinearMembraneForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryLinearMembraneForce2::*)(::out_stream &)) &ImmersedBoundaryLinearMembraneForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetElementSpringConst", + (double(ImmersedBoundaryLinearMembraneForce2::*)() const ) &ImmersedBoundaryLinearMembraneForce2::GetElementSpringConst, + " " ) + .def( + "SetElementSpringConst", + (void(ImmersedBoundaryLinearMembraneForce2::*)(double)) &ImmersedBoundaryLinearMembraneForce2::SetElementSpringConst, + " " , py::arg("elementSpringConst") ) + .def( + "GetElementRestLength", + (double(ImmersedBoundaryLinearMembraneForce2::*)() const ) &ImmersedBoundaryLinearMembraneForce2::GetElementRestLength, + " " ) + .def( + "SetElementRestLength", + (void(ImmersedBoundaryLinearMembraneForce2::*)(double)) &ImmersedBoundaryLinearMembraneForce2::SetElementRestLength, + " " , py::arg("elementRestLength") ) + .def( + "GetLaminaSpringConst", + (double(ImmersedBoundaryLinearMembraneForce2::*)() const ) &ImmersedBoundaryLinearMembraneForce2::GetLaminaSpringConst, + " " ) + .def( + "SetLaminaSpringConst", + (void(ImmersedBoundaryLinearMembraneForce2::*)(double)) &ImmersedBoundaryLinearMembraneForce2::SetLaminaSpringConst, + " " , py::arg("laminaSpringConst") ) + .def( + "GetLaminaRestLength", + (double(ImmersedBoundaryLinearMembraneForce2::*)() const ) &ImmersedBoundaryLinearMembraneForce2::GetLaminaRestLength, + " " ) + .def( + "SetLaminaRestLength", + (void(ImmersedBoundaryLinearMembraneForce2::*)(double)) &ImmersedBoundaryLinearMembraneForce2::SetLaminaRestLength, + " " , py::arg("laminaRestLength") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.hpp new file mode 100644 index 00000000..4018d1e7 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryLinearMembraneForce2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryLinearMembraneForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryLinearMembraneForce2_class(py::module &m); +#endif // ImmersedBoundaryLinearMembraneForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp new file mode 100644 index 00000000..acbb2836 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryLinearMembraneForce.hpp" + +#include "ImmersedBoundaryLinearMembraneForce3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryLinearMembraneForce<3 > ImmersedBoundaryLinearMembraneForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryLinearMembraneForce3_Overloads : public ImmersedBoundaryLinearMembraneForce3{ + public: + using ImmersedBoundaryLinearMembraneForce3::ImmersedBoundaryLinearMembraneForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearMembraneForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryLinearMembraneForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryLinearMembraneForce3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<3> >(m, "ImmersedBoundaryLinearMembraneForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryLinearMembraneForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &ImmersedBoundaryLinearMembraneForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryLinearMembraneForce3::*)(::out_stream &)) &ImmersedBoundaryLinearMembraneForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetElementSpringConst", + (double(ImmersedBoundaryLinearMembraneForce3::*)() const ) &ImmersedBoundaryLinearMembraneForce3::GetElementSpringConst, + " " ) + .def( + "SetElementSpringConst", + (void(ImmersedBoundaryLinearMembraneForce3::*)(double)) &ImmersedBoundaryLinearMembraneForce3::SetElementSpringConst, + " " , py::arg("elementSpringConst") ) + .def( + "GetElementRestLength", + (double(ImmersedBoundaryLinearMembraneForce3::*)() const ) &ImmersedBoundaryLinearMembraneForce3::GetElementRestLength, + " " ) + .def( + "SetElementRestLength", + (void(ImmersedBoundaryLinearMembraneForce3::*)(double)) &ImmersedBoundaryLinearMembraneForce3::SetElementRestLength, + " " , py::arg("elementRestLength") ) + .def( + "GetLaminaSpringConst", + (double(ImmersedBoundaryLinearMembraneForce3::*)() const ) &ImmersedBoundaryLinearMembraneForce3::GetLaminaSpringConst, + " " ) + .def( + "SetLaminaSpringConst", + (void(ImmersedBoundaryLinearMembraneForce3::*)(double)) &ImmersedBoundaryLinearMembraneForce3::SetLaminaSpringConst, + " " , py::arg("laminaSpringConst") ) + .def( + "GetLaminaRestLength", + (double(ImmersedBoundaryLinearMembraneForce3::*)() const ) &ImmersedBoundaryLinearMembraneForce3::GetLaminaRestLength, + " " ) + .def( + "SetLaminaRestLength", + (void(ImmersedBoundaryLinearMembraneForce3::*)(double)) &ImmersedBoundaryLinearMembraneForce3::SetLaminaRestLength, + " " , py::arg("laminaRestLength") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.hpp new file mode 100644 index 00000000..688dfaec --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryLinearMembraneForce3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryLinearMembraneForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryLinearMembraneForce3_class(py::module &m); +#endif // ImmersedBoundaryLinearMembraneForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp new file mode 100644 index 00000000..668211a5 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryMorseInteractionForce.hpp" + +#include "ImmersedBoundaryMorseInteractionForce2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryMorseInteractionForce<2 > ImmersedBoundaryMorseInteractionForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryMorseInteractionForce2_Overloads : public ImmersedBoundaryMorseInteractionForce2{ + public: + using ImmersedBoundaryMorseInteractionForce2::ImmersedBoundaryMorseInteractionForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseInteractionForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseInteractionForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryMorseInteractionForce2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<2> >(m, "ImmersedBoundaryMorseInteractionForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryMorseInteractionForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &ImmersedBoundaryMorseInteractionForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryMorseInteractionForce2::*)(::out_stream &)) &ImmersedBoundaryMorseInteractionForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetWellDepth", + (double(ImmersedBoundaryMorseInteractionForce2::*)() const ) &ImmersedBoundaryMorseInteractionForce2::GetWellDepth, + " " ) + .def( + "SetWellDepth", + (void(ImmersedBoundaryMorseInteractionForce2::*)(double)) &ImmersedBoundaryMorseInteractionForce2::SetWellDepth, + " " , py::arg("wellDepth") ) + .def( + "GetRestLength", + (double(ImmersedBoundaryMorseInteractionForce2::*)() const ) &ImmersedBoundaryMorseInteractionForce2::GetRestLength, + " " ) + .def( + "SetRestLength", + (void(ImmersedBoundaryMorseInteractionForce2::*)(double)) &ImmersedBoundaryMorseInteractionForce2::SetRestLength, + " " , py::arg("restLength") ) + .def( + "GetLaminaWellDepthMult", + (double(ImmersedBoundaryMorseInteractionForce2::*)() const ) &ImmersedBoundaryMorseInteractionForce2::GetLaminaWellDepthMult, + " " ) + .def( + "SetLaminaWellDepthMult", + (void(ImmersedBoundaryMorseInteractionForce2::*)(double)) &ImmersedBoundaryMorseInteractionForce2::SetLaminaWellDepthMult, + " " , py::arg("laminaWellDepthMult") ) + .def( + "GetLaminaRestLengthMult", + (double(ImmersedBoundaryMorseInteractionForce2::*)() const ) &ImmersedBoundaryMorseInteractionForce2::GetLaminaRestLengthMult, + " " ) + .def( + "SetLaminaRestLengthMult", + (void(ImmersedBoundaryMorseInteractionForce2::*)(double)) &ImmersedBoundaryMorseInteractionForce2::SetLaminaRestLengthMult, + " " , py::arg("laminaRestLengthMult") ) + .def( + "GetWellWidth", + (double(ImmersedBoundaryMorseInteractionForce2::*)() const ) &ImmersedBoundaryMorseInteractionForce2::GetWellWidth, + " " ) + .def( + "SetWellWidth", + (void(ImmersedBoundaryMorseInteractionForce2::*)(double)) &ImmersedBoundaryMorseInteractionForce2::SetWellWidth, + " " , py::arg("wellWidth") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.hpp new file mode 100644 index 00000000..72453f4c --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryMorseInteractionForce2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryMorseInteractionForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryMorseInteractionForce2_class(py::module &m); +#endif // ImmersedBoundaryMorseInteractionForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp new file mode 100644 index 00000000..4ff6b8f1 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryMorseInteractionForce.hpp" + +#include "ImmersedBoundaryMorseInteractionForce3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryMorseInteractionForce<3 > ImmersedBoundaryMorseInteractionForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryMorseInteractionForce3_Overloads : public ImmersedBoundaryMorseInteractionForce3{ + public: + using ImmersedBoundaryMorseInteractionForce3::ImmersedBoundaryMorseInteractionForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseInteractionForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseInteractionForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryMorseInteractionForce3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<3> >(m, "ImmersedBoundaryMorseInteractionForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryMorseInteractionForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &ImmersedBoundaryMorseInteractionForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryMorseInteractionForce3::*)(::out_stream &)) &ImmersedBoundaryMorseInteractionForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetWellDepth", + (double(ImmersedBoundaryMorseInteractionForce3::*)() const ) &ImmersedBoundaryMorseInteractionForce3::GetWellDepth, + " " ) + .def( + "SetWellDepth", + (void(ImmersedBoundaryMorseInteractionForce3::*)(double)) &ImmersedBoundaryMorseInteractionForce3::SetWellDepth, + " " , py::arg("wellDepth") ) + .def( + "GetRestLength", + (double(ImmersedBoundaryMorseInteractionForce3::*)() const ) &ImmersedBoundaryMorseInteractionForce3::GetRestLength, + " " ) + .def( + "SetRestLength", + (void(ImmersedBoundaryMorseInteractionForce3::*)(double)) &ImmersedBoundaryMorseInteractionForce3::SetRestLength, + " " , py::arg("restLength") ) + .def( + "GetLaminaWellDepthMult", + (double(ImmersedBoundaryMorseInteractionForce3::*)() const ) &ImmersedBoundaryMorseInteractionForce3::GetLaminaWellDepthMult, + " " ) + .def( + "SetLaminaWellDepthMult", + (void(ImmersedBoundaryMorseInteractionForce3::*)(double)) &ImmersedBoundaryMorseInteractionForce3::SetLaminaWellDepthMult, + " " , py::arg("laminaWellDepthMult") ) + .def( + "GetLaminaRestLengthMult", + (double(ImmersedBoundaryMorseInteractionForce3::*)() const ) &ImmersedBoundaryMorseInteractionForce3::GetLaminaRestLengthMult, + " " ) + .def( + "SetLaminaRestLengthMult", + (void(ImmersedBoundaryMorseInteractionForce3::*)(double)) &ImmersedBoundaryMorseInteractionForce3::SetLaminaRestLengthMult, + " " , py::arg("laminaRestLengthMult") ) + .def( + "GetWellWidth", + (double(ImmersedBoundaryMorseInteractionForce3::*)() const ) &ImmersedBoundaryMorseInteractionForce3::GetWellWidth, + " " ) + .def( + "SetWellWidth", + (void(ImmersedBoundaryMorseInteractionForce3::*)(double)) &ImmersedBoundaryMorseInteractionForce3::SetWellWidth, + " " , py::arg("wellWidth") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.hpp new file mode 100644 index 00000000..3dee75eb --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryMorseInteractionForce3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryMorseInteractionForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryMorseInteractionForce3_class(py::module &m); +#endif // ImmersedBoundaryMorseInteractionForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp new file mode 100644 index 00000000..20fcf74e --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryMorseMembraneForce.hpp" + +#include "ImmersedBoundaryMorseMembraneForce2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryMorseMembraneForce<2 > ImmersedBoundaryMorseMembraneForce2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryMorseMembraneForce2_Overloads : public ImmersedBoundaryMorseMembraneForce2{ + public: + using ImmersedBoundaryMorseMembraneForce2::ImmersedBoundaryMorseMembraneForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseMembraneForce2, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseMembraneForce2, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryMorseMembraneForce2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<2> >(m, "ImmersedBoundaryMorseMembraneForce2") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryMorseMembraneForce2::*)(::std::vector *, Node<2> *>> &, ::ImmersedBoundaryCellPopulation<2> &)) &ImmersedBoundaryMorseMembraneForce2::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryMorseMembraneForce2::*)(::out_stream &)) &ImmersedBoundaryMorseMembraneForce2::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetElementWellDepth", + (double(ImmersedBoundaryMorseMembraneForce2::*)() const ) &ImmersedBoundaryMorseMembraneForce2::GetElementWellDepth, + " " ) + .def( + "SetElementWellDepth", + (void(ImmersedBoundaryMorseMembraneForce2::*)(double)) &ImmersedBoundaryMorseMembraneForce2::SetElementWellDepth, + " " , py::arg("elementWellDepth") ) + .def( + "GetElementRestLength", + (double(ImmersedBoundaryMorseMembraneForce2::*)() const ) &ImmersedBoundaryMorseMembraneForce2::GetElementRestLength, + " " ) + .def( + "SetElementRestLength", + (void(ImmersedBoundaryMorseMembraneForce2::*)(double)) &ImmersedBoundaryMorseMembraneForce2::SetElementRestLength, + " " , py::arg("elementRestLength") ) + .def( + "GetLaminaWellDepth", + (double(ImmersedBoundaryMorseMembraneForce2::*)() const ) &ImmersedBoundaryMorseMembraneForce2::GetLaminaWellDepth, + " " ) + .def( + "SetLaminaWellDepth", + (void(ImmersedBoundaryMorseMembraneForce2::*)(double)) &ImmersedBoundaryMorseMembraneForce2::SetLaminaWellDepth, + " " , py::arg("laminaWellDepth") ) + .def( + "GetLaminaRestLength", + (double(ImmersedBoundaryMorseMembraneForce2::*)() const ) &ImmersedBoundaryMorseMembraneForce2::GetLaminaRestLength, + " " ) + .def( + "SetLaminaRestLength", + (void(ImmersedBoundaryMorseMembraneForce2::*)(double)) &ImmersedBoundaryMorseMembraneForce2::SetLaminaRestLength, + " " , py::arg("laminaRestLength") ) + .def( + "GetWellWidth", + (double(ImmersedBoundaryMorseMembraneForce2::*)() const ) &ImmersedBoundaryMorseMembraneForce2::GetWellWidth, + " " ) + .def( + "SetWellWidth", + (void(ImmersedBoundaryMorseMembraneForce2::*)(double)) &ImmersedBoundaryMorseMembraneForce2::SetWellWidth, + " " , py::arg("wellWidth") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.hpp new file mode 100644 index 00000000..292f04dc --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryMorseMembraneForce2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryMorseMembraneForce2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryMorseMembraneForce2_class(py::module &m); +#endif // ImmersedBoundaryMorseMembraneForce2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp new file mode 100644 index 00000000..0e279d29 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryMorseMembraneForce.hpp" + +#include "ImmersedBoundaryMorseMembraneForce3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryMorseMembraneForce<3 > ImmersedBoundaryMorseMembraneForce3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryMorseMembraneForce3_Overloads : public ImmersedBoundaryMorseMembraneForce3{ + public: + using ImmersedBoundaryMorseMembraneForce3::ImmersedBoundaryMorseMembraneForce; + void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseMembraneForce3, + AddImmersedBoundaryForceContribution, + rNodePairs, +rCellPopulation); + } + void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMorseMembraneForce3, + OutputImmersedBoundaryForceParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundaryMorseMembraneForce3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryForce<3> >(m, "ImmersedBoundaryMorseMembraneForce3") + .def(py::init< >()) + .def( + "AddImmersedBoundaryForceContribution", + (void(ImmersedBoundaryMorseMembraneForce3::*)(::std::vector *, Node<3> *>> &, ::ImmersedBoundaryCellPopulation<3> &)) &ImmersedBoundaryMorseMembraneForce3::AddImmersedBoundaryForceContribution, + " " , py::arg("rNodePairs"), py::arg("rCellPopulation") ) + .def( + "OutputImmersedBoundaryForceParameters", + (void(ImmersedBoundaryMorseMembraneForce3::*)(::out_stream &)) &ImmersedBoundaryMorseMembraneForce3::OutputImmersedBoundaryForceParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetElementWellDepth", + (double(ImmersedBoundaryMorseMembraneForce3::*)() const ) &ImmersedBoundaryMorseMembraneForce3::GetElementWellDepth, + " " ) + .def( + "SetElementWellDepth", + (void(ImmersedBoundaryMorseMembraneForce3::*)(double)) &ImmersedBoundaryMorseMembraneForce3::SetElementWellDepth, + " " , py::arg("elementWellDepth") ) + .def( + "GetElementRestLength", + (double(ImmersedBoundaryMorseMembraneForce3::*)() const ) &ImmersedBoundaryMorseMembraneForce3::GetElementRestLength, + " " ) + .def( + "SetElementRestLength", + (void(ImmersedBoundaryMorseMembraneForce3::*)(double)) &ImmersedBoundaryMorseMembraneForce3::SetElementRestLength, + " " , py::arg("elementRestLength") ) + .def( + "GetLaminaWellDepth", + (double(ImmersedBoundaryMorseMembraneForce3::*)() const ) &ImmersedBoundaryMorseMembraneForce3::GetLaminaWellDepth, + " " ) + .def( + "SetLaminaWellDepth", + (void(ImmersedBoundaryMorseMembraneForce3::*)(double)) &ImmersedBoundaryMorseMembraneForce3::SetLaminaWellDepth, + " " , py::arg("laminaWellDepth") ) + .def( + "GetLaminaRestLength", + (double(ImmersedBoundaryMorseMembraneForce3::*)() const ) &ImmersedBoundaryMorseMembraneForce3::GetLaminaRestLength, + " " ) + .def( + "SetLaminaRestLength", + (void(ImmersedBoundaryMorseMembraneForce3::*)(double)) &ImmersedBoundaryMorseMembraneForce3::SetLaminaRestLength, + " " , py::arg("laminaRestLength") ) + .def( + "GetWellWidth", + (double(ImmersedBoundaryMorseMembraneForce3::*)() const ) &ImmersedBoundaryMorseMembraneForce3::GetWellWidth, + " " ) + .def( + "SetWellWidth", + (void(ImmersedBoundaryMorseMembraneForce3::*)(double)) &ImmersedBoundaryMorseMembraneForce3::SetWellWidth, + " " , py::arg("wellWidth") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.hpp new file mode 100644 index 00000000..f2f70f77 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryMorseMembraneForce3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryMorseMembraneForce3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryMorseMembraneForce3_class(py::module &m); +#endif // ImmersedBoundaryMorseMembraneForce3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp new file mode 100644 index 00000000..7b1eab55 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp @@ -0,0 +1,51 @@ +#include +#include +#include "ImmersedBoundaryCellPopulation.hpp" +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryNeighbourNumberWriter.hpp" + +#include "ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryNeighbourNumberWriter<2,2 > ImmersedBoundaryNeighbourNumberWriter2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryNeighbourNumberWriter2_2_Overloads : public ImmersedBoundaryNeighbourNumberWriter2_2{ + public: + using ImmersedBoundaryNeighbourNumberWriter2_2::ImmersedBoundaryNeighbourNumberWriter; + double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryNeighbourNumberWriter2_2, + GetCellDataForVtkOutput, + pCell, +pCellPopulation); + } + void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryNeighbourNumberWriter2_2, + VisitCell, + pCell, +pCellPopulation); + } + +}; +void register_ImmersedBoundaryNeighbourNumberWriter2_2_class(py::module &m){ +py::class_ , AbstractCellWriter<2, 2> >(m, "ImmersedBoundaryNeighbourNumberWriter2_2") + .def(py::init< >()) + .def( + "GetCellDataForVtkOutput", + (double(ImmersedBoundaryNeighbourNumberWriter2_2::*)(::CellPtr, ::AbstractCellPopulation<2> *)) &ImmersedBoundaryNeighbourNumberWriter2_2::GetCellDataForVtkOutput, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + .def( + "VisitCell", + (void(ImmersedBoundaryNeighbourNumberWriter2_2::*)(::CellPtr, ::AbstractCellPopulation<2> *)) &ImmersedBoundaryNeighbourNumberWriter2_2::VisitCell, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.hpp new file mode 100644 index 00000000..dc47c685 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryNeighbourNumberWriter2_2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryNeighbourNumberWriter2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryNeighbourNumberWriter2_2_class(py::module &m); +#endif // ImmersedBoundaryNeighbourNumberWriter2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp new file mode 100644 index 00000000..e16c4011 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp @@ -0,0 +1,51 @@ +#include +#include +#include "ImmersedBoundaryCellPopulation.hpp" +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryNeighbourNumberWriter.hpp" + +#include "ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryNeighbourNumberWriter<3,3 > ImmersedBoundaryNeighbourNumberWriter3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryNeighbourNumberWriter3_3_Overloads : public ImmersedBoundaryNeighbourNumberWriter3_3{ + public: + using ImmersedBoundaryNeighbourNumberWriter3_3::ImmersedBoundaryNeighbourNumberWriter; + double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryNeighbourNumberWriter3_3, + GetCellDataForVtkOutput, + pCell, +pCellPopulation); + } + void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryNeighbourNumberWriter3_3, + VisitCell, + pCell, +pCellPopulation); + } + +}; +void register_ImmersedBoundaryNeighbourNumberWriter3_3_class(py::module &m){ +py::class_ , AbstractCellWriter<3, 3> >(m, "ImmersedBoundaryNeighbourNumberWriter3_3") + .def(py::init< >()) + .def( + "GetCellDataForVtkOutput", + (double(ImmersedBoundaryNeighbourNumberWriter3_3::*)(::CellPtr, ::AbstractCellPopulation<3> *)) &ImmersedBoundaryNeighbourNumberWriter3_3::GetCellDataForVtkOutput, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + .def( + "VisitCell", + (void(ImmersedBoundaryNeighbourNumberWriter3_3::*)(::CellPtr, ::AbstractCellPopulation<3> *)) &ImmersedBoundaryNeighbourNumberWriter3_3::VisitCell, + " " , py::arg("pCell"), py::arg("pCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.hpp new file mode 100644 index 00000000..66bf0516 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryNeighbourNumberWriter3_3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryNeighbourNumberWriter3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryNeighbourNumberWriter3_3_class(py::module &m); +#endif // ImmersedBoundaryNeighbourNumberWriter3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp new file mode 100644 index 00000000..3579889c --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundarySimulationModifier.hpp" + +#include "ImmersedBoundarySimulationModifier2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundarySimulationModifier<2 > ImmersedBoundarySimulationModifier2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundarySimulationModifier2_Overloads : public ImmersedBoundarySimulationModifier2{ + public: + using ImmersedBoundarySimulationModifier2::ImmersedBoundarySimulationModifier; + void UpdateAtEndOfTimeStep(::AbstractCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySimulationModifier2, + UpdateAtEndOfTimeStep, + rCellPopulation); + } + void SetupSolve(::AbstractCellPopulation<2> & rCellPopulation, ::std::string outputDirectory) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySimulationModifier2, + SetupSolve, + rCellPopulation, +outputDirectory); + } + void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySimulationModifier2, + OutputSimulationModifierParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundarySimulationModifier2_class(py::module &m){ +py::class_ , AbstractCellBasedSimulationModifier<2> >(m, "ImmersedBoundarySimulationModifier2") + .def(py::init< >()) + .def( + "UpdateAtEndOfTimeStep", + (void(ImmersedBoundarySimulationModifier2::*)(::AbstractCellPopulation<2> &)) &ImmersedBoundarySimulationModifier2::UpdateAtEndOfTimeStep, + " " , py::arg("rCellPopulation") ) + .def( + "SetupSolve", + (void(ImmersedBoundarySimulationModifier2::*)(::AbstractCellPopulation<2> &, ::std::string)) &ImmersedBoundarySimulationModifier2::SetupSolve, + " " , py::arg("rCellPopulation"), py::arg("outputDirectory") ) + .def( + "OutputSimulationModifierParameters", + (void(ImmersedBoundarySimulationModifier2::*)(::out_stream &)) &ImmersedBoundarySimulationModifier2::OutputSimulationModifierParameters, + " " , py::arg("rParamsFile") ) + .def( + "SetNodeNeighbourUpdateFrequency", + (void(ImmersedBoundarySimulationModifier2::*)(unsigned int)) &ImmersedBoundarySimulationModifier2::SetNodeNeighbourUpdateFrequency, + " " , py::arg("newFrequency") ) + .def( + "GetNodeNeighbourUpdateFrequency", + (unsigned int(ImmersedBoundarySimulationModifier2::*)()) &ImmersedBoundarySimulationModifier2::GetNodeNeighbourUpdateFrequency, + " " ) + .def( + "AddImmersedBoundaryForce", + (void(ImmersedBoundarySimulationModifier2::*)(::boost::shared_ptr>)) &ImmersedBoundarySimulationModifier2::AddImmersedBoundaryForce, + " " , py::arg("pForce") ) + .def( + "AddNormalNoise", + (void(ImmersedBoundarySimulationModifier2::*)() const ) &ImmersedBoundarySimulationModifier2::AddNormalNoise, + " " ) + .def( + "GetZeroFieldSums", + (bool(ImmersedBoundarySimulationModifier2::*)() const ) &ImmersedBoundarySimulationModifier2::GetZeroFieldSums, + " " ) + .def( + "SetZeroFieldSums", + (void(ImmersedBoundarySimulationModifier2::*)(bool)) &ImmersedBoundarySimulationModifier2::SetZeroFieldSums, + " " , py::arg("zeroFieldSums") ) + .def( + "SetReynoldsNumber", + (void(ImmersedBoundarySimulationModifier2::*)(double)) &ImmersedBoundarySimulationModifier2::SetReynoldsNumber, + " " , py::arg("reynoldsNumber") ) + .def( + "GetReynoldsNumber", + (double(ImmersedBoundarySimulationModifier2::*)()) &ImmersedBoundarySimulationModifier2::GetReynoldsNumber, + " " ) + .def( + "GetAdditiveNormalNoise", + (bool(ImmersedBoundarySimulationModifier2::*)() const ) &ImmersedBoundarySimulationModifier2::GetAdditiveNormalNoise, + " " ) + .def( + "SetAdditiveNormalNoise", + (void(ImmersedBoundarySimulationModifier2::*)(bool)) &ImmersedBoundarySimulationModifier2::SetAdditiveNormalNoise, + " " , py::arg("additiveNormalNoise") ) + .def( + "GetNoiseStrength", + (double(ImmersedBoundarySimulationModifier2::*)() const ) &ImmersedBoundarySimulationModifier2::GetNoiseStrength, + " " ) + .def( + "SetNoiseStrength", + (void(ImmersedBoundarySimulationModifier2::*)(double)) &ImmersedBoundarySimulationModifier2::SetNoiseStrength, + " " , py::arg("noiseStrength") ) + .def( + "GetNoiseSkip", + (unsigned int(ImmersedBoundarySimulationModifier2::*)() const ) &ImmersedBoundarySimulationModifier2::GetNoiseSkip, + " " ) + .def( + "SetNoiseSkip", + (void(ImmersedBoundarySimulationModifier2::*)(unsigned int)) &ImmersedBoundarySimulationModifier2::SetNoiseSkip, + " " , py::arg("noiseSkip") ) + .def( + "GetNoiseLengthScale", + (double(ImmersedBoundarySimulationModifier2::*)() const ) &ImmersedBoundarySimulationModifier2::GetNoiseLengthScale, + " " ) + .def( + "SetNoiseLengthScale", + (void(ImmersedBoundarySimulationModifier2::*)(double)) &ImmersedBoundarySimulationModifier2::SetNoiseLengthScale, + " " , py::arg("noiseLengthScale") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.hpp new file mode 100644 index 00000000..ef1de78b --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundarySimulationModifier2_hpp__pyplusplus_wrapper +#define ImmersedBoundarySimulationModifier2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundarySimulationModifier2_class(py::module &m); +#endif // ImmersedBoundarySimulationModifier2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp new file mode 100644 index 00000000..186fb245 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundarySimulationModifier.hpp" + +#include "ImmersedBoundarySimulationModifier3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundarySimulationModifier<3 > ImmersedBoundarySimulationModifier3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundarySimulationModifier3_Overloads : public ImmersedBoundarySimulationModifier3{ + public: + using ImmersedBoundarySimulationModifier3::ImmersedBoundarySimulationModifier; + void UpdateAtEndOfTimeStep(::AbstractCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySimulationModifier3, + UpdateAtEndOfTimeStep, + rCellPopulation); + } + void SetupSolve(::AbstractCellPopulation<3> & rCellPopulation, ::std::string outputDirectory) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySimulationModifier3, + SetupSolve, + rCellPopulation, +outputDirectory); + } + void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySimulationModifier3, + OutputSimulationModifierParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundarySimulationModifier3_class(py::module &m){ +py::class_ , AbstractCellBasedSimulationModifier<3> >(m, "ImmersedBoundarySimulationModifier3") + .def(py::init< >()) + .def( + "UpdateAtEndOfTimeStep", + (void(ImmersedBoundarySimulationModifier3::*)(::AbstractCellPopulation<3> &)) &ImmersedBoundarySimulationModifier3::UpdateAtEndOfTimeStep, + " " , py::arg("rCellPopulation") ) + .def( + "SetupSolve", + (void(ImmersedBoundarySimulationModifier3::*)(::AbstractCellPopulation<3> &, ::std::string)) &ImmersedBoundarySimulationModifier3::SetupSolve, + " " , py::arg("rCellPopulation"), py::arg("outputDirectory") ) + .def( + "OutputSimulationModifierParameters", + (void(ImmersedBoundarySimulationModifier3::*)(::out_stream &)) &ImmersedBoundarySimulationModifier3::OutputSimulationModifierParameters, + " " , py::arg("rParamsFile") ) + .def( + "SetNodeNeighbourUpdateFrequency", + (void(ImmersedBoundarySimulationModifier3::*)(unsigned int)) &ImmersedBoundarySimulationModifier3::SetNodeNeighbourUpdateFrequency, + " " , py::arg("newFrequency") ) + .def( + "GetNodeNeighbourUpdateFrequency", + (unsigned int(ImmersedBoundarySimulationModifier3::*)()) &ImmersedBoundarySimulationModifier3::GetNodeNeighbourUpdateFrequency, + " " ) + .def( + "AddImmersedBoundaryForce", + (void(ImmersedBoundarySimulationModifier3::*)(::boost::shared_ptr>)) &ImmersedBoundarySimulationModifier3::AddImmersedBoundaryForce, + " " , py::arg("pForce") ) + .def( + "AddNormalNoise", + (void(ImmersedBoundarySimulationModifier3::*)() const ) &ImmersedBoundarySimulationModifier3::AddNormalNoise, + " " ) + .def( + "GetZeroFieldSums", + (bool(ImmersedBoundarySimulationModifier3::*)() const ) &ImmersedBoundarySimulationModifier3::GetZeroFieldSums, + " " ) + .def( + "SetZeroFieldSums", + (void(ImmersedBoundarySimulationModifier3::*)(bool)) &ImmersedBoundarySimulationModifier3::SetZeroFieldSums, + " " , py::arg("zeroFieldSums") ) + .def( + "SetReynoldsNumber", + (void(ImmersedBoundarySimulationModifier3::*)(double)) &ImmersedBoundarySimulationModifier3::SetReynoldsNumber, + " " , py::arg("reynoldsNumber") ) + .def( + "GetReynoldsNumber", + (double(ImmersedBoundarySimulationModifier3::*)()) &ImmersedBoundarySimulationModifier3::GetReynoldsNumber, + " " ) + .def( + "GetAdditiveNormalNoise", + (bool(ImmersedBoundarySimulationModifier3::*)() const ) &ImmersedBoundarySimulationModifier3::GetAdditiveNormalNoise, + " " ) + .def( + "SetAdditiveNormalNoise", + (void(ImmersedBoundarySimulationModifier3::*)(bool)) &ImmersedBoundarySimulationModifier3::SetAdditiveNormalNoise, + " " , py::arg("additiveNormalNoise") ) + .def( + "GetNoiseStrength", + (double(ImmersedBoundarySimulationModifier3::*)() const ) &ImmersedBoundarySimulationModifier3::GetNoiseStrength, + " " ) + .def( + "SetNoiseStrength", + (void(ImmersedBoundarySimulationModifier3::*)(double)) &ImmersedBoundarySimulationModifier3::SetNoiseStrength, + " " , py::arg("noiseStrength") ) + .def( + "GetNoiseSkip", + (unsigned int(ImmersedBoundarySimulationModifier3::*)() const ) &ImmersedBoundarySimulationModifier3::GetNoiseSkip, + " " ) + .def( + "SetNoiseSkip", + (void(ImmersedBoundarySimulationModifier3::*)(unsigned int)) &ImmersedBoundarySimulationModifier3::SetNoiseSkip, + " " , py::arg("noiseSkip") ) + .def( + "GetNoiseLengthScale", + (double(ImmersedBoundarySimulationModifier3::*)() const ) &ImmersedBoundarySimulationModifier3::GetNoiseLengthScale, + " " ) + .def( + "SetNoiseLengthScale", + (void(ImmersedBoundarySimulationModifier3::*)(double)) &ImmersedBoundarySimulationModifier3::SetNoiseLengthScale, + " " , py::arg("noiseLengthScale") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.hpp new file mode 100644 index 00000000..29009ea0 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundarySimulationModifier3_hpp__pyplusplus_wrapper +#define ImmersedBoundarySimulationModifier3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundarySimulationModifier3_class(py::module &m); +#endif // ImmersedBoundarySimulationModifier3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp new file mode 100644 index 00000000..5fdbf34a --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundarySvgWriter.hpp" + +#include "ImmersedBoundarySvgWriter2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundarySvgWriter<2 > ImmersedBoundarySvgWriter2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundarySvgWriter2_Overloads : public ImmersedBoundarySvgWriter2{ + public: + using ImmersedBoundarySvgWriter2::ImmersedBoundarySvgWriter; + void UpdateAtEndOfTimeStep(::AbstractCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySvgWriter2, + UpdateAtEndOfTimeStep, + rCellPopulation); + } + void SetupSolve(::AbstractCellPopulation<2> & rCellPopulation, ::std::string outputDirectory) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySvgWriter2, + SetupSolve, + rCellPopulation, +outputDirectory); + } + void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySvgWriter2, + OutputSimulationModifierParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundarySvgWriter2_class(py::module &m){ +py::class_ , AbstractCellBasedSimulationModifier<2> >(m, "ImmersedBoundarySvgWriter2") + .def(py::init< >()) + .def( + "UpdateAtEndOfTimeStep", + (void(ImmersedBoundarySvgWriter2::*)(::AbstractCellPopulation<2> &)) &ImmersedBoundarySvgWriter2::UpdateAtEndOfTimeStep, + " " , py::arg("rCellPopulation") ) + .def( + "SetupSolve", + (void(ImmersedBoundarySvgWriter2::*)(::AbstractCellPopulation<2> &, ::std::string)) &ImmersedBoundarySvgWriter2::SetupSolve, + " " , py::arg("rCellPopulation"), py::arg("outputDirectory") ) + .def( + "AddPointToSvgFile", + (void(ImmersedBoundarySvgWriter2::*)(::out_stream &, ::boost::numeric::ublas::c_vector, unsigned int, double)) &ImmersedBoundarySvgWriter2::AddPointToSvgFile, + " " , py::arg("rSvgFile"), py::arg("location"), py::arg("region"), py::arg("rad") ) + .def( + "OutputSimulationModifierParameters", + (void(ImmersedBoundarySvgWriter2::*)(::out_stream &)) &ImmersedBoundarySvgWriter2::OutputSimulationModifierParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetSamplingMultiple", + (unsigned int(ImmersedBoundarySvgWriter2::*)() const ) &ImmersedBoundarySvgWriter2::GetSamplingMultiple, + " " ) + .def( + "SetSamplingMultiple", + (void(ImmersedBoundarySvgWriter2::*)(unsigned int)) &ImmersedBoundarySvgWriter2::SetSamplingMultiple, + " " , py::arg("samplingMultiple") ) + .def( + "GetSvgSize", + (double(ImmersedBoundarySvgWriter2::*)() const ) &ImmersedBoundarySvgWriter2::GetSvgSize, + " " ) + .def( + "SetSvgSize", + (void(ImmersedBoundarySvgWriter2::*)(double)) &ImmersedBoundarySvgWriter2::SetSvgSize, + " " , py::arg("svgSize") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.hpp new file mode 100644 index 00000000..d27918ab --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundarySvgWriter2_hpp__pyplusplus_wrapper +#define ImmersedBoundarySvgWriter2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundarySvgWriter2_class(py::module &m); +#endif // ImmersedBoundarySvgWriter2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp new file mode 100644 index 00000000..524d5668 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundarySvgWriter.hpp" + +#include "ImmersedBoundarySvgWriter3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundarySvgWriter<3 > ImmersedBoundarySvgWriter3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundarySvgWriter3_Overloads : public ImmersedBoundarySvgWriter3{ + public: + using ImmersedBoundarySvgWriter3::ImmersedBoundarySvgWriter; + void UpdateAtEndOfTimeStep(::AbstractCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySvgWriter3, + UpdateAtEndOfTimeStep, + rCellPopulation); + } + void SetupSolve(::AbstractCellPopulation<3> & rCellPopulation, ::std::string outputDirectory) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySvgWriter3, + SetupSolve, + rCellPopulation, +outputDirectory); + } + void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundarySvgWriter3, + OutputSimulationModifierParameters, + rParamsFile); + } + +}; +void register_ImmersedBoundarySvgWriter3_class(py::module &m){ +py::class_ , AbstractCellBasedSimulationModifier<3> >(m, "ImmersedBoundarySvgWriter3") + .def(py::init< >()) + .def( + "UpdateAtEndOfTimeStep", + (void(ImmersedBoundarySvgWriter3::*)(::AbstractCellPopulation<3> &)) &ImmersedBoundarySvgWriter3::UpdateAtEndOfTimeStep, + " " , py::arg("rCellPopulation") ) + .def( + "SetupSolve", + (void(ImmersedBoundarySvgWriter3::*)(::AbstractCellPopulation<3> &, ::std::string)) &ImmersedBoundarySvgWriter3::SetupSolve, + " " , py::arg("rCellPopulation"), py::arg("outputDirectory") ) + .def( + "AddPointToSvgFile", + (void(ImmersedBoundarySvgWriter3::*)(::out_stream &, ::boost::numeric::ublas::c_vector, unsigned int, double)) &ImmersedBoundarySvgWriter3::AddPointToSvgFile, + " " , py::arg("rSvgFile"), py::arg("location"), py::arg("region"), py::arg("rad") ) + .def( + "OutputSimulationModifierParameters", + (void(ImmersedBoundarySvgWriter3::*)(::out_stream &)) &ImmersedBoundarySvgWriter3::OutputSimulationModifierParameters, + " " , py::arg("rParamsFile") ) + .def( + "GetSamplingMultiple", + (unsigned int(ImmersedBoundarySvgWriter3::*)() const ) &ImmersedBoundarySvgWriter3::GetSamplingMultiple, + " " ) + .def( + "SetSamplingMultiple", + (void(ImmersedBoundarySvgWriter3::*)(unsigned int)) &ImmersedBoundarySvgWriter3::SetSamplingMultiple, + " " , py::arg("samplingMultiple") ) + .def( + "GetSvgSize", + (double(ImmersedBoundarySvgWriter3::*)() const ) &ImmersedBoundarySvgWriter3::GetSvgSize, + " " ) + .def( + "SetSvgSize", + (void(ImmersedBoundarySvgWriter3::*)(double)) &ImmersedBoundarySvgWriter3::SetSvgSize, + " " , py::arg("svgSize") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.hpp b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.hpp new file mode 100644 index 00000000..f3497156 --- /dev/null +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundarySvgWriter3_hpp__pyplusplus_wrapper +#define ImmersedBoundarySvgWriter3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundarySvgWriter3_class(py::module &m); +#endif // ImmersedBoundarySvgWriter3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp new file mode 100644 index 00000000..d9d99ffa --- /dev/null +++ b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "NormallyDistributedTargetAreaModifier.hpp" + +#include "NormallyDistributedTargetAreaModifier2.cppwg.hpp" + +namespace py = pybind11; +typedef NormallyDistributedTargetAreaModifier<2 > NormallyDistributedTargetAreaModifier2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class NormallyDistributedTargetAreaModifier2_Overloads : public NormallyDistributedTargetAreaModifier2{ + public: + using NormallyDistributedTargetAreaModifier2::NormallyDistributedTargetAreaModifier; + void UpdateTargetAreaOfCell(::CellPtr const pCell) override { + PYBIND11_OVERLOAD( + void, + NormallyDistributedTargetAreaModifier2, + UpdateTargetAreaOfCell, + pCell); + } + void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + NormallyDistributedTargetAreaModifier2, + OutputSimulationModifierParameters, + rParamsFile); + } + +}; +void register_NormallyDistributedTargetAreaModifier2_class(py::module &m){ +py::class_ , AbstractTargetAreaModifier<2> >(m, "NormallyDistributedTargetAreaModifier2") + .def(py::init< >()) + .def( + "UpdateTargetAreaOfCell", + (void(NormallyDistributedTargetAreaModifier2::*)(::CellPtr const)) &NormallyDistributedTargetAreaModifier2::UpdateTargetAreaOfCell, + " " , py::arg("pCell") ) + .def( + "GetGrowthDuration", + (double(NormallyDistributedTargetAreaModifier2::*)()) &NormallyDistributedTargetAreaModifier2::GetGrowthDuration, + " " ) + .def( + "SetGrowthDuration", + (void(NormallyDistributedTargetAreaModifier2::*)(double)) &NormallyDistributedTargetAreaModifier2::SetGrowthDuration, + " " , py::arg("growthDuration") ) + .def( + "OutputSimulationModifierParameters", + (void(NormallyDistributedTargetAreaModifier2::*)(::out_stream &)) &NormallyDistributedTargetAreaModifier2::OutputSimulationModifierParameters, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.hpp b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.hpp new file mode 100644 index 00000000..7b27f8b9 --- /dev/null +++ b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef NormallyDistributedTargetAreaModifier2_hpp__pyplusplus_wrapper +#define NormallyDistributedTargetAreaModifier2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_NormallyDistributedTargetAreaModifier2_class(py::module &m); +#endif // NormallyDistributedTargetAreaModifier2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp new file mode 100644 index 00000000..8155fbc6 --- /dev/null +++ b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "NormallyDistributedTargetAreaModifier.hpp" + +#include "NormallyDistributedTargetAreaModifier3.cppwg.hpp" + +namespace py = pybind11; +typedef NormallyDistributedTargetAreaModifier<3 > NormallyDistributedTargetAreaModifier3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class NormallyDistributedTargetAreaModifier3_Overloads : public NormallyDistributedTargetAreaModifier3{ + public: + using NormallyDistributedTargetAreaModifier3::NormallyDistributedTargetAreaModifier; + void UpdateTargetAreaOfCell(::CellPtr const pCell) override { + PYBIND11_OVERLOAD( + void, + NormallyDistributedTargetAreaModifier3, + UpdateTargetAreaOfCell, + pCell); + } + void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERLOAD( + void, + NormallyDistributedTargetAreaModifier3, + OutputSimulationModifierParameters, + rParamsFile); + } + +}; +void register_NormallyDistributedTargetAreaModifier3_class(py::module &m){ +py::class_ , AbstractTargetAreaModifier<3> >(m, "NormallyDistributedTargetAreaModifier3") + .def(py::init< >()) + .def( + "UpdateTargetAreaOfCell", + (void(NormallyDistributedTargetAreaModifier3::*)(::CellPtr const)) &NormallyDistributedTargetAreaModifier3::UpdateTargetAreaOfCell, + " " , py::arg("pCell") ) + .def( + "GetGrowthDuration", + (double(NormallyDistributedTargetAreaModifier3::*)()) &NormallyDistributedTargetAreaModifier3::GetGrowthDuration, + " " ) + .def( + "SetGrowthDuration", + (void(NormallyDistributedTargetAreaModifier3::*)(double)) &NormallyDistributedTargetAreaModifier3::SetGrowthDuration, + " " , py::arg("growthDuration") ) + .def( + "OutputSimulationModifierParameters", + (void(NormallyDistributedTargetAreaModifier3::*)(::out_stream &)) &NormallyDistributedTargetAreaModifier3::OutputSimulationModifierParameters, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.hpp b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.hpp new file mode 100644 index 00000000..716e2bf9 --- /dev/null +++ b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef NormallyDistributedTargetAreaModifier3_hpp__pyplusplus_wrapper +#define NormallyDistributedTargetAreaModifier3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_NormallyDistributedTargetAreaModifier3_class(py::module &m); +#endif // NormallyDistributedTargetAreaModifier3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp new file mode 100644 index 00000000..872a83f0 --- /dev/null +++ b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "RandomDirectionCentreBasedDivisionRule.hpp" + +#include "RandomDirectionCentreBasedDivisionRule2_2.cppwg.hpp" + +namespace py = pybind11; +typedef RandomDirectionCentreBasedDivisionRule<2 > RandomDirectionCentreBasedDivisionRule2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::std::pair, boost::numeric::ublas::c_vector> _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_; + +class RandomDirectionCentreBasedDivisionRule2_2_Overloads : public RandomDirectionCentreBasedDivisionRule2_2{ + public: + using RandomDirectionCentreBasedDivisionRule2_2::RandomDirectionCentreBasedDivisionRule; + ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<2, 2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_, + RandomDirectionCentreBasedDivisionRule2_2, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + +}; +void register_RandomDirectionCentreBasedDivisionRule2_2_class(py::module &m){ +py::class_ , AbstractCentreBasedDivisionRule<2> >(m, "RandomDirectionCentreBasedDivisionRule2_2") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::std::pair, boost::numeric::ublas::c_vector>(RandomDirectionCentreBasedDivisionRule2_2::*)(::CellPtr, ::AbstractCentreBasedCellPopulation<2, 2> &)) &RandomDirectionCentreBasedDivisionRule2_2::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.hpp b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.hpp new file mode 100644 index 00000000..be2dc4af --- /dev/null +++ b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef RandomDirectionCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper +#define RandomDirectionCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_RandomDirectionCentreBasedDivisionRule2_2_class(py::module &m); +#endif // RandomDirectionCentreBasedDivisionRule2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp new file mode 100644 index 00000000..c97eb2c3 --- /dev/null +++ b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "RandomDirectionCentreBasedDivisionRule.hpp" + +#include "RandomDirectionCentreBasedDivisionRule3_3.cppwg.hpp" + +namespace py = pybind11; +typedef RandomDirectionCentreBasedDivisionRule<3 > RandomDirectionCentreBasedDivisionRule3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::std::pair, boost::numeric::ublas::c_vector> _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_; + +class RandomDirectionCentreBasedDivisionRule3_3_Overloads : public RandomDirectionCentreBasedDivisionRule3_3{ + public: + using RandomDirectionCentreBasedDivisionRule3_3::RandomDirectionCentreBasedDivisionRule; + ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<3, 3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_, + RandomDirectionCentreBasedDivisionRule3_3, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + +}; +void register_RandomDirectionCentreBasedDivisionRule3_3_class(py::module &m){ +py::class_ , AbstractCentreBasedDivisionRule<3> >(m, "RandomDirectionCentreBasedDivisionRule3_3") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::std::pair, boost::numeric::ublas::c_vector>(RandomDirectionCentreBasedDivisionRule3_3::*)(::CellPtr, ::AbstractCentreBasedCellPopulation<3, 3> &)) &RandomDirectionCentreBasedDivisionRule3_3::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.hpp b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.hpp new file mode 100644 index 00000000..65ac131b --- /dev/null +++ b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef RandomDirectionCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper +#define RandomDirectionCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_RandomDirectionCentreBasedDivisionRule3_3_class(py::module &m); +#endif // RandomDirectionCentreBasedDivisionRule3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp new file mode 100644 index 00000000..43842ea6 --- /dev/null +++ b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ShortAxisImmersedBoundaryDivisionRule.hpp" + +#include "ShortAxisImmersedBoundaryDivisionRule2.cppwg.hpp" + +namespace py = pybind11; +typedef ShortAxisImmersedBoundaryDivisionRule<2 > ShortAxisImmersedBoundaryDivisionRule2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_2_gt_; + +class ShortAxisImmersedBoundaryDivisionRule2_Overloads : public ShortAxisImmersedBoundaryDivisionRule2{ + public: + using ShortAxisImmersedBoundaryDivisionRule2::ShortAxisImmersedBoundaryDivisionRule; + ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_2_gt_, + ShortAxisImmersedBoundaryDivisionRule2, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + +}; +void register_ShortAxisImmersedBoundaryDivisionRule2_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryDivisionRule<2> >(m, "ShortAxisImmersedBoundaryDivisionRule2") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::boost::numeric::ublas::c_vector(ShortAxisImmersedBoundaryDivisionRule2::*)(::CellPtr, ::ImmersedBoundaryCellPopulation<2> &)) &ShortAxisImmersedBoundaryDivisionRule2::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.hpp b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.hpp new file mode 100644 index 00000000..698c42e9 --- /dev/null +++ b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ShortAxisImmersedBoundaryDivisionRule2_hpp__pyplusplus_wrapper +#define ShortAxisImmersedBoundaryDivisionRule2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ShortAxisImmersedBoundaryDivisionRule2_class(py::module &m); +#endif // ShortAxisImmersedBoundaryDivisionRule2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp new file mode 100644 index 00000000..4e29095a --- /dev/null +++ b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ShortAxisImmersedBoundaryDivisionRule.hpp" + +#include "ShortAxisImmersedBoundaryDivisionRule3.cppwg.hpp" + +namespace py = pybind11; +typedef ShortAxisImmersedBoundaryDivisionRule<3 > ShortAxisImmersedBoundaryDivisionRule3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; + +class ShortAxisImmersedBoundaryDivisionRule3_Overloads : public ShortAxisImmersedBoundaryDivisionRule3{ + public: + using ShortAxisImmersedBoundaryDivisionRule3::ShortAxisImmersedBoundaryDivisionRule; + ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + ShortAxisImmersedBoundaryDivisionRule3, + CalculateCellDivisionVector, + pParentCell, +rCellPopulation); + } + +}; +void register_ShortAxisImmersedBoundaryDivisionRule3_class(py::module &m){ +py::class_ , AbstractImmersedBoundaryDivisionRule<3> >(m, "ShortAxisImmersedBoundaryDivisionRule3") + .def(py::init< >()) + .def( + "CalculateCellDivisionVector", + (::boost::numeric::ublas::c_vector(ShortAxisImmersedBoundaryDivisionRule3::*)(::CellPtr, ::ImmersedBoundaryCellPopulation<3> &)) &ShortAxisImmersedBoundaryDivisionRule3::CalculateCellDivisionVector, + " " , py::arg("pParentCell"), py::arg("rCellPopulation") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.hpp b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.hpp new file mode 100644 index 00000000..71f18d52 --- /dev/null +++ b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ShortAxisImmersedBoundaryDivisionRule3_hpp__pyplusplus_wrapper +#define ShortAxisImmersedBoundaryDivisionRule3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ShortAxisImmersedBoundaryDivisionRule3_class(py::module &m); +#endif // ShortAxisImmersedBoundaryDivisionRule3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp new file mode 100644 index 00000000..352d2c71 --- /dev/null +++ b/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp @@ -0,0 +1,133 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractElement.hpp" + +#include "AbstractElement1_2.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractElement<1,2 > AbstractElement1_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class AbstractElement1_2_Overloads : public AbstractElement1_2{ + public: + using AbstractElement1_2::AbstractElement; + void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractElement1_2, + UpdateNode, + rIndex, +pNode); + } + void MarkAsDeleted() override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractElement1_2, + MarkAsDeleted, + ); + } + void RegisterWithNodes() override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractElement1_2, + RegisterWithNodes, + ); + } + +}; +void register_AbstractElement1_2_class(py::module &m){ +py::class_ >(m, "AbstractElement1_2") + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def(py::init(), py::arg("index") = ::INDEX_IS_NOT_USED) + .def( + "UpdateNode", + (void(AbstractElement1_2::*)(unsigned int const &, ::Node<2> *)) &AbstractElement1_2::UpdateNode, + " " , py::arg("rIndex"), py::arg("pNode") ) + .def( + "ReplaceNode", + (void(AbstractElement1_2::*)(::Node<2> *, ::Node<2> *)) &AbstractElement1_2::ReplaceNode, + " " , py::arg("pOldNode"), py::arg("pNewNode") ) + .def( + "MarkAsDeleted", + (void(AbstractElement1_2::*)()) &AbstractElement1_2::MarkAsDeleted, + " " ) + .def( + "RegisterWithNodes", + (void(AbstractElement1_2::*)()) &AbstractElement1_2::RegisterWithNodes, + " " ) + .def( + "GetNodeLocation", + (double(AbstractElement1_2::*)(unsigned int, unsigned int) const ) &AbstractElement1_2::GetNodeLocation, + " " , py::arg("localIndex"), py::arg("dimension") ) + .def( + "GetNodeLocation", + (::boost::numeric::ublas::c_vector(AbstractElement1_2::*)(unsigned int) const ) &AbstractElement1_2::GetNodeLocation, + " " , py::arg("localIndex") ) + .def( + "GetNodeGlobalIndex", + (unsigned int(AbstractElement1_2::*)(unsigned int) const ) &AbstractElement1_2::GetNodeGlobalIndex, + " " , py::arg("localIndex") ) + .def( + "GetNode", + (::Node<2> *(AbstractElement1_2::*)(unsigned int) const ) &AbstractElement1_2::GetNode, + " " , py::arg("localIndex") , py::return_value_policy::reference) + .def( + "GetNumNodes", + (unsigned int(AbstractElement1_2::*)() const ) &AbstractElement1_2::GetNumNodes, + " " ) + .def( + "AddNode", + (void(AbstractElement1_2::*)(::Node<2> *)) &AbstractElement1_2::AddNode, + " " , py::arg("pNode") ) + .def( + "IsDeleted", + (bool(AbstractElement1_2::*)() const ) &AbstractElement1_2::IsDeleted, + " " ) + .def( + "GetIndex", + (unsigned int(AbstractElement1_2::*)() const ) &AbstractElement1_2::GetIndex, + " " ) + .def( + "SetIndex", + (void(AbstractElement1_2::*)(unsigned int)) &AbstractElement1_2::SetIndex, + " " , py::arg("index") ) + .def( + "GetOwnership", + (bool(AbstractElement1_2::*)() const ) &AbstractElement1_2::GetOwnership, + " " ) + .def( + "SetOwnership", + (void(AbstractElement1_2::*)(bool)) &AbstractElement1_2::SetOwnership, + " " , py::arg("ownership") ) + .def( + "SetAttribute", + (void(AbstractElement1_2::*)(double)) &AbstractElement1_2::SetAttribute, + " " , py::arg("attribute") ) + .def( + "GetAttribute", + (double(AbstractElement1_2::*)()) &AbstractElement1_2::GetAttribute, + " " ) + .def( + "GetUnsignedAttribute", + (unsigned int(AbstractElement1_2::*)()) &AbstractElement1_2::GetUnsignedAttribute, + " " ) + .def( + "AddElementAttribute", + (void(AbstractElement1_2::*)(double)) &AbstractElement1_2::AddElementAttribute, + " " , py::arg("attribute") ) + .def( + "rGetElementAttributes", + (::std::vector &(AbstractElement1_2::*)()) &AbstractElement1_2::rGetElementAttributes, + " " , py::return_value_policy::reference_internal) + .def( + "GetNumElementAttributes", + (unsigned int(AbstractElement1_2::*)()) &AbstractElement1_2::GetNumElementAttributes, + " " ) + ; +} diff --git a/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.hpp b/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.hpp new file mode 100644 index 00000000..6a1151e9 --- /dev/null +++ b/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractElement1_2_hpp__pyplusplus_wrapper +#define AbstractElement1_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractElement1_2_class(py::module &m); +#endif // AbstractElement1_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp new file mode 100644 index 00000000..314ff3d2 --- /dev/null +++ b/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp @@ -0,0 +1,133 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractElement.hpp" + +#include "AbstractElement2_3.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractElement<2,3 > AbstractElement2_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class AbstractElement2_3_Overloads : public AbstractElement2_3{ + public: + using AbstractElement2_3::AbstractElement; + void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractElement2_3, + UpdateNode, + rIndex, +pNode); + } + void MarkAsDeleted() override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractElement2_3, + MarkAsDeleted, + ); + } + void RegisterWithNodes() override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractElement2_3, + RegisterWithNodes, + ); + } + +}; +void register_AbstractElement2_3_class(py::module &m){ +py::class_ >(m, "AbstractElement2_3") + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def(py::init(), py::arg("index") = ::INDEX_IS_NOT_USED) + .def( + "UpdateNode", + (void(AbstractElement2_3::*)(unsigned int const &, ::Node<3> *)) &AbstractElement2_3::UpdateNode, + " " , py::arg("rIndex"), py::arg("pNode") ) + .def( + "ReplaceNode", + (void(AbstractElement2_3::*)(::Node<3> *, ::Node<3> *)) &AbstractElement2_3::ReplaceNode, + " " , py::arg("pOldNode"), py::arg("pNewNode") ) + .def( + "MarkAsDeleted", + (void(AbstractElement2_3::*)()) &AbstractElement2_3::MarkAsDeleted, + " " ) + .def( + "RegisterWithNodes", + (void(AbstractElement2_3::*)()) &AbstractElement2_3::RegisterWithNodes, + " " ) + .def( + "GetNodeLocation", + (double(AbstractElement2_3::*)(unsigned int, unsigned int) const ) &AbstractElement2_3::GetNodeLocation, + " " , py::arg("localIndex"), py::arg("dimension") ) + .def( + "GetNodeLocation", + (::boost::numeric::ublas::c_vector(AbstractElement2_3::*)(unsigned int) const ) &AbstractElement2_3::GetNodeLocation, + " " , py::arg("localIndex") ) + .def( + "GetNodeGlobalIndex", + (unsigned int(AbstractElement2_3::*)(unsigned int) const ) &AbstractElement2_3::GetNodeGlobalIndex, + " " , py::arg("localIndex") ) + .def( + "GetNode", + (::Node<3> *(AbstractElement2_3::*)(unsigned int) const ) &AbstractElement2_3::GetNode, + " " , py::arg("localIndex") , py::return_value_policy::reference) + .def( + "GetNumNodes", + (unsigned int(AbstractElement2_3::*)() const ) &AbstractElement2_3::GetNumNodes, + " " ) + .def( + "AddNode", + (void(AbstractElement2_3::*)(::Node<3> *)) &AbstractElement2_3::AddNode, + " " , py::arg("pNode") ) + .def( + "IsDeleted", + (bool(AbstractElement2_3::*)() const ) &AbstractElement2_3::IsDeleted, + " " ) + .def( + "GetIndex", + (unsigned int(AbstractElement2_3::*)() const ) &AbstractElement2_3::GetIndex, + " " ) + .def( + "SetIndex", + (void(AbstractElement2_3::*)(unsigned int)) &AbstractElement2_3::SetIndex, + " " , py::arg("index") ) + .def( + "GetOwnership", + (bool(AbstractElement2_3::*)() const ) &AbstractElement2_3::GetOwnership, + " " ) + .def( + "SetOwnership", + (void(AbstractElement2_3::*)(bool)) &AbstractElement2_3::SetOwnership, + " " , py::arg("ownership") ) + .def( + "SetAttribute", + (void(AbstractElement2_3::*)(double)) &AbstractElement2_3::SetAttribute, + " " , py::arg("attribute") ) + .def( + "GetAttribute", + (double(AbstractElement2_3::*)()) &AbstractElement2_3::GetAttribute, + " " ) + .def( + "GetUnsignedAttribute", + (unsigned int(AbstractElement2_3::*)()) &AbstractElement2_3::GetUnsignedAttribute, + " " ) + .def( + "AddElementAttribute", + (void(AbstractElement2_3::*)(double)) &AbstractElement2_3::AddElementAttribute, + " " , py::arg("attribute") ) + .def( + "rGetElementAttributes", + (::std::vector &(AbstractElement2_3::*)()) &AbstractElement2_3::rGetElementAttributes, + " " , py::return_value_policy::reference_internal) + .def( + "GetNumElementAttributes", + (unsigned int(AbstractElement2_3::*)()) &AbstractElement2_3::GetNumElementAttributes, + " " ) + ; +} diff --git a/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.hpp b/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.hpp new file mode 100644 index 00000000..b20cb880 --- /dev/null +++ b/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractElement2_3_hpp__pyplusplus_wrapper +#define AbstractElement2_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractElement2_3_class(py::module &m); +#endif // AbstractElement2_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/FluidSource2.cppwg.cpp b/dynamic/wrappers/mesh/FluidSource2.cppwg.cpp new file mode 100644 index 00000000..ee354d31 --- /dev/null +++ b/dynamic/wrappers/mesh/FluidSource2.cppwg.cpp @@ -0,0 +1,67 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "FluidSource.hpp" + +#include "FluidSource2.cppwg.hpp" + +namespace py = pybind11; +typedef FluidSource<2 > FluidSource2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +void register_FluidSource2_class(py::module &m){ +py::class_ >(m, "FluidSource2") + .def(py::init >(), py::arg("index"), py::arg("point")) + .def(py::init >(), py::arg("index"), py::arg("location")) + .def(py::init(), py::arg("index"), py::arg("v1") = 0., py::arg("v2") = 0., py::arg("v3") = 0.) + .def( + "GetIndex", + (unsigned int(FluidSource2::*)() const ) &FluidSource2::GetIndex, + " " ) + .def( + "SetIndex", + (void(FluidSource2::*)(unsigned int)) &FluidSource2::SetIndex, + " " , py::arg("index") ) + .def( + "GetPoint", + (::ChastePoint<2>(FluidSource2::*)() const ) &FluidSource2::GetPoint, + " " ) + .def( + "rGetLocation", + (::boost::numeric::ublas::c_vector const &(FluidSource2::*)() const ) &FluidSource2::rGetLocation, + " " , py::return_value_policy::reference_internal) + .def( + "rGetModifiableLocation", + (::boost::numeric::ublas::c_vector &(FluidSource2::*)()) &FluidSource2::rGetModifiableLocation, + " " , py::return_value_policy::reference_internal) + .def( + "GetStrength", + (double(FluidSource2::*)() const ) &FluidSource2::GetStrength, + " " ) + .def( + "SetStrength", + (void(FluidSource2::*)(double)) &FluidSource2::SetStrength, + " " , py::arg("strength") ) + .def( + "SetIfSourceIsAssociatedWithElement", + (void(FluidSource2::*)(bool)) &FluidSource2::SetIfSourceIsAssociatedWithElement, + " " , py::arg("associated") ) + .def( + "IsSourceAssociatedWithElement", + (bool(FluidSource2::*)()) &FluidSource2::IsSourceAssociatedWithElement, + " " ) + .def( + "GetAssociatedElementIndex", + (unsigned int(FluidSource2::*)() const ) &FluidSource2::GetAssociatedElementIndex, + " " ) + .def( + "SetAssociatedElementIndex", + (void(FluidSource2::*)(unsigned int)) &FluidSource2::SetAssociatedElementIndex, + " " , py::arg("associatedElementIndex") ) + ; +} diff --git a/dynamic/wrappers/mesh/FluidSource2.cppwg.hpp b/dynamic/wrappers/mesh/FluidSource2.cppwg.hpp new file mode 100644 index 00000000..ef7adf18 --- /dev/null +++ b/dynamic/wrappers/mesh/FluidSource2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef FluidSource2_hpp__pyplusplus_wrapper +#define FluidSource2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_FluidSource2_class(py::module &m); +#endif // FluidSource2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/FluidSource3.cppwg.cpp b/dynamic/wrappers/mesh/FluidSource3.cppwg.cpp new file mode 100644 index 00000000..76c13407 --- /dev/null +++ b/dynamic/wrappers/mesh/FluidSource3.cppwg.cpp @@ -0,0 +1,67 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "FluidSource.hpp" + +#include "FluidSource3.cppwg.hpp" + +namespace py = pybind11; +typedef FluidSource<3 > FluidSource3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +void register_FluidSource3_class(py::module &m){ +py::class_ >(m, "FluidSource3") + .def(py::init >(), py::arg("index"), py::arg("point")) + .def(py::init >(), py::arg("index"), py::arg("location")) + .def(py::init(), py::arg("index"), py::arg("v1") = 0., py::arg("v2") = 0., py::arg("v3") = 0.) + .def( + "GetIndex", + (unsigned int(FluidSource3::*)() const ) &FluidSource3::GetIndex, + " " ) + .def( + "SetIndex", + (void(FluidSource3::*)(unsigned int)) &FluidSource3::SetIndex, + " " , py::arg("index") ) + .def( + "GetPoint", + (::ChastePoint<3>(FluidSource3::*)() const ) &FluidSource3::GetPoint, + " " ) + .def( + "rGetLocation", + (::boost::numeric::ublas::c_vector const &(FluidSource3::*)() const ) &FluidSource3::rGetLocation, + " " , py::return_value_policy::reference_internal) + .def( + "rGetModifiableLocation", + (::boost::numeric::ublas::c_vector &(FluidSource3::*)()) &FluidSource3::rGetModifiableLocation, + " " , py::return_value_policy::reference_internal) + .def( + "GetStrength", + (double(FluidSource3::*)() const ) &FluidSource3::GetStrength, + " " ) + .def( + "SetStrength", + (void(FluidSource3::*)(double)) &FluidSource3::SetStrength, + " " , py::arg("strength") ) + .def( + "SetIfSourceIsAssociatedWithElement", + (void(FluidSource3::*)(bool)) &FluidSource3::SetIfSourceIsAssociatedWithElement, + " " , py::arg("associated") ) + .def( + "IsSourceAssociatedWithElement", + (bool(FluidSource3::*)()) &FluidSource3::IsSourceAssociatedWithElement, + " " ) + .def( + "GetAssociatedElementIndex", + (unsigned int(FluidSource3::*)() const ) &FluidSource3::GetAssociatedElementIndex, + " " ) + .def( + "SetAssociatedElementIndex", + (void(FluidSource3::*)(unsigned int)) &FluidSource3::SetAssociatedElementIndex, + " " , py::arg("associatedElementIndex") ) + ; +} diff --git a/dynamic/wrappers/mesh/FluidSource3.cppwg.hpp b/dynamic/wrappers/mesh/FluidSource3.cppwg.hpp new file mode 100644 index 00000000..62bc931d --- /dev/null +++ b/dynamic/wrappers/mesh/FluidSource3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef FluidSource3_hpp__pyplusplus_wrapper +#define FluidSource3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_FluidSource3_class(py::module &m); +#endif // FluidSource3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp new file mode 100644 index 00000000..d81d17ad --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp @@ -0,0 +1,61 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryElement.hpp" + +#include "ImmersedBoundaryElement1_2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryElement<1,2 > ImmersedBoundaryElement1_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryElement1_2_Overloads : public ImmersedBoundaryElement1_2{ + public: + using ImmersedBoundaryElement1_2::ImmersedBoundaryElement; + bool IsElementOnBoundary() const override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryElement1_2, + IsElementOnBoundary, + ); + } + +}; +void register_ImmersedBoundaryElement1_2_class(py::module &m){ +py::class_ , MutableElement<1, 2> >(m, "ImmersedBoundaryElement1_2") + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "SetFluidSource", + (void(ImmersedBoundaryElement1_2::*)(::std::shared_ptr>)) &ImmersedBoundaryElement1_2::SetFluidSource, + " " , py::arg("fluidSource") ) + .def( + "GetFluidSource", + (::std::shared_ptr>(ImmersedBoundaryElement1_2::*)()) &ImmersedBoundaryElement1_2::GetFluidSource, + " " ) + .def( + "rGetCornerNodes", + (::std::vector *> &(ImmersedBoundaryElement1_2::*)()) &ImmersedBoundaryElement1_2::rGetCornerNodes, + " " , py::return_value_policy::reference_internal) + .def( + "GetAverageNodeSpacing", + (double(ImmersedBoundaryElement1_2::*)()) &ImmersedBoundaryElement1_2::GetAverageNodeSpacing, + " " ) + .def( + "SetAverageNodeSpacing", + (void(ImmersedBoundaryElement1_2::*)(double)) &ImmersedBoundaryElement1_2::SetAverageNodeSpacing, + " " , py::arg("averageNodeSpacing") ) + .def( + "IsElementOnBoundary", + (bool(ImmersedBoundaryElement1_2::*)() const ) &ImmersedBoundaryElement1_2::IsElementOnBoundary, + " " ) + .def( + "SetIsBoundaryElement", + (void(ImmersedBoundaryElement1_2::*)(bool)) &ImmersedBoundaryElement1_2::SetIsBoundaryElement, + " " , py::arg("isBoundaryElement") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.hpp new file mode 100644 index 00000000..4932aad6 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryElement1_2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryElement1_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryElement1_2_class(py::module &m); +#endif // ImmersedBoundaryElement1_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp new file mode 100644 index 00000000..8ceb9d01 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp @@ -0,0 +1,61 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryElement.hpp" + +#include "ImmersedBoundaryElement2_2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryElement<2,2 > ImmersedBoundaryElement2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryElement2_2_Overloads : public ImmersedBoundaryElement2_2{ + public: + using ImmersedBoundaryElement2_2::ImmersedBoundaryElement; + bool IsElementOnBoundary() const override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryElement2_2, + IsElementOnBoundary, + ); + } + +}; +void register_ImmersedBoundaryElement2_2_class(py::module &m){ +py::class_ , MutableElement<2, 2> >(m, "ImmersedBoundaryElement2_2") + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "SetFluidSource", + (void(ImmersedBoundaryElement2_2::*)(::std::shared_ptr>)) &ImmersedBoundaryElement2_2::SetFluidSource, + " " , py::arg("fluidSource") ) + .def( + "GetFluidSource", + (::std::shared_ptr>(ImmersedBoundaryElement2_2::*)()) &ImmersedBoundaryElement2_2::GetFluidSource, + " " ) + .def( + "rGetCornerNodes", + (::std::vector *> &(ImmersedBoundaryElement2_2::*)()) &ImmersedBoundaryElement2_2::rGetCornerNodes, + " " , py::return_value_policy::reference_internal) + .def( + "GetAverageNodeSpacing", + (double(ImmersedBoundaryElement2_2::*)()) &ImmersedBoundaryElement2_2::GetAverageNodeSpacing, + " " ) + .def( + "SetAverageNodeSpacing", + (void(ImmersedBoundaryElement2_2::*)(double)) &ImmersedBoundaryElement2_2::SetAverageNodeSpacing, + " " , py::arg("averageNodeSpacing") ) + .def( + "IsElementOnBoundary", + (bool(ImmersedBoundaryElement2_2::*)() const ) &ImmersedBoundaryElement2_2::IsElementOnBoundary, + " " ) + .def( + "SetIsBoundaryElement", + (void(ImmersedBoundaryElement2_2::*)(bool)) &ImmersedBoundaryElement2_2::SetIsBoundaryElement, + " " , py::arg("isBoundaryElement") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.hpp new file mode 100644 index 00000000..58e676f6 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryElement2_2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryElement2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryElement2_2_class(py::module &m); +#endif // ImmersedBoundaryElement2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp new file mode 100644 index 00000000..eb5a536e --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp @@ -0,0 +1,61 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryElement.hpp" + +#include "ImmersedBoundaryElement2_3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryElement<2,3 > ImmersedBoundaryElement2_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryElement2_3_Overloads : public ImmersedBoundaryElement2_3{ + public: + using ImmersedBoundaryElement2_3::ImmersedBoundaryElement; + bool IsElementOnBoundary() const override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryElement2_3, + IsElementOnBoundary, + ); + } + +}; +void register_ImmersedBoundaryElement2_3_class(py::module &m){ +py::class_ , MutableElement<2, 3> >(m, "ImmersedBoundaryElement2_3") + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "SetFluidSource", + (void(ImmersedBoundaryElement2_3::*)(::std::shared_ptr>)) &ImmersedBoundaryElement2_3::SetFluidSource, + " " , py::arg("fluidSource") ) + .def( + "GetFluidSource", + (::std::shared_ptr>(ImmersedBoundaryElement2_3::*)()) &ImmersedBoundaryElement2_3::GetFluidSource, + " " ) + .def( + "rGetCornerNodes", + (::std::vector *> &(ImmersedBoundaryElement2_3::*)()) &ImmersedBoundaryElement2_3::rGetCornerNodes, + " " , py::return_value_policy::reference_internal) + .def( + "GetAverageNodeSpacing", + (double(ImmersedBoundaryElement2_3::*)()) &ImmersedBoundaryElement2_3::GetAverageNodeSpacing, + " " ) + .def( + "SetAverageNodeSpacing", + (void(ImmersedBoundaryElement2_3::*)(double)) &ImmersedBoundaryElement2_3::SetAverageNodeSpacing, + " " , py::arg("averageNodeSpacing") ) + .def( + "IsElementOnBoundary", + (bool(ImmersedBoundaryElement2_3::*)() const ) &ImmersedBoundaryElement2_3::IsElementOnBoundary, + " " ) + .def( + "SetIsBoundaryElement", + (void(ImmersedBoundaryElement2_3::*)(bool)) &ImmersedBoundaryElement2_3::SetIsBoundaryElement, + " " , py::arg("isBoundaryElement") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.hpp new file mode 100644 index 00000000..813eac7c --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryElement2_3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryElement2_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryElement2_3_class(py::module &m); +#endif // ImmersedBoundaryElement2_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp new file mode 100644 index 00000000..76b7617d --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp @@ -0,0 +1,61 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryElement.hpp" + +#include "ImmersedBoundaryElement3_3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryElement<3,3 > ImmersedBoundaryElement3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ImmersedBoundaryElement3_3_Overloads : public ImmersedBoundaryElement3_3{ + public: + using ImmersedBoundaryElement3_3::ImmersedBoundaryElement; + bool IsElementOnBoundary() const override { + PYBIND11_OVERLOAD( + bool, + ImmersedBoundaryElement3_3, + IsElementOnBoundary, + ); + } + +}; +void register_ImmersedBoundaryElement3_3_class(py::module &m){ +py::class_ , MutableElement<3, 3> >(m, "ImmersedBoundaryElement3_3") + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "SetFluidSource", + (void(ImmersedBoundaryElement3_3::*)(::std::shared_ptr>)) &ImmersedBoundaryElement3_3::SetFluidSource, + " " , py::arg("fluidSource") ) + .def( + "GetFluidSource", + (::std::shared_ptr>(ImmersedBoundaryElement3_3::*)()) &ImmersedBoundaryElement3_3::GetFluidSource, + " " ) + .def( + "rGetCornerNodes", + (::std::vector *> &(ImmersedBoundaryElement3_3::*)()) &ImmersedBoundaryElement3_3::rGetCornerNodes, + " " , py::return_value_policy::reference_internal) + .def( + "GetAverageNodeSpacing", + (double(ImmersedBoundaryElement3_3::*)()) &ImmersedBoundaryElement3_3::GetAverageNodeSpacing, + " " ) + .def( + "SetAverageNodeSpacing", + (void(ImmersedBoundaryElement3_3::*)(double)) &ImmersedBoundaryElement3_3::SetAverageNodeSpacing, + " " , py::arg("averageNodeSpacing") ) + .def( + "IsElementOnBoundary", + (bool(ImmersedBoundaryElement3_3::*)() const ) &ImmersedBoundaryElement3_3::IsElementOnBoundary, + " " ) + .def( + "SetIsBoundaryElement", + (void(ImmersedBoundaryElement3_3::*)(bool)) &ImmersedBoundaryElement3_3::SetIsBoundaryElement, + " " , py::arg("isBoundaryElement") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.hpp new file mode 100644 index 00000000..fa4fa138 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryElement3_3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryElement3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryElement3_3_class(py::module &m); +#endif // ImmersedBoundaryElement3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.cpp new file mode 100644 index 00000000..f5ec8ade --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.cpp @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryHoneycombMeshGenerator.hpp" + +#include "ImmersedBoundaryHoneycombMeshGenerator.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryHoneycombMeshGenerator ImmersedBoundaryHoneycombMeshGenerator; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +void register_ImmersedBoundaryHoneycombMeshGenerator_class(py::module &m){ +py::class_ >(m, "ImmersedBoundaryHoneycombMeshGenerator") + .def(py::init(), py::arg("numElementsX"), py::arg("numElementsY"), py::arg("numNodesPerEdge"), py::arg("proportionalGap"), py::arg("padding")) + .def(py::init< >()) + .def( + "GetMesh", + (::ImmersedBoundaryMesh<2, 2> *(ImmersedBoundaryHoneycombMeshGenerator::*)()) &ImmersedBoundaryHoneycombMeshGenerator::GetMesh, + " " , py::return_value_policy::reference) + .def( + "GetUnitHexagon", + (::std::vector>(ImmersedBoundaryHoneycombMeshGenerator::*)(unsigned int)) &ImmersedBoundaryHoneycombMeshGenerator::GetUnitHexagon, + " " , py::arg("numPtsPerSide") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.hpp new file mode 100644 index 00000000..cff18946 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryHoneycombMeshGenerator.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryHoneycombMeshGenerator_hpp__pyplusplus_wrapper +#define ImmersedBoundaryHoneycombMeshGenerator_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryHoneycombMeshGenerator_class(py::module &m); +#endif // ImmersedBoundaryHoneycombMeshGenerator_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp new file mode 100644 index 00000000..3dee6ee4 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp @@ -0,0 +1,357 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryMesh.hpp" + +#include "ImmersedBoundaryMesh2_2.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryMesh<2,2 > ImmersedBoundaryMesh2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef unsigned int unsignedint; +typedef unsigned int unsignedint; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_2_gt_; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_2_gt_; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; +typedef unsigned int unsignedint; + +class ImmersedBoundaryMesh2_2_Overloads : public ImmersedBoundaryMesh2_2{ + public: + using ImmersedBoundaryMesh2_2::ImmersedBoundaryMesh; + unsigned int GetNumNodes() const override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryMesh2_2, + GetNumNodes, + ); + } + unsigned int GetNumElements() const override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryMesh2_2, + GetNumElements, + ); + } + ::boost::numeric::ublas::c_vector GetVectorFromAtoB(::boost::numeric::ublas::c_vector const & rLocation1, ::boost::numeric::ublas::c_vector const & rLocation2) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_2_gt_, + ImmersedBoundaryMesh2_2, + GetVectorFromAtoB, + rLocation1, +rLocation2); + } + ::boost::numeric::ublas::c_vector GetCentroidOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_2_gt_, + ImmersedBoundaryMesh2_2, + GetCentroidOfElement, + index); + } + void Clear() override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMesh2_2, + Clear, + ); + } + double GetVolumeOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryMesh2_2, + GetVolumeOfElement, + index); + } + double GetSurfaceAreaOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryMesh2_2, + GetSurfaceAreaOfElement, + index); + } + ::boost::numeric::ublas::c_vector CalculateMomentsOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + ImmersedBoundaryMesh2_2, + CalculateMomentsOfElement, + index); + } + unsigned int SolveNodeMapping(unsigned int index) const override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryMesh2_2, + SolveNodeMapping, + index); + } + +}; +void register_ImmersedBoundaryMesh2_2_class(py::module &m){ +py::class_ , AbstractMesh<2, 2> >(m, "ImmersedBoundaryMesh2_2") + .def(py::init<::std::vector *>, ::std::vector *>, ::std::vector *>, unsigned int, unsigned int >(), py::arg("nodes"), py::arg("elements"), py::arg("laminas") = std::vector *>{}, py::arg("numGridPtsX") = 128U, py::arg("numGridPtsY") = 128U) + .def(py::init< >()) + .def( + "rGetNodes", + (::std::vector *> const &(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::rGetNodes, + " " , py::return_value_policy::reference_internal) + .def( + "GetElementIteratorBegin", + (::ImmersedBoundaryMesh<2, 2>::ImmersedBoundaryElementIterator(ImmersedBoundaryMesh2_2::*)(bool)) &ImmersedBoundaryMesh2_2::GetElementIteratorBegin, + " " , py::arg("skipDeletedElements") = true ) + .def( + "GetElementIteratorEnd", + (::ImmersedBoundaryMesh<2, 2>::ImmersedBoundaryElementIterator(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::GetElementIteratorEnd, + " " ) + .def( + "GetLaminaIteratorBegin", + (::ImmersedBoundaryMesh<2, 2>::ImmersedBoundaryLaminaIterator(ImmersedBoundaryMesh2_2::*)(bool)) &ImmersedBoundaryMesh2_2::GetLaminaIteratorBegin, + " " , py::arg("skipDeletedLaminas") = true ) + .def( + "GetLaminaIteratorEnd", + (::ImmersedBoundaryMesh<2, 2>::ImmersedBoundaryLaminaIterator(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::GetLaminaIteratorEnd, + " " ) + .def( + "GetNumNodes", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNumNodes, + " " ) + .def( + "GetNumElements", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNumElements, + " " ) + .def( + "GetNumAllElements", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNumAllElements, + " " ) + .def( + "GetNumLaminas", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNumLaminas, + " " ) + .def( + "GetNumGridPtsX", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNumGridPtsX, + " " ) + .def( + "GetNumGridPtsY", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNumGridPtsY, + " " ) + .def( + "GetCharacteristicNodeSpacing", + (double(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetCharacteristicNodeSpacing, + " " ) + .def( + "GetSpacingRatio", + (double(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetSpacingRatio, + " " ) + .def( + "GetMaxNodeIndex", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetMaxNodeIndex, + " " ) + .def( + "GetMaxElementIndex", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetMaxElementIndex, + " " ) + .def( + "GetMaxLaminaIndex", + (unsigned int(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetMaxLaminaIndex, + " " ) + .def( + "GetVectorFromAtoB", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh2_2::*)(::boost::numeric::ublas::c_vector const &, ::boost::numeric::ublas::c_vector const &)) &ImmersedBoundaryMesh2_2::GetVectorFromAtoB, + " " , py::arg("rLocation1"), py::arg("rLocation2") ) + .def( + "SetNode", + (void(ImmersedBoundaryMesh2_2::*)(unsigned int, ::ChastePoint<2>)) &ImmersedBoundaryMesh2_2::SetNode, + " " , py::arg("nodeIndex"), py::arg("point") ) + .def( + "ConformToGeometry", + (void(ImmersedBoundaryMesh2_2::*)(::boost::numeric::ublas::c_vector &)) &ImmersedBoundaryMesh2_2::ConformToGeometry, + " " , py::arg("rLocation") ) + .def( + "rGet2dVelocityGrids", + (::boost::multi_array const &(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::rGet2dVelocityGrids, + " " , py::return_value_policy::reference_internal) + .def( + "rGetModifiable2dVelocityGrids", + (::boost::multi_array &(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::rGetModifiable2dVelocityGrids, + " " , py::return_value_policy::reference_internal) + .def( + "SetNumGridPtsX", + (void(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::SetNumGridPtsX, + " " , py::arg("meshPointsX") ) + .def( + "SetNumGridPtsY", + (void(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::SetNumGridPtsY, + " " , py::arg("meshPointsY") ) + .def( + "SetNumGridPtsXAndY", + (void(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::SetNumGridPtsXAndY, + " " , py::arg("numGridPts") ) + .def( + "SetCharacteristicNodeSpacing", + (void(ImmersedBoundaryMesh2_2::*)(double)) &ImmersedBoundaryMesh2_2::SetCharacteristicNodeSpacing, + " " , py::arg("nodeSpacing") ) + .def( + "AddNode", + (unsigned int(ImmersedBoundaryMesh2_2::*)(::Node<2> *)) &ImmersedBoundaryMesh2_2::AddNode, + " " , py::arg("pNewNode") ) + .def( + "rGetElementFluidSources", + (::std::vector>> &(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::rGetElementFluidSources, + " " , py::return_value_policy::reference_internal) + .def( + "rGetBalancingFluidSources", + (::std::vector>> &(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::rGetBalancingFluidSources, + " " , py::return_value_policy::reference_internal) + .def( + "GetNeighbouringNodeIndices", + (::std::set(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetNeighbouringNodeIndices, + " " , py::arg("nodeIndex") ) + .def( + "GetElement", + (::ImmersedBoundaryElement<2, 2> *(ImmersedBoundaryMesh2_2::*)(unsigned int) const ) &ImmersedBoundaryMesh2_2::GetElement, + " " , py::arg("index") , py::return_value_policy::reference) + .def( + "GetLamina", + (::ImmersedBoundaryElement<1, 2> *(ImmersedBoundaryMesh2_2::*)(unsigned int) const ) &ImmersedBoundaryMesh2_2::GetLamina, + " " , py::arg("index") , py::return_value_policy::reference) + .def( + "GetCentroidOfElement", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetCentroidOfElement, + " " , py::arg("index") ) + .def( + "ConstructFromMeshReader", + (void(ImmersedBoundaryMesh2_2::*)(::AbstractMeshReader<2, 2> &)) &ImmersedBoundaryMesh2_2::ConstructFromMeshReader, + " " , py::arg("rMeshReader") ) + .def( + "Clear", + (void(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::Clear, + " " ) + .def( + "GetVolumeOfElement", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetVolumeOfElement, + " " , py::arg("index") ) + .def( + "GetSurfaceAreaOfElement", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetSurfaceAreaOfElement, + " " , py::arg("index") ) + .def( + "GetVoronoiSurfaceAreaOfElement", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetVoronoiSurfaceAreaOfElement, + " " , py::arg("elemIdx") ) + .def( + "GetAverageNodeSpacingOfElement", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int, bool)) &ImmersedBoundaryMesh2_2::GetAverageNodeSpacingOfElement, + " " , py::arg("index"), py::arg("recalculate") = true ) + .def( + "GetAverageNodeSpacingOfLamina", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int, bool)) &ImmersedBoundaryMesh2_2::GetAverageNodeSpacingOfLamina, + " " , py::arg("index"), py::arg("recalculate") = true ) + .def( + "CalculateMomentsOfElement", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::CalculateMomentsOfElement, + " " , py::arg("index") ) + .def( + "GetElongationShapeFactorOfElement", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetElongationShapeFactorOfElement, + " " , py::arg("elementIndex") ) + .def( + "GetTortuosityOfMesh", + (double(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::GetTortuosityOfMesh, + " " ) + .def( + "GetSkewnessOfElementMassDistributionAboutAxis", + (double(ImmersedBoundaryMesh2_2::*)(unsigned int, ::boost::numeric::ublas::c_vector)) &ImmersedBoundaryMesh2_2::GetSkewnessOfElementMassDistributionAboutAxis, + " " , py::arg("elemIndex"), py::arg("axis") ) + .def( + "CalculateBoundingBoxOfElement", + (::ChasteCuboid<2>(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::CalculateBoundingBoxOfElement, + " " , py::arg("index") ) + .def( + "GetShortAxisOfElement", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetShortAxisOfElement, + " " , py::arg("index") ) + .def( + "DivideElementAlongGivenAxis", + (unsigned int(ImmersedBoundaryMesh2_2::*)(::ImmersedBoundaryElement<2, 2> *, ::boost::numeric::ublas::c_vector, bool)) &ImmersedBoundaryMesh2_2::DivideElementAlongGivenAxis, + " " , py::arg("pElement"), py::arg("axisOfDivision"), py::arg("placeOriginalElementBelow") = false ) + .def( + "DivideElementAlongShortAxis", + (unsigned int(ImmersedBoundaryMesh2_2::*)(::ImmersedBoundaryElement<2, 2> *, bool)) &ImmersedBoundaryMesh2_2::DivideElementAlongShortAxis, + " " , py::arg("pElement"), py::arg("placeOriginalElementBelow") = false ) + .def( + "GetElementDivisionSpacing", + (double(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::GetElementDivisionSpacing, + " " ) + .def( + "SetElementDivisionSpacing", + (void(ImmersedBoundaryMesh2_2::*)(double)) &ImmersedBoundaryMesh2_2::SetElementDivisionSpacing, + " " , py::arg("elementDivisionSpacing") ) + .def( + "GetNeighbourDist", + (double(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetNeighbourDist, + " " ) + .def( + "SetCellRearrangementThreshold", + (void(ImmersedBoundaryMesh2_2::*)(double)) &ImmersedBoundaryMesh2_2::SetCellRearrangementThreshold, + " " , py::arg("cellRearrangementThreshold") ) + .def( + "GetCellRearrangementThreshold", + (double(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::GetCellRearrangementThreshold, + " " ) + .def( + "SetNeighbourDist", + (void(ImmersedBoundaryMesh2_2::*)(double)) &ImmersedBoundaryMesh2_2::SetNeighbourDist, + " " , py::arg("neighbourDist") ) + .def( + "UpdateNodeLocationsVoronoiDiagramIfOutOfDate", + (void(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::UpdateNodeLocationsVoronoiDiagramIfOutOfDate, + " " ) + .def( + "ReMesh", + (void(ImmersedBoundaryMesh2_2::*)(bool)) &ImmersedBoundaryMesh2_2::ReMesh, + " " , py::arg("randomOrder") = false ) + .def( + "ReMeshElement", + (void(ImmersedBoundaryMesh2_2::*)(::ImmersedBoundaryElement<2, 2> *, bool)) &ImmersedBoundaryMesh2_2::ReMeshElement, + " " , py::arg("pElement"), py::arg("randomOrder") ) + .def( + "ReMeshLamina", + (void(ImmersedBoundaryMesh2_2::*)(::ImmersedBoundaryElement<1, 2> *, bool)) &ImmersedBoundaryMesh2_2::ReMeshLamina, + " " , py::arg("pLamina"), py::arg("randomOrder") ) + .def( + "NodesInDifferentElementOrLamina", + (bool(ImmersedBoundaryMesh2_2::*)(::Node<2> *, ::Node<2> *)) &ImmersedBoundaryMesh2_2::NodesInDifferentElementOrLamina, + " " , py::arg("pNodeA"), py::arg("pNodeB") ) + .def( + "GetNeighbouringElementIndices", + (::std::set(ImmersedBoundaryMesh2_2::*)(unsigned int)) &ImmersedBoundaryMesh2_2::GetNeighbouringElementIndices, + " " , py::arg("elemIdx") ) + .def( + "CalculateLengthOfVoronoiEdge", + (double(ImmersedBoundaryMesh2_2::*)(::boost::polygon::voronoi_diagram::edge_type const &)) &ImmersedBoundaryMesh2_2::CalculateLengthOfVoronoiEdge, + " " , py::arg("rEdge") ) + .def( + "GetPolygonDistribution", + (::std::array(ImmersedBoundaryMesh2_2::*)()) &ImmersedBoundaryMesh2_2::GetPolygonDistribution, + " " ) + .def( + "rGetNodeLocationsVoronoiDiagram", + (::boost::polygon::voronoi_diagram const &(ImmersedBoundaryMesh2_2::*)(bool)) &ImmersedBoundaryMesh2_2::rGetNodeLocationsVoronoiDiagram, + " " , py::arg("update") = true , py::return_value_policy::reference_internal) + .def( + "GetVoronoiCellIdsIndexedByNodeIndex", + (::std::vector const &(ImmersedBoundaryMesh2_2::*)() const ) &ImmersedBoundaryMesh2_2::GetVoronoiCellIdsIndexedByNodeIndex, + " " , py::return_value_policy::reference_internal) + .def( + "ScaleUpToVoronoiCoordinate", + (int(ImmersedBoundaryMesh2_2::*)(double) const ) &ImmersedBoundaryMesh2_2::ScaleUpToVoronoiCoordinate, + " " , py::arg("location") ) + .def( + "ScaleDistanceDownFromVoronoi", + (double(ImmersedBoundaryMesh2_2::*)(double const) const ) &ImmersedBoundaryMesh2_2::ScaleDistanceDownFromVoronoi, + " " , py::arg("distance") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.hpp new file mode 100644 index 00000000..e74537e5 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryMesh2_2_hpp__pyplusplus_wrapper +#define ImmersedBoundaryMesh2_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryMesh2_2_class(py::module &m); +#endif // ImmersedBoundaryMesh2_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp new file mode 100644 index 00000000..205263a6 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp @@ -0,0 +1,357 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryMesh.hpp" + +#include "ImmersedBoundaryMesh3_3.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryMesh<3,3 > ImmersedBoundaryMesh3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef unsigned int unsignedint; +typedef unsigned int unsignedint; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; +typedef ::boost::numeric::ublas::c_vector _boost_numeric_ublas_c_vector_lt_double_3_gt_; +typedef unsigned int unsignedint; + +class ImmersedBoundaryMesh3_3_Overloads : public ImmersedBoundaryMesh3_3{ + public: + using ImmersedBoundaryMesh3_3::ImmersedBoundaryMesh; + unsigned int GetNumNodes() const override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryMesh3_3, + GetNumNodes, + ); + } + unsigned int GetNumElements() const override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryMesh3_3, + GetNumElements, + ); + } + ::boost::numeric::ublas::c_vector GetVectorFromAtoB(::boost::numeric::ublas::c_vector const & rLocation1, ::boost::numeric::ublas::c_vector const & rLocation2) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + ImmersedBoundaryMesh3_3, + GetVectorFromAtoB, + rLocation1, +rLocation2); + } + ::boost::numeric::ublas::c_vector GetCentroidOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + ImmersedBoundaryMesh3_3, + GetCentroidOfElement, + index); + } + void Clear() override { + PYBIND11_OVERLOAD( + void, + ImmersedBoundaryMesh3_3, + Clear, + ); + } + double GetVolumeOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryMesh3_3, + GetVolumeOfElement, + index); + } + double GetSurfaceAreaOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + double, + ImmersedBoundaryMesh3_3, + GetSurfaceAreaOfElement, + index); + } + ::boost::numeric::ublas::c_vector CalculateMomentsOfElement(unsigned int index) override { + PYBIND11_OVERLOAD( + _boost_numeric_ublas_c_vector_lt_double_3_gt_, + ImmersedBoundaryMesh3_3, + CalculateMomentsOfElement, + index); + } + unsigned int SolveNodeMapping(unsigned int index) const override { + PYBIND11_OVERLOAD( + unsignedint, + ImmersedBoundaryMesh3_3, + SolveNodeMapping, + index); + } + +}; +void register_ImmersedBoundaryMesh3_3_class(py::module &m){ +py::class_ , AbstractMesh<3, 3> >(m, "ImmersedBoundaryMesh3_3") + .def(py::init<::std::vector *>, ::std::vector *>, ::std::vector *>, unsigned int, unsigned int >(), py::arg("nodes"), py::arg("elements"), py::arg("laminas") = std::vector *>{}, py::arg("numGridPtsX") = 128U, py::arg("numGridPtsY") = 128U) + .def(py::init< >()) + .def( + "rGetNodes", + (::std::vector *> const &(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::rGetNodes, + " " , py::return_value_policy::reference_internal) + .def( + "GetElementIteratorBegin", + (::ImmersedBoundaryMesh<3, 3>::ImmersedBoundaryElementIterator(ImmersedBoundaryMesh3_3::*)(bool)) &ImmersedBoundaryMesh3_3::GetElementIteratorBegin, + " " , py::arg("skipDeletedElements") = true ) + .def( + "GetElementIteratorEnd", + (::ImmersedBoundaryMesh<3, 3>::ImmersedBoundaryElementIterator(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::GetElementIteratorEnd, + " " ) + .def( + "GetLaminaIteratorBegin", + (::ImmersedBoundaryMesh<3, 3>::ImmersedBoundaryLaminaIterator(ImmersedBoundaryMesh3_3::*)(bool)) &ImmersedBoundaryMesh3_3::GetLaminaIteratorBegin, + " " , py::arg("skipDeletedLaminas") = true ) + .def( + "GetLaminaIteratorEnd", + (::ImmersedBoundaryMesh<3, 3>::ImmersedBoundaryLaminaIterator(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::GetLaminaIteratorEnd, + " " ) + .def( + "GetNumNodes", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNumNodes, + " " ) + .def( + "GetNumElements", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNumElements, + " " ) + .def( + "GetNumAllElements", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNumAllElements, + " " ) + .def( + "GetNumLaminas", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNumLaminas, + " " ) + .def( + "GetNumGridPtsX", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNumGridPtsX, + " " ) + .def( + "GetNumGridPtsY", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNumGridPtsY, + " " ) + .def( + "GetCharacteristicNodeSpacing", + (double(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetCharacteristicNodeSpacing, + " " ) + .def( + "GetSpacingRatio", + (double(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetSpacingRatio, + " " ) + .def( + "GetMaxNodeIndex", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetMaxNodeIndex, + " " ) + .def( + "GetMaxElementIndex", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetMaxElementIndex, + " " ) + .def( + "GetMaxLaminaIndex", + (unsigned int(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetMaxLaminaIndex, + " " ) + .def( + "GetVectorFromAtoB", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh3_3::*)(::boost::numeric::ublas::c_vector const &, ::boost::numeric::ublas::c_vector const &)) &ImmersedBoundaryMesh3_3::GetVectorFromAtoB, + " " , py::arg("rLocation1"), py::arg("rLocation2") ) + .def( + "SetNode", + (void(ImmersedBoundaryMesh3_3::*)(unsigned int, ::ChastePoint<3>)) &ImmersedBoundaryMesh3_3::SetNode, + " " , py::arg("nodeIndex"), py::arg("point") ) + .def( + "ConformToGeometry", + (void(ImmersedBoundaryMesh3_3::*)(::boost::numeric::ublas::c_vector &)) &ImmersedBoundaryMesh3_3::ConformToGeometry, + " " , py::arg("rLocation") ) + .def( + "rGet2dVelocityGrids", + (::boost::multi_array const &(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::rGet2dVelocityGrids, + " " , py::return_value_policy::reference_internal) + .def( + "rGetModifiable2dVelocityGrids", + (::boost::multi_array &(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::rGetModifiable2dVelocityGrids, + " " , py::return_value_policy::reference_internal) + .def( + "SetNumGridPtsX", + (void(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::SetNumGridPtsX, + " " , py::arg("meshPointsX") ) + .def( + "SetNumGridPtsY", + (void(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::SetNumGridPtsY, + " " , py::arg("meshPointsY") ) + .def( + "SetNumGridPtsXAndY", + (void(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::SetNumGridPtsXAndY, + " " , py::arg("numGridPts") ) + .def( + "SetCharacteristicNodeSpacing", + (void(ImmersedBoundaryMesh3_3::*)(double)) &ImmersedBoundaryMesh3_3::SetCharacteristicNodeSpacing, + " " , py::arg("nodeSpacing") ) + .def( + "AddNode", + (unsigned int(ImmersedBoundaryMesh3_3::*)(::Node<3> *)) &ImmersedBoundaryMesh3_3::AddNode, + " " , py::arg("pNewNode") ) + .def( + "rGetElementFluidSources", + (::std::vector>> &(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::rGetElementFluidSources, + " " , py::return_value_policy::reference_internal) + .def( + "rGetBalancingFluidSources", + (::std::vector>> &(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::rGetBalancingFluidSources, + " " , py::return_value_policy::reference_internal) + .def( + "GetNeighbouringNodeIndices", + (::std::set(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetNeighbouringNodeIndices, + " " , py::arg("nodeIndex") ) + .def( + "GetElement", + (::ImmersedBoundaryElement<3, 3> *(ImmersedBoundaryMesh3_3::*)(unsigned int) const ) &ImmersedBoundaryMesh3_3::GetElement, + " " , py::arg("index") , py::return_value_policy::reference) + .def( + "GetLamina", + (::ImmersedBoundaryElement<2, 3> *(ImmersedBoundaryMesh3_3::*)(unsigned int) const ) &ImmersedBoundaryMesh3_3::GetLamina, + " " , py::arg("index") , py::return_value_policy::reference) + .def( + "GetCentroidOfElement", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetCentroidOfElement, + " " , py::arg("index") ) + .def( + "ConstructFromMeshReader", + (void(ImmersedBoundaryMesh3_3::*)(::AbstractMeshReader<3, 3> &)) &ImmersedBoundaryMesh3_3::ConstructFromMeshReader, + " " , py::arg("rMeshReader") ) + .def( + "Clear", + (void(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::Clear, + " " ) + .def( + "GetVolumeOfElement", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetVolumeOfElement, + " " , py::arg("index") ) + .def( + "GetSurfaceAreaOfElement", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetSurfaceAreaOfElement, + " " , py::arg("index") ) + .def( + "GetVoronoiSurfaceAreaOfElement", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetVoronoiSurfaceAreaOfElement, + " " , py::arg("elemIdx") ) + .def( + "GetAverageNodeSpacingOfElement", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int, bool)) &ImmersedBoundaryMesh3_3::GetAverageNodeSpacingOfElement, + " " , py::arg("index"), py::arg("recalculate") = true ) + .def( + "GetAverageNodeSpacingOfLamina", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int, bool)) &ImmersedBoundaryMesh3_3::GetAverageNodeSpacingOfLamina, + " " , py::arg("index"), py::arg("recalculate") = true ) + .def( + "CalculateMomentsOfElement", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::CalculateMomentsOfElement, + " " , py::arg("index") ) + .def( + "GetElongationShapeFactorOfElement", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetElongationShapeFactorOfElement, + " " , py::arg("elementIndex") ) + .def( + "GetTortuosityOfMesh", + (double(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::GetTortuosityOfMesh, + " " ) + .def( + "GetSkewnessOfElementMassDistributionAboutAxis", + (double(ImmersedBoundaryMesh3_3::*)(unsigned int, ::boost::numeric::ublas::c_vector)) &ImmersedBoundaryMesh3_3::GetSkewnessOfElementMassDistributionAboutAxis, + " " , py::arg("elemIndex"), py::arg("axis") ) + .def( + "CalculateBoundingBoxOfElement", + (::ChasteCuboid<3>(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::CalculateBoundingBoxOfElement, + " " , py::arg("index") ) + .def( + "GetShortAxisOfElement", + (::boost::numeric::ublas::c_vector(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetShortAxisOfElement, + " " , py::arg("index") ) + .def( + "DivideElementAlongGivenAxis", + (unsigned int(ImmersedBoundaryMesh3_3::*)(::ImmersedBoundaryElement<3, 3> *, ::boost::numeric::ublas::c_vector, bool)) &ImmersedBoundaryMesh3_3::DivideElementAlongGivenAxis, + " " , py::arg("pElement"), py::arg("axisOfDivision"), py::arg("placeOriginalElementBelow") = false ) + .def( + "DivideElementAlongShortAxis", + (unsigned int(ImmersedBoundaryMesh3_3::*)(::ImmersedBoundaryElement<3, 3> *, bool)) &ImmersedBoundaryMesh3_3::DivideElementAlongShortAxis, + " " , py::arg("pElement"), py::arg("placeOriginalElementBelow") = false ) + .def( + "GetElementDivisionSpacing", + (double(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::GetElementDivisionSpacing, + " " ) + .def( + "SetElementDivisionSpacing", + (void(ImmersedBoundaryMesh3_3::*)(double)) &ImmersedBoundaryMesh3_3::SetElementDivisionSpacing, + " " , py::arg("elementDivisionSpacing") ) + .def( + "GetNeighbourDist", + (double(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetNeighbourDist, + " " ) + .def( + "SetCellRearrangementThreshold", + (void(ImmersedBoundaryMesh3_3::*)(double)) &ImmersedBoundaryMesh3_3::SetCellRearrangementThreshold, + " " , py::arg("cellRearrangementThreshold") ) + .def( + "GetCellRearrangementThreshold", + (double(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::GetCellRearrangementThreshold, + " " ) + .def( + "SetNeighbourDist", + (void(ImmersedBoundaryMesh3_3::*)(double)) &ImmersedBoundaryMesh3_3::SetNeighbourDist, + " " , py::arg("neighbourDist") ) + .def( + "UpdateNodeLocationsVoronoiDiagramIfOutOfDate", + (void(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::UpdateNodeLocationsVoronoiDiagramIfOutOfDate, + " " ) + .def( + "ReMesh", + (void(ImmersedBoundaryMesh3_3::*)(bool)) &ImmersedBoundaryMesh3_3::ReMesh, + " " , py::arg("randomOrder") = false ) + .def( + "ReMeshElement", + (void(ImmersedBoundaryMesh3_3::*)(::ImmersedBoundaryElement<3, 3> *, bool)) &ImmersedBoundaryMesh3_3::ReMeshElement, + " " , py::arg("pElement"), py::arg("randomOrder") ) + .def( + "ReMeshLamina", + (void(ImmersedBoundaryMesh3_3::*)(::ImmersedBoundaryElement<2, 3> *, bool)) &ImmersedBoundaryMesh3_3::ReMeshLamina, + " " , py::arg("pLamina"), py::arg("randomOrder") ) + .def( + "NodesInDifferentElementOrLamina", + (bool(ImmersedBoundaryMesh3_3::*)(::Node<3> *, ::Node<3> *)) &ImmersedBoundaryMesh3_3::NodesInDifferentElementOrLamina, + " " , py::arg("pNodeA"), py::arg("pNodeB") ) + .def( + "GetNeighbouringElementIndices", + (::std::set(ImmersedBoundaryMesh3_3::*)(unsigned int)) &ImmersedBoundaryMesh3_3::GetNeighbouringElementIndices, + " " , py::arg("elemIdx") ) + .def( + "CalculateLengthOfVoronoiEdge", + (double(ImmersedBoundaryMesh3_3::*)(::boost::polygon::voronoi_diagram::edge_type const &)) &ImmersedBoundaryMesh3_3::CalculateLengthOfVoronoiEdge, + " " , py::arg("rEdge") ) + .def( + "GetPolygonDistribution", + (::std::array(ImmersedBoundaryMesh3_3::*)()) &ImmersedBoundaryMesh3_3::GetPolygonDistribution, + " " ) + .def( + "rGetNodeLocationsVoronoiDiagram", + (::boost::polygon::voronoi_diagram const &(ImmersedBoundaryMesh3_3::*)(bool)) &ImmersedBoundaryMesh3_3::rGetNodeLocationsVoronoiDiagram, + " " , py::arg("update") = true , py::return_value_policy::reference_internal) + .def( + "GetVoronoiCellIdsIndexedByNodeIndex", + (::std::vector const &(ImmersedBoundaryMesh3_3::*)() const ) &ImmersedBoundaryMesh3_3::GetVoronoiCellIdsIndexedByNodeIndex, + " " , py::return_value_policy::reference_internal) + .def( + "ScaleUpToVoronoiCoordinate", + (int(ImmersedBoundaryMesh3_3::*)(double) const ) &ImmersedBoundaryMesh3_3::ScaleUpToVoronoiCoordinate, + " " , py::arg("location") ) + .def( + "ScaleDistanceDownFromVoronoi", + (double(ImmersedBoundaryMesh3_3::*)(double const) const ) &ImmersedBoundaryMesh3_3::ScaleDistanceDownFromVoronoi, + " " , py::arg("distance") ) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.hpp new file mode 100644 index 00000000..8f63d5f1 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryMesh3_3_hpp__pyplusplus_wrapper +#define ImmersedBoundaryMesh3_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryMesh3_3_class(py::module &m); +#endif // ImmersedBoundaryMesh3_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.cpp new file mode 100644 index 00000000..a8ba433b --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ImmersedBoundaryPalisadeMeshGenerator.hpp" + +#include "ImmersedBoundaryPalisadeMeshGenerator.cppwg.hpp" + +namespace py = pybind11; +typedef ImmersedBoundaryPalisadeMeshGenerator ImmersedBoundaryPalisadeMeshGenerator; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +void register_ImmersedBoundaryPalisadeMeshGenerator_class(py::module &m){ +py::class_ >(m, "ImmersedBoundaryPalisadeMeshGenerator") + .def(py::init(), py::arg("numCellsWide"), py::arg("numNodesPerCell") = 100, py::arg("ellipseExponent") = 0.20000000000000001, py::arg("cellAspectRatio") = 2., py::arg("randomYMult") = 0., py::arg("basalLamina") = false, py::arg("apicalLamina") = false, py::arg("leakyLaminas") = false, py::arg("numFluidMeshPoints") = (2147483647 * 2U + 1U), py::arg("absoluteGap") = DOUBLE_UNSET) + .def(py::init< >()) + .def( + "GetMesh", + (::ImmersedBoundaryMesh<2, 2> *(ImmersedBoundaryPalisadeMeshGenerator::*)()) &ImmersedBoundaryPalisadeMeshGenerator::GetMesh, + " " , py::return_value_policy::reference) + ; +} diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.hpp b/dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.hpp new file mode 100644 index 00000000..425709d5 --- /dev/null +++ b/dynamic/wrappers/mesh/ImmersedBoundaryPalisadeMeshGenerator.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef ImmersedBoundaryPalisadeMeshGenerator_hpp__pyplusplus_wrapper +#define ImmersedBoundaryPalisadeMeshGenerator_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_ImmersedBoundaryPalisadeMeshGenerator_class(py::module &m); +#endif // ImmersedBoundaryPalisadeMeshGenerator_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp new file mode 100644 index 00000000..b2dac80a --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "MutableElement.hpp" + +#include "MutableElement1_2.cppwg.hpp" + +namespace py = pybind11; +typedef MutableElement<1,2 > MutableElement1_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class MutableElement1_2_Overloads : public MutableElement1_2{ + public: + using MutableElement1_2::MutableElement; + void RegisterWithNodes() override { + PYBIND11_OVERLOAD( + void, + MutableElement1_2, + RegisterWithNodes, + ); + } + void MarkAsDeleted() override { + PYBIND11_OVERLOAD( + void, + MutableElement1_2, + MarkAsDeleted, + ); + } + void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { + PYBIND11_OVERLOAD( + void, + MutableElement1_2, + UpdateNode, + rIndex, +pNode); + } + bool IsElementOnBoundary() const override { + PYBIND11_OVERLOAD( + bool, + MutableElement1_2, + IsElementOnBoundary, + ); + } + +}; +void register_MutableElement1_2_class(py::module &m){ +py::class_ , AbstractElement<1, 2> >(m, "MutableElement1_2") + .def(py::init(), py::arg("index")) + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "RegisterWithNodes", + (void(MutableElement1_2::*)()) &MutableElement1_2::RegisterWithNodes, + " " ) + .def( + "MarkAsDeleted", + (void(MutableElement1_2::*)()) &MutableElement1_2::MarkAsDeleted, + " " ) + .def( + "ResetIndex", + (void(MutableElement1_2::*)(unsigned int)) &MutableElement1_2::ResetIndex, + " " , py::arg("index") ) + .def( + "UpdateNode", + (void(MutableElement1_2::*)(unsigned int const &, ::Node<2> *)) &MutableElement1_2::UpdateNode, + " " , py::arg("rIndex"), py::arg("pNode") ) + .def( + "DeleteNode", + (void(MutableElement1_2::*)(unsigned int const &)) &MutableElement1_2::DeleteNode, + " " , py::arg("rIndex") ) + .def( + "AddNode", + (void(MutableElement1_2::*)(::Node<2> *, unsigned int const &)) &MutableElement1_2::AddNode, + " " , py::arg("pNode"), py::arg("rIndex") ) + .def( + "GetNodeLocalIndex", + (unsigned int(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetNodeLocalIndex, + " " , py::arg("globalIndex") ) + .def( + "RegisterWithEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::RegisterWithEdges, + " " ) + .def( + "RebuildEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::RebuildEdges, + " " ) + .def( + "IsElementOnBoundary", + (bool(MutableElement1_2::*)() const ) &MutableElement1_2::IsElementOnBoundary, + " " ) + .def( + "SetEdgeHelper", + (void(MutableElement1_2::*)(::EdgeHelper<2> *)) &MutableElement1_2::SetEdgeHelper, + " " , py::arg("pEdgeHelper") ) + .def( + "ClearEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::ClearEdges, + " " ) + .def( + "BuildEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::BuildEdges, + " " ) + .def( + "GetEdgeGlobalIndex", + (unsigned int(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetEdgeGlobalIndex, + " " , py::arg("localIndex") ) + .def( + "GetEdge", + (::Edge<2> *(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetEdge, + " " , py::arg("localIndex") , py::return_value_policy::reference) + .def( + "GetNumEdges", + (unsigned int(MutableElement1_2::*)() const ) &MutableElement1_2::GetNumEdges, + " " ) + .def( + "GetNeighbouringElementAtEdgeIndex", + (::std::set(MutableElement1_2::*)(unsigned int)) &MutableElement1_2::GetNeighbouringElementAtEdgeIndex, + " " , py::arg("localIndex") ) + .def( + "ContainsEdge", + (bool(MutableElement1_2::*)(::Edge<2> const *) const ) &MutableElement1_2::ContainsEdge, + " " , py::arg("pEdge") ) + .def( + "GetLocalEdgeIndex", + (long int(MutableElement1_2::*)(::Edge<2> const *) const ) &MutableElement1_2::GetLocalEdgeIndex, + " " , py::arg("pEdge") ) + ; +} diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp new file mode 100644 index 00000000..9736fd4a --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef MutableElement1_2_hpp__pyplusplus_wrapper +#define MutableElement1_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_MutableElement1_2_class(py::module &m); +#endif // MutableElement1_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp new file mode 100644 index 00000000..6f3b2eed --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "MutableElement.hpp" + +#include "MutableElement2_3.cppwg.hpp" + +namespace py = pybind11; +typedef MutableElement<2,3 > MutableElement2_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class MutableElement2_3_Overloads : public MutableElement2_3{ + public: + using MutableElement2_3::MutableElement; + void RegisterWithNodes() override { + PYBIND11_OVERLOAD( + void, + MutableElement2_3, + RegisterWithNodes, + ); + } + void MarkAsDeleted() override { + PYBIND11_OVERLOAD( + void, + MutableElement2_3, + MarkAsDeleted, + ); + } + void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { + PYBIND11_OVERLOAD( + void, + MutableElement2_3, + UpdateNode, + rIndex, +pNode); + } + bool IsElementOnBoundary() const override { + PYBIND11_OVERLOAD( + bool, + MutableElement2_3, + IsElementOnBoundary, + ); + } + +}; +void register_MutableElement2_3_class(py::module &m){ +py::class_ , AbstractElement<2, 3> >(m, "MutableElement2_3") + .def(py::init(), py::arg("index")) + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "RegisterWithNodes", + (void(MutableElement2_3::*)()) &MutableElement2_3::RegisterWithNodes, + " " ) + .def( + "MarkAsDeleted", + (void(MutableElement2_3::*)()) &MutableElement2_3::MarkAsDeleted, + " " ) + .def( + "ResetIndex", + (void(MutableElement2_3::*)(unsigned int)) &MutableElement2_3::ResetIndex, + " " , py::arg("index") ) + .def( + "UpdateNode", + (void(MutableElement2_3::*)(unsigned int const &, ::Node<3> *)) &MutableElement2_3::UpdateNode, + " " , py::arg("rIndex"), py::arg("pNode") ) + .def( + "DeleteNode", + (void(MutableElement2_3::*)(unsigned int const &)) &MutableElement2_3::DeleteNode, + " " , py::arg("rIndex") ) + .def( + "AddNode", + (void(MutableElement2_3::*)(::Node<3> *, unsigned int const &)) &MutableElement2_3::AddNode, + " " , py::arg("pNode"), py::arg("rIndex") ) + .def( + "GetNodeLocalIndex", + (unsigned int(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetNodeLocalIndex, + " " , py::arg("globalIndex") ) + .def( + "RegisterWithEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::RegisterWithEdges, + " " ) + .def( + "RebuildEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::RebuildEdges, + " " ) + .def( + "IsElementOnBoundary", + (bool(MutableElement2_3::*)() const ) &MutableElement2_3::IsElementOnBoundary, + " " ) + .def( + "SetEdgeHelper", + (void(MutableElement2_3::*)(::EdgeHelper<3> *)) &MutableElement2_3::SetEdgeHelper, + " " , py::arg("pEdgeHelper") ) + .def( + "ClearEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::ClearEdges, + " " ) + .def( + "BuildEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::BuildEdges, + " " ) + .def( + "GetEdgeGlobalIndex", + (unsigned int(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetEdgeGlobalIndex, + " " , py::arg("localIndex") ) + .def( + "GetEdge", + (::Edge<3> *(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetEdge, + " " , py::arg("localIndex") , py::return_value_policy::reference) + .def( + "GetNumEdges", + (unsigned int(MutableElement2_3::*)() const ) &MutableElement2_3::GetNumEdges, + " " ) + .def( + "GetNeighbouringElementAtEdgeIndex", + (::std::set(MutableElement2_3::*)(unsigned int)) &MutableElement2_3::GetNeighbouringElementAtEdgeIndex, + " " , py::arg("localIndex") ) + .def( + "ContainsEdge", + (bool(MutableElement2_3::*)(::Edge<3> const *) const ) &MutableElement2_3::ContainsEdge, + " " , py::arg("pEdge") ) + .def( + "GetLocalEdgeIndex", + (long int(MutableElement2_3::*)(::Edge<3> const *) const ) &MutableElement2_3::GetLocalEdgeIndex, + " " , py::arg("pEdge") ) + ; +} diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp new file mode 100644 index 00000000..32a874a4 --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef MutableElement2_3_hpp__pyplusplus_wrapper +#define MutableElement2_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_MutableElement2_3_class(py::module &m); +#endif // MutableElement2_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp new file mode 100644 index 00000000..5fef9fdb --- /dev/null +++ b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp @@ -0,0 +1,102 @@ +#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_OVERLOAD_PURE( + bool, + AbstractCellCycleModelOdeSolver, + IsSetUp, + ); + } + void Reset() override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractCellCycleModelOdeSolver, + Reset, + ); + } + void Initialise() override { + PYBIND11_OVERLOAD_PURE( + void, + AbstractCellCycleModelOdeSolver, + Initialise, + ); + } + bool IsAdaptive() override { + PYBIND11_OVERLOAD( + 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 new file mode 100644 index 00000000..e3168416 --- /dev/null +++ b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.hpp @@ -0,0 +1,6 @@ +#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 diff --git a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp new file mode 100644 index 00000000..f3b402c2 --- /dev/null +++ b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem.hpp" + +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractLinearParabolicPdeSystemForCoupledOdeSystem<2,2,1 > AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::boost::numeric::ublas::c_matrix _boost_numeric_ublas_c_matrix_lt_double_2_2_gt_; + +class AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_Overloads : public AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1{ + public: + using AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::AbstractLinearParabolicPdeSystemForCoupledOdeSystem; + double ComputeDuDtCoefficientFunction(::ChastePoint<2> const & rX, unsigned int pdeIndex) override { + PYBIND11_OVERLOAD_PURE( + double, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, + ComputeDuDtCoefficientFunction, + rX, +pdeIndex); + } + double ComputeSourceTerm(::ChastePoint<2> const & rX, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { + PYBIND11_OVERLOAD_PURE( + double, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, + ComputeSourceTerm, + rX, +rU, +rOdeSolution, +pdeIndex); + } + double ComputeSourceTermAtNode(::Node<2> const & rNode, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { + PYBIND11_OVERLOAD( + double, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, + ComputeSourceTermAtNode, + rNode, +rU, +rOdeSolution, +pdeIndex); + } + ::boost::numeric::ublas::c_matrix ComputeDiffusionTerm(::ChastePoint<2> const & rX, unsigned int pdeIndex, ::Element<2, 2> * pElement) override { + PYBIND11_OVERLOAD_PURE( + _boost_numeric_ublas_c_matrix_lt_double_2_2_gt_, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, + ComputeDiffusionTerm, + rX, +pdeIndex, +pElement); + } + +}; +void register_AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_class(py::module &m){ +py::class_ >(m, "AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1") + .def(py::init< >()) + .def( + "ComputeDuDtCoefficientFunction", + (double(AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::*)(::ChastePoint<2> const &, unsigned int)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::ComputeDuDtCoefficientFunction, + " " , py::arg("rX"), py::arg("pdeIndex") ) + .def( + "ComputeSourceTerm", + (double(AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::*)(::ChastePoint<2> const &, ::boost::numeric::ublas::c_vector &, ::std::vector &, unsigned int)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::ComputeSourceTerm, + " " , py::arg("rX"), py::arg("rU"), py::arg("rOdeSolution"), py::arg("pdeIndex") ) + .def( + "ComputeSourceTermAtNode", + (double(AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::*)(::Node<2> const &, ::boost::numeric::ublas::c_vector &, ::std::vector &, unsigned int)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::ComputeSourceTermAtNode, + " " , py::arg("rNode"), py::arg("rU"), py::arg("rOdeSolution"), py::arg("pdeIndex") ) + .def( + "ComputeDiffusionTerm", + (::boost::numeric::ublas::c_matrix(AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::*)(::ChastePoint<2> const &, unsigned int, ::Element<2, 2> *)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::ComputeDiffusionTerm, + " " , py::arg("rX"), py::arg("pdeIndex"), py::arg("pElement") = __null ) + ; +} diff --git a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp new file mode 100644 index 00000000..0d460d11 --- /dev/null +++ b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_hpp__pyplusplus_wrapper +#define AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_class(py::module &m); +#endif // AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp new file mode 100644 index 00000000..e3ac614f --- /dev/null +++ b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem.hpp" + +#include "AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractLinearParabolicPdeSystemForCoupledOdeSystem<3,3,1 > AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); +typedef ::boost::numeric::ublas::c_matrix _boost_numeric_ublas_c_matrix_lt_double_3_3_gt_; + +class AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_Overloads : public AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1{ + public: + using AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::AbstractLinearParabolicPdeSystemForCoupledOdeSystem; + double ComputeDuDtCoefficientFunction(::ChastePoint<3> const & rX, unsigned int pdeIndex) override { + PYBIND11_OVERLOAD_PURE( + double, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, + ComputeDuDtCoefficientFunction, + rX, +pdeIndex); + } + double ComputeSourceTerm(::ChastePoint<3> const & rX, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { + PYBIND11_OVERLOAD_PURE( + double, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, + ComputeSourceTerm, + rX, +rU, +rOdeSolution, +pdeIndex); + } + double ComputeSourceTermAtNode(::Node<3> const & rNode, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { + PYBIND11_OVERLOAD( + double, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, + ComputeSourceTermAtNode, + rNode, +rU, +rOdeSolution, +pdeIndex); + } + ::boost::numeric::ublas::c_matrix ComputeDiffusionTerm(::ChastePoint<3> const & rX, unsigned int pdeIndex, ::Element<3, 3> * pElement) override { + PYBIND11_OVERLOAD_PURE( + _boost_numeric_ublas_c_matrix_lt_double_3_3_gt_, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, + ComputeDiffusionTerm, + rX, +pdeIndex, +pElement); + } + +}; +void register_AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_class(py::module &m){ +py::class_ >(m, "AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1") + .def(py::init< >()) + .def( + "ComputeDuDtCoefficientFunction", + (double(AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::*)(::ChastePoint<3> const &, unsigned int)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::ComputeDuDtCoefficientFunction, + " " , py::arg("rX"), py::arg("pdeIndex") ) + .def( + "ComputeSourceTerm", + (double(AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::*)(::ChastePoint<3> const &, ::boost::numeric::ublas::c_vector &, ::std::vector &, unsigned int)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::ComputeSourceTerm, + " " , py::arg("rX"), py::arg("rU"), py::arg("rOdeSolution"), py::arg("pdeIndex") ) + .def( + "ComputeSourceTermAtNode", + (double(AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::*)(::Node<3> const &, ::boost::numeric::ublas::c_vector &, ::std::vector &, unsigned int)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::ComputeSourceTermAtNode, + " " , py::arg("rNode"), py::arg("rU"), py::arg("rOdeSolution"), py::arg("pdeIndex") ) + .def( + "ComputeDiffusionTerm", + (::boost::numeric::ublas::c_matrix(AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::*)(::ChastePoint<3> const &, unsigned int, ::Element<3, 3> *)) &AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::ComputeDiffusionTerm, + " " , py::arg("rX"), py::arg("pdeIndex"), py::arg("pElement") = __null ) + ; +} diff --git a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.hpp b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.hpp new file mode 100644 index 00000000..71634219 --- /dev/null +++ b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_hpp__pyplusplus_wrapper +#define AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_class(py::module &m); +#endif // AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_hpp__pyplusplus_wrapper From 1b00801a621ab0213ef7e25fa293b86a50a24b84 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 18:03:40 +0000 Subject: [PATCH 14/40] #62 use new PYBIND11_OVERRIDE macros --- ...stractCentreBasedDivisionRule2_2.cppwg.cpp | 4 +- ...stractCentreBasedDivisionRule3_3.cppwg.cpp | 4 +- ...actImmersedBoundaryDivisionRule2.cppwg.cpp | 4 +- ...actImmersedBoundaryDivisionRule3.cppwg.cpp | 4 +- .../AbstractImmersedBoundaryForce2.cppwg.cpp | 4 +- .../AbstractImmersedBoundaryForce3.cppwg.cpp | 4 +- .../FixedCentreBasedDivisionRule2_2.cppwg.cpp | 2 +- .../FixedCentreBasedDivisionRule3_3.cppwg.cpp | 2 +- ...sedBoundaryBoundaryCellWriter2_2.cppwg.cpp | 4 +- ...sedBoundaryBoundaryCellWriter3_3.cppwg.cpp | 4 +- .../ImmersedBoundaryCellPopulation2.cppwg.cpp | 52 +++++++++---------- .../ImmersedBoundaryCellPopulation3.cppwg.cpp | 52 +++++++++---------- ...dBoundaryKinematicFeedbackForce2.cppwg.cpp | 4 +- ...dBoundaryKinematicFeedbackForce3.cppwg.cpp | 4 +- ...LinearDifferentialAdhesionForce2.cppwg.cpp | 4 +- ...LinearDifferentialAdhesionForce3.cppwg.cpp | 4 +- ...dBoundaryLinearInteractionForce2.cppwg.cpp | 4 +- ...dBoundaryLinearInteractionForce3.cppwg.cpp | 4 +- ...rsedBoundaryLinearMembraneForce2.cppwg.cpp | 4 +- ...rsedBoundaryLinearMembraneForce3.cppwg.cpp | 4 +- ...edBoundaryMorseInteractionForce2.cppwg.cpp | 4 +- ...edBoundaryMorseInteractionForce3.cppwg.cpp | 4 +- ...ersedBoundaryMorseMembraneForce2.cppwg.cpp | 4 +- ...ersedBoundaryMorseMembraneForce3.cppwg.cpp | 4 +- ...BoundaryNeighbourNumberWriter2_2.cppwg.cpp | 4 +- ...BoundaryNeighbourNumberWriter3_3.cppwg.cpp | 4 +- ...ersedBoundarySimulationModifier2.cppwg.cpp | 6 +-- ...ersedBoundarySimulationModifier3.cppwg.cpp | 6 +-- .../ImmersedBoundarySvgWriter2.cppwg.cpp | 6 +-- .../ImmersedBoundarySvgWriter3.cppwg.cpp | 6 +-- ...lyDistributedTargetAreaModifier2.cppwg.cpp | 4 +- ...lyDistributedTargetAreaModifier3.cppwg.cpp | 4 +- ...ectionCentreBasedDivisionRule2_2.cppwg.cpp | 2 +- ...ectionCentreBasedDivisionRule3_3.cppwg.cpp | 2 +- ...xisImmersedBoundaryDivisionRule2.cppwg.cpp | 2 +- ...xisImmersedBoundaryDivisionRule3.cppwg.cpp | 2 +- .../mesh/AbstractElement1_2.cppwg.cpp | 6 +-- .../mesh/AbstractElement2_2.cppwg.cpp | 6 +-- .../mesh/AbstractElement2_3.cppwg.cpp | 6 +-- .../mesh/AbstractElement3_3.cppwg.cpp | 6 +-- .../mesh/ImmersedBoundaryElement1_2.cppwg.cpp | 2 +- .../mesh/ImmersedBoundaryElement2_2.cppwg.cpp | 2 +- .../mesh/ImmersedBoundaryElement2_3.cppwg.cpp | 2 +- .../mesh/ImmersedBoundaryElement3_3.cppwg.cpp | 2 +- .../mesh/ImmersedBoundaryMesh2_2.cppwg.cpp | 18 +++---- .../mesh/ImmersedBoundaryMesh3_3.cppwg.cpp | 18 +++---- .../wrappers/mesh/MutableElement1_2.cppwg.cpp | 8 +-- .../wrappers/mesh/MutableElement2_2.cppwg.cpp | 8 +-- .../wrappers/mesh/MutableElement2_3.cppwg.cpp | 8 +-- .../wrappers/mesh/MutableElement3_3.cppwg.cpp | 8 +-- .../AbstractCellCycleModelOdeSolver.cppwg.cpp | 8 +-- ...deSystemForCoupledOdeSystem2_2_1.cppwg.cpp | 8 +-- ...deSystemForCoupledOdeSystem3_3_1.cppwg.cpp | 8 +-- 53 files changed, 180 insertions(+), 180 deletions(-) diff --git a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp index 8ab05c0d..8a56203e 100644 --- a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule2_2.cppwg.cpp @@ -19,7 +19,7 @@ class AbstractCentreBasedDivisionRule2_2_Overloads : public AbstractCentreBasedD public: using AbstractCentreBasedDivisionRule2_2::AbstractCentreBasedDivisionRule; ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<2, 2> & rCellPopulation) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_, AbstractCentreBasedDivisionRule2_2, CalculateCellDivisionVector, @@ -27,7 +27,7 @@ class AbstractCentreBasedDivisionRule2_2_Overloads : public AbstractCentreBasedD rCellPopulation); } void OutputCellCentreBasedDivisionRuleParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, AbstractCentreBasedDivisionRule2_2, OutputCellCentreBasedDivisionRuleParameters, diff --git a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp index c1f1720c..382beb2b 100644 --- a/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractCentreBasedDivisionRule3_3.cppwg.cpp @@ -19,7 +19,7 @@ class AbstractCentreBasedDivisionRule3_3_Overloads : public AbstractCentreBasedD public: using AbstractCentreBasedDivisionRule3_3::AbstractCentreBasedDivisionRule; ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<3, 3> & rCellPopulation) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_, AbstractCentreBasedDivisionRule3_3, CalculateCellDivisionVector, @@ -27,7 +27,7 @@ class AbstractCentreBasedDivisionRule3_3_Overloads : public AbstractCentreBasedD rCellPopulation); } void OutputCellCentreBasedDivisionRuleParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, AbstractCentreBasedDivisionRule3_3, OutputCellCentreBasedDivisionRuleParameters, diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp index 6bc96ff0..aa514e80 100644 --- a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule2.cppwg.cpp @@ -19,7 +19,7 @@ class AbstractImmersedBoundaryDivisionRule2_Overloads : public AbstractImmersedB public: using AbstractImmersedBoundaryDivisionRule2::AbstractImmersedBoundaryDivisionRule; ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( _boost_numeric_ublas_c_vector_lt_double_2_gt_, AbstractImmersedBoundaryDivisionRule2, CalculateCellDivisionVector, @@ -27,7 +27,7 @@ class AbstractImmersedBoundaryDivisionRule2_Overloads : public AbstractImmersedB rCellPopulation); } void OutputCellImmersedBoundaryDivisionRuleParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, AbstractImmersedBoundaryDivisionRule2, OutputCellImmersedBoundaryDivisionRuleParameters, diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp index 4ec3cc48..768fa343 100644 --- a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryDivisionRule3.cppwg.cpp @@ -19,7 +19,7 @@ class AbstractImmersedBoundaryDivisionRule3_Overloads : public AbstractImmersedB public: using AbstractImmersedBoundaryDivisionRule3::AbstractImmersedBoundaryDivisionRule; ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, AbstractImmersedBoundaryDivisionRule3, CalculateCellDivisionVector, @@ -27,7 +27,7 @@ class AbstractImmersedBoundaryDivisionRule3_Overloads : public AbstractImmersedB rCellPopulation); } void OutputCellImmersedBoundaryDivisionRuleParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, AbstractImmersedBoundaryDivisionRule3, OutputCellImmersedBoundaryDivisionRuleParameters, diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp index 9ebbbd42..14a51ad8 100644 --- a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce2.cppwg.cpp @@ -18,7 +18,7 @@ class AbstractImmersedBoundaryForce2_Overloads : public AbstractImmersedBoundary public: using AbstractImmersedBoundaryForce2::AbstractImmersedBoundaryForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractImmersedBoundaryForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class AbstractImmersedBoundaryForce2_Overloads : public AbstractImmersedBoundary rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractImmersedBoundaryForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp index 823c673f..1596ae18 100644 --- a/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractImmersedBoundaryForce3.cppwg.cpp @@ -18,7 +18,7 @@ class AbstractImmersedBoundaryForce3_Overloads : public AbstractImmersedBoundary public: using AbstractImmersedBoundaryForce3::AbstractImmersedBoundaryForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractImmersedBoundaryForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class AbstractImmersedBoundaryForce3_Overloads : public AbstractImmersedBoundary rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractImmersedBoundaryForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp index c7f058c4..18bc4d31 100644 --- a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule2_2.cppwg.cpp @@ -19,7 +19,7 @@ class FixedCentreBasedDivisionRule2_2_Overloads : public FixedCentreBasedDivisio public: using FixedCentreBasedDivisionRule2_2::FixedCentreBasedDivisionRule; ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<2, 2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_, FixedCentreBasedDivisionRule2_2, CalculateCellDivisionVector, diff --git a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp index c8aa20f1..7efd132d 100644 --- a/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/FixedCentreBasedDivisionRule3_3.cppwg.cpp @@ -19,7 +19,7 @@ class FixedCentreBasedDivisionRule3_3_Overloads : public FixedCentreBasedDivisio public: using FixedCentreBasedDivisionRule3_3::FixedCentreBasedDivisionRule; ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<3, 3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_, FixedCentreBasedDivisionRule3_3, CalculateCellDivisionVector, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp index 86a2c1d5..1760fd75 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter2_2.cppwg.cpp @@ -19,7 +19,7 @@ class ImmersedBoundaryBoundaryCellWriter2_2_Overloads : public ImmersedBoundaryB public: using ImmersedBoundaryBoundaryCellWriter2_2::ImmersedBoundaryBoundaryCellWriter; double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryBoundaryCellWriter2_2, GetCellDataForVtkOutput, @@ -27,7 +27,7 @@ class ImmersedBoundaryBoundaryCellWriter2_2_Overloads : public ImmersedBoundaryB pCellPopulation); } void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryBoundaryCellWriter2_2, VisitCell, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp index 94c01e57..c9fdd36b 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryBoundaryCellWriter3_3.cppwg.cpp @@ -19,7 +19,7 @@ class ImmersedBoundaryBoundaryCellWriter3_3_Overloads : public ImmersedBoundaryB public: using ImmersedBoundaryBoundaryCellWriter3_3::ImmersedBoundaryBoundaryCellWriter; double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryBoundaryCellWriter3_3, GetCellDataForVtkOutput, @@ -27,7 +27,7 @@ class ImmersedBoundaryBoundaryCellWriter3_3_Overloads : public ImmersedBoundaryB pCellPopulation); } void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryBoundaryCellWriter3_3, VisitCell, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp index d49cbda8..b675190b 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation2.cppwg.cpp @@ -62,56 +62,56 @@ class ImmersedBoundaryCellPopulation2_Overloads : public ImmersedBoundaryCellPop public: using ImmersedBoundaryCellPopulation2::ImmersedBoundaryCellPopulation; double GetDampingConstant(unsigned int nodeIndex) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation2, GetDampingConstant, nodeIndex); } unsigned int GetNumNodes() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryCellPopulation2, GetNumNodes, ); } ::boost::numeric::ublas::c_vector GetLocationOfCellCentre(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_2_gt_, ImmersedBoundaryCellPopulation2, GetLocationOfCellCentre, pCell); } ::Node<2> * GetNode(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _Node_lt_2_gt_Ptr, ImmersedBoundaryCellPopulation2, GetNode, index); } ::std::set GetNeighbouringLocationIndices(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_set_lt_unsignedint_gt_, ImmersedBoundaryCellPopulation2, GetNeighbouringLocationIndices, pCell); } unsigned int AddNode(::Node<2> * pNewNode) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryCellPopulation2, AddNode, pNewNode); } void UpdateNodeLocations(double dt) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, UpdateNodeLocations, dt); } void SetNode(unsigned int index, ::ChastePoint<2> & rNewLocation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, SetNode, @@ -119,7 +119,7 @@ class ImmersedBoundaryCellPopulation2_Overloads : public ImmersedBoundaryCellPop rNewLocation); } ::CellPtr AddCell(::CellPtr pNewCell, ::CellPtr pParentCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _CellPtr, ImmersedBoundaryCellPopulation2, AddCell, @@ -127,56 +127,56 @@ rNewLocation); pParentCell); } unsigned int RemoveDeadCells() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryCellPopulation2, RemoveDeadCells, ); } bool IsCellAssociatedWithADeletedLocation(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryCellPopulation2, IsCellAssociatedWithADeletedLocation, pCell); } void Update(bool hasHadBirthsOrDeaths) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, Update, hasHadBirthsOrDeaths); } void OpenWritersFiles(::OutputFileHandler & rOutputFileHandler) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, OpenWritersFiles, rOutputFileHandler); } void AcceptPopulationWriter(::boost::shared_ptr> pPopulationWriter) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, AcceptPopulationWriter, pPopulationWriter); } void AcceptPopulationEventWriter(::boost::shared_ptr> pPopulationEventWriter) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, AcceptPopulationEventWriter, pPopulationEventWriter); } void AcceptPopulationCountWriter(::boost::shared_ptr> pPopulationCountWriter) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, AcceptPopulationCountWriter, pPopulationCountWriter); } void AcceptCellWriter(::boost::shared_ptr> pCellWriter, ::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, AcceptCellWriter, @@ -184,49 +184,49 @@ pParentCell); pCell); } double GetVolumeOfCell(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation2, GetVolumeOfCell, pCell); } void OutputCellPopulationParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, OutputCellPopulationParameters, rParamsFile); } double GetWidth(unsigned int const & rDimension) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation2, GetWidth, rDimension); } ::std::set GetNeighbouringNodeIndices(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_set_lt_unsignedint_gt_, ImmersedBoundaryCellPopulation2, GetNeighbouringNodeIndices, index); } ::TetrahedralMesh<2, 2> * GetTetrahedralMeshForPdeModifier() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _TetrahedralMesh_lt_2_2_gt_Ptr, ImmersedBoundaryCellPopulation2, GetTetrahedralMeshForPdeModifier, ); } bool IsPdeNodeAssociatedWithNonApoptoticCell(unsigned int pdeNodeIndex) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryCellPopulation2, IsPdeNodeAssociatedWithNonApoptoticCell, pdeNodeIndex); } double GetCellDataItemAtPdeNode(unsigned int pdeNodeIndex, ::std::string & rVariableName, bool dirichletBoundaryConditionApplies, double dirichletBoundaryValue) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation2, GetCellDataItemAtPdeNode, @@ -236,7 +236,7 @@ dirichletBoundaryConditionApplies, dirichletBoundaryValue); } void CheckForStepSizeException(unsigned int nodeIndex, ::boost::numeric::ublas::c_vector & rDisplacement, double dt) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation2, CheckForStepSizeException, @@ -245,7 +245,7 @@ rDisplacement, dt); } double GetDefaultTimeStep() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation2, GetDefaultTimeStep, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp index 4c126ee0..7c4bba72 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryCellPopulation3.cppwg.cpp @@ -62,56 +62,56 @@ class ImmersedBoundaryCellPopulation3_Overloads : public ImmersedBoundaryCellPop public: using ImmersedBoundaryCellPopulation3::ImmersedBoundaryCellPopulation; double GetDampingConstant(unsigned int nodeIndex) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation3, GetDampingConstant, nodeIndex); } unsigned int GetNumNodes() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryCellPopulation3, GetNumNodes, ); } ::boost::numeric::ublas::c_vector GetLocationOfCellCentre(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, ImmersedBoundaryCellPopulation3, GetLocationOfCellCentre, pCell); } ::Node<3> * GetNode(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _Node_lt_3_gt_Ptr, ImmersedBoundaryCellPopulation3, GetNode, index); } ::std::set GetNeighbouringLocationIndices(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_set_lt_unsignedint_gt_, ImmersedBoundaryCellPopulation3, GetNeighbouringLocationIndices, pCell); } unsigned int AddNode(::Node<3> * pNewNode) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryCellPopulation3, AddNode, pNewNode); } void UpdateNodeLocations(double dt) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, UpdateNodeLocations, dt); } void SetNode(unsigned int index, ::ChastePoint<3> & rNewLocation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, SetNode, @@ -119,7 +119,7 @@ class ImmersedBoundaryCellPopulation3_Overloads : public ImmersedBoundaryCellPop rNewLocation); } ::CellPtr AddCell(::CellPtr pNewCell, ::CellPtr pParentCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _CellPtr, ImmersedBoundaryCellPopulation3, AddCell, @@ -127,56 +127,56 @@ rNewLocation); pParentCell); } unsigned int RemoveDeadCells() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryCellPopulation3, RemoveDeadCells, ); } bool IsCellAssociatedWithADeletedLocation(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryCellPopulation3, IsCellAssociatedWithADeletedLocation, pCell); } void Update(bool hasHadBirthsOrDeaths) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, Update, hasHadBirthsOrDeaths); } void OpenWritersFiles(::OutputFileHandler & rOutputFileHandler) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, OpenWritersFiles, rOutputFileHandler); } void AcceptPopulationWriter(::boost::shared_ptr> pPopulationWriter) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, AcceptPopulationWriter, pPopulationWriter); } void AcceptPopulationEventWriter(::boost::shared_ptr> pPopulationEventWriter) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, AcceptPopulationEventWriter, pPopulationEventWriter); } void AcceptPopulationCountWriter(::boost::shared_ptr> pPopulationCountWriter) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, AcceptPopulationCountWriter, pPopulationCountWriter); } void AcceptCellWriter(::boost::shared_ptr> pCellWriter, ::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, AcceptCellWriter, @@ -184,49 +184,49 @@ pParentCell); pCell); } double GetVolumeOfCell(::CellPtr pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation3, GetVolumeOfCell, pCell); } void OutputCellPopulationParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, OutputCellPopulationParameters, rParamsFile); } double GetWidth(unsigned int const & rDimension) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation3, GetWidth, rDimension); } ::std::set GetNeighbouringNodeIndices(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_set_lt_unsignedint_gt_, ImmersedBoundaryCellPopulation3, GetNeighbouringNodeIndices, index); } ::TetrahedralMesh<3, 3> * GetTetrahedralMeshForPdeModifier() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _TetrahedralMesh_lt_3_3_gt_Ptr, ImmersedBoundaryCellPopulation3, GetTetrahedralMeshForPdeModifier, ); } bool IsPdeNodeAssociatedWithNonApoptoticCell(unsigned int pdeNodeIndex) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryCellPopulation3, IsPdeNodeAssociatedWithNonApoptoticCell, pdeNodeIndex); } double GetCellDataItemAtPdeNode(unsigned int pdeNodeIndex, ::std::string & rVariableName, bool dirichletBoundaryConditionApplies, double dirichletBoundaryValue) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation3, GetCellDataItemAtPdeNode, @@ -236,7 +236,7 @@ dirichletBoundaryConditionApplies, dirichletBoundaryValue); } void CheckForStepSizeException(unsigned int nodeIndex, ::boost::numeric::ublas::c_vector & rDisplacement, double dt) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryCellPopulation3, CheckForStepSizeException, @@ -245,7 +245,7 @@ rDisplacement, dt); } double GetDefaultTimeStep() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryCellPopulation3, GetDefaultTimeStep, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp index e9ad5d7e..fd164760 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryKinematicFeedbackForce2_Overloads : public ImmersedBoundar public: using ImmersedBoundaryKinematicFeedbackForce2::ImmersedBoundaryKinematicFeedbackForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryKinematicFeedbackForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryKinematicFeedbackForce2_Overloads : public ImmersedBoundar rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryKinematicFeedbackForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp index 53e2da16..e71be5e2 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryKinematicFeedbackForce3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryKinematicFeedbackForce3_Overloads : public ImmersedBoundar public: using ImmersedBoundaryKinematicFeedbackForce3::ImmersedBoundaryKinematicFeedbackForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryKinematicFeedbackForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryKinematicFeedbackForce3_Overloads : public ImmersedBoundar rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryKinematicFeedbackForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp index f2f8d144..7b56dadd 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryLinearDifferentialAdhesionForce2_Overloads : public Immers public: using ImmersedBoundaryLinearDifferentialAdhesionForce2::ImmersedBoundaryLinearDifferentialAdhesionForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearDifferentialAdhesionForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryLinearDifferentialAdhesionForce2_Overloads : public Immers rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearDifferentialAdhesionForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp index c78ea789..63c81738 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearDifferentialAdhesionForce3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryLinearDifferentialAdhesionForce3_Overloads : public Immers public: using ImmersedBoundaryLinearDifferentialAdhesionForce3::ImmersedBoundaryLinearDifferentialAdhesionForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearDifferentialAdhesionForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryLinearDifferentialAdhesionForce3_Overloads : public Immers rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearDifferentialAdhesionForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp index 63896b56..205f19b0 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryLinearInteractionForce2_Overloads : public ImmersedBoundar public: using ImmersedBoundaryLinearInteractionForce2::ImmersedBoundaryLinearInteractionForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearInteractionForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryLinearInteractionForce2_Overloads : public ImmersedBoundar rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearInteractionForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp index 6762d720..81c89b7b 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearInteractionForce3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryLinearInteractionForce3_Overloads : public ImmersedBoundar public: using ImmersedBoundaryLinearInteractionForce3::ImmersedBoundaryLinearInteractionForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearInteractionForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryLinearInteractionForce3_Overloads : public ImmersedBoundar rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearInteractionForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp index 9c368612..dcea093f 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryLinearMembraneForce2_Overloads : public ImmersedBoundaryLi public: using ImmersedBoundaryLinearMembraneForce2::ImmersedBoundaryLinearMembraneForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearMembraneForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryLinearMembraneForce2_Overloads : public ImmersedBoundaryLi rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearMembraneForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp index acbb2836..e7ebf474 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryLinearMembraneForce3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryLinearMembraneForce3_Overloads : public ImmersedBoundaryLi public: using ImmersedBoundaryLinearMembraneForce3::ImmersedBoundaryLinearMembraneForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearMembraneForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryLinearMembraneForce3_Overloads : public ImmersedBoundaryLi rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryLinearMembraneForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp index 668211a5..1ccb1952 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryMorseInteractionForce2_Overloads : public ImmersedBoundary public: using ImmersedBoundaryMorseInteractionForce2::ImmersedBoundaryMorseInteractionForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseInteractionForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryMorseInteractionForce2_Overloads : public ImmersedBoundary rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseInteractionForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp index 4ff6b8f1..60a0aabc 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseInteractionForce3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryMorseInteractionForce3_Overloads : public ImmersedBoundary public: using ImmersedBoundaryMorseInteractionForce3::ImmersedBoundaryMorseInteractionForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseInteractionForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryMorseInteractionForce3_Overloads : public ImmersedBoundary rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseInteractionForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp index 20fcf74e..8ba9c823 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryMorseMembraneForce2_Overloads : public ImmersedBoundaryMor public: using ImmersedBoundaryMorseMembraneForce2::ImmersedBoundaryMorseMembraneForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<2> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseMembraneForce2, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryMorseMembraneForce2_Overloads : public ImmersedBoundaryMor rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseMembraneForce2, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp index 0e279d29..657c5e2d 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryMorseMembraneForce3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryMorseMembraneForce3_Overloads : public ImmersedBoundaryMor public: using ImmersedBoundaryMorseMembraneForce3::ImmersedBoundaryMorseMembraneForce; void AddImmersedBoundaryForceContribution(::std::vector *, Node<3> *>> & rNodePairs, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseMembraneForce3, AddImmersedBoundaryForceContribution, @@ -26,7 +26,7 @@ class ImmersedBoundaryMorseMembraneForce3_Overloads : public ImmersedBoundaryMor rCellPopulation); } void OutputImmersedBoundaryForceParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMorseMembraneForce3, OutputImmersedBoundaryForceParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp index 7b1eab55..1747a780 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter2_2.cppwg.cpp @@ -19,7 +19,7 @@ class ImmersedBoundaryNeighbourNumberWriter2_2_Overloads : public ImmersedBounda public: using ImmersedBoundaryNeighbourNumberWriter2_2::ImmersedBoundaryNeighbourNumberWriter; double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryNeighbourNumberWriter2_2, GetCellDataForVtkOutput, @@ -27,7 +27,7 @@ class ImmersedBoundaryNeighbourNumberWriter2_2_Overloads : public ImmersedBounda pCellPopulation); } void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<2> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryNeighbourNumberWriter2_2, VisitCell, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp index e16c4011..94e70f50 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundaryNeighbourNumberWriter3_3.cppwg.cpp @@ -19,7 +19,7 @@ class ImmersedBoundaryNeighbourNumberWriter3_3_Overloads : public ImmersedBounda public: using ImmersedBoundaryNeighbourNumberWriter3_3::ImmersedBoundaryNeighbourNumberWriter; double GetCellDataForVtkOutput(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryNeighbourNumberWriter3_3, GetCellDataForVtkOutput, @@ -27,7 +27,7 @@ class ImmersedBoundaryNeighbourNumberWriter3_3_Overloads : public ImmersedBounda pCellPopulation); } void VisitCell(::CellPtr pCell, ::AbstractCellPopulation<3> * pCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryNeighbourNumberWriter3_3, VisitCell, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp index 3579889c..9f027077 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier2.cppwg.cpp @@ -18,14 +18,14 @@ class ImmersedBoundarySimulationModifier2_Overloads : public ImmersedBoundarySim public: using ImmersedBoundarySimulationModifier2::ImmersedBoundarySimulationModifier; void UpdateAtEndOfTimeStep(::AbstractCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySimulationModifier2, UpdateAtEndOfTimeStep, rCellPopulation); } void SetupSolve(::AbstractCellPopulation<2> & rCellPopulation, ::std::string outputDirectory) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySimulationModifier2, SetupSolve, @@ -33,7 +33,7 @@ class ImmersedBoundarySimulationModifier2_Overloads : public ImmersedBoundarySim outputDirectory); } void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySimulationModifier2, OutputSimulationModifierParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp index 186fb245..0ebe0126 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySimulationModifier3.cppwg.cpp @@ -18,14 +18,14 @@ class ImmersedBoundarySimulationModifier3_Overloads : public ImmersedBoundarySim public: using ImmersedBoundarySimulationModifier3::ImmersedBoundarySimulationModifier; void UpdateAtEndOfTimeStep(::AbstractCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySimulationModifier3, UpdateAtEndOfTimeStep, rCellPopulation); } void SetupSolve(::AbstractCellPopulation<3> & rCellPopulation, ::std::string outputDirectory) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySimulationModifier3, SetupSolve, @@ -33,7 +33,7 @@ class ImmersedBoundarySimulationModifier3_Overloads : public ImmersedBoundarySim outputDirectory); } void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySimulationModifier3, OutputSimulationModifierParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp index 5fdbf34a..0e099ad9 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter2.cppwg.cpp @@ -18,14 +18,14 @@ class ImmersedBoundarySvgWriter2_Overloads : public ImmersedBoundarySvgWriter2{ public: using ImmersedBoundarySvgWriter2::ImmersedBoundarySvgWriter; void UpdateAtEndOfTimeStep(::AbstractCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySvgWriter2, UpdateAtEndOfTimeStep, rCellPopulation); } void SetupSolve(::AbstractCellPopulation<2> & rCellPopulation, ::std::string outputDirectory) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySvgWriter2, SetupSolve, @@ -33,7 +33,7 @@ class ImmersedBoundarySvgWriter2_Overloads : public ImmersedBoundarySvgWriter2{ outputDirectory); } void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySvgWriter2, OutputSimulationModifierParameters, diff --git a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp index 524d5668..310be3c5 100644 --- a/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ImmersedBoundarySvgWriter3.cppwg.cpp @@ -18,14 +18,14 @@ class ImmersedBoundarySvgWriter3_Overloads : public ImmersedBoundarySvgWriter3{ public: using ImmersedBoundarySvgWriter3::ImmersedBoundarySvgWriter; void UpdateAtEndOfTimeStep(::AbstractCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySvgWriter3, UpdateAtEndOfTimeStep, rCellPopulation); } void SetupSolve(::AbstractCellPopulation<3> & rCellPopulation, ::std::string outputDirectory) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySvgWriter3, SetupSolve, @@ -33,7 +33,7 @@ class ImmersedBoundarySvgWriter3_Overloads : public ImmersedBoundarySvgWriter3{ outputDirectory); } void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundarySvgWriter3, OutputSimulationModifierParameters, diff --git a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp index d9d99ffa..494b354d 100644 --- a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier2.cppwg.cpp @@ -18,14 +18,14 @@ class NormallyDistributedTargetAreaModifier2_Overloads : public NormallyDistribu public: using NormallyDistributedTargetAreaModifier2::NormallyDistributedTargetAreaModifier; void UpdateTargetAreaOfCell(::CellPtr const pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, NormallyDistributedTargetAreaModifier2, UpdateTargetAreaOfCell, pCell); } void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, NormallyDistributedTargetAreaModifier2, OutputSimulationModifierParameters, diff --git a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp index 8155fbc6..28dd10c5 100644 --- a/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/NormallyDistributedTargetAreaModifier3.cppwg.cpp @@ -18,14 +18,14 @@ class NormallyDistributedTargetAreaModifier3_Overloads : public NormallyDistribu public: using NormallyDistributedTargetAreaModifier3::NormallyDistributedTargetAreaModifier; void UpdateTargetAreaOfCell(::CellPtr const pCell) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, NormallyDistributedTargetAreaModifier3, UpdateTargetAreaOfCell, pCell); } void OutputSimulationModifierParameters(::out_stream & rParamsFile) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, NormallyDistributedTargetAreaModifier3, OutputSimulationModifierParameters, diff --git a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp index 872a83f0..3e4b99cf 100644 --- a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule2_2.cppwg.cpp @@ -19,7 +19,7 @@ class RandomDirectionCentreBasedDivisionRule2_2_Overloads : public RandomDirecti public: using RandomDirectionCentreBasedDivisionRule2_2::RandomDirectionCentreBasedDivisionRule; ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<2, 2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_2_gt__boost_numeric_ublas_c_vector_lt_double_2_gt__gt_, RandomDirectionCentreBasedDivisionRule2_2, CalculateCellDivisionVector, diff --git a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp index c97eb2c3..c98e4ff2 100644 --- a/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/RandomDirectionCentreBasedDivisionRule3_3.cppwg.cpp @@ -19,7 +19,7 @@ class RandomDirectionCentreBasedDivisionRule3_3_Overloads : public RandomDirecti public: using RandomDirectionCentreBasedDivisionRule3_3::RandomDirectionCentreBasedDivisionRule; ::std::pair, boost::numeric::ublas::c_vector> CalculateCellDivisionVector(::CellPtr pParentCell, ::AbstractCentreBasedCellPopulation<3, 3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _std_pair_lt_boost_numeric_ublas_c_vector_lt_double_3_gt__boost_numeric_ublas_c_vector_lt_double_3_gt__gt_, RandomDirectionCentreBasedDivisionRule3_3, CalculateCellDivisionVector, diff --git a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp index 43842ea6..83e80c4a 100644 --- a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule2.cppwg.cpp @@ -19,7 +19,7 @@ class ShortAxisImmersedBoundaryDivisionRule2_Overloads : public ShortAxisImmerse public: using ShortAxisImmersedBoundaryDivisionRule2::ShortAxisImmersedBoundaryDivisionRule; ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<2> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_2_gt_, ShortAxisImmersedBoundaryDivisionRule2, CalculateCellDivisionVector, diff --git a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp index 4e29095a..c1101606 100644 --- a/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ShortAxisImmersedBoundaryDivisionRule3.cppwg.cpp @@ -19,7 +19,7 @@ class ShortAxisImmersedBoundaryDivisionRule3_Overloads : public ShortAxisImmerse public: using ShortAxisImmersedBoundaryDivisionRule3::ShortAxisImmersedBoundaryDivisionRule; ::boost::numeric::ublas::c_vector CalculateCellDivisionVector(::CellPtr pParentCell, ::ImmersedBoundaryCellPopulation<3> & rCellPopulation) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, ShortAxisImmersedBoundaryDivisionRule3, CalculateCellDivisionVector, diff --git a/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp index 352d2c71..a055977a 100644 --- a/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/AbstractElement1_2.cppwg.cpp @@ -18,7 +18,7 @@ class AbstractElement1_2_Overloads : public AbstractElement1_2{ public: using AbstractElement1_2::AbstractElement; void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement1_2, UpdateNode, @@ -26,14 +26,14 @@ class AbstractElement1_2_Overloads : public AbstractElement1_2{ pNode); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement1_2, MarkAsDeleted, ); } void RegisterWithNodes() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement1_2, RegisterWithNodes, diff --git a/dynamic/wrappers/mesh/AbstractElement2_2.cppwg.cpp b/dynamic/wrappers/mesh/AbstractElement2_2.cppwg.cpp index f4ca618f..01c10bee 100644 --- a/dynamic/wrappers/mesh/AbstractElement2_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/AbstractElement2_2.cppwg.cpp @@ -18,7 +18,7 @@ class AbstractElement2_2_Overloads : public AbstractElement2_2{ public: using AbstractElement2_2::AbstractElement; void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement2_2, UpdateNode, @@ -26,14 +26,14 @@ class AbstractElement2_2_Overloads : public AbstractElement2_2{ pNode); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement2_2, MarkAsDeleted, ); } void RegisterWithNodes() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement2_2, RegisterWithNodes, diff --git a/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp index 314ff3d2..3bfb5a6c 100644 --- a/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/AbstractElement2_3.cppwg.cpp @@ -18,7 +18,7 @@ class AbstractElement2_3_Overloads : public AbstractElement2_3{ public: using AbstractElement2_3::AbstractElement; void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement2_3, UpdateNode, @@ -26,14 +26,14 @@ class AbstractElement2_3_Overloads : public AbstractElement2_3{ pNode); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement2_3, MarkAsDeleted, ); } void RegisterWithNodes() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement2_3, RegisterWithNodes, diff --git a/dynamic/wrappers/mesh/AbstractElement3_3.cppwg.cpp b/dynamic/wrappers/mesh/AbstractElement3_3.cppwg.cpp index c24139c6..6bd9cd75 100644 --- a/dynamic/wrappers/mesh/AbstractElement3_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/AbstractElement3_3.cppwg.cpp @@ -18,7 +18,7 @@ class AbstractElement3_3_Overloads : public AbstractElement3_3{ public: using AbstractElement3_3::AbstractElement; void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement3_3, UpdateNode, @@ -26,14 +26,14 @@ class AbstractElement3_3_Overloads : public AbstractElement3_3{ pNode); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement3_3, MarkAsDeleted, ); } void RegisterWithNodes() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractElement3_3, RegisterWithNodes, diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp index d81d17ad..b88ef2dd 100644 --- a/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement1_2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryElement1_2_Overloads : public ImmersedBoundaryElement1_2{ public: using ImmersedBoundaryElement1_2::ImmersedBoundaryElement; bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryElement1_2, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp index 8ceb9d01..5b948dc9 100644 --- a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_2.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryElement2_2_Overloads : public ImmersedBoundaryElement2_2{ public: using ImmersedBoundaryElement2_2::ImmersedBoundaryElement; bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryElement2_2, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp index eb5a536e..e3a07cca 100644 --- a/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement2_3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryElement2_3_Overloads : public ImmersedBoundaryElement2_3{ public: using ImmersedBoundaryElement2_3::ImmersedBoundaryElement; bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryElement2_3, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp index 76b7617d..e2860b08 100644 --- a/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/ImmersedBoundaryElement3_3.cppwg.cpp @@ -18,7 +18,7 @@ class ImmersedBoundaryElement3_3_Overloads : public ImmersedBoundaryElement3_3{ public: using ImmersedBoundaryElement3_3::ImmersedBoundaryElement; bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, ImmersedBoundaryElement3_3, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp index 3dee6ee4..ba8ee4ad 100644 --- a/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/ImmersedBoundaryMesh2_2.cppwg.cpp @@ -24,21 +24,21 @@ class ImmersedBoundaryMesh2_2_Overloads : public ImmersedBoundaryMesh2_2{ public: using ImmersedBoundaryMesh2_2::ImmersedBoundaryMesh; unsigned int GetNumNodes() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryMesh2_2, GetNumNodes, ); } unsigned int GetNumElements() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryMesh2_2, GetNumElements, ); } ::boost::numeric::ublas::c_vector GetVectorFromAtoB(::boost::numeric::ublas::c_vector const & rLocation1, ::boost::numeric::ublas::c_vector const & rLocation2) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_2_gt_, ImmersedBoundaryMesh2_2, GetVectorFromAtoB, @@ -46,42 +46,42 @@ class ImmersedBoundaryMesh2_2_Overloads : public ImmersedBoundaryMesh2_2{ rLocation2); } ::boost::numeric::ublas::c_vector GetCentroidOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_2_gt_, ImmersedBoundaryMesh2_2, GetCentroidOfElement, index); } void Clear() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMesh2_2, Clear, ); } double GetVolumeOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryMesh2_2, GetVolumeOfElement, index); } double GetSurfaceAreaOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryMesh2_2, GetSurfaceAreaOfElement, index); } ::boost::numeric::ublas::c_vector CalculateMomentsOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, ImmersedBoundaryMesh2_2, CalculateMomentsOfElement, index); } unsigned int SolveNodeMapping(unsigned int index) const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryMesh2_2, SolveNodeMapping, diff --git a/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp b/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp index 205263a6..4bc4989a 100644 --- a/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/ImmersedBoundaryMesh3_3.cppwg.cpp @@ -24,21 +24,21 @@ class ImmersedBoundaryMesh3_3_Overloads : public ImmersedBoundaryMesh3_3{ public: using ImmersedBoundaryMesh3_3::ImmersedBoundaryMesh; unsigned int GetNumNodes() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryMesh3_3, GetNumNodes, ); } unsigned int GetNumElements() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryMesh3_3, GetNumElements, ); } ::boost::numeric::ublas::c_vector GetVectorFromAtoB(::boost::numeric::ublas::c_vector const & rLocation1, ::boost::numeric::ublas::c_vector const & rLocation2) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, ImmersedBoundaryMesh3_3, GetVectorFromAtoB, @@ -46,42 +46,42 @@ class ImmersedBoundaryMesh3_3_Overloads : public ImmersedBoundaryMesh3_3{ rLocation2); } ::boost::numeric::ublas::c_vector GetCentroidOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, ImmersedBoundaryMesh3_3, GetCentroidOfElement, index); } void Clear() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, ImmersedBoundaryMesh3_3, Clear, ); } double GetVolumeOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryMesh3_3, GetVolumeOfElement, index); } double GetSurfaceAreaOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, ImmersedBoundaryMesh3_3, GetSurfaceAreaOfElement, index); } ::boost::numeric::ublas::c_vector CalculateMomentsOfElement(unsigned int index) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( _boost_numeric_ublas_c_vector_lt_double_3_gt_, ImmersedBoundaryMesh3_3, CalculateMomentsOfElement, index); } unsigned int SolveNodeMapping(unsigned int index) const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( unsignedint, ImmersedBoundaryMesh3_3, SolveNodeMapping, diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp index b2dac80a..01e9c8bd 100644 --- a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp @@ -18,21 +18,21 @@ class MutableElement1_2_Overloads : public MutableElement1_2{ public: using MutableElement1_2::MutableElement; void RegisterWithNodes() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement1_2, RegisterWithNodes, ); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement1_2, MarkAsDeleted, ); } void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement1_2, UpdateNode, @@ -40,7 +40,7 @@ class MutableElement1_2_Overloads : public MutableElement1_2{ pNode); } bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, MutableElement1_2, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/MutableElement2_2.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement2_2.cppwg.cpp index 3bbc7622..c48b6ab5 100644 --- a/dynamic/wrappers/mesh/MutableElement2_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/MutableElement2_2.cppwg.cpp @@ -18,21 +18,21 @@ class MutableElement2_2_Overloads : public MutableElement2_2{ public: using MutableElement2_2::MutableElement; void RegisterWithNodes() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement2_2, RegisterWithNodes, ); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement2_2, MarkAsDeleted, ); } void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement2_2, UpdateNode, @@ -40,7 +40,7 @@ class MutableElement2_2_Overloads : public MutableElement2_2{ pNode); } bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, MutableElement2_2, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp index 6f3b2eed..38fcd9b0 100644 --- a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp @@ -18,21 +18,21 @@ class MutableElement2_3_Overloads : public MutableElement2_3{ public: using MutableElement2_3::MutableElement; void RegisterWithNodes() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement2_3, RegisterWithNodes, ); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement2_3, MarkAsDeleted, ); } void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement2_3, UpdateNode, @@ -40,7 +40,7 @@ class MutableElement2_3_Overloads : public MutableElement2_3{ pNode); } bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, MutableElement2_3, IsElementOnBoundary, diff --git a/dynamic/wrappers/mesh/MutableElement3_3.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement3_3.cppwg.cpp index d4dfc118..272251f4 100644 --- a/dynamic/wrappers/mesh/MutableElement3_3.cppwg.cpp +++ b/dynamic/wrappers/mesh/MutableElement3_3.cppwg.cpp @@ -18,21 +18,21 @@ class MutableElement3_3_Overloads : public MutableElement3_3{ public: using MutableElement3_3::MutableElement; void RegisterWithNodes() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement3_3, RegisterWithNodes, ); } void MarkAsDeleted() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement3_3, MarkAsDeleted, ); } void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( void, MutableElement3_3, UpdateNode, @@ -40,7 +40,7 @@ class MutableElement3_3_Overloads : public MutableElement3_3{ pNode); } bool IsElementOnBoundary() const override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, MutableElement3_3, IsElementOnBoundary, diff --git a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp index 5fef9fdb..dce9f232 100644 --- a/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp +++ b/dynamic/wrappers/pde/AbstractCellCycleModelOdeSolver.cppwg.cpp @@ -18,28 +18,28 @@ class AbstractCellCycleModelOdeSolver_Overloads : public AbstractCellCycleModelO public: using AbstractCellCycleModelOdeSolver::AbstractCellCycleModelOdeSolver; bool IsSetUp() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( bool, AbstractCellCycleModelOdeSolver, IsSetUp, ); } void Reset() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractCellCycleModelOdeSolver, Reset, ); } void Initialise() override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( void, AbstractCellCycleModelOdeSolver, Initialise, ); } bool IsAdaptive() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( bool, AbstractCellCycleModelOdeSolver, IsAdaptive, diff --git a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp index f3b402c2..541b6e9a 100644 --- a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp +++ b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1.cppwg.cpp @@ -19,7 +19,7 @@ class AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_Overloads : publi public: using AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1::AbstractLinearParabolicPdeSystemForCoupledOdeSystem; double ComputeDuDtCoefficientFunction(::ChastePoint<2> const & rX, unsigned int pdeIndex) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( double, AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, ComputeDuDtCoefficientFunction, @@ -27,7 +27,7 @@ class AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1_Overloads : publi pdeIndex); } double ComputeSourceTerm(::ChastePoint<2> const & rX, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( double, AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, ComputeSourceTerm, @@ -37,7 +37,7 @@ rOdeSolution, pdeIndex); } double ComputeSourceTermAtNode(::Node<2> const & rNode, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, ComputeSourceTermAtNode, @@ -47,7 +47,7 @@ rOdeSolution, pdeIndex); } ::boost::numeric::ublas::c_matrix ComputeDiffusionTerm(::ChastePoint<2> const & rX, unsigned int pdeIndex, ::Element<2, 2> * pElement) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( _boost_numeric_ublas_c_matrix_lt_double_2_2_gt_, AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, ComputeDiffusionTerm, diff --git a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp index e3ac614f..d2a62032 100644 --- a/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp +++ b/dynamic/wrappers/pde/AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1.cppwg.cpp @@ -19,7 +19,7 @@ class AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_Overloads : publi public: using AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1::AbstractLinearParabolicPdeSystemForCoupledOdeSystem; double ComputeDuDtCoefficientFunction(::ChastePoint<3> const & rX, unsigned int pdeIndex) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( double, AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, ComputeDuDtCoefficientFunction, @@ -27,7 +27,7 @@ class AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1_Overloads : publi pdeIndex); } double ComputeSourceTerm(::ChastePoint<3> const & rX, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( double, AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, ComputeSourceTerm, @@ -37,7 +37,7 @@ rOdeSolution, pdeIndex); } double ComputeSourceTermAtNode(::Node<3> const & rNode, ::boost::numeric::ublas::c_vector & rU, ::std::vector & rOdeSolution, unsigned int pdeIndex) override { - PYBIND11_OVERLOAD( + PYBIND11_OVERRIDE( double, AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, ComputeSourceTermAtNode, @@ -47,7 +47,7 @@ rOdeSolution, pdeIndex); } ::boost::numeric::ublas::c_matrix ComputeDiffusionTerm(::ChastePoint<3> const & rX, unsigned int pdeIndex, ::Element<3, 3> * pElement) override { - PYBIND11_OVERLOAD_PURE( + PYBIND11_OVERRIDE_PURE( _boost_numeric_ublas_c_matrix_lt_double_3_3_gt_, AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, ComputeDiffusionTerm, From 6fb613dae39969fd2d8c3cdf7713d1fcefa45146 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 20:01:54 +0000 Subject: [PATCH 15/40] #62 Remove non-standard MutableElement wrappers --- dynamic/wrapper_generators/package_info.yaml | 3 - .../wrappers/mesh/MutableElement1_2.cppwg.cpp | 132 ------------------ .../wrappers/mesh/MutableElement1_2.cppwg.hpp | 6 - .../wrappers/mesh/MutableElement2_3.cppwg.cpp | 132 ------------------ .../wrappers/mesh/MutableElement2_3.cppwg.hpp | 6 - dynamic/wrappers/mesh/mesh.main.cpp | 4 - .../wrappers/wrapper_header_collection.hpp | 4 - 7 files changed, 287 deletions(-) delete mode 100644 dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp delete mode 100644 dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp delete mode 100644 dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp delete mode 100644 dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index 6cf12ef7..9fa750b4 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -126,9 +126,6 @@ modules: - signature: replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: MutableElement - template_substitutions: - - signature: - replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: NodesOnlyMesh - name: PottsElement - name: PottsMesh diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp deleted file mode 100644 index 01e9c8bd..00000000 --- a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "SmartPointers.hpp" -#include "UblasIncludes.hpp" -#include "MutableElement.hpp" - -#include "MutableElement1_2.cppwg.hpp" - -namespace py = pybind11; -typedef MutableElement<1,2 > MutableElement1_2; -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - -class MutableElement1_2_Overloads : public MutableElement1_2{ - public: - using MutableElement1_2::MutableElement; - void RegisterWithNodes() override { - PYBIND11_OVERRIDE( - void, - MutableElement1_2, - RegisterWithNodes, - ); - } - void MarkAsDeleted() override { - PYBIND11_OVERRIDE( - void, - MutableElement1_2, - MarkAsDeleted, - ); - } - void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { - PYBIND11_OVERRIDE( - void, - MutableElement1_2, - UpdateNode, - rIndex, -pNode); - } - bool IsElementOnBoundary() const override { - PYBIND11_OVERRIDE( - bool, - MutableElement1_2, - IsElementOnBoundary, - ); - } - -}; -void register_MutableElement1_2_class(py::module &m){ -py::class_ , AbstractElement<1, 2> >(m, "MutableElement1_2") - .def(py::init(), py::arg("index")) - .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) - .def( - "RegisterWithNodes", - (void(MutableElement1_2::*)()) &MutableElement1_2::RegisterWithNodes, - " " ) - .def( - "MarkAsDeleted", - (void(MutableElement1_2::*)()) &MutableElement1_2::MarkAsDeleted, - " " ) - .def( - "ResetIndex", - (void(MutableElement1_2::*)(unsigned int)) &MutableElement1_2::ResetIndex, - " " , py::arg("index") ) - .def( - "UpdateNode", - (void(MutableElement1_2::*)(unsigned int const &, ::Node<2> *)) &MutableElement1_2::UpdateNode, - " " , py::arg("rIndex"), py::arg("pNode") ) - .def( - "DeleteNode", - (void(MutableElement1_2::*)(unsigned int const &)) &MutableElement1_2::DeleteNode, - " " , py::arg("rIndex") ) - .def( - "AddNode", - (void(MutableElement1_2::*)(::Node<2> *, unsigned int const &)) &MutableElement1_2::AddNode, - " " , py::arg("pNode"), py::arg("rIndex") ) - .def( - "GetNodeLocalIndex", - (unsigned int(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetNodeLocalIndex, - " " , py::arg("globalIndex") ) - .def( - "RegisterWithEdges", - (void(MutableElement1_2::*)()) &MutableElement1_2::RegisterWithEdges, - " " ) - .def( - "RebuildEdges", - (void(MutableElement1_2::*)()) &MutableElement1_2::RebuildEdges, - " " ) - .def( - "IsElementOnBoundary", - (bool(MutableElement1_2::*)() const ) &MutableElement1_2::IsElementOnBoundary, - " " ) - .def( - "SetEdgeHelper", - (void(MutableElement1_2::*)(::EdgeHelper<2> *)) &MutableElement1_2::SetEdgeHelper, - " " , py::arg("pEdgeHelper") ) - .def( - "ClearEdges", - (void(MutableElement1_2::*)()) &MutableElement1_2::ClearEdges, - " " ) - .def( - "BuildEdges", - (void(MutableElement1_2::*)()) &MutableElement1_2::BuildEdges, - " " ) - .def( - "GetEdgeGlobalIndex", - (unsigned int(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetEdgeGlobalIndex, - " " , py::arg("localIndex") ) - .def( - "GetEdge", - (::Edge<2> *(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetEdge, - " " , py::arg("localIndex") , py::return_value_policy::reference) - .def( - "GetNumEdges", - (unsigned int(MutableElement1_2::*)() const ) &MutableElement1_2::GetNumEdges, - " " ) - .def( - "GetNeighbouringElementAtEdgeIndex", - (::std::set(MutableElement1_2::*)(unsigned int)) &MutableElement1_2::GetNeighbouringElementAtEdgeIndex, - " " , py::arg("localIndex") ) - .def( - "ContainsEdge", - (bool(MutableElement1_2::*)(::Edge<2> const *) const ) &MutableElement1_2::ContainsEdge, - " " , py::arg("pEdge") ) - .def( - "GetLocalEdgeIndex", - (long int(MutableElement1_2::*)(::Edge<2> const *) const ) &MutableElement1_2::GetLocalEdgeIndex, - " " , py::arg("pEdge") ) - ; -} diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp deleted file mode 100644 index 9736fd4a..00000000 --- a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MutableElement1_2_hpp__pyplusplus_wrapper -#define MutableElement1_2_hpp__pyplusplus_wrapper - -namespace py = pybind11; -void register_MutableElement1_2_class(py::module &m); -#endif // MutableElement1_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp deleted file mode 100644 index 38fcd9b0..00000000 --- a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "SmartPointers.hpp" -#include "UblasIncludes.hpp" -#include "MutableElement.hpp" - -#include "MutableElement2_3.cppwg.hpp" - -namespace py = pybind11; -typedef MutableElement<2,3 > MutableElement2_3; -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - -class MutableElement2_3_Overloads : public MutableElement2_3{ - public: - using MutableElement2_3::MutableElement; - void RegisterWithNodes() override { - PYBIND11_OVERRIDE( - void, - MutableElement2_3, - RegisterWithNodes, - ); - } - void MarkAsDeleted() override { - PYBIND11_OVERRIDE( - void, - MutableElement2_3, - MarkAsDeleted, - ); - } - void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { - PYBIND11_OVERRIDE( - void, - MutableElement2_3, - UpdateNode, - rIndex, -pNode); - } - bool IsElementOnBoundary() const override { - PYBIND11_OVERRIDE( - bool, - MutableElement2_3, - IsElementOnBoundary, - ); - } - -}; -void register_MutableElement2_3_class(py::module &m){ -py::class_ , AbstractElement<2, 3> >(m, "MutableElement2_3") - .def(py::init(), py::arg("index")) - .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) - .def( - "RegisterWithNodes", - (void(MutableElement2_3::*)()) &MutableElement2_3::RegisterWithNodes, - " " ) - .def( - "MarkAsDeleted", - (void(MutableElement2_3::*)()) &MutableElement2_3::MarkAsDeleted, - " " ) - .def( - "ResetIndex", - (void(MutableElement2_3::*)(unsigned int)) &MutableElement2_3::ResetIndex, - " " , py::arg("index") ) - .def( - "UpdateNode", - (void(MutableElement2_3::*)(unsigned int const &, ::Node<3> *)) &MutableElement2_3::UpdateNode, - " " , py::arg("rIndex"), py::arg("pNode") ) - .def( - "DeleteNode", - (void(MutableElement2_3::*)(unsigned int const &)) &MutableElement2_3::DeleteNode, - " " , py::arg("rIndex") ) - .def( - "AddNode", - (void(MutableElement2_3::*)(::Node<3> *, unsigned int const &)) &MutableElement2_3::AddNode, - " " , py::arg("pNode"), py::arg("rIndex") ) - .def( - "GetNodeLocalIndex", - (unsigned int(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetNodeLocalIndex, - " " , py::arg("globalIndex") ) - .def( - "RegisterWithEdges", - (void(MutableElement2_3::*)()) &MutableElement2_3::RegisterWithEdges, - " " ) - .def( - "RebuildEdges", - (void(MutableElement2_3::*)()) &MutableElement2_3::RebuildEdges, - " " ) - .def( - "IsElementOnBoundary", - (bool(MutableElement2_3::*)() const ) &MutableElement2_3::IsElementOnBoundary, - " " ) - .def( - "SetEdgeHelper", - (void(MutableElement2_3::*)(::EdgeHelper<3> *)) &MutableElement2_3::SetEdgeHelper, - " " , py::arg("pEdgeHelper") ) - .def( - "ClearEdges", - (void(MutableElement2_3::*)()) &MutableElement2_3::ClearEdges, - " " ) - .def( - "BuildEdges", - (void(MutableElement2_3::*)()) &MutableElement2_3::BuildEdges, - " " ) - .def( - "GetEdgeGlobalIndex", - (unsigned int(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetEdgeGlobalIndex, - " " , py::arg("localIndex") ) - .def( - "GetEdge", - (::Edge<3> *(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetEdge, - " " , py::arg("localIndex") , py::return_value_policy::reference) - .def( - "GetNumEdges", - (unsigned int(MutableElement2_3::*)() const ) &MutableElement2_3::GetNumEdges, - " " ) - .def( - "GetNeighbouringElementAtEdgeIndex", - (::std::set(MutableElement2_3::*)(unsigned int)) &MutableElement2_3::GetNeighbouringElementAtEdgeIndex, - " " , py::arg("localIndex") ) - .def( - "ContainsEdge", - (bool(MutableElement2_3::*)(::Edge<3> const *) const ) &MutableElement2_3::ContainsEdge, - " " , py::arg("pEdge") ) - .def( - "GetLocalEdgeIndex", - (long int(MutableElement2_3::*)(::Edge<3> const *) const ) &MutableElement2_3::GetLocalEdgeIndex, - " " , py::arg("pEdge") ) - ; -} diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp deleted file mode 100644 index 32a874a4..00000000 --- a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MutableElement2_3_hpp__pyplusplus_wrapper -#define MutableElement2_3_hpp__pyplusplus_wrapper - -namespace py = pybind11; -void register_MutableElement2_3_class(py::module &m); -#endif // MutableElement2_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/mesh.main.cpp b/dynamic/wrappers/mesh/mesh.main.cpp index 235e7531..2200a25e 100644 --- a/dynamic/wrappers/mesh/mesh.main.cpp +++ b/dynamic/wrappers/mesh/mesh.main.cpp @@ -30,9 +30,7 @@ #include "AbstractElement2_2.cppwg.hpp" #include "AbstractElement2_3.cppwg.hpp" #include "AbstractElement3_3.cppwg.hpp" -#include "MutableElement1_2.cppwg.hpp" #include "MutableElement2_2.cppwg.hpp" -#include "MutableElement2_3.cppwg.hpp" #include "MutableElement3_3.cppwg.hpp" #include "NodesOnlyMesh2.cppwg.hpp" #include "NodesOnlyMesh3.cppwg.hpp" @@ -106,9 +104,7 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_AbstractElement2_2_class(m); register_AbstractElement2_3_class(m); register_AbstractElement3_3_class(m); - register_MutableElement1_2_class(m); register_MutableElement2_2_class(m); - register_MutableElement2_3_class(m); register_MutableElement3_3_class(m); register_NodesOnlyMesh2_class(m); register_NodesOnlyMesh3_class(m); diff --git a/dynamic/wrappers/wrapper_header_collection.hpp b/dynamic/wrappers/wrapper_header_collection.hpp index bd82d80d..bd809233 100644 --- a/dynamic/wrappers/wrapper_header_collection.hpp +++ b/dynamic/wrappers/wrapper_header_collection.hpp @@ -318,9 +318,7 @@ template class MutableMesh<2,2>; template class MutableMesh<3,3>; template class AbstractElement<2,2>; template class AbstractElement<3,3>; -template class MutableElement<1,2>; template class MutableElement<2,2>; -template class MutableElement<2,3>; template class MutableElement<3,3>; template class NodesOnlyMesh<2>; template class NodesOnlyMesh<3>; @@ -723,9 +721,7 @@ typedef AbstractElement<1,2> AbstractElement1_2; typedef AbstractElement<2,2> AbstractElement2_2; typedef AbstractElement<2,3> AbstractElement2_3; typedef AbstractElement<3,3> AbstractElement3_3; -typedef MutableElement<1,2> MutableElement1_2; typedef MutableElement<2,2> MutableElement2_2; -typedef MutableElement<2,3> MutableElement2_3; typedef MutableElement<3,3> MutableElement3_3; typedef NodesOnlyMesh<2> NodesOnlyMesh2; typedef NodesOnlyMesh<3> NodesOnlyMesh3; From 795f099f7975ef7484ebe9e0e8a27145fc18680e Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 12 Mar 2024 21:07:52 +0000 Subject: [PATCH 16/40] #62 add MutableElement<1,2> and <2,3> --- dynamic/wrapper_generators/package_info.yaml | 3 + .../wrappers/mesh/MutableElement1_2.cppwg.cpp | 132 ++++++++++++++++++ .../wrappers/mesh/MutableElement1_2.cppwg.hpp | 6 + .../wrappers/mesh/MutableElement2_3.cppwg.cpp | 132 ++++++++++++++++++ .../wrappers/mesh/MutableElement2_3.cppwg.hpp | 6 + dynamic/wrappers/mesh/mesh.main.cpp | 4 + .../wrappers/wrapper_header_collection.hpp | 4 + 7 files changed, 287 insertions(+) create mode 100644 dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp create mode 100644 dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp create mode 100644 dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index 9fa750b4..6cf12ef7 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -126,6 +126,9 @@ modules: - signature: replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: MutableElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: NodesOnlyMesh - name: PottsElement - name: PottsMesh diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp new file mode 100644 index 00000000..01e9c8bd --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "MutableElement.hpp" + +#include "MutableElement1_2.cppwg.hpp" + +namespace py = pybind11; +typedef MutableElement<1,2 > MutableElement1_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class MutableElement1_2_Overloads : public MutableElement1_2{ + public: + using MutableElement1_2::MutableElement; + void RegisterWithNodes() override { + PYBIND11_OVERRIDE( + void, + MutableElement1_2, + RegisterWithNodes, + ); + } + void MarkAsDeleted() override { + PYBIND11_OVERRIDE( + void, + MutableElement1_2, + MarkAsDeleted, + ); + } + void UpdateNode(unsigned int const & rIndex, ::Node<2> * pNode) override { + PYBIND11_OVERRIDE( + void, + MutableElement1_2, + UpdateNode, + rIndex, +pNode); + } + bool IsElementOnBoundary() const override { + PYBIND11_OVERRIDE( + bool, + MutableElement1_2, + IsElementOnBoundary, + ); + } + +}; +void register_MutableElement1_2_class(py::module &m){ +py::class_ , AbstractElement<1, 2> >(m, "MutableElement1_2") + .def(py::init(), py::arg("index")) + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "RegisterWithNodes", + (void(MutableElement1_2::*)()) &MutableElement1_2::RegisterWithNodes, + " " ) + .def( + "MarkAsDeleted", + (void(MutableElement1_2::*)()) &MutableElement1_2::MarkAsDeleted, + " " ) + .def( + "ResetIndex", + (void(MutableElement1_2::*)(unsigned int)) &MutableElement1_2::ResetIndex, + " " , py::arg("index") ) + .def( + "UpdateNode", + (void(MutableElement1_2::*)(unsigned int const &, ::Node<2> *)) &MutableElement1_2::UpdateNode, + " " , py::arg("rIndex"), py::arg("pNode") ) + .def( + "DeleteNode", + (void(MutableElement1_2::*)(unsigned int const &)) &MutableElement1_2::DeleteNode, + " " , py::arg("rIndex") ) + .def( + "AddNode", + (void(MutableElement1_2::*)(::Node<2> *, unsigned int const &)) &MutableElement1_2::AddNode, + " " , py::arg("pNode"), py::arg("rIndex") ) + .def( + "GetNodeLocalIndex", + (unsigned int(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetNodeLocalIndex, + " " , py::arg("globalIndex") ) + .def( + "RegisterWithEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::RegisterWithEdges, + " " ) + .def( + "RebuildEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::RebuildEdges, + " " ) + .def( + "IsElementOnBoundary", + (bool(MutableElement1_2::*)() const ) &MutableElement1_2::IsElementOnBoundary, + " " ) + .def( + "SetEdgeHelper", + (void(MutableElement1_2::*)(::EdgeHelper<2> *)) &MutableElement1_2::SetEdgeHelper, + " " , py::arg("pEdgeHelper") ) + .def( + "ClearEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::ClearEdges, + " " ) + .def( + "BuildEdges", + (void(MutableElement1_2::*)()) &MutableElement1_2::BuildEdges, + " " ) + .def( + "GetEdgeGlobalIndex", + (unsigned int(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetEdgeGlobalIndex, + " " , py::arg("localIndex") ) + .def( + "GetEdge", + (::Edge<2> *(MutableElement1_2::*)(unsigned int) const ) &MutableElement1_2::GetEdge, + " " , py::arg("localIndex") , py::return_value_policy::reference) + .def( + "GetNumEdges", + (unsigned int(MutableElement1_2::*)() const ) &MutableElement1_2::GetNumEdges, + " " ) + .def( + "GetNeighbouringElementAtEdgeIndex", + (::std::set(MutableElement1_2::*)(unsigned int)) &MutableElement1_2::GetNeighbouringElementAtEdgeIndex, + " " , py::arg("localIndex") ) + .def( + "ContainsEdge", + (bool(MutableElement1_2::*)(::Edge<2> const *) const ) &MutableElement1_2::ContainsEdge, + " " , py::arg("pEdge") ) + .def( + "GetLocalEdgeIndex", + (long int(MutableElement1_2::*)(::Edge<2> const *) const ) &MutableElement1_2::GetLocalEdgeIndex, + " " , py::arg("pEdge") ) + ; +} diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp new file mode 100644 index 00000000..9736fd4a --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef MutableElement1_2_hpp__pyplusplus_wrapper +#define MutableElement1_2_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_MutableElement1_2_class(py::module &m); +#endif // MutableElement1_2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp new file mode 100644 index 00000000..38fcd9b0 --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "MutableElement.hpp" + +#include "MutableElement2_3.cppwg.hpp" + +namespace py = pybind11; +typedef MutableElement<2,3 > MutableElement2_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class MutableElement2_3_Overloads : public MutableElement2_3{ + public: + using MutableElement2_3::MutableElement; + void RegisterWithNodes() override { + PYBIND11_OVERRIDE( + void, + MutableElement2_3, + RegisterWithNodes, + ); + } + void MarkAsDeleted() override { + PYBIND11_OVERRIDE( + void, + MutableElement2_3, + MarkAsDeleted, + ); + } + void UpdateNode(unsigned int const & rIndex, ::Node<3> * pNode) override { + PYBIND11_OVERRIDE( + void, + MutableElement2_3, + UpdateNode, + rIndex, +pNode); + } + bool IsElementOnBoundary() const override { + PYBIND11_OVERRIDE( + bool, + MutableElement2_3, + IsElementOnBoundary, + ); + } + +}; +void register_MutableElement2_3_class(py::module &m){ +py::class_ , AbstractElement<2, 3> >(m, "MutableElement2_3") + .def(py::init(), py::arg("index")) + .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) + .def( + "RegisterWithNodes", + (void(MutableElement2_3::*)()) &MutableElement2_3::RegisterWithNodes, + " " ) + .def( + "MarkAsDeleted", + (void(MutableElement2_3::*)()) &MutableElement2_3::MarkAsDeleted, + " " ) + .def( + "ResetIndex", + (void(MutableElement2_3::*)(unsigned int)) &MutableElement2_3::ResetIndex, + " " , py::arg("index") ) + .def( + "UpdateNode", + (void(MutableElement2_3::*)(unsigned int const &, ::Node<3> *)) &MutableElement2_3::UpdateNode, + " " , py::arg("rIndex"), py::arg("pNode") ) + .def( + "DeleteNode", + (void(MutableElement2_3::*)(unsigned int const &)) &MutableElement2_3::DeleteNode, + " " , py::arg("rIndex") ) + .def( + "AddNode", + (void(MutableElement2_3::*)(::Node<3> *, unsigned int const &)) &MutableElement2_3::AddNode, + " " , py::arg("pNode"), py::arg("rIndex") ) + .def( + "GetNodeLocalIndex", + (unsigned int(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetNodeLocalIndex, + " " , py::arg("globalIndex") ) + .def( + "RegisterWithEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::RegisterWithEdges, + " " ) + .def( + "RebuildEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::RebuildEdges, + " " ) + .def( + "IsElementOnBoundary", + (bool(MutableElement2_3::*)() const ) &MutableElement2_3::IsElementOnBoundary, + " " ) + .def( + "SetEdgeHelper", + (void(MutableElement2_3::*)(::EdgeHelper<3> *)) &MutableElement2_3::SetEdgeHelper, + " " , py::arg("pEdgeHelper") ) + .def( + "ClearEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::ClearEdges, + " " ) + .def( + "BuildEdges", + (void(MutableElement2_3::*)()) &MutableElement2_3::BuildEdges, + " " ) + .def( + "GetEdgeGlobalIndex", + (unsigned int(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetEdgeGlobalIndex, + " " , py::arg("localIndex") ) + .def( + "GetEdge", + (::Edge<3> *(MutableElement2_3::*)(unsigned int) const ) &MutableElement2_3::GetEdge, + " " , py::arg("localIndex") , py::return_value_policy::reference) + .def( + "GetNumEdges", + (unsigned int(MutableElement2_3::*)() const ) &MutableElement2_3::GetNumEdges, + " " ) + .def( + "GetNeighbouringElementAtEdgeIndex", + (::std::set(MutableElement2_3::*)(unsigned int)) &MutableElement2_3::GetNeighbouringElementAtEdgeIndex, + " " , py::arg("localIndex") ) + .def( + "ContainsEdge", + (bool(MutableElement2_3::*)(::Edge<3> const *) const ) &MutableElement2_3::ContainsEdge, + " " , py::arg("pEdge") ) + .def( + "GetLocalEdgeIndex", + (long int(MutableElement2_3::*)(::Edge<3> const *) const ) &MutableElement2_3::GetLocalEdgeIndex, + " " , py::arg("pEdge") ) + ; +} diff --git a/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp new file mode 100644 index 00000000..32a874a4 --- /dev/null +++ b/dynamic/wrappers/mesh/MutableElement2_3.cppwg.hpp @@ -0,0 +1,6 @@ +#ifndef MutableElement2_3_hpp__pyplusplus_wrapper +#define MutableElement2_3_hpp__pyplusplus_wrapper + +namespace py = pybind11; +void register_MutableElement2_3_class(py::module &m); +#endif // MutableElement2_3_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/mesh/mesh.main.cpp b/dynamic/wrappers/mesh/mesh.main.cpp index 2200a25e..235e7531 100644 --- a/dynamic/wrappers/mesh/mesh.main.cpp +++ b/dynamic/wrappers/mesh/mesh.main.cpp @@ -30,7 +30,9 @@ #include "AbstractElement2_2.cppwg.hpp" #include "AbstractElement2_3.cppwg.hpp" #include "AbstractElement3_3.cppwg.hpp" +#include "MutableElement1_2.cppwg.hpp" #include "MutableElement2_2.cppwg.hpp" +#include "MutableElement2_3.cppwg.hpp" #include "MutableElement3_3.cppwg.hpp" #include "NodesOnlyMesh2.cppwg.hpp" #include "NodesOnlyMesh3.cppwg.hpp" @@ -104,7 +106,9 @@ PYBIND11_MODULE(_chaste_project_PyChaste_mesh, m) register_AbstractElement2_2_class(m); register_AbstractElement2_3_class(m); register_AbstractElement3_3_class(m); + register_MutableElement1_2_class(m); register_MutableElement2_2_class(m); + register_MutableElement2_3_class(m); register_MutableElement3_3_class(m); register_NodesOnlyMesh2_class(m); register_NodesOnlyMesh3_class(m); diff --git a/dynamic/wrappers/wrapper_header_collection.hpp b/dynamic/wrappers/wrapper_header_collection.hpp index bd809233..bd82d80d 100644 --- a/dynamic/wrappers/wrapper_header_collection.hpp +++ b/dynamic/wrappers/wrapper_header_collection.hpp @@ -318,7 +318,9 @@ template class MutableMesh<2,2>; template class MutableMesh<3,3>; template class AbstractElement<2,2>; template class AbstractElement<3,3>; +template class MutableElement<1,2>; template class MutableElement<2,2>; +template class MutableElement<2,3>; template class MutableElement<3,3>; template class NodesOnlyMesh<2>; template class NodesOnlyMesh<3>; @@ -721,7 +723,9 @@ typedef AbstractElement<1,2> AbstractElement1_2; typedef AbstractElement<2,2> AbstractElement2_2; typedef AbstractElement<2,3> AbstractElement2_3; typedef AbstractElement<3,3> AbstractElement3_3; +typedef MutableElement<1,2> MutableElement1_2; typedef MutableElement<2,2> MutableElement2_2; +typedef MutableElement<2,3> MutableElement2_3; typedef MutableElement<3,3> MutableElement3_3; typedef NodesOnlyMesh<2> NodesOnlyMesh2; typedef NodesOnlyMesh<3> NodesOnlyMesh3; From 6fb23f7cc09bac527a0498a1a9b142871f8dc187 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 18 Mar 2024 17:23:08 +0000 Subject: [PATCH 17/40] #62 remove missing MutableElement1_2 constructor --- dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp index 01e9c8bd..b126e1fc 100644 --- a/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp +++ b/dynamic/wrappers/mesh/MutableElement1_2.cppwg.cpp @@ -50,7 +50,6 @@ pNode); }; void register_MutableElement1_2_class(py::module &m){ py::class_ , AbstractElement<1, 2> >(m, "MutableElement1_2") - .def(py::init(), py::arg("index")) .def(py::init *> const & >(), py::arg("index"), py::arg("rNodes")) .def( "RegisterWithNodes", From 3fe4c00069280cf0b01e56f8210af4334a229634 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 20 Mar 2024 21:06:10 +0000 Subject: [PATCH 18/40] #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 From c1ac439b17df4cf36dec2913233cf1e583f9e316 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Sat, 23 Mar 2024 08:30:49 +0000 Subject: [PATCH 19/40] #62 update cppwg cmake target --- WrapPython.cmake | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/WrapPython.cmake b/WrapPython.cmake index 3956f863..989db90e 100644 --- a/WrapPython.cmake +++ b/WrapPython.cmake @@ -35,9 +35,6 @@ add_compile_options(-Wno-unused-local-typedefs) # Add any cmake modules defined in this project list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) -# Used for binding generation -find_program(CASTXML_EXE_LOC castxml) - # Find the Chaste and third party dependency header files. include_directories(${Chaste_INCLUDE_DIRS} ${Chaste_THIRD_PARTY_INCLUDE_DIRS}) @@ -102,14 +99,13 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc/ DESTINATION ${CMAKE_CURRENT_BINARY_DI # Target to generate bindings add_custom_target(project_PyChaste_Python_Bindings) -SET(arguments ${CMAKE_SOURCE_DIR}/) -LIST(APPEND arguments ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrappers/) -LIST(APPEND arguments ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/package_info.yaml) -LIST(APPEND arguments ${CASTXML_EXE_LOC}) -LIST(APPEND arguments ${PYCHASTE_INCLUDE_DIRS}) -LIST(APPEND arguments ${Chaste_INCLUDE_DIRS}) -LIST(APPEND arguments ${Chaste_THIRD_PARTY_INCLUDE_DIRS}) -add_custom_command(TARGET project_PyChaste_Python_Bindings COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/generate.py ${arguments}) +add_custom_command( + TARGET project_PyChaste_Python_Bindings + COMMAND cppwg ${CMAKE_SOURCE_DIR} + -w ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrappers + -p ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/package_info.yaml + -i ${PYCHASTE_INCLUDE_DIRS} ${Chaste_INCLUDE_DIRS} ${Chaste_THIRD_PARTY_INCLUDE_DIRS} +) # Loop through each module and create the shared library targets list(LENGTH PYCHASTE_PYTHON_MODULES len1) From b9505ee867cdaa147da8e039ccc0dba19a17d464 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Sat, 23 Mar 2024 13:32:33 +0000 Subject: [PATCH 20/40] #62 simplify and annotate package info --- dynamic/wrapper_generators/package_info.yaml | 1145 +++++++----------- 1 file changed, 423 insertions(+), 722 deletions(-) diff --git a/dynamic/wrapper_generators/package_info.yaml b/dynamic/wrapper_generators/package_info.yaml index 569b5b2b..f1ab8b7e 100644 --- a/dynamic/wrapper_generators/package_info.yaml +++ b/dynamic/wrapper_generators/package_info.yaml @@ -27,13 +27,18 @@ template_substitutions: replacement: [[2, 2], [3, 3]] modules: + #=== core - name: core source_locations: - global/src - io/src - linalg/src + classes: + ##=== core: chaste/global/checkpointing/ - name: Identifiable + + ##=== core: chaste/global/parallel/ - name: PetscTools excluded_methods: - GetWorld # MPI not wrapped here @@ -42,16 +47,17 @@ modules: - SetupMat excluded_variables: - MASTER_RANK # MPI not wrapped here - source_includes: + source_includes: &petsc_includes - # forward decl - # forward decl - "PythonPetscObjectConverters.hpp" - name: ReplicatableVector - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" + source_includes: *petsc_includes + + ##=== core: chaste/global/timing/ - name: Timer + + ##=== core: chaste/global/ - name: RelativeTo # enum source_file: FileFinder.hpp - name: FileFinder @@ -65,13 +71,19 @@ modules: - name: TimeStepper - name: ChasteBuildInfo source_file: Version.hpp + + #=== ode - name: ode source_locations: - ode/src + classes: + ##=== ode: chaste/ode/common/ - name: AbstractOdeSystemInformation - - name: AbstractPythonOdeSystemInformation - name: AbstractOdeSystem + + ##=== ode: chaste/cell_based/ode/ + - name: DeltaNotchOdeSystem - name: DeltaNotchEdgeOdeSystem - name: DeltaNotchInteriorOdeSystem - name: Alarcon2004OxygenBasedCellCycleOdeSystem @@ -79,11 +91,23 @@ modules: - name: TysonNovak2001OdeSystem excluded_methods: - AnalyticJacobian # double ** jacobian - - name: DeltaNotchOdeSystem + # - name: CellwiseOdeSystemInformation + + ##=== ode: pychaste/ode/ + - name: AbstractPythonOdeSystemInformation + + #=== pde - name: pde source_locations: - pde/src + classes: + #=== pde: chaste/pde/common/ + - name: AbstractBoundaryCondition + - name: ConstBoundaryCondition + - name: PdeSimulationTime + + #=== pde: chaste/pde/problem/ - name: AbstractLinearPde - name: AbstractLinearParabolicPde - name: AbstractLinearEllipticPde @@ -92,26 +116,80 @@ modules: - signature: replacement: [[2, 2, 1], [3, 3, 1]] - name: AbstractNonlinearEllipticPde - - name: AbstractBoundaryCondition - - name: ConstBoundaryCondition - - name: PdeSimulationTime + + #=== pde: chaste/cell_based/cell_based_pde/pdes/ + - name: CellwiseSourceEllipticPde + - name: AveragedSourceEllipticPde + - name: VolumeDependentAveragedSourceEllipticPde + - name: UniformSourceEllipticPde + - name: CellwiseSourceParabolicPde + - name: UniformSourceParabolicPde + - name: AveragedSourceParabolicPde + + #=== pde: chaste/cell_based/cell_based_pde/ + - name: CellBasedEllipticPdeSolver + source_includes: *petsc_includes + - name: CellBasedParabolicPdeSolver + - name: AbstractPdeModifier + excluded_methods: + - GetSolution + - GetFeMesh + source_includes: *petsc_includes + - name: AbstractBoxDomainPdeModifier + source_includes: *petsc_includes + - name: AbstractGrowingDomainPdeModifier + source_includes: *petsc_includes + - name: EllipticGrowingDomainPdeModifier + source_includes: *petsc_includes + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: ParabolicGrowingDomainPdeModifier + source_includes: *petsc_includes + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: EllipticBoxDomainPdeModifier + source_includes: *petsc_includes + excluded_methods: + - ConstructBoundaryConditionsContainer + - name: ParabolicBoxDomainPdeModifier + source_includes: *petsc_includes + excluded_methods: + - ConstructBoundaryConditionsContainer + + #=== mesh - name: mesh source_locations: - mesh/src + classes: + #=== mesh: chaste/mesh/common/ - name: ChastePoint - name: AbstractChasteRegion - - name: ChasteCuboid - - name: ChasteEllipsoid + + - name: ChasteCuboid # chaste/mesh/utilities + - name: ChasteEllipsoid # chaste/mesh/utilities + + - name: AbstractElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] + - name: AbstractMesh + - name: NodeAttributes - name: Node - - name: Element - excluded_methods: - - CalculateCircumsphereVolume # method not found! + - name: Edge - name: EdgeHelper - name: EdgeOperation - - name: AbstractMesh + + - name: Element + excluded_methods: + - CalculateCircumsphereVolume # method not found! + - name: MutableElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] + - name: AbstractTetrahedralMesh - name: TetrahedralMesh excluded_methods: @@ -121,25 +199,27 @@ modules: excluded_methods: - SplitLongEdges # can't work with vec - RescaleMeshFromBoundaryNode # method not found! - - name: AbstractElement - template_substitutions: - - signature: - replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - - name: MutableElement - template_substitutions: - - signature: - replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] - name: NodesOnlyMesh - - name: PottsElement - - name: PottsMesh - - name: FluidSource - - name: ImmersedBoundaryElement - template_substitutions: - - signature: - replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] + + #=== mesh: chaste/mesh/mutable/ + - name: Cylindrical2dMesh excluded_methods: - AddCornerNode # not implemented in 1D - - name: PottsMeshGenerator + - GetInstanceOfMismatchedBoundaryNodes + - name: Cylindrical2dNodesOnlyMesh + excluded_methods: + - SetUpBoxCollection # boost::numeric::ublas::unit_vector + - name: PeriodicNodesOnlyMesh + excluded_methods: + - SetUpBoxCollection # boost::numeric::ublas::zero_vector + - name: Toroidal2dMesh + excluded_methods: + - GetInstanceOfMismatchedBoundaryNodes + + - name: HoneycombMeshGenerator + - name: CylindricalHoneycombMeshGenerator + - name: ToroidalHoneycombMeshGenerator + + #=== mesh: chaste/mesh/vertex/ - name: VertexMesh excluded_methods: - GetFace # dont have mixed dim elements @@ -149,86 +229,102 @@ modules: - TetrahedralMesh<2, 2> - name: MutableVertexMesh - name: Cylindrical2dVertexMesh - - name: Toroidal2dMesh - excluded_methods: - - GetInstanceOfMismatchedBoundaryNodes - - name: PeriodicNodesOnlyMesh - excluded_methods: - - SetUpBoxCollection # boost::numeric::ublas::zero_vector - - name: Cylindrical2dNodesOnlyMesh - excluded_methods: - - SetUpBoxCollection # boost::numeric::ublas::unit_vector - - name: Cylindrical2dMesh - excluded_methods: - - GetInstanceOfMismatchedBoundaryNodes - name: Toroidal2dVertexMesh - - name: ImmersedBoundaryMesh - - name: HoneycombMeshGenerator + - name: HoneycombVertexMeshGenerator - - name: CylindricalHoneycombMeshGenerator - name: CylindricalHoneycombVertexMeshGenerator - - name: ToroidalHoneycombMeshGenerator - name: ToroidalHoneycombVertexMeshGenerator - name: VoronoiVertexMeshGenerator + + #=== mesh: chaste/mesh/immersed_boundary/ + - name: FluidSource + + - name: ImmersedBoundaryElement + template_substitutions: + - signature: + replacement: [[1, 2], [2, 2], [2, 3], [3, 3]] + excluded_methods: AddCornerNode # not implemented in 1D + + - name: ImmersedBoundaryMesh + - name: ImmersedBoundaryHoneycombMeshGenerator - name: ImmersedBoundaryPalisadeMeshGenerator + + #=== mesh: chaste/cell_based/mesh/ + - name: PottsElement + - name: PottsMesh + - name: PottsMeshGenerator + - name: PottsMeshWriter + # - name: PottsMeshReader + + #=== cell_based - name: cell_based source_locations: - cell_based/src + classes: + ##=== cell_based: chaste/cell_based/cell_based/properties/ + - name: AbstractCellProperty + excluded_methods: + - IsType # exclude templated method + - name: ApoptoticCellProperty + - name: CellPropertyCollection + excluded_methods: + - GetCellPropertyRegistry + - name: CellData + - name: CellLabel + - name: CellAncestor + - name: CellId + - name: CellEdgeData + - name: CellPropertyRegistry + excluded_methods: + - rGetAllCellProperties + - TakeOwnership + - Get + # - name: CellVecData + + ##=== cell_based: chaste/cell_based/properties/proliferative_types/ + - name: AbstractCellProliferativeType + - name: StemCellProliferativeType + - name: DefaultCellProliferativeType + - name: TransitCellProliferativeType + - name: DifferentiatedCellProliferativeType + + ##=== cell_based: chaste/cell_based/properties/mutations/ + - name: AbstractCellMutationState + - name: ApcOneHitCellMutationState + - name: ApcTwoHitCellMutationState + - name: BetaCateninOneHitCellMutationState + - name: WildTypeCellMutationState + + ##=== cell_based: chaste/cell_based/cycle/ - name: AbstractCellCycleModel - name: AbstractPhaseBasedCellCycleModel - name: AbstractSimpleCellCycleModel - name: AbstractSimplePhaseBasedCellCycleModel - name: AbstractSimpleGenerationalCellCycleModel - name: AbstractCellCycleModelOdeSolver + - name: AbstractOdeBasedCellCycleModel + - name: AbstractOdeBasedPhaseBasedCellCycleModel + - name: NoCellCycleModel - name: UniformCellCycleModel - - name: SimpleOxygenBasedCellCycleModel - name: UniformG1GenerationalCellCycleModel - - name: NoCellCycleModel + - name: StochasticOxygenBasedCellCycleModel + - name: SimpleOxygenBasedCellCycleModel - name: BiasedBernoulliTrialCellCycleModel - name: LabelDependentBernoulliTrialCellCycleModel - name: AlwaysDivideCellCycleModel - - name: AbstractOdeBasedCellCycleModel - name: ContactInhibitionCellCycleModel - - name: StochasticOxygenBasedCellCycleModel - name: GammaG1CellCycleModel - name: ExponentialG1GenerationalCellCycleModel - - name: AbstractOdeBasedPhaseBasedCellCycleModel - name: TysonNovakCellCycleModel - name: Alarcon2004OxygenBasedCellCycleModel - name: FixedSequenceCellCycleModel - name: BernoulliTrialCellCycleModel - name: FixedG1GenerationalCellCycleModel - ## - name: CellCycleModelOdeSolver - - name: AbstractCellProperty - excluded_methods: - - IsType # exclude templated method - ## - name: CellwiseOdeSystemInformation - - name: CellPropertyCollection - excluded_methods: - - GetCellPropertyRegistry - - name: AbstractCellProliferativeType - - name: StemCellProliferativeType - - name: DefaultCellProliferativeType - - name: TransitCellProliferativeType - - name: DifferentiatedCellProliferativeType - - name: AbstractCellMutationState - - name: ApcOneHitCellMutationState - - name: ApcTwoHitCellMutationState - - name: BetaCateninOneHitCellMutationState - - name: WildTypeCellMutationState - - name: ApoptoticCellProperty - - name: CellData - - name: CellLabel - - name: CellAncestor - - name: CellId - - name: CellEdgeData - - name: CellPropertyRegistry - excluded_methods: - - rGetAllCellProperties - - TakeOwnership - - Get + # - name: CellCycleModelOdeSolver + + ##=== cell_based: chaste/cell_based/srn/ - name: AbstractSrnModel - name: AbstractOdeSrnModel - name: NullSrnModel @@ -237,13 +333,14 @@ modules: - name: DeltaNotchEdgeSrnModel - name: DeltaNotchInteriorSrnModel - name: Goldbeter1991SrnModel - - name: VertexBasedPopulationSrn + + ##=== cell_based: chaste/cell_based/cell/ - name: Cell excluded_methods: - rGetCellPropertyCollection - GetSrnModel - name: CellsGenerator - template_substitutions: + template_substitutions: &cells_generator_substitutions - signature: replacement: - [NoCellCycleModel, 2] @@ -278,7 +375,7 @@ modules: - [BernoulliTrialCellCycleModel, 3] - [FixedG1GenerationalCellCycleModel, 2] - [FixedG1GenerationalCellCycleModel, 3] - custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/CellsGenerator_custom.py + custom_generator: &cells_generator "CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/CellsGenerator_custom.py" source_includes: - NoCellCycleModel.hpp - UniformCellCycleModel.hpp @@ -296,112 +393,25 @@ modules: - FixedSequenceCellCycleModel.hpp - BernoulliTrialCellCycleModel.hpp - FixedG1GenerationalCellCycleModel.hpp - - name: CellwiseSourceEllipticPde - - name: AveragedSourceEllipticPde - - name: VolumeDependentAveragedSourceEllipticPde - - name: UniformSourceEllipticPde - - name: CellwiseSourceParabolicPde - - name: UniformSourceParabolicPde - - name: AveragedSourceParabolicPde - - name: CellBasedEllipticPdeSolver + # - name: ParallelCellsGenerator + + ##=== cell_based: chaste/cell_based/population/srn_update/ + - name: VertexBasedPopulationSrn + + ##=== cell_based: chaste/cell_based/writers/ + - name: AbstractCellBasedWriter + + ##=== cell_based: chaste/cell_based/writers/cell_writers/ + - name: AbstractCellWriter source_includes: - - # forward decl - - # forward decl - - name: CellBasedParabolicPdeSolver - - name: AbstractCellBasedSimulationModifier - - name: AbstractPdeModifier - excluded_methods: - - GetSolution - - GetFeMesh + - AbstractCellPopulation.hpp + - name: CellAgesWriter source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: AbstractBoxDomainPdeModifier + - AbstractCellPopulation.hpp + - name: CellAncestorWriter source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: AbstractGrowingDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - - name: EllipticGrowingDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: ParabolicGrowingDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: EllipticBoxDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: ParabolicBoxDomainPdeModifier - source_includes: - - # forward decl - - # forward decl - - "PythonPetscObjectConverters.hpp" - excluded_methods: - - ConstructBoundaryConditionsContainer - - name: AbstractCellBasedWriter - - name: AbstractCellWriter - source_includes: - - AbstractCellPopulation.hpp - - name: AbstractCellPopulationWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: AbstractCellPopulationCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: AbstractCellPopulationEventWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: BoundaryNodeWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellAgesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellAncestorWriter - source_includes: - - AbstractCellPopulation.hpp - - name: CellAppliedForceWriter + - AbstractCellPopulation.hpp + - name: CellAppliedForceWriter source_includes: - AbstractCellPopulation.hpp - name: CellCycleModelProteinConcentrationsWriter @@ -413,135 +423,48 @@ modules: - name: CellDeltaNotchWriter source_includes: - AbstractCellPopulation.hpp - - name: CellDivisionLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - name: CellIdWriter source_includes: - AbstractCellPopulation.hpp - - name: CellLocationIndexWriter + - name: CellLabelWriter source_includes: - AbstractCellPopulation.hpp - - name: CellMutationStatesCountWriter + - name: CellLocationIndexWriter source_includes: - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - name: CellMutationStatesWriter source_includes: - AbstractCellPopulation.hpp - - name: CellPopulationAdjacencyMatrixWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellPopulationAreaWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellPopulationElementWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: CellProliferativePhasesCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - name: CellProliferativePhasesWriter source_includes: - AbstractCellPopulation.hpp - - name: CellProliferativeTypesCountWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - name: CellProliferativeTypesWriter source_includes: - AbstractCellPopulation.hpp - name: CellRadiusWriter source_includes: - AbstractCellPopulation.hpp - - name: CellRemovalLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - name: CellRosetteRankWriter source_includes: - AbstractCellPopulation.hpp - name: CellVolumesWriter source_includes: - AbstractCellPopulation.hpp - - name: HeterotypicBoundaryLengthWriter + - name: ImmersedBoundaryBoundaryCellWriter source_includes: - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: LegacyCellProliferativeTypesWriter - source_includes: - - AbstractCellPopulation.hpp - - name: NodeLocationWriter + - name: ImmersedBoundaryNeighbourNumberWriter source_includes: - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: NodeVelocityWriter + - name: LegacyCellProliferativeTypesWriter source_includes: - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp - - name: PottsMeshWriter - - name: RadialCellDataDistributionWriter - source_includes: + + ##=== cell_based: chaste/cell_based/writers/population_writers/ + - name: AbstractCellPopulationWriter + source_includes: &population_writer_includes - AbstractCellPopulation.hpp - MeshBasedCellPopulation.hpp - PottsBasedCellPopulation.hpp @@ -549,321 +472,174 @@ modules: - ImmersedBoundaryCellPopulation.hpp - NodeBasedCellPopulation.hpp - VertexBasedCellPopulation.hpp + - name: BoundaryNodeWriter + source_includes: *population_writer_includes + - name: CellPopulationAdjacencyMatrixWriter + source_includes: *population_writer_includes + - name: CellPopulationAreaWriter + source_includes: *population_writer_includes + - name: CellPopulationElementWriter + source_includes: *population_writer_includes + - name: HeterotypicBoundaryLengthWriter + source_includes: *population_writer_includes + - name: NodeLocationWriter + source_includes: *population_writer_includes + - name: NodeVelocityWriter + source_includes: *population_writer_includes + - name: RadialCellDataDistributionWriter + source_includes: *population_writer_includes - name: VertexIntersectionSwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp + source_includes: *population_writer_includes - name: VertexT1SwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp + source_includes: *population_writer_includes - name: VertexT2SwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp + source_includes: *population_writer_includes - name: VertexT3SwapLocationsWriter - source_includes: - - AbstractCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - VertexBasedCellPopulation.hpp + source_includes: *population_writer_includes - name: VoronoiDataWriter - source_includes: - - VertexBasedCellPopulation.hpp - - MeshBasedCellPopulation.hpp - - PottsBasedCellPopulation.hpp - - NodeBasedCellPopulation.hpp - - CaBasedCellPopulation.hpp - - ImmersedBoundaryCellPopulation.hpp - - name: ImmersedBoundaryBoundaryCellWriter - source_includes: - - ImmersedBoundaryCellPopulation.hpp - - name: ImmersedBoundaryNeighbourNumberWriter - source_includes: - - ImmersedBoundaryCellPopulation.hpp - - name: CellLabelWriter - source_includes: - - AbstractCellPopulation.hpp + source_includes: *population_writer_includes + + ##=== cell_based: chaste/cell_based/writers/population_count_writers/ + - name: AbstractCellPopulationCountWriter + source_includes: *population_writer_includes + - name: CellMutationStatesCountWriter + source_includes: *population_writer_includes + - name: CellProliferativePhasesCountWriter + source_includes: *population_writer_includes + - name: CellProliferativeTypesCountWriter + source_includes: *population_writer_includes + + ##=== cell_based: chaste/cell_based/writers/population_event_writers/ + - name: AbstractCellPopulationEventWriter + source_includes: *population_writer_includes + - name: CellDivisionLocationsWriter + source_includes: *population_writer_includes + - name: CellRemovalLocationsWriter + source_includes: *population_writer_includes + + ##=== cell_based: chaste/cell_based/population/update_rules/ - name: AbstractUpdateRule - name: AbstractCaUpdateRule - name: AbstractPottsUpdateRule + - name: AbstractCaSwitchingUpdateRule + + - name: AdhesionPottsUpdateRule + - name: ChemotaxisPottsUpdateRule + - name: DifferentialAdhesionPottsUpdateRule + - name: DiffusionCaUpdateRule + - name: RandomCaSwitchingUpdateRule + - name: SurfaceAreaConstraintPottsUpdateRule + - name: VolumeConstraintPottsUpdateRule + + ##=== cell_based: chaste/cell_based/population/division_rules/ - name: AbstractCentreBasedDivisionRule - name: AbstractCaBasedDivisionRule - - name: AbstractCaSwitchingUpdateRule - name: AbstractImmersedBoundaryDivisionRule - name: AbstractVertexBasedDivisionRule - - name: DiffusionCaUpdateRule - - name: VolumeConstraintPottsUpdateRule - - name: SurfaceAreaConstraintPottsUpdateRule - - name: AdhesionPottsUpdateRule - - name: DifferentialAdhesionPottsUpdateRule - - name: RandomDirectionVertexBasedDivisionRule - - name: VonMisesVertexBasedDivisionRule - - name: FixedVertexBasedDivisionRule - - name: ShovingCaBasedDivisionRule + - name: ExclusionCaBasedDivisionRule - - name: RandomDirectionCentreBasedDivisionRule - name: FixedCentreBasedDivisionRule - - name: ShortAxisVertexBasedDivisionRule + - name: FixedVertexBasedDivisionRule + - name: RandomDirectionCentreBasedDivisionRule + - name: RandomDirectionVertexBasedDivisionRule - name: ShortAxisImmersedBoundaryDivisionRule - - name: RandomCaSwitchingUpdateRule - - name: ChemotaxisPottsUpdateRule + - name: ShortAxisVertexBasedDivisionRule + - name: ShovingCaBasedDivisionRule + - name: VonMisesVertexBasedDivisionRule + + ##=== cell_based: chaste/cell_based/population/forces/ - name: AbstractForce - name: AbstractTwoBodyInteractionForce + - name: AbstractImmersedBoundaryForce + - name: BuskeAdhesiveForce - name: BuskeCompressionForce - name: BuskeElasticForce - name: ChemotacticForce + - name: DiffusionForce + - name: FarhadifarForce - name: GeneralisedLinearSpringForce - - name: DifferentialAdhesionGeneralisedLinearSpringForce + - name: ImmersedBoundaryKinematicFeedbackForce + - name: ImmersedBoundaryLinearDifferentialAdhesionForce + - name: ImmersedBoundaryLinearInteractionForce + - name: ImmersedBoundaryLinearMembraneForce + - name: ImmersedBoundaryMorseInteractionForce + - name: ImmersedBoundaryMorseMembraneForce - name: NagaiHondaForce - - name: DiffusionForce - name: RepulsionForce - name: WelikyOsterForce - - name: FarhadifarForce - excluded_methods: - - GetLineTensionParameter - - name: PlanarPolarisedFarhadifarForce excluded_methods: - GetLineTensionParameter + + - name: DifferentialAdhesionGeneralisedLinearSpringForce - name: NagaiHondaDifferentialAdhesionForce excluded_methods: - GetAdhesionParameter - - name: AbstractImmersedBoundaryForce - - name: ImmersedBoundaryKinematicFeedbackForce - - name: ImmersedBoundaryLinearDifferentialAdhesionForce - - name: ImmersedBoundaryLinearInteractionForce - - name: ImmersedBoundaryLinearMembraneForce - - name: ImmersedBoundaryMorseInteractionForce - - name: ImmersedBoundaryMorseMembraneForce + - name: PlanarPolarisedFarhadifarForce + excluded_methods: + - GetLineTensionParameter + # - name: DiscreteSystemForceCalculator + + ##=== cell_based: chaste/cell_based/population/killers/ - name: AbstractCellKiller - - name: PlaneBasedCellKiller + - name: ApoptoticCellKiller - - name: TargetedCellKiller - - name: RandomCellKiller - - name: T2SwapCellKiller - name: IsolatedLabelledCellKiller - - name: AbstractCellPopulationBoundaryCondition - - name: PlaneBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: AttractingPlaneBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: SphereGeometryBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: SlidingBoundaryCondition - source_includes: - - PythonUblasObjectConverters.hpp - - name: AbstractCellPopulation - excluded_methods: - - rGetCells - source_includes: - - AbstractCellBasedSimulation.hpp - - name: AbstractOffLatticeCellPopulation - - name: AbstractCentreBasedCellPopulation - template_substitutions: - - signature: - replacement: [[2, 2], [3, 3]] - excluded_methods: - - MarkSpring - - UnmarkSpring - - name: AbstractOnLatticeCellPopulation - excluded_methods: - - GetNodeCorrespondingToCell - - MarkSpring - - UnmarkSpring - - name: CaBasedCellPopulation - excluded_methods: - - rGetMesh - - GetTetrahedralMeshForPdeModifier - - GetNodeCorrespondingToCell - - rGetAvailableSpaces - 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: ImmersedBoundaryCellPopulation - excluded_methods: - - rGetMesh - - GetTetrahedralMeshForPdeModifier - custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py - source_includes: - - AbstractImmersedBoundaryDivisionRule.hpp - - 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: MeshBasedCellPopulation - excluded_methods: - - GetVoronoiTessellation - - rGetNodePairs - - GetTetrahedralMeshForPdeModifier - - 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: MeshBasedCellPopulationWithGhostNodes - 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: VertexBasedCellPopulation + - name: PlaneBasedCellKiller + - name: RandomCellKiller + - name: T2SwapCellKiller + - name: TargetedCellKiller + + ##=== cell_based: chaste/cell_based/population/boundary_conditions/ + - name: AbstractCellPopulationBoundaryCondition + + - name: PlaneBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + + - name: SlidingBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + + - name: SphereGeometryBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + + ##=== cell_based: chaste/cell_based/population/ + - name: AbstractCellPopulation excluded_methods: - - GetElementCorrespondingToCell - - GetElement - - GetTetrahedralMeshForPdeModifier - - rGetMesh - custom_generator: CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py + - rGetCells source_includes: - AbstractCellBasedSimulation.hpp - - AbstractVertexBasedDivisionRule.hppBoundaryNodeWriter.hpp + + - name: AbstractOffLatticeCellPopulation + + - name: AbstractCentreBasedCellPopulation + template_substitutions: + - signature: + replacement: [[2, 2], [3, 3]] + excluded_methods: + - MarkSpring + - UnmarkSpring + + - name: AbstractOnLatticeCellPopulation + excluded_methods: + - GetNodeCorrespondingToCell + - MarkSpring + - UnmarkSpring + + - name: CaBasedCellPopulation + excluded_methods: + - rGetMesh + - GetTetrahedralMeshForPdeModifier + - GetNodeCorrespondingToCell + - rGetAvailableSpaces + custom_generator: &population_generator "CPPWG_SOURCEROOT/projects/PyChaste/dynamic/wrapper_generators/PopulationWriter_custom.py" + source_includes: &population_includes + - AbstractCellBasedSimulation.hpp + - AbstractImmersedBoundaryDivisionRule.hpp + - AbstractVertexBasedDivisionRule.hpp + - BoundaryNodeWriter.hpp - CellAgesWriter.hpp - CellAncestorWriter.hpp - CellAppliedForceWriter.hpp @@ -898,196 +674,121 @@ modules: - VertexT2SwapLocationsWriter.hpp - VertexT3SwapLocationsWriter.hpp - VoronoiDataWriter.hpp - - name: PottsBasedCellPopulation + + - name: ImmersedBoundaryCellPopulation excluded_methods: - - GetElementCorrespondingToCell - - GetElement + - rGetMesh + - GetTetrahedralMeshForPdeModifier + custom_generator: *population_generator + source_includes: *population_includes + + - name: MeshBasedCellPopulation + excluded_methods: + - GetVoronoiTessellation + - rGetNodePairs - GetTetrahedralMeshForPdeModifier - rGetMesh - - GetElementTessellation - - GetMutableMesh - 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 + custom_generator: *population_generator + source_includes: *population_includes + + - name: MeshBasedCellPopulationWithGhostNodes + custom_generator: *population_generator + source_includes: *population_includes + - name: NodeBasedCellPopulation excluded_methods: - rGetNodePairs - GetTetrahedralMeshForPdeModifier - 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 + custom_generator: *population_generator + source_includes: *population_includes + + - name: NodeBasedCellPopulationWithBuskeUpdate + excluded_methods: + - rGetMesh + custom_generator: *population_generator + source_includes: *population_includes + - 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 + custom_generator: *population_generator + source_includes: *population_includes + + - name: VertexBasedCellPopulation excluded_methods: + - GetElementCorrespondingToCell + - GetElement + - GetTetrahedralMeshForPdeModifier - 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 + custom_generator: *population_generator + source_includes: *population_includes + + - name: PottsBasedCellPopulation + excluded_methods: + - GetElementCorrespondingToCell + - GetElement + - GetTetrahedralMeshForPdeModifier + - rGetMesh + - GetElementTessellation + - GetMutableMesh + custom_generator: *population_generator + source_includes: *population_includes + + # - name: CellwiseDataGradient + + ##=== cell_based: chaste/cell_based/simulation/modifiers/ + - name: AbstractCellBasedSimulationModifier - name: AbstractTargetAreaModifier - - name: SimpleTargetAreaModifier + + - name: DeltaNotchTrackingModifier + - name: DeltaNotchEdgeTrackingModifier + - name: DeltaNotchEdgeInteriorTrackingModifier - name: DivisionBiasTrackingModifier - name: ExtrinsicPullModifier - - name: DeltaNotchEdgeInteriorTrackingModifier - - name: DeltaNotchTrackingModifier - - name: TargetAreaLinearGrowthModifier - - name: VolumeTrackingModifier - - name: VtkSceneModifier - name: ImmersedBoundarySimulationModifier - name: ImmersedBoundarySvgWriter - name: NormallyDistributedTargetAreaModifier + - name: SimpleTargetAreaModifier + - name: TargetAreaLinearGrowthModifier + - name: VolumeTrackingModifier + + ##=== cell_based: chaste/cell_based/simulation/numerical_methods/ + - name: AbstractNumericalMethod + - name: ForwardEulerNumericalMethod + # - name: StepSizeException + + ##=== cell_based: chaste/cell_based/common/ + - name: SimulationTime + # - name: OdeLinearSystemSolver + + ##=== cell_based: chaste/cell_based/simulation/ - name: AbstractCellBasedSimulation template_substitutions: - signature: replacement: [[2, 2], [3, 3]] excluded_methods: - GetSimulationModifiers - - name: SimulationTime - - name: OnLatticeSimulation + - name: OffLatticeSimulation + - name: OnLatticeSimulation + # - name: CellBasedSimulationArchiver + + ##=== cell_based: pychaste/cell_based/ + - name: AttractingPlaneBoundaryCondition + source_includes: + - PythonUblasObjectConverters.hpp + - name: VtkSceneModifier - name: PythonSimulationModifier + + #=== tutorial - name: tutorial source_locations: - projects/PyChaste/tutorial/src classes: - name: Hello + + #=== visualization - name: visualization source_locations: - projects/PyChaste/visualization/src From eca74311755e51e3494a3215edc5e1586afb247e Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 14:44:44 +0000 Subject: [PATCH 21/40] #62 rm missing mesh from cmake --- ProjectIncludes.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ProjectIncludes.cmake b/ProjectIncludes.cmake index 1e17f456..a919baef 100644 --- a/ProjectIncludes.cmake +++ b/ProjectIncludes.cmake @@ -34,7 +34,6 @@ set(PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/cell_based) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/ode) -# list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/mesh) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/tutorial) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/visualization) list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dynamic) \ No newline at end of file From c1461d8027da1573696187f24a26352f7fe05a0c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 15:00:43 +0000 Subject: [PATCH 22/40] #62 Add numerical method classes --- .../AbstractNumericalMethod2_2.cppwg.cpp | 80 +++++++++++++++++++ .../AbstractNumericalMethod2_2.cppwg.hpp | 7 ++ .../AbstractNumericalMethod3_3.cppwg.cpp | 80 +++++++++++++++++++ .../AbstractNumericalMethod3_3.cppwg.hpp | 7 ++ .../ForwardEulerNumericalMethod2_2.cppwg.cpp | 48 +++++++++++ .../ForwardEulerNumericalMethod2_2.cppwg.hpp | 7 ++ .../ForwardEulerNumericalMethod3_3.cppwg.cpp | 48 +++++++++++ .../ForwardEulerNumericalMethod3_3.cppwg.hpp | 7 ++ .../wrappers/cell_based/cell_based.main.cpp | 4 + .../wrappers/wrapper_header_collection.hpp | 4 + 10 files changed, 292 insertions(+) create mode 100644 dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp create mode 100644 dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp create mode 100644 dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp new file mode 100644 index 00000000..9acd2d7a --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractNumericalMethod.hpp" + +#include "AbstractNumericalMethod2_2.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractNumericalMethod<2, 2 > AbstractNumericalMethod2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class AbstractNumericalMethod2_Overrides : public AbstractNumericalMethod2_2{ + public: + using AbstractNumericalMethod2_2::AbstractNumericalMethod; + void UpdateAllNodePositions(double dt) override { + PYBIND11_OVERRIDE_PURE( + void, + AbstractNumericalMethod2_2, + UpdateAllNodePositions, + dt); + } + void OutputNumericalMethodParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERRIDE( + void, + AbstractNumericalMethod2_2, + OutputNumericalMethodParameters, + rParamsFile); + } + +}; +void register_AbstractNumericalMethod2_class(py::module &m){ +py::class_ >(m, "AbstractNumericalMethod2_2") + .def(py::init< >()) + .def( + "SetCellPopulation", + (void(AbstractNumericalMethod2_2::*)(::AbstractOffLatticeCellPopulation<2> *)) &AbstractNumericalMethod2_2::SetCellPopulation, + " " , py::arg("pPopulation") ) + .def( + "SetForceCollection", + (void(AbstractNumericalMethod2_2::*)(::std::vector>> *)) &AbstractNumericalMethod2_2::SetForceCollection, + " " , py::arg("pForces") ) + .def( + "SetBoundaryConditions", + (void(AbstractNumericalMethod2_2::*)(::std::vector>> *)) &AbstractNumericalMethod2_2::SetBoundaryConditions, + " " , py::arg("pBoundaryConditions") ) + .def( + "SetUseAdaptiveTimestep", + (void(AbstractNumericalMethod2_2::*)(bool)) &AbstractNumericalMethod2_2::SetUseAdaptiveTimestep, + " " , py::arg("useAdaptiveTimestep") ) + .def( + "SetUseUpdateNodeLocation", + (void(AbstractNumericalMethod2_2::*)(bool)) &AbstractNumericalMethod2_2::SetUseUpdateNodeLocation, + " " , py::arg("useUpdateNodeLocation") ) + .def( + "GetUseUpdateNodeLocation", + (bool(AbstractNumericalMethod2_2::*)()) &AbstractNumericalMethod2_2::GetUseUpdateNodeLocation, + " " ) + .def( + "HasAdaptiveTimestep", + (bool(AbstractNumericalMethod2_2::*)()) &AbstractNumericalMethod2_2::HasAdaptiveTimestep, + " " ) + .def( + "UpdateAllNodePositions", + (void(AbstractNumericalMethod2_2::*)(double)) &AbstractNumericalMethod2_2::UpdateAllNodePositions, + " " , py::arg("dt") ) + .def( + "OutputNumericalMethodInfo", + (void(AbstractNumericalMethod2_2::*)(::out_stream &)) &AbstractNumericalMethod2_2::OutputNumericalMethodInfo, + " " , py::arg("rParamsFile") ) + .def( + "OutputNumericalMethodParameters", + (void(AbstractNumericalMethod2_2::*)(::out_stream &)) &AbstractNumericalMethod2_2::OutputNumericalMethodParameters, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp new file mode 100644 index 00000000..b4317e2f --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp @@ -0,0 +1,7 @@ +#ifndef AbstractNumericalMethod2_hpp__cppwg_wrapper +#define AbstractNumericalMethod2_hpp__cppwg_wrapper + +#include + +void register_AbstractNumericalMethod2_class(pybind11::module &m); +#endif // AbstractNumericalMethod2_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp new file mode 100644 index 00000000..56f54e0b --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "AbstractNumericalMethod.hpp" + +#include "AbstractNumericalMethod3_3.cppwg.hpp" + +namespace py = pybind11; +typedef AbstractNumericalMethod<3, 3 > AbstractNumericalMethod3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class AbstractNumericalMethod3_Overrides : public AbstractNumericalMethod3_3{ + public: + using AbstractNumericalMethod3_3::AbstractNumericalMethod; + void UpdateAllNodePositions(double dt) override { + PYBIND11_OVERRIDE_PURE( + void, + AbstractNumericalMethod3_3, + UpdateAllNodePositions, + dt); + } + void OutputNumericalMethodParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERRIDE( + void, + AbstractNumericalMethod3_3, + OutputNumericalMethodParameters, + rParamsFile); + } + +}; +void register_AbstractNumericalMethod3_class(py::module &m){ +py::class_ >(m, "AbstractNumericalMethod3_3") + .def(py::init< >()) + .def( + "SetCellPopulation", + (void(AbstractNumericalMethod3_3::*)(::AbstractOffLatticeCellPopulation<3> *)) &AbstractNumericalMethod3_3::SetCellPopulation, + " " , py::arg("pPopulation") ) + .def( + "SetForceCollection", + (void(AbstractNumericalMethod3_3::*)(::std::vector>> *)) &AbstractNumericalMethod3_3::SetForceCollection, + " " , py::arg("pForces") ) + .def( + "SetBoundaryConditions", + (void(AbstractNumericalMethod3_3::*)(::std::vector>> *)) &AbstractNumericalMethod3_3::SetBoundaryConditions, + " " , py::arg("pBoundaryConditions") ) + .def( + "SetUseAdaptiveTimestep", + (void(AbstractNumericalMethod3_3::*)(bool)) &AbstractNumericalMethod3_3::SetUseAdaptiveTimestep, + " " , py::arg("useAdaptiveTimestep") ) + .def( + "SetUseUpdateNodeLocation", + (void(AbstractNumericalMethod3_3::*)(bool)) &AbstractNumericalMethod3_3::SetUseUpdateNodeLocation, + " " , py::arg("useUpdateNodeLocation") ) + .def( + "GetUseUpdateNodeLocation", + (bool(AbstractNumericalMethod3_3::*)()) &AbstractNumericalMethod3_3::GetUseUpdateNodeLocation, + " " ) + .def( + "HasAdaptiveTimestep", + (bool(AbstractNumericalMethod3_3::*)()) &AbstractNumericalMethod3_3::HasAdaptiveTimestep, + " " ) + .def( + "UpdateAllNodePositions", + (void(AbstractNumericalMethod3_3::*)(double)) &AbstractNumericalMethod3_3::UpdateAllNodePositions, + " " , py::arg("dt") ) + .def( + "OutputNumericalMethodInfo", + (void(AbstractNumericalMethod3_3::*)(::out_stream &)) &AbstractNumericalMethod3_3::OutputNumericalMethodInfo, + " " , py::arg("rParamsFile") ) + .def( + "OutputNumericalMethodParameters", + (void(AbstractNumericalMethod3_3::*)(::out_stream &)) &AbstractNumericalMethod3_3::OutputNumericalMethodParameters, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp new file mode 100644 index 00000000..dc8aa0a4 --- /dev/null +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp @@ -0,0 +1,7 @@ +#ifndef AbstractNumericalMethod3_hpp__cppwg_wrapper +#define AbstractNumericalMethod3_hpp__cppwg_wrapper + +#include + +void register_AbstractNumericalMethod3_class(pybind11::module &m); +#endif // AbstractNumericalMethod3_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp new file mode 100644 index 00000000..7861fcc6 --- /dev/null +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ForwardEulerNumericalMethod.hpp" + +#include "ForwardEulerNumericalMethod2_2.cppwg.hpp" + +namespace py = pybind11; +typedef ForwardEulerNumericalMethod<2, 2 > ForwardEulerNumericalMethod2_2; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ForwardEulerNumericalMethod2_Overrides : public ForwardEulerNumericalMethod2_2{ + public: + using ForwardEulerNumericalMethod2_2::ForwardEulerNumericalMethod; + void UpdateAllNodePositions(double dt) override { + PYBIND11_OVERRIDE( + void, + ForwardEulerNumericalMethod2_2, + UpdateAllNodePositions, + dt); + } + void OutputNumericalMethodParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERRIDE( + void, + ForwardEulerNumericalMethod2_2, + OutputNumericalMethodParameters, + rParamsFile); + } + +}; +void register_ForwardEulerNumericalMethod2_class(py::module &m){ +py::class_ , AbstractNumericalMethod<2> >(m, "ForwardEulerNumericalMethod2_2") + .def(py::init< >()) + .def( + "UpdateAllNodePositions", + (void(ForwardEulerNumericalMethod2_2::*)(double)) &ForwardEulerNumericalMethod2_2::UpdateAllNodePositions, + " " , py::arg("dt") ) + .def( + "OutputNumericalMethodParameters", + (void(ForwardEulerNumericalMethod2_2::*)(::out_stream &)) &ForwardEulerNumericalMethod2_2::OutputNumericalMethodParameters, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp new file mode 100644 index 00000000..fd1da39e --- /dev/null +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp @@ -0,0 +1,7 @@ +#ifndef ForwardEulerNumericalMethod2_hpp__cppwg_wrapper +#define ForwardEulerNumericalMethod2_hpp__cppwg_wrapper + +#include + +void register_ForwardEulerNumericalMethod2_class(pybind11::module &m); +#endif // ForwardEulerNumericalMethod2_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp new file mode 100644 index 00000000..1a29ce62 --- /dev/null +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include +#include +#include "SmartPointers.hpp" +#include "UblasIncludes.hpp" +#include "ForwardEulerNumericalMethod.hpp" + +#include "ForwardEulerNumericalMethod3_3.cppwg.hpp" + +namespace py = pybind11; +typedef ForwardEulerNumericalMethod<3, 3 > ForwardEulerNumericalMethod3_3; +PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); + +class ForwardEulerNumericalMethod3_Overrides : public ForwardEulerNumericalMethod3_3{ + public: + using ForwardEulerNumericalMethod3_3::ForwardEulerNumericalMethod; + void UpdateAllNodePositions(double dt) override { + PYBIND11_OVERRIDE( + void, + ForwardEulerNumericalMethod3_3, + UpdateAllNodePositions, + dt); + } + void OutputNumericalMethodParameters(::out_stream & rParamsFile) override { + PYBIND11_OVERRIDE( + void, + ForwardEulerNumericalMethod3_3, + OutputNumericalMethodParameters, + rParamsFile); + } + +}; +void register_ForwardEulerNumericalMethod3_class(py::module &m){ +py::class_ , AbstractNumericalMethod<3> >(m, "ForwardEulerNumericalMethod3_3") + .def(py::init< >()) + .def( + "UpdateAllNodePositions", + (void(ForwardEulerNumericalMethod3_3::*)(double)) &ForwardEulerNumericalMethod3_3::UpdateAllNodePositions, + " " , py::arg("dt") ) + .def( + "OutputNumericalMethodParameters", + (void(ForwardEulerNumericalMethod3_3::*)(::out_stream &)) &ForwardEulerNumericalMethod3_3::OutputNumericalMethodParameters, + " " , py::arg("rParamsFile") ) + ; +} diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp new file mode 100644 index 00000000..67c8b0c9 --- /dev/null +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp @@ -0,0 +1,7 @@ +#ifndef ForwardEulerNumericalMethod3_hpp__cppwg_wrapper +#define ForwardEulerNumericalMethod3_hpp__cppwg_wrapper + +#include + +void register_ForwardEulerNumericalMethod3_class(pybind11::module &m); +#endif // ForwardEulerNumericalMethod3_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/cell_based.main.cpp b/dynamic/wrappers/cell_based/cell_based.main.cpp index 2d750883..46b876a8 100644 --- a/dynamic/wrappers/cell_based/cell_based.main.cpp +++ b/dynamic/wrappers/cell_based/cell_based.main.cpp @@ -753,6 +753,10 @@ PYBIND11_MODULE(_chaste_project_PyChaste_cell_based, m) register_ImmersedBoundarySvgWriter3_class(m); register_NormallyDistributedTargetAreaModifier2_class(m); register_NormallyDistributedTargetAreaModifier3_class(m); + register_AbstractNumericalMethod2_2_class(m); + register_AbstractNumericalMethod3_3_class(m); + register_ForwardEulerNumericalMethod2_2_class(m); + register_ForwardEulerNumericalMethod3_3_class(m); register_AbstractCellBasedSimulation2_2_class(m); register_AbstractCellBasedSimulation3_3_class(m); register_SimulationTime_class(m); diff --git a/dynamic/wrappers/wrapper_header_collection.hpp b/dynamic/wrappers/wrapper_header_collection.hpp index bd82d80d..1b0794a0 100644 --- a/dynamic/wrappers/wrapper_header_collection.hpp +++ b/dynamic/wrappers/wrapper_header_collection.hpp @@ -662,6 +662,10 @@ template class ImmersedBoundarySvgWriter<2>; template class ImmersedBoundarySvgWriter<3>; template class NormallyDistributedTargetAreaModifier<2>; template class NormallyDistributedTargetAreaModifier<3>; +template class AbstractNumericalMethod<2,2>; +template class AbstractNumericalMethod<3,3>; +template class ForwardEulerNumericalMethod<2,2>; +template class ForwardEulerNumericalMethod<3,3>; template class AbstractCellBasedSimulation<2,2>; template class AbstractCellBasedSimulation<3,3>; template class OnLatticeSimulation<2>; From a09ef7816d8a7001766335d9bd94821f04ca8917 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 15:01:53 +0000 Subject: [PATCH 23/40] #62 update c++ std in generation cmake --- WrapPython.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/WrapPython.cmake b/WrapPython.cmake index 989db90e..ae8c70ea 100644 --- a/WrapPython.cmake +++ b/WrapPython.cmake @@ -105,6 +105,7 @@ add_custom_command( -w ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrappers -p ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/package_info.yaml -i ${PYCHASTE_INCLUDE_DIRS} ${Chaste_INCLUDE_DIRS} ${Chaste_THIRD_PARTY_INCLUDE_DIRS} + --std c++17 ) # Loop through each module and create the shared library targets From d74e09e98ea2ab270cb232748ef3531258079d75 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 15:14:02 +0000 Subject: [PATCH 24/40] #62 fix numerical method wrappers --- .../wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp | 2 +- .../wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp | 2 +- .../wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp | 2 +- .../wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp | 2 +- .../cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp | 2 +- .../cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp | 2 +- .../cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp | 2 +- .../cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp | 2 +- dynamic/wrappers/cell_based/cell_based.main.cpp | 4 ++++ 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp index 9acd2d7a..8ae64e94 100644 --- a/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.cpp @@ -33,7 +33,7 @@ class AbstractNumericalMethod2_Overrides : public AbstractNumericalMethod2_2{ } }; -void register_AbstractNumericalMethod2_class(py::module &m){ +void register_AbstractNumericalMethod2_2_class(py::module &m){ py::class_ >(m, "AbstractNumericalMethod2_2") .def(py::init< >()) .def( diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp index b4317e2f..9d2264ca 100644 --- a/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod2_2.cppwg.hpp @@ -3,5 +3,5 @@ #include -void register_AbstractNumericalMethod2_class(pybind11::module &m); +void register_AbstractNumericalMethod2_2_class(pybind11::module &m); #endif // AbstractNumericalMethod2_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp index 56f54e0b..43f4da99 100644 --- a/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.cpp @@ -33,7 +33,7 @@ class AbstractNumericalMethod3_Overrides : public AbstractNumericalMethod3_3{ } }; -void register_AbstractNumericalMethod3_class(py::module &m){ +void register_AbstractNumericalMethod3_3_class(py::module &m){ py::class_ >(m, "AbstractNumericalMethod3_3") .def(py::init< >()) .def( diff --git a/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp index dc8aa0a4..ce3f7efb 100644 --- a/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp +++ b/dynamic/wrappers/cell_based/AbstractNumericalMethod3_3.cppwg.hpp @@ -3,5 +3,5 @@ #include -void register_AbstractNumericalMethod3_class(pybind11::module &m); +void register_AbstractNumericalMethod3_3_class(pybind11::module &m); #endif // AbstractNumericalMethod3_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp index 7861fcc6..26efb694 100644 --- a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.cpp @@ -33,7 +33,7 @@ class ForwardEulerNumericalMethod2_Overrides : public ForwardEulerNumericalMetho } }; -void register_ForwardEulerNumericalMethod2_class(py::module &m){ +void register_ForwardEulerNumericalMethod2_2_class(py::module &m){ py::class_ , AbstractNumericalMethod<2> >(m, "ForwardEulerNumericalMethod2_2") .def(py::init< >()) .def( diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp index fd1da39e..05f78547 100644 --- a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod2_2.cppwg.hpp @@ -3,5 +3,5 @@ #include -void register_ForwardEulerNumericalMethod2_class(pybind11::module &m); +void register_ForwardEulerNumericalMethod2_2_class(pybind11::module &m); #endif // ForwardEulerNumericalMethod2_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp index 1a29ce62..f842a4cf 100644 --- a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.cpp @@ -33,7 +33,7 @@ class ForwardEulerNumericalMethod3_Overrides : public ForwardEulerNumericalMetho } }; -void register_ForwardEulerNumericalMethod3_class(py::module &m){ +void register_ForwardEulerNumericalMethod3_3_class(py::module &m){ py::class_ , AbstractNumericalMethod<3> >(m, "ForwardEulerNumericalMethod3_3") .def(py::init< >()) .def( diff --git a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp index 67c8b0c9..20d67b1d 100644 --- a/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp +++ b/dynamic/wrappers/cell_based/ForwardEulerNumericalMethod3_3.cppwg.hpp @@ -3,5 +3,5 @@ #include -void register_ForwardEulerNumericalMethod3_class(pybind11::module &m); +void register_ForwardEulerNumericalMethod3_3_class(pybind11::module &m); #endif // ForwardEulerNumericalMethod3_hpp__cppwg_wrapper diff --git a/dynamic/wrappers/cell_based/cell_based.main.cpp b/dynamic/wrappers/cell_based/cell_based.main.cpp index 46b876a8..69fbab15 100644 --- a/dynamic/wrappers/cell_based/cell_based.main.cpp +++ b/dynamic/wrappers/cell_based/cell_based.main.cpp @@ -369,6 +369,10 @@ #include "ImmersedBoundarySvgWriter3.cppwg.hpp" #include "NormallyDistributedTargetAreaModifier2.cppwg.hpp" #include "NormallyDistributedTargetAreaModifier3.cppwg.hpp" +#include "AbstractNumericalMethod2_2.cppwg.hpp" +#include "AbstractNumericalMethod3_3.cppwg.hpp" +#include "ForwardEulerNumericalMethod2_2.cppwg.hpp" +#include "ForwardEulerNumericalMethod3_3.cppwg.hpp" #include "AbstractCellBasedSimulation2_2.cppwg.hpp" #include "AbstractCellBasedSimulation3_3.cppwg.hpp" #include "SimulationTime.cppwg.hpp" From 404a4809c03088c8dd7592267a990ae8522fd7af Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 17:55:20 +0000 Subject: [PATCH 25/40] #62 add immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 334 ++++++++++++++++++ doc/tutorials/TestImmersedBoundaryTutorial.md | 285 +++++++++++++++ .../tutorials/TestImmersedBoundaryTutorial.py | 200 +++++++++++ 3 files changed, 819 insertions(+) create mode 100644 doc/tutorials/TestImmersedBoundaryTutorial.ipynb create mode 100644 doc/tutorials/TestImmersedBoundaryTutorial.md create mode 100644 test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb new file mode 100644 index 00000000..b114bbf8 --- /dev/null +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -0,0 +1,334 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "73f1bc0d", + "metadata": {}, + "source": [ + "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "529189e2", + "metadata": {}, + "outputs": [], + "source": [ + "# Jupyter notebook specific imports \n", + "import matplotlib as mpl \n", + "from IPython import display \n", + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "id": "8be0f7bf", + "metadata": {}, + "source": [ + "\n", + "## Introduction\n", + "This tutorial is a demonstration of the immersed boundary method, a technique\n", + "for simulating fluid-structure interactions. We can use the immersed boundary\n", + "method to simulate a cell as a structure with its outer **boundary immersed**\n", + "in a fluid. There is a two-way coupling between the fluid and the structure:\n", + "the flow of the fluid exerts a force on the structure, and the structure\n", + "influences the flow of the fluid.\n", + "\n", + "In this tutorial, we demonstrate how to:\n", + "1. Building single cell immersed boundary capable simulations.\n", + "2. Multi-cellular simulations.\n", + "3. Adding and manipulating fluid sources.\n", + "\n", + "## Imports\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a08f7af", + "metadata": {}, + "outputs": [], + "source": [ + "import chaste\n", + "chaste.init() # setup MPI\n", + "from chaste.cell_based import (\n", + " AbstractCellBasedTestSuite,\n", + " CellsGeneratorUniformCellCycleModel_2,\n", + " DifferentiatedCellProliferativeType,\n", + " ForwardEulerNumericalMethod2_2,\n", + " ImmersedBoundaryCellPopulation2,\n", + " ImmersedBoundaryLinearMembraneForce2,\n", + " ImmersedBoundarySimulationModifier2,\n", + " OffLatticeSimulation2_2,\n", + " SimulationTime,\n", + " TearDownNotebookTest,\n", + ")\n", + "from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator\n", + "import chaste.visualization" + ] + }, + { + "cell_type": "markdown", + "id": "1d63ea78", + "metadata": {}, + "source": [ + "### Simple Immersed Boundary Simulations\n", + "We begin by exploring simulations containing a single cell. This will\n", + "familiarise you with how to generate immersed boundary cells, the steps\n", + "involved in setting up an immersed boundary simulation, and the options\n", + "available for controlling how the cells are generated and behave.\n", + "\n", + "Immersed boundary simulations operate over a square domain, with `x` and `y`\n", + "coordinates lying in the range `0` to `1`. The domain wraps on both axes -\n", + "this means that if a cell moves off the right hand edge of the domain,\n", + "the segment will appear on the left hand side. This is not purely visual;\n", + "forces are also transmitted across these boundaries.\n", + "\n", + " **Tip** Make sure all your coordinates are between `0` and `1`.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "5720be7d", + "metadata": {}, + "source": [ + "#### The First Cell\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0d525101", + "metadata": {}, + "outputs": [], + "source": [ + "#Set the start time for the simulation\n", + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "960941ed", + "metadata": {}, + "source": [ + " **Tip** Lines of code beginning with `#` are comments in Python\n", + " \n", + "Next, we define the necessary geometry.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dc8534c6", + "metadata": {}, + "outputs": [], + "source": [ + "# Generate a mesh containing a single cell\n", + "gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False)\n", + "mesh = gen.GetMesh()" + ] + }, + { + "cell_type": "markdown", + "id": "b3445932", + "metadata": {}, + "source": [ + "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", + "called `gen`. The 3rd and 4th parameters control the exponent of the\n", + "superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can\n", + "experiment with modifying these to change the initial shape of the cell.\n", + "\n", + "The second line of code instructs the mesh generator to generate a mesh.\n", + "Checking the type of mesh with `type(mesh)` will show it as\n", + "`ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using\n", + "a 2-dimensional space, and 2-dimensional elements to define the mesh.\n", + "\n", + "We now set the fluid grid resolution. The following code specifies\n", + "that we are using a 64x64 grid to simulate our fluid over.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "699122f4", + "metadata": {}, + "outputs": [], + "source": [ + "#Set the fluid grid resolution\n", + "mesh.SetNumGridPtsXAndY(64)" + ] + }, + { + "cell_type": "markdown", + "id": "4a9e3a83", + "metadata": {}, + "source": [ + "Next, we set up the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1624795b", + "metadata": {}, + "outputs": [], + "source": [ + "# Generate the cells\n", + "cell_type = DifferentiatedCellProliferativeType()\n", + "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", + "# Set up the cell population\n", + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)" + ] + }, + { + "cell_type": "markdown", + "id": "3c7939e3", + "metadata": {}, + "source": [ + "We specify a cell type and cell cycle model. These can be\n", + "interchanged to modify the life cycle of the cells. The\n", + "`CellsGenerator` then constructs the necessary information for each\n", + "of the elements in the mesh. Finally, we construct an\n", + "`ImmersedBoundaryCellPopulation`. We then specify whether the\n", + "population has active fluid sources or not. For now, we are not\n", + "using any fluid sources, so we set this to false\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "38158696", + "metadata": {}, + "outputs": [], + "source": [ + "# Specify whether the population has active fluid sources\n", + "cell_population.SetIfPopulationHasActiveSources(False)" + ] + }, + { + "cell_type": "markdown", + "id": "2d2d95a1", + "metadata": {}, + "source": [ + "Here, we use an `OffLatticeSimulation` simulator to control the\n", + "simulation. Although the fluid is simulated on a lattice (grid),\n", + "the nodes/cells are not bound to a lattice.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "319add36", + "metadata": {}, + "outputs": [], + "source": [ + "# Create a simulator to manage our simulation\n", + "simulator = OffLatticeSimulation2_2(cell_population)\n", + "numerical_method = ForwardEulerNumericalMethod2_2()\n", + "numerical_method.SetUseUpdateNodeLocation(True)\n", + "simulator.SetNumericalMethod(numerical_method)" + ] + }, + { + "cell_type": "markdown", + "id": "3eeb6c2b", + "metadata": {}, + "source": [ + "As we have an off-lattice simulation, we need a way to model the\n", + "fluid. This is handled by the `ImmersedBoundarySimulationModifier`.\n", + "Modifiers in chaste are classes that can be attached to simulations\n", + "to perform some additional custom functionality each timestep.\n", + "In this case, the modifier is responsible for solving the\n", + "Navier-Stokes equations and propagating forces between the nodes and\n", + "the fluid.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5188263b", + "metadata": {}, + "outputs": [], + "source": [ + "# Add an immersed boundary simulation modifier.\n", + "# The modifier is responsible for managing the fluid simulation\n", + "# and propagating forces between the fluid & cell." + ] + }, + { + "cell_type": "markdown", + "id": "154ab0d2", + "metadata": {}, + "source": [ + "We must also provide the modifier with a force model to govern\n", + "interactions between the nodes forming the boundary of the cells.\n", + "Note that these forces only act between nodes in the same cell,\n", + "they do not control interactions between cells.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "916b49c1", + "metadata": {}, + "outputs": [], + "source": [ + "# Add a force law to model the behaviour of the cell membrane\n", + "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", + "boundary_force.SetElementSpringConst(1.0 * 1e7)" + ] + }, + { + "cell_type": "markdown", + "id": "44cc9d7b", + "metadata": {}, + "source": [ + "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", + "is. You can experiment with adjusting the spring constant to change\n", + "the force behaviour between nodes of the cell boundary.\n", + "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", + "membrane nodes using linear springs i.e, the force applied is\n", + "proportional to the deviation of the distance between nodes\n", + "from a rest length.\n", + "\n", + "Finally, we set up the simulation properties and run it.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3eb50f2d", + "metadata": {}, + "outputs": [], + "source": [ + "# Set simulation properties\n", + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)\n", + "# Perform the simulation\n", + "simulator.Solve()\n", + "SimulationTime.Instance().Destroy()\n", + "TearDownNotebookTest()" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md new file mode 100644 index 00000000..a28c4fa2 --- /dev/null +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -0,0 +1,285 @@ + +--- +title : "Test Immersed Boundary Tutorial" +summary: "" +draft: false +images: [] +toc: true +layout: "single" +--- + +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [d74e09e9](https://github.com/Chaste/PyChaste/commit/d74e09e98ea2ab270cb232748ef3531258079d75). +Note that the code is given in full at the bottom of the page. + + +## Introduction +This tutorial is a demonstration of the immersed boundary method, a technique +for simulating fluid-structure interactions. We can use the immersed boundary +method to simulate a cell as a structure with its outer **boundary immersed** +in a fluid. There is a two-way coupling between the fluid and the structure: +the flow of the fluid exerts a force on the structure, and the structure +influences the flow of the fluid. + +In this tutorial, we demonstrate how to: +1. Building single cell immersed boundary capable simulations. +2. Multi-cellular simulations. +3. Adding and manipulating fluid sources. + +## Imports + +```python +import unittest + +import chaste +chaste.init() # setup MPI + +from chaste.cell_based import ( + AbstractCellBasedTestSuite, + CellsGeneratorUniformCellCycleModel_2, + DifferentiatedCellProliferativeType, + ForwardEulerNumericalMethod2_2, + ImmersedBoundaryCellPopulation2, + ImmersedBoundaryLinearMembraneForce2, + ImmersedBoundarySimulationModifier2, + OffLatticeSimulation2_2, + SimulationTime, + TearDownNotebookTest, +) +from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator +import chaste.visualization + +class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): + +``` +### Simple Immersed Boundary Simulations +We begin by exploring simulations containing a single cell. This will +familiarise you with how to generate immersed boundary cells, the steps +involved in setting up an immersed boundary simulation, and the options +available for controlling how the cells are generated and behave. + +Immersed boundary simulations operate over a square domain, with `x` and `y` +coordinates lying in the range `0` to `1`. The domain wraps on both axes - +this means that if a cell moves off the right hand edge of the domain, +the segment will appear on the left hand side. This is not purely visual; +forces are also transmitted across these boundaries. + + **Tip** Make sure all your coordinates are between `0` and `1`. + +```python + def test_single_cell_immersed_boundary(self): +``` +#### The First Cell + +```python + #Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + +``` + **Tip** Lines of code beginning with `#` are comments in Python + +Next, we define the necessary geometry. + +```python + # Generate a mesh containing a single cell + gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + mesh = gen.GetMesh() + +``` +The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator` +called `gen`. The 3rd and 4th parameters control the exponent of the +superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can +experiment with modifying these to change the initial shape of the cell. + +The second line of code instructs the mesh generator to generate a mesh. +Checking the type of mesh with `type(mesh)` will show it as +`ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using +a 2-dimensional space, and 2-dimensional elements to define the mesh. + +We now set the fluid grid resolution. The following code specifies +that we are using a 64x64 grid to simulate our fluid over. + +```python + #Set the fluid grid resolution + mesh.SetNumGridPtsXAndY(64) + +``` +Next, we set up the cell population + +```python + # Generate the cells + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + # Set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + +``` +We specify a cell type and cell cycle model. These can be +interchanged to modify the life cycle of the cells. The +`CellsGenerator` then constructs the necessary information for each +of the elements in the mesh. Finally, we construct an +`ImmersedBoundaryCellPopulation`. We then specify whether the +population has active fluid sources or not. For now, we are not +using any fluid sources, so we set this to false + +```python + # Specify whether the population has active fluid sources + cell_population.SetIfPopulationHasActiveSources(False) + +``` +Here, we use an `OffLatticeSimulation` simulator to control the +simulation. Although the fluid is simulated on a lattice (grid), +the nodes/cells are not bound to a lattice. + +```python + # Create a simulator to manage our simulation + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + +``` +As we have an off-lattice simulation, we need a way to model the +fluid. This is handled by the `ImmersedBoundarySimulationModifier`. +Modifiers in chaste are classes that can be attached to simulations +to perform some additional custom functionality each timestep. +In this case, the modifier is responsible for solving the +Navier-Stokes equations and propagating forces between the nodes and +the fluid. + +```python + # Add an immersed boundary simulation modifier. + # The modifier is responsible for managing the fluid simulation + # and propagating forces between the fluid & cell. + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + +``` +We must also provide the modifier with a force model to govern +interactions between the nodes forming the boundary of the cells. +Note that these forces only act between nodes in the same cell, +they do not control interactions between cells. + +```python + # Add a force law to model the behaviour of the cell membrane + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + +``` +The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary +is. You can experiment with adjusting the spring constant to change +the force behaviour between nodes of the cell boundary. +The `ImmersedBoundaryLinearMembraneForce` models forces between +membrane nodes using linear springs i.e, the force applied is +proportional to the deviation of the distance between nodes +from a rest length. + +Finally, we set up the simulation properties and run it. + +```python + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + +if __name__ == '__main__': + unittest.main(verbosity=2) + +``` + + +## Full code + + +**File name:** `TestImmersedBoundaryTutorial.py` + +```python +import unittest + +import chaste +chaste.init() # setup MPI + +from chaste.cell_based import ( + AbstractCellBasedTestSuite, + CellsGeneratorUniformCellCycleModel_2, + DifferentiatedCellProliferativeType, + ForwardEulerNumericalMethod2_2, + ImmersedBoundaryCellPopulation2, + ImmersedBoundaryLinearMembraneForce2, + ImmersedBoundarySimulationModifier2, + OffLatticeSimulation2_2, + SimulationTime, + TearDownNotebookTest, +) +from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator +import chaste.visualization + +class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): + + def test_single_cell_immersed_boundary(self): + #Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + + # Generate a mesh containing a single cell + gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + mesh = gen.GetMesh() + + #Set the fluid grid resolution + mesh.SetNumGridPtsXAndY(64) + + # Generate the cells + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + # Set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify whether the population has active fluid sources + cell_population.SetIfPopulationHasActiveSources(False) + + # Create a simulator to manage our simulation + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier. + # The modifier is responsible for managing the fluid simulation + # and propagating forces between the fluid & cell. + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + # Add a force law to model the behaviour of the cell membrane + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + +if __name__ == '__main__': + unittest.main(verbosity=2) + +``` + diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py new file mode 100644 index 00000000..f547ae36 --- /dev/null +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -0,0 +1,200 @@ + +"""Copyright (c) 2005-2024, University of Oxford. +All rights reserved. + +University of Oxford means the Chancellor, Masters and Scholars of the +University of Oxford, having an administrative office at Wellington +Square, Oxford OX1 2JD, UK. + +This file is part of Chaste. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the University of Oxford nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +""" +#ifndef +#define TRIGGER_WIKI + +## ## Introduction +## This tutorial is a demonstration of the immersed boundary method, a technique +## for simulating fluid-structure interactions. We can use the immersed boundary +## method to simulate a cell as a structure with its outer **boundary immersed** +## in a fluid. There is a two-way coupling between the fluid and the structure: +## the flow of the fluid exerts a force on the structure, and the structure +## influences the flow of the fluid. +## +## In this tutorial, we demonstrate how to: +## 1. Building single cell immersed boundary capable simulations. +## 2. Multi-cellular simulations. +## 3. Adding and manipulating fluid sources. +## +## ## Imports + +import unittest + +import chaste +chaste.init() # setup MPI + +from chaste.cell_based import ( + AbstractCellBasedTestSuite, + CellsGeneratorUniformCellCycleModel_2, + DifferentiatedCellProliferativeType, + ForwardEulerNumericalMethod2_2, + ImmersedBoundaryCellPopulation2, + ImmersedBoundaryLinearMembraneForce2, + ImmersedBoundarySimulationModifier2, + OffLatticeSimulation2_2, + SimulationTime, + TearDownNotebookTest, +) +from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator +import chaste.visualization + +class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): + + ## ### Simple Immersed Boundary Simulations + ## We begin by exploring simulations containing a single cell. This will + ## familiarise you with how to generate immersed boundary cells, the steps + ## involved in setting up an immersed boundary simulation, and the options + ## available for controlling how the cells are generated and behave. + ## + ## Immersed boundary simulations operate over a square domain, with `x` and `y` + ## coordinates lying in the range `0` to `1`. The domain wraps on both axes - + ## this means that if a cell moves off the right hand edge of the domain, + ## the segment will appear on the left hand side. This is not purely visual; + ## forces are also transmitted across these boundaries. + ## + ## **Tip** Make sure all your coordinates are between `0` and `1`. + + def test_single_cell_immersed_boundary(self): + ## #### The First Cell + + #Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + + ## **Tip** Lines of code beginning with `#` are comments in Python + ## + ## Next, we define the necessary geometry. + + # Generate a mesh containing a single cell + gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + mesh = gen.GetMesh() + + ## The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator` + ## called `gen`. The 3rd and 4th parameters control the exponent of the + ## superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can + ## experiment with modifying these to change the initial shape of the cell. + ## + ## The second line of code instructs the mesh generator to generate a mesh. + ## Checking the type of mesh with `type(mesh)` will show it as + ## `ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using + ## a 2-dimensional space, and 2-dimensional elements to define the mesh. + ## + ## We now set the fluid grid resolution. The following code specifies + ## that we are using a 64x64 grid to simulate our fluid over. + + #Set the fluid grid resolution + mesh.SetNumGridPtsXAndY(64) + + ## Next, we set up the cell population + + # Generate the cells + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + # Set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + ## We specify a cell type and cell cycle model. These can be + ## interchanged to modify the life cycle of the cells. The + ## `CellsGenerator` then constructs the necessary information for each + ## of the elements in the mesh. Finally, we construct an + ## `ImmersedBoundaryCellPopulation`. We then specify whether the + ## population has active fluid sources or not. For now, we are not + ## using any fluid sources, so we set this to false + + # Specify whether the population has active fluid sources + cell_population.SetIfPopulationHasActiveSources(False) + + + ## Here, we use an `OffLatticeSimulation` simulator to control the + ## simulation. Although the fluid is simulated on a lattice (grid), + ## the nodes/cells are not bound to a lattice. + + # Create a simulator to manage our simulation + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + ## As we have an off-lattice simulation, we need a way to model the + ## fluid. This is handled by the `ImmersedBoundarySimulationModifier`. + ## Modifiers in chaste are classes that can be attached to simulations + ## to perform some additional custom functionality each timestep. + ## In this case, the modifier is responsible for solving the + ## Navier-Stokes equations and propagating forces between the nodes and + ## the fluid. + + # Add an immersed boundary simulation modifier. + # The modifier is responsible for managing the fluid simulation + # and propagating forces between the fluid & cell. + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + ## We must also provide the modifier with a force model to govern + ## interactions between the nodes forming the boundary of the cells. + ## Note that these forces only act between nodes in the same cell, + ## they do not control interactions between cells. + + # Add a force law to model the behaviour of the cell membrane + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + ## The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary + ## is. You can experiment with adjusting the spring constant to change + ## the force behaviour between nodes of the cell boundary. + ## The `ImmersedBoundaryLinearMembraneForce` models forces between + ## membrane nodes using linear springs i.e, the force applied is + ## proportional to the deviation of the distance between nodes + ## from a rest length. + + ## Finally, we set up the simulation properties and run it. + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + +if __name__ == '__main__': + unittest.main(verbosity=2) + +#endif END_WIKI + \ No newline at end of file From de6c6f9256f00ad5a80ce1e2f5ab1a8c4c9cf58d Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 18:35:18 +0000 Subject: [PATCH 26/40] #62 expand immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 200 ++++++++++++++--- doc/tutorials/TestImmersedBoundaryTutorial.md | 190 ++++++++++++++-- .../tutorials/TestImmersedBoundaryTutorial.py | 210 +++++++++++++----- 3 files changed, 484 insertions(+), 116 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index b114bbf8..323526f5 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "73f1bc0d", + "id": "29256d0a", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "529189e2", + "id": "578ccc75", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "8be0f7bf", + "id": "c3501404", "metadata": {}, "source": [ "\n", @@ -36,9 +36,9 @@ "the flow of the fluid exerts a force on the structure, and the structure\n", "influences the flow of the fluid.\n", "\n", - "In this tutorial, we demonstrate how to:\n", - "1. Building single cell immersed boundary capable simulations.\n", - "2. Multi-cellular simulations.\n", + "In this tutorial, we demonstrate:\n", + "1. Building single-cell immersed boundary capable simulations.\n", + "2. Building multi-cellular simulations.\n", "3. Adding and manipulating fluid sources.\n", "\n", "## Imports\n", @@ -48,18 +48,19 @@ { "cell_type": "code", "execution_count": null, - "id": "7a08f7af", + "id": "b44b26a2", "metadata": {}, "outputs": [], "source": [ "import chaste\n", - "chaste.init() # setup MPI\n", + "chaste.init() # setup MPI\n", "from chaste.cell_based import (\n", " AbstractCellBasedTestSuite,\n", " CellsGeneratorUniformCellCycleModel_2,\n", " DifferentiatedCellProliferativeType,\n", " ForwardEulerNumericalMethod2_2,\n", " ImmersedBoundaryCellPopulation2,\n", + " ImmersedBoundaryLinearInteractionForce2,\n", " ImmersedBoundaryLinearMembraneForce2,\n", " ImmersedBoundarySimulationModifier2,\n", " OffLatticeSimulation2_2,\n", @@ -72,7 +73,7 @@ }, { "cell_type": "markdown", - "id": "1d63ea78", + "id": "ab95f9ef", "metadata": {}, "source": [ "### Simple Immersed Boundary Simulations\n", @@ -91,29 +92,20 @@ "\n" ] }, - { - "cell_type": "markdown", - "id": "5720be7d", - "metadata": {}, - "source": [ - "#### The First Cell\n", - "\n" - ] - }, { "cell_type": "code", "execution_count": null, - "id": "0d525101", + "id": "1bc36a89", "metadata": {}, "outputs": [], "source": [ - "#Set the start time for the simulation\n", + "# Set the start time for the simulation\n", "SimulationTime.Instance().SetStartTime(0.0)" ] }, { "cell_type": "markdown", - "id": "960941ed", + "id": "2e51436d", "metadata": {}, "source": [ " **Tip** Lines of code beginning with `#` are comments in Python\n", @@ -125,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc8534c6", + "id": "bec0e9a3", "metadata": {}, "outputs": [], "source": [ @@ -136,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "b3445932", + "id": "f921e6cd", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -157,17 +149,17 @@ { "cell_type": "code", "execution_count": null, - "id": "699122f4", + "id": "93e72245", "metadata": {}, "outputs": [], "source": [ - "#Set the fluid grid resolution\n", + "# Set the fluid grid resolution\n", "mesh.SetNumGridPtsXAndY(64)" ] }, { "cell_type": "markdown", - "id": "4a9e3a83", + "id": "a057b472", "metadata": {}, "source": [ "Next, we set up the cell population\n", @@ -177,7 +169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1624795b", + "id": "e6f17c9e", "metadata": {}, "outputs": [], "source": [ @@ -191,7 +183,7 @@ }, { "cell_type": "markdown", - "id": "3c7939e3", + "id": "b462d292", "metadata": {}, "source": [ "We specify a cell type and cell cycle model. These can be\n", @@ -207,7 +199,7 @@ { "cell_type": "code", "execution_count": null, - "id": "38158696", + "id": "6b81d9c1", "metadata": {}, "outputs": [], "source": [ @@ -217,7 +209,7 @@ }, { "cell_type": "markdown", - "id": "2d2d95a1", + "id": "668743c8", "metadata": {}, "source": [ "Here, we use an `OffLatticeSimulation` simulator to control the\n", @@ -229,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "319add36", + "id": "cbed8981", "metadata": {}, "outputs": [], "source": [ @@ -242,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "3eeb6c2b", + "id": "38ab127a", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -258,7 +250,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5188263b", + "id": "d1dc695f", "metadata": {}, "outputs": [], "source": [ @@ -269,7 +261,7 @@ }, { "cell_type": "markdown", - "id": "154ab0d2", + "id": "4399049a", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -282,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "916b49c1", + "id": "2bd27598", "metadata": {}, "outputs": [], "source": [ @@ -293,7 +285,7 @@ }, { "cell_type": "markdown", - "id": "44cc9d7b", + "id": "3f417925", "metadata": {}, "source": [ "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", @@ -311,10 +303,144 @@ { "cell_type": "code", "execution_count": null, - "id": "3eb50f2d", + "id": "5081813f", + "metadata": {}, + "outputs": [], + "source": [ + "# Set simulation properties\n", + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)\n", + "# Perform the simulation\n", + "simulator.Solve()\n", + "SimulationTime.Instance().Destroy()\n", + "TearDownNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "7366874a", + "metadata": {}, + "source": [ + "### Adding More Cells\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dfce16e7", + "metadata": {}, + "outputs": [], + "source": [ + "# Set the start time for the simulation\n", + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "09ab91fb", + "metadata": {}, + "source": [ + "#### Multiple Cells\n", + "We can use the mesh generator to generate multiple cells. The first\n", + "parameter of the mesh generator constructor controls the number of\n", + "cells. Try increasing the number of cells by adjusting the parameter\n", + "value. A sensible range for this tutorial is 4-10 cells.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3952328b", + "metadata": {}, + "outputs": [], + "source": [ + "# Create a mesh generator\n", + "gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False)" + ] + }, + { + "cell_type": "markdown", + "id": "031d74c1", + "metadata": {}, + "source": [ + "#### Laminas\n", + "In addition to the cells we have seen so far, we can introduce\n", + "laminas to the simulation. Laminas are surfaces with reduced\n", + "dimensionality. For 3D elements, a lamina is a 2D surface. For the\n", + "2D elements we are working with, laminas are lines. Changing the last\n", + "parameter of the mesh generator constructor from `False` to `True`\n", + "will generate a basal lamina spanning the palisade cells.\n", + "Laminas can also interact with the fluid field, and can be made\n", + "'leaky' to allow some flow across their boundary. This can be used\n", + "to model a permeable boundary.\n", + "\n", + "#### Cell Variations\n", + "Apart from using the 3rd and 4th constructor parameters to modify\n", + "the cell shapes, we can also introduce variation between cells by\n", + "modifying the 5th parameter.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cfd88229", + "metadata": {}, + "outputs": [], + "source": [ + "# Generate the mesh\n", + "mesh = gen.GetMesh()\n", + "# Set the fluid grid resolution\n", + "mesh.SetNumGridPtsXAndY(64)\n", + "# Generate the cells\n", + "cell_type = DifferentiatedCellProliferativeType()\n", + "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", + "# Set up the cell population\n", + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", + "# Specify whether the population has active fluid sources\n", + "cell_population.SetIfPopulationHasActiveSources(False)\n", + "# Create a simulator to manage our simulation\n", + "simulator = OffLatticeSimulation2_2(cell_population)\n", + "numerical_method = ForwardEulerNumericalMethod2_2()\n", + "numerical_method.SetUseUpdateNodeLocation(True)\n", + "simulator.SetNumericalMethod(numerical_method)\n", + "# Add an immersed boundary simulation modifier.\n", + "# Add a force law to model the behaviour of the cell membrane\n", + "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", + "boundary_force.SetElementSpringConst(1.0 * 1e7)" + ] + }, + { + "cell_type": "markdown", + "id": "5a53fdf1", + "metadata": {}, + "source": [ + "#### Intercellular Interactions\n", + "So far, we have encountered forces that act to maintain the shape\n", + "of the cell membrane. We can also introduce forces that apply\n", + "between cells using `ImmersedBoundaryLinearInteractionForce`. I\n", + "Instead of the `SetElementSpringConst` method, it has a\n", + "`SetSpringConst` method which we should use. The rest length can\n", + "also be modified using the `SetRestLength` method.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3f190624", "metadata": {}, "outputs": [], "source": [ + "# Add a new intercellular force law\n", + "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", + "interaction_force.SetSpringConst(1.0 * 1e6)\n", "# Set simulation properties\n", "dt = 0.05\n", "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index a28c4fa2..1c1344b7 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [d74e09e9](https://github.com/Chaste/PyChaste/commit/d74e09e98ea2ab270cb232748ef3531258079d75). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [404a4809](https://github.com/Chaste/PyChaste/commit/404a4809c03088c8dd7592267a990ae8522fd7af). Note that the code is given in full at the bottom of the page. @@ -20,9 +20,9 @@ in a fluid. There is a two-way coupling between the fluid and the structure: the flow of the fluid exerts a force on the structure, and the structure influences the flow of the fluid. -In this tutorial, we demonstrate how to: -1. Building single cell immersed boundary capable simulations. -2. Multi-cellular simulations. +In this tutorial, we demonstrate: +1. Building single-cell immersed boundary capable simulations. +2. Building multi-cellular simulations. 3. Adding and manipulating fluid sources. ## Imports @@ -31,7 +31,8 @@ In this tutorial, we demonstrate how to: import unittest import chaste -chaste.init() # setup MPI + +chaste.init() # setup MPI from chaste.cell_based import ( AbstractCellBasedTestSuite, @@ -39,6 +40,7 @@ from chaste.cell_based import ( DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, ImmersedBoundaryCellPopulation2, + ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, ImmersedBoundarySimulationModifier2, OffLatticeSimulation2_2, @@ -66,12 +68,8 @@ forces are also transmitted across these boundaries. **Tip** Make sure all your coordinates are between `0` and `1`. ```python - def test_single_cell_immersed_boundary(self): -``` -#### The First Cell - -```python - #Set the start time for the simulation + def test_simple_immersed_boundary_simulation(self): + # Set the start time for the simulation SimulationTime.Instance().SetStartTime(0.0) ``` @@ -99,7 +97,7 @@ We now set the fluid grid resolution. The following code specifies that we are using a 64x64 grid to simulate our fluid over. ```python - #Set the fluid grid resolution + # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) ``` @@ -192,7 +190,104 @@ Finally, we set up the simulation properties and run it. SimulationTime.Instance().Destroy() TearDownNotebookTest() -if __name__ == '__main__': +``` +### Adding More Cells + +```python + def test_multicell_immersed_boundary_simulation(self): + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + +``` +#### Multiple Cells +We can use the mesh generator to generate multiple cells. The first +parameter of the mesh generator constructor controls the number of +cells. Try increasing the number of cells by adjusting the parameter +value. A sensible range for this tutorial is 4-10 cells. + +```python + # Create a mesh generator + gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + +``` +#### Laminas +In addition to the cells we have seen so far, we can introduce +laminas to the simulation. Laminas are surfaces with reduced +dimensionality. For 3D elements, a lamina is a 2D surface. For the +2D elements we are working with, laminas are lines. Changing the last +parameter of the mesh generator constructor from `False` to `True` +will generate a basal lamina spanning the palisade cells. +Laminas can also interact with the fluid field, and can be made +'leaky' to allow some flow across their boundary. This can be used +to model a permeable boundary. + +#### Cell Variations +Apart from using the 3rd and 4th constructor parameters to modify +the cell shapes, we can also introduce variation between cells by +modifying the 5th parameter. + +```python + # Generate the mesh + mesh = gen.GetMesh() + + # Set the fluid grid resolution + mesh.SetNumGridPtsXAndY(64) + + # Generate the cells + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + # Set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify whether the population has active fluid sources + cell_population.SetIfPopulationHasActiveSources(False) + + # Create a simulator to manage our simulation + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier. + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + # Add a force law to model the behaviour of the cell membrane + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + +``` +#### Intercellular Interactions +So far, we have encountered forces that act to maintain the shape +of the cell membrane. We can also introduce forces that apply +between cells using `ImmersedBoundaryLinearInteractionForce`. I +Instead of the `SetElementSpringConst` method, it has a +`SetSpringConst` method which we should use. The rest length can +also be modified using the `SetRestLength` method. + +```python + # Add a new intercellular force law + interaction_force = ImmersedBoundaryLinearInteractionForce2() + interaction_force.SetSpringConst(1.0 * 1e6) + main_modifier.AddImmersedBoundaryForce(interaction_force) + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + +if __name__ == "__main__": unittest.main(verbosity=2) ``` @@ -207,7 +302,8 @@ if __name__ == '__main__': import unittest import chaste -chaste.init() # setup MPI + +chaste.init() # setup MPI from chaste.cell_based import ( AbstractCellBasedTestSuite, @@ -215,6 +311,7 @@ from chaste.cell_based import ( DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, ImmersedBoundaryCellPopulation2, + ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, ImmersedBoundarySimulationModifier2, OffLatticeSimulation2_2, @@ -226,15 +323,15 @@ import chaste.visualization class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): - def test_single_cell_immersed_boundary(self): - #Set the start time for the simulation + def test_simple_immersed_boundary_simulation(self): + # Set the start time for the simulation SimulationTime.Instance().SetStartTime(0.0) # Generate a mesh containing a single cell gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() - #Set the fluid grid resolution + # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) # Generate the cells @@ -278,7 +375,64 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): SimulationTime.Instance().Destroy() TearDownNotebookTest() -if __name__ == '__main__': + def test_multicell_immersed_boundary_simulation(self): + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + + # Create a mesh generator + gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + + # Generate the mesh + mesh = gen.GetMesh() + + # Set the fluid grid resolution + mesh.SetNumGridPtsXAndY(64) + + # Generate the cells + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + # Set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify whether the population has active fluid sources + cell_population.SetIfPopulationHasActiveSources(False) + + # Create a simulator to manage our simulation + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier. + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + # Add a force law to model the behaviour of the cell membrane + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + # Add a new intercellular force law + interaction_force = ImmersedBoundaryLinearInteractionForce2() + interaction_force.SetSpringConst(1.0 * 1e6) + main_modifier.AddImmersedBoundaryForce(interaction_force) + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + +if __name__ == "__main__": unittest.main(verbosity=2) ``` diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index f547ae36..e2552504 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -1,4 +1,3 @@ - """Copyright (c) 2005-2024, University of Oxford. All rights reserved. @@ -34,16 +33,16 @@ #define TRIGGER_WIKI ## ## Introduction -## This tutorial is a demonstration of the immersed boundary method, a technique -## for simulating fluid-structure interactions. We can use the immersed boundary -## method to simulate a cell as a structure with its outer **boundary immersed** -## in a fluid. There is a two-way coupling between the fluid and the structure: -## the flow of the fluid exerts a force on the structure, and the structure -## influences the flow of the fluid. +## This tutorial is a demonstration of the immersed boundary method, a technique +## for simulating fluid-structure interactions. We can use the immersed boundary +## method to simulate a cell as a structure with its outer **boundary immersed** +## in a fluid. There is a two-way coupling between the fluid and the structure: +## the flow of the fluid exerts a force on the structure, and the structure +## influences the flow of the fluid. ## -## In this tutorial, we demonstrate how to: -## 1. Building single cell immersed boundary capable simulations. -## 2. Multi-cellular simulations. +## In this tutorial, we demonstrate: +## 1. Building single-cell immersed boundary capable simulations. +## 2. Building multi-cellular simulations. ## 3. Adding and manipulating fluid sources. ## ## ## Imports @@ -51,7 +50,8 @@ import unittest import chaste -chaste.init() # setup MPI + +chaste.init() # setup MPI from chaste.cell_based import ( AbstractCellBasedTestSuite, @@ -59,6 +59,7 @@ DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, ImmersedBoundaryCellPopulation2, + ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, ImmersedBoundarySimulationModifier2, OffLatticeSimulation2_2, @@ -68,50 +69,49 @@ from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator import chaste.visualization + class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): - + ## ### Simple Immersed Boundary Simulations - ## We begin by exploring simulations containing a single cell. This will - ## familiarise you with how to generate immersed boundary cells, the steps - ## involved in setting up an immersed boundary simulation, and the options + ## We begin by exploring simulations containing a single cell. This will + ## familiarise you with how to generate immersed boundary cells, the steps + ## involved in setting up an immersed boundary simulation, and the options ## available for controlling how the cells are generated and behave. ## - ## Immersed boundary simulations operate over a square domain, with `x` and `y` - ## coordinates lying in the range `0` to `1`. The domain wraps on both axes - - ## this means that if a cell moves off the right hand edge of the domain, - ## the segment will appear on the left hand side. This is not purely visual; + ## Immersed boundary simulations operate over a square domain, with `x` and `y` + ## coordinates lying in the range `0` to `1`. The domain wraps on both axes - + ## this means that if a cell moves off the right hand edge of the domain, + ## the segment will appear on the left hand side. This is not purely visual; ## forces are also transmitted across these boundaries. ## ## **Tip** Make sure all your coordinates are between `0` and `1`. - - def test_single_cell_immersed_boundary(self): - ## #### The First Cell - - #Set the start time for the simulation + + def test_simple_immersed_boundary_simulation(self): + # Set the start time for the simulation SimulationTime.Instance().SetStartTime(0.0) ## **Tip** Lines of code beginning with `#` are comments in Python ## ## Next, we define the necessary geometry. - + # Generate a mesh containing a single cell gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() - ## The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator` - ## called `gen`. The 3rd and 4th parameters control the exponent of the - ## superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can + ## The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator` + ## called `gen`. The 3rd and 4th parameters control the exponent of the + ## superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can ## experiment with modifying these to change the initial shape of the cell. ## - ## The second line of code instructs the mesh generator to generate a mesh. - ## Checking the type of mesh with `type(mesh)` will show it as - ## `ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using + ## The second line of code instructs the mesh generator to generate a mesh. + ## Checking the type of mesh with `type(mesh)` will show it as + ## `ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using ## a 2-dimensional space, and 2-dimensional elements to define the mesh. ## - ## We now set the fluid grid resolution. The following code specifies + ## We now set the fluid grid resolution. The following code specifies ## that we are using a 64x64 grid to simulate our fluid over. - #Set the fluid grid resolution + # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) ## Next, we set up the cell population @@ -124,34 +124,33 @@ def test_single_cell_immersed_boundary(self): # Set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - ## We specify a cell type and cell cycle model. These can be - ## interchanged to modify the life cycle of the cells. The - ## `CellsGenerator` then constructs the necessary information for each - ## of the elements in the mesh. Finally, we construct an - ## `ImmersedBoundaryCellPopulation`. We then specify whether the - ## population has active fluid sources or not. For now, we are not + ## We specify a cell type and cell cycle model. These can be + ## interchanged to modify the life cycle of the cells. The + ## `CellsGenerator` then constructs the necessary information for each + ## of the elements in the mesh. Finally, we construct an + ## `ImmersedBoundaryCellPopulation`. We then specify whether the + ## population has active fluid sources or not. For now, we are not ## using any fluid sources, so we set this to false # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) - - ## Here, we use an `OffLatticeSimulation` simulator to control the - ## simulation. Although the fluid is simulated on a lattice (grid), + ## Here, we use an `OffLatticeSimulation` simulator to control the + ## simulation. Although the fluid is simulated on a lattice (grid), ## the nodes/cells are not bound to a lattice. - + # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) - ## As we have an off-lattice simulation, we need a way to model the - ## fluid. This is handled by the `ImmersedBoundarySimulationModifier`. - ## Modifiers in chaste are classes that can be attached to simulations - ## to perform some additional custom functionality each timestep. - ## In this case, the modifier is responsible for solving the - ## Navier-Stokes equations and propagating forces between the nodes and + ## As we have an off-lattice simulation, we need a way to model the + ## fluid. This is handled by the `ImmersedBoundarySimulationModifier`. + ## Modifiers in chaste are classes that can be attached to simulations + ## to perform some additional custom functionality each timestep. + ## In this case, the modifier is responsible for solving the + ## Navier-Stokes equations and propagating forces between the nodes and ## the fluid. # Add an immersed boundary simulation modifier. @@ -160,9 +159,9 @@ def test_single_cell_immersed_boundary(self): main_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(main_modifier) - ## We must also provide the modifier with a force model to govern - ## interactions between the nodes forming the boundary of the cells. - ## Note that these forces only act between nodes in the same cell, + ## We must also provide the modifier with a force model to govern + ## interactions between the nodes forming the boundary of the cells. + ## Note that these forces only act between nodes in the same cell, ## they do not control interactions between cells. # Add a force law to model the behaviour of the cell membrane @@ -170,12 +169,12 @@ def test_single_cell_immersed_boundary(self): boundary_force.SetElementSpringConst(1.0 * 1e7) main_modifier.AddImmersedBoundaryForce(boundary_force) - ## The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary - ## is. You can experiment with adjusting the spring constant to change - ## the force behaviour between nodes of the cell boundary. - ## The `ImmersedBoundaryLinearMembraneForce` models forces between - ## membrane nodes using linear springs i.e, the force applied is - ## proportional to the deviation of the distance between nodes + ## The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary + ## is. You can experiment with adjusting the spring constant to change + ## the force behaviour between nodes of the cell boundary. + ## The `ImmersedBoundaryLinearMembraneForce` models forces between + ## membrane nodes using linear springs i.e, the force applied is + ## proportional to the deviation of the distance between nodes ## from a rest length. ## Finally, we set up the simulation properties and run it. @@ -193,8 +192,97 @@ def test_single_cell_immersed_boundary(self): SimulationTime.Instance().Destroy() TearDownNotebookTest() -if __name__ == '__main__': + ## ### Adding More Cells + + def test_multicell_immersed_boundary_simulation(self): + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + + ## #### Multiple Cells + ## We can use the mesh generator to generate multiple cells. The first + ## parameter of the mesh generator constructor controls the number of + ## cells. Try increasing the number of cells by adjusting the parameter + ## value. A sensible range for this tutorial is 4-10 cells. + + # Create a mesh generator + gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + + ## #### Laminas + ## In addition to the cells we have seen so far, we can introduce + ## laminas to the simulation. Laminas are surfaces with reduced + ## dimensionality. For 3D elements, a lamina is a 2D surface. For the + ## 2D elements we are working with, laminas are lines. Changing the last + ## parameter of the mesh generator constructor from `False` to `True` + ## will generate a basal lamina spanning the palisade cells. + ## Laminas can also interact with the fluid field, and can be made + ## 'leaky' to allow some flow across their boundary. This can be used + ## to model a permeable boundary. + ## + ## #### Cell Variations + ## Apart from using the 3rd and 4th constructor parameters to modify + ## the cell shapes, we can also introduce variation between cells by + ## modifying the 5th parameter. + + # Generate the mesh + mesh = gen.GetMesh() + + # Set the fluid grid resolution + mesh.SetNumGridPtsXAndY(64) + + # Generate the cells + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + # Set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify whether the population has active fluid sources + cell_population.SetIfPopulationHasActiveSources(False) + + # Create a simulator to manage our simulation + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier. + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + # Add a force law to model the behaviour of the cell membrane + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + ## #### Intercellular Interactions + ## So far, we have encountered forces that act to maintain the shape + ## of the cell membrane. We can also introduce forces that apply + ## between cells using `ImmersedBoundaryLinearInteractionForce`. I + ## Instead of the `SetElementSpringConst` method, it has a + ## `SetSpringConst` method which we should use. The rest length can + ## also be modified using the `SetRestLength` method. + + # Add a new intercellular force law + interaction_force = ImmersedBoundaryLinearInteractionForce2() + interaction_force.SetSpringConst(1.0 * 1e6) + main_modifier.AddImmersedBoundaryForce(interaction_force) + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + + +if __name__ == "__main__": unittest.main(verbosity=2) - + #endif END_WIKI - \ No newline at end of file From 3964667c5f950bbbb77687d2024795105278294b Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 19:04:39 +0000 Subject: [PATCH 27/40] #62 add third part of immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 278 +++++++++++++++--- doc/tutorials/TestImmersedBoundaryTutorial.md | 188 +++++++++++- .../tutorials/TestImmersedBoundaryTutorial.py | 107 ++++++- 3 files changed, 523 insertions(+), 50 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index 323526f5..4b39dd31 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "29256d0a", + "id": "deb0fc74", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "578ccc75", + "id": "ccee77a3", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "c3501404", + "id": "de45c720", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b44b26a2", + "id": "2aa5ec9d", "metadata": {}, "outputs": [], "source": [ @@ -59,6 +59,7 @@ " CellsGeneratorUniformCellCycleModel_2,\n", " DifferentiatedCellProliferativeType,\n", " ForwardEulerNumericalMethod2_2,\n", + " FluidSource2,\n", " ImmersedBoundaryCellPopulation2,\n", " ImmersedBoundaryLinearInteractionForce2,\n", " ImmersedBoundaryLinearMembraneForce2,\n", @@ -73,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "ab95f9ef", + "id": "97f8738f", "metadata": {}, "source": [ "### Simple Immersed Boundary Simulations\n", @@ -95,7 +96,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1bc36a89", + "id": "d208513f", "metadata": {}, "outputs": [], "source": [ @@ -105,7 +106,7 @@ }, { "cell_type": "markdown", - "id": "2e51436d", + "id": "cfb921a4", "metadata": {}, "source": [ " **Tip** Lines of code beginning with `#` are comments in Python\n", @@ -117,7 +118,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bec0e9a3", + "id": "ad339510", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +129,7 @@ }, { "cell_type": "markdown", - "id": "f921e6cd", + "id": "0b8d25bc", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -149,7 +150,7 @@ { "cell_type": "code", "execution_count": null, - "id": "93e72245", + "id": "e391a6b0", "metadata": {}, "outputs": [], "source": [ @@ -159,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "a057b472", + "id": "6f51bb50", "metadata": {}, "source": [ "Next, we set up the cell population\n", @@ -169,7 +170,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e6f17c9e", + "id": "06cffc4d", "metadata": {}, "outputs": [], "source": [ @@ -183,7 +184,7 @@ }, { "cell_type": "markdown", - "id": "b462d292", + "id": "d097dc7d", "metadata": {}, "source": [ "We specify a cell type and cell cycle model. These can be\n", @@ -199,7 +200,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6b81d9c1", + "id": "e84e028b", "metadata": {}, "outputs": [], "source": [ @@ -209,7 +210,7 @@ }, { "cell_type": "markdown", - "id": "668743c8", + "id": "f9a53b09", "metadata": {}, "source": [ "Here, we use an `OffLatticeSimulation` simulator to control the\n", @@ -221,7 +222,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cbed8981", + "id": "84ee8737", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +235,7 @@ }, { "cell_type": "markdown", - "id": "38ab127a", + "id": "5b2852bc", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -250,7 +251,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1dc695f", + "id": "732f2973", "metadata": {}, "outputs": [], "source": [ @@ -261,7 +262,7 @@ }, { "cell_type": "markdown", - "id": "4399049a", + "id": "a30da25d", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -274,7 +275,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2bd27598", + "id": "3142419c", "metadata": {}, "outputs": [], "source": [ @@ -285,7 +286,7 @@ }, { "cell_type": "markdown", - "id": "3f417925", + "id": "94e7c0db", "metadata": {}, "source": [ "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", @@ -303,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5081813f", + "id": "f9788472", "metadata": {}, "outputs": [], "source": [ @@ -321,27 +322,16 @@ }, { "cell_type": "markdown", - "id": "7366874a", + "id": "c05f0d4d", "metadata": {}, "source": [ "### Adding More Cells\n", "\n" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "dfce16e7", - "metadata": {}, - "outputs": [], - "source": [ - "# Set the start time for the simulation\n", - "SimulationTime.Instance().SetStartTime(0.0)" - ] - }, { "cell_type": "markdown", - "id": "09ab91fb", + "id": "410bb6bb", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -355,7 +345,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3952328b", + "id": "8b37b5b1", "metadata": {}, "outputs": [], "source": [ @@ -365,7 +355,7 @@ }, { "cell_type": "markdown", - "id": "031d74c1", + "id": "bf004900", "metadata": {}, "source": [ "#### Laminas\n", @@ -389,7 +379,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cfd88229", + "id": "8a05255b", "metadata": {}, "outputs": [], "source": [ @@ -405,6 +395,8 @@ "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", "# Specify whether the population has active fluid sources\n", "cell_population.SetIfPopulationHasActiveSources(False)\n", + "# Set the start time for the simulation\n", + "SimulationTime.Instance().SetStartTime(0.0)\n", "# Create a simulator to manage our simulation\n", "simulator = OffLatticeSimulation2_2(cell_population)\n", "numerical_method = ForwardEulerNumericalMethod2_2()\n", @@ -418,7 +410,7 @@ }, { "cell_type": "markdown", - "id": "5a53fdf1", + "id": "dbf593e4", "metadata": {}, "source": [ "#### Intercellular Interactions\n", @@ -434,7 +426,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3f190624", + "id": "ab416131", "metadata": {}, "outputs": [], "source": [ @@ -452,6 +444,212 @@ "SimulationTime.Instance().Destroy()\n", "TearDownNotebookTest()" ] + }, + { + "cell_type": "markdown", + "id": "cd6c6d09", + "metadata": {}, + "source": [ + "### Adding Fluid Sources\n", + "Now that we are familiar with how to generate the cells, we will\n", + "introduce fluid sources.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "cfa8c872", + "metadata": {}, + "source": [ + "#### Adding a Fluid Source\n", + "We begin by constructing a fluid source object.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cea19b8c", + "metadata": {}, + "outputs": [], + "source": [ + "source = FluidSource2(0, 0.5, 0.7)" + ] + }, + { + "cell_type": "markdown", + "id": "18b44048", + "metadata": {}, + "source": [ + "This constructs a `FluidSource` object in 2 dimensions. The first\n", + "parameter gives the index of the fluid source. Each source you\n", + "create must have a unique index. The next parameters are the\n", + "`x` and `y` coordinates of the source. Fluid sources in chaste are\n", + "point-like, that is to say they do not have any area/volume.\n", + "\n", + "Having created the fluid source, we set its strength:\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "beae54d5", + "metadata": {}, + "outputs": [], + "source": [ + "source.SetStrength(0.012)" + ] + }, + { + "cell_type": "markdown", + "id": "52ca6674", + "metadata": {}, + "source": [ + "Now, we must associate the source with an element in the simulation\n", + "so that the simulation is aware of the source.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "30354ec0", + "metadata": {}, + "outputs": [], + "source": [ + "# Create the mesh\n", + "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)\n", + "mesh = gen.GetMesh()\n", + "mesh.SetNumGridPtsXAndY(64)\n", + "# Associate the fluid source with an element in the mesh\n", + "mesh.GetElement(0).SetFluidSource(source)" + ] + }, + { + "cell_type": "markdown", + "id": "d682896b", + "metadata": {}, + "source": [ + "Finally, we must tell the cell population that fluid sources are present.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3ec64e67", + "metadata": {}, + "outputs": [], + "source": [ + "# Set up the cell population\n", + "cell_type = DifferentiatedCellProliferativeType()\n", + "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", + "# Specify that fluid sources are present\n", + "cell_population.SetIfPopulationHasActiveSources(True)" + ] + }, + { + "cell_type": "markdown", + "id": "1ee49811", + "metadata": {}, + "source": [ + "#### Varying the Source Location\n", + "You can experiment with the source location. Try moving it closer to\n", + "and further away from the cells.\n", + "\n", + "#### Varying the Source Strength\n", + "Try modifying the source strength to see what impact this has on\n", + "the cell shapes.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a16602d7", + "metadata": {}, + "outputs": [], + "source": [ + "# Create a simulator\n", + "SimulationTime.Instance().SetStartTime(0.0)\n", + "simulator = OffLatticeSimulation2_2(cell_population)\n", + "numerical_method = ForwardEulerNumericalMethod2_2()\n", + "numerical_method.SetUseUpdateNodeLocation(True)\n", + "simulator.SetNumericalMethod(numerical_method)\n", + "# Add an immersed boundary simulation modifier" + ] + }, + { + "cell_type": "markdown", + "id": "861d9003", + "metadata": {}, + "source": [ + "#### Fluid-Cell Interaction\n", + "Have a go at modifying the spring constant of the\n", + "`ImmersedBoundaryLinearMembraneForce` to see how this changes the\n", + "effect of the fluid source on the cells.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65828444", + "metadata": {}, + "outputs": [], + "source": [ + "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", + "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", + "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", + "interaction_force.SetSpringConst(1.0 * 1e6)" + ] + }, + { + "cell_type": "markdown", + "id": "03ac75c6", + "metadata": {}, + "source": [ + "#### Adding More Sources\n", + "Try adding second fluid source. You will need to use a unique index,\n", + "and attach it to a different element as each element can only manage\n", + "a single fluid source.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "945d4565", + "metadata": {}, + "outputs": [], + "source": [ + "# Set simulation properties\n", + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)\n", + "# Perform the simulation\n", + "simulator.Solve()\n", + "SimulationTime.Instance().Destroy()\n", + "TearDownNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "d272679b", + "metadata": {}, + "source": [ + "#### Further Exercises\n", + " * Try integrating a different cell cycle model to introduce cell\n", + " division. See how the presence of a fluid source impacts the\n", + " structure that is formed.\n", + " * Use one of the cell writers to collect some statistics\n", + "\n" + ] } ], "metadata": {}, diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index 1c1344b7..8b81ba45 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [404a4809](https://github.com/Chaste/PyChaste/commit/404a4809c03088c8dd7592267a990ae8522fd7af). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [de6c6f92](https://github.com/Chaste/PyChaste/commit/de6c6f9256f00ad5a80ce1e2f5ab1a8c4c9cf58d). Note that the code is given in full at the bottom of the page. @@ -39,6 +39,7 @@ from chaste.cell_based import ( CellsGeneratorUniformCellCycleModel_2, DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, + FluidSource2, ImmersedBoundaryCellPopulation2, ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, @@ -195,9 +196,6 @@ Finally, we set up the simulation properties and run it. ```python def test_multicell_immersed_boundary_simulation(self): - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) - ``` #### Multiple Cells We can use the mesh generator to generate multiple cells. The first @@ -244,6 +242,9 @@ modifying the 5th parameter. # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() @@ -287,6 +288,123 @@ also be modified using the `SetRestLength` method. SimulationTime.Instance().Destroy() TearDownNotebookTest() +``` +### Adding Fluid Sources +Now that we are familiar with how to generate the cells, we will +introduce fluid sources. + +```python + def test_fluid_source_immersed_boundary_simulation(self): + +``` +#### Adding a Fluid Source +We begin by constructing a fluid source object. + +```python + source = FluidSource2(0, 0.5, 0.7) + +``` +This constructs a `FluidSource` object in 2 dimensions. The first +parameter gives the index of the fluid source. Each source you +create must have a unique index. The next parameters are the +`x` and `y` coordinates of the source. Fluid sources in chaste are +point-like, that is to say they do not have any area/volume. + +Having created the fluid source, we set its strength: + +```python + source.SetStrength(0.012) + +``` +Now, we must associate the source with an element in the simulation +so that the simulation is aware of the source. + +```python + # Create the mesh + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) + mesh = gen.GetMesh() + mesh.SetNumGridPtsXAndY(64) + + # Associate the fluid source with an element in the mesh + mesh.GetElement(0).SetFluidSource(source) + +``` +Finally, we must tell the cell population that fluid sources are present. + +```python + # Set up the cell population + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify that fluid sources are present + cell_population.SetIfPopulationHasActiveSources(True) + +``` +#### Varying the Source Location +You can experiment with the source location. Try moving it closer to +and further away from the cells. + +#### Varying the Source Strength +Try modifying the source strength to see what impact this has on +the cell shapes. + +```python + # Create a simulator + SimulationTime.Instance().SetStartTime(0.0) + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + +``` +#### Fluid-Cell Interaction +Have a go at modifying the spring constant of the +`ImmersedBoundaryLinearMembraneForce` to see how this changes the +effect of the fluid source on the cells. + +```python + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + interaction_force = ImmersedBoundaryLinearInteractionForce2() + interaction_force.SetSpringConst(1.0 * 1e6) + main_modifier.AddImmersedBoundaryForce(interaction_force) + +``` +#### Adding More Sources +Try adding second fluid source. You will need to use a unique index, +and attach it to a different element as each element can only manage +a single fluid source. + +```python + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + +``` +#### Further Exercises + * Try integrating a different cell cycle model to introduce cell + division. See how the presence of a fluid source impacts the + structure that is formed. + * Use one of the cell writers to collect some statistics + +```python if __name__ == "__main__": unittest.main(verbosity=2) @@ -310,6 +428,7 @@ from chaste.cell_based import ( CellsGeneratorUniformCellCycleModel_2, DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, + FluidSource2, ImmersedBoundaryCellPopulation2, ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, @@ -376,9 +495,6 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): TearDownNotebookTest() def test_multicell_immersed_boundary_simulation(self): - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) - # Create a mesh generator gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) @@ -399,6 +515,9 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() @@ -432,6 +551,61 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): SimulationTime.Instance().Destroy() TearDownNotebookTest() + def test_fluid_source_immersed_boundary_simulation(self): + + source = FluidSource2(0, 0.5, 0.7) + + source.SetStrength(0.012) + + # Create the mesh + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) + mesh = gen.GetMesh() + mesh.SetNumGridPtsXAndY(64) + + # Associate the fluid source with an element in the mesh + mesh.GetElement(0).SetFluidSource(source) + + # Set up the cell population + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify that fluid sources are present + cell_population.SetIfPopulationHasActiveSources(True) + + # Create a simulator + SimulationTime.Instance().SetStartTime(0.0) + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + interaction_force = ImmersedBoundaryLinearInteractionForce2() + interaction_force.SetSpringConst(1.0 * 1e6) + main_modifier.AddImmersedBoundaryForce(interaction_force) + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + if __name__ == "__main__": unittest.main(verbosity=2) diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index e2552504..acc350ea 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -29,6 +29,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ + #ifndef #define TRIGGER_WIKI @@ -58,6 +59,7 @@ CellsGeneratorUniformCellCycleModel_2, DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, + FluidSource2, ImmersedBoundaryCellPopulation2, ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, @@ -195,9 +197,6 @@ def test_simple_immersed_boundary_simulation(self): ## ### Adding More Cells def test_multicell_immersed_boundary_simulation(self): - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) - ## #### Multiple Cells ## We can use the mesh generator to generate multiple cells. The first ## parameter of the mesh generator constructor controls the number of @@ -240,6 +239,9 @@ def test_multicell_immersed_boundary_simulation(self): # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() @@ -281,6 +283,105 @@ def test_multicell_immersed_boundary_simulation(self): SimulationTime.Instance().Destroy() TearDownNotebookTest() + ## ### Adding Fluid Sources + ## Now that we are familiar with how to generate the cells, we will + ## introduce fluid sources. + + def test_fluid_source_immersed_boundary_simulation(self): + + ## #### Adding a Fluid Source + ## We begin by constructing a fluid source object. + + source = FluidSource2(0, 0.5, 0.7) + + ## This constructs a `FluidSource` object in 2 dimensions. The first + ## parameter gives the index of the fluid source. Each source you + ## create must have a unique index. The next parameters are the + ## `x` and `y` coordinates of the source. Fluid sources in chaste are + ## point-like, that is to say they do not have any area/volume. + ## + ## Having created the fluid source, we set its strength: + + source.SetStrength(0.012) + + ## Now, we must associate the source with an element in the simulation + ## so that the simulation is aware of the source. + + # Create the mesh + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) + mesh = gen.GetMesh() + mesh.SetNumGridPtsXAndY(64) + + # Associate the fluid source with an element in the mesh + mesh.GetElement(0).SetFluidSource(source) + + ## Finally, we must tell the cell population that fluid sources are present. + + # Set up the cell population + cell_type = DifferentiatedCellProliferativeType() + cell_generator = CellsGeneratorUniformCellCycleModel_2() + cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + + # Specify that fluid sources are present + cell_population.SetIfPopulationHasActiveSources(True) + + ## #### Varying the Source Location + ## You can experiment with the source location. Try moving it closer to + ## and further away from the cells. + ## + ## #### Varying the Source Strength + ## Try modifying the source strength to see what impact this has on + ## the cell shapes. + + # Create a simulator + SimulationTime.Instance().SetStartTime(0.0) + simulator = OffLatticeSimulation2_2(cell_population) + numerical_method = ForwardEulerNumericalMethod2_2() + numerical_method.SetUseUpdateNodeLocation(True) + simulator.SetNumericalMethod(numerical_method) + + # Add an immersed boundary simulation modifier + main_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(main_modifier) + + ## #### Fluid-Cell Interaction + ## Have a go at modifying the spring constant of the + ## `ImmersedBoundaryLinearMembraneForce` to see how this changes the + ## effect of the fluid source on the cells. + + boundary_force = ImmersedBoundaryLinearMembraneForce2() + boundary_force.SetElementSpringConst(1.0 * 1e7) + main_modifier.AddImmersedBoundaryForce(boundary_force) + + interaction_force = ImmersedBoundaryLinearInteractionForce2() + interaction_force.SetSpringConst(1.0 * 1e6) + main_modifier.AddImmersedBoundaryForce(interaction_force) + + ## #### Adding More Sources + ## Try adding second fluid source. You will need to use a unique index, + ## and attach it to a different element as each element can only manage + ## a single fluid source. + + # Set simulation properties + dt = 0.05 + simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetDt(dt) + simulator.SetSamplingTimestepMultiple(4) + simulator.SetEndTime(1000 * dt) + + # Perform the simulation + simulator.Solve() + + SimulationTime.Instance().Destroy() + TearDownNotebookTest() + + ## #### Further Exercises + ## * Try integrating a different cell cycle model to introduce cell + ## division. See how the presence of a fluid source impacts the + ## structure that is formed. + ## * Use one of the cell writers to collect some statistics + if __name__ == "__main__": unittest.main(verbosity=2) From 5e0d0a44af4a3ba6db0eb8a89f7a538f4c6d6656 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 19:32:38 +0000 Subject: [PATCH 28/40] #62 update immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 126 ++++++++++-------- doc/tutorials/TestImmersedBoundaryTutorial.md | 84 ++++++------ .../tutorials/TestImmersedBoundaryTutorial.py | 43 +++--- 3 files changed, 129 insertions(+), 124 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index 4b39dd31..d92b859b 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "deb0fc74", + "id": "10d49fc0", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ccee77a3", + "id": "37e0eb83", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "de45c720", + "id": "af011b03", "metadata": {}, "source": [ "\n", @@ -38,8 +38,8 @@ "\n", "In this tutorial, we demonstrate:\n", "1. Building single-cell immersed boundary capable simulations.\n", - "2. Building multi-cellular simulations.\n", - "3. Adding and manipulating fluid sources.\n", + "2. Building multi-cellular immersed boundary simulations.\n", + "3. Adding and manipulating immersed boundary fluid sources.\n", "\n", "## Imports\n", "\n" @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2aa5ec9d", + "id": "485d8440", "metadata": {}, "outputs": [], "source": [ @@ -59,7 +59,6 @@ " CellsGeneratorUniformCellCycleModel_2,\n", " DifferentiatedCellProliferativeType,\n", " ForwardEulerNumericalMethod2_2,\n", - " FluidSource2,\n", " ImmersedBoundaryCellPopulation2,\n", " ImmersedBoundaryLinearInteractionForce2,\n", " ImmersedBoundaryLinearMembraneForce2,\n", @@ -68,13 +67,13 @@ " SimulationTime,\n", " TearDownNotebookTest,\n", ")\n", - "from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator\n", + "from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator\n", "import chaste.visualization" ] }, { "cell_type": "markdown", - "id": "97f8738f", + "id": "98d21225", "metadata": {}, "source": [ "### Simple Immersed Boundary Simulations\n", @@ -96,7 +95,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d208513f", + "id": "8575bb86", "metadata": {}, "outputs": [], "source": [ @@ -106,7 +105,7 @@ }, { "cell_type": "markdown", - "id": "cfb921a4", + "id": "d52abc31", "metadata": {}, "source": [ " **Tip** Lines of code beginning with `#` are comments in Python\n", @@ -118,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad339510", + "id": "64212899", "metadata": {}, "outputs": [], "source": [ @@ -129,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "0b8d25bc", + "id": "c07e0482", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -150,7 +149,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e391a6b0", + "id": "719b46a7", "metadata": {}, "outputs": [], "source": [ @@ -160,7 +159,7 @@ }, { "cell_type": "markdown", - "id": "6f51bb50", + "id": "4cdd3480", "metadata": {}, "source": [ "Next, we set up the cell population\n", @@ -170,7 +169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06cffc4d", + "id": "da032fda", "metadata": {}, "outputs": [], "source": [ @@ -184,7 +183,7 @@ }, { "cell_type": "markdown", - "id": "d097dc7d", + "id": "50f88c8e", "metadata": {}, "source": [ "We specify a cell type and cell cycle model. These can be\n", @@ -200,7 +199,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e84e028b", + "id": "ab7d7c00", "metadata": {}, "outputs": [], "source": [ @@ -210,7 +209,7 @@ }, { "cell_type": "markdown", - "id": "f9a53b09", + "id": "98bbfbd8", "metadata": {}, "source": [ "Here, we use an `OffLatticeSimulation` simulator to control the\n", @@ -222,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84ee8737", + "id": "0f275a93", "metadata": {}, "outputs": [], "source": [ @@ -235,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "5b2852bc", + "id": "cc1c2b31", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -251,18 +250,18 @@ { "cell_type": "code", "execution_count": null, - "id": "732f2973", + "id": "26e89451", "metadata": {}, "outputs": [], "source": [ "# Add an immersed boundary simulation modifier.\n", - "# The modifier is responsible for managing the fluid simulation\n", - "# and propagating forces between the fluid & cell." + "ib_modifier = ImmersedBoundarySimulationModifier2()\n", + "simulator.AddSimulationModifier(ib_modifier)" ] }, { "cell_type": "markdown", - "id": "a30da25d", + "id": "7a50e537", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -275,18 +274,19 @@ { "cell_type": "code", "execution_count": null, - "id": "3142419c", + "id": "0d8dbd4f", "metadata": {}, "outputs": [], "source": [ "# Add a force law to model the behaviour of the cell membrane\n", "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", - "boundary_force.SetElementSpringConst(1.0 * 1e7)" + "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(boundary_force)" ] }, { "cell_type": "markdown", - "id": "94e7c0db", + "id": "eef19d3d", "metadata": {}, "source": [ "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f9788472", + "id": "a0a48881", "metadata": {}, "outputs": [], "source": [ @@ -322,7 +322,7 @@ }, { "cell_type": "markdown", - "id": "c05f0d4d", + "id": "bfe1b482", "metadata": {}, "source": [ "### Adding More Cells\n", @@ -331,7 +331,7 @@ }, { "cell_type": "markdown", - "id": "410bb6bb", + "id": "de09605a", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -345,7 +345,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8b37b5b1", + "id": "8f076763", "metadata": {}, "outputs": [], "source": [ @@ -355,7 +355,7 @@ }, { "cell_type": "markdown", - "id": "bf004900", + "id": "7925d86f", "metadata": {}, "source": [ "#### Laminas\n", @@ -379,7 +379,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8a05255b", + "id": "dbb3ab72", "metadata": {}, "outputs": [], "source": [ @@ -387,6 +387,8 @@ "mesh = gen.GetMesh()\n", "# Set the fluid grid resolution\n", "mesh.SetNumGridPtsXAndY(64)\n", + "# Set the start time for the simulation\n", + "SimulationTime.Instance().SetStartTime(0.0)\n", "# Generate the cells\n", "cell_type = DifferentiatedCellProliferativeType()\n", "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", @@ -395,22 +397,23 @@ "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", "# Specify whether the population has active fluid sources\n", "cell_population.SetIfPopulationHasActiveSources(False)\n", - "# Set the start time for the simulation\n", - "SimulationTime.Instance().SetStartTime(0.0)\n", "# Create a simulator to manage our simulation\n", "simulator = OffLatticeSimulation2_2(cell_population)\n", "numerical_method = ForwardEulerNumericalMethod2_2()\n", "numerical_method.SetUseUpdateNodeLocation(True)\n", "simulator.SetNumericalMethod(numerical_method)\n", - "# Add an immersed boundary simulation modifier.\n", + "# Add an immersed boundary simulation modifier\n", + "ib_modifier = ImmersedBoundarySimulationModifier2()\n", + "simulator.AddSimulationModifier(ib_modifier)\n", "# Add a force law to model the behaviour of the cell membrane\n", "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", - "boundary_force.SetElementSpringConst(1.0 * 1e7)" + "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(boundary_force)" ] }, { "cell_type": "markdown", - "id": "dbf593e4", + "id": "dec897cd", "metadata": {}, "source": [ "#### Intercellular Interactions\n", @@ -426,13 +429,14 @@ { "cell_type": "code", "execution_count": null, - "id": "ab416131", + "id": "850bcc64", "metadata": {}, "outputs": [], "source": [ "# Add a new intercellular force law\n", "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", "interaction_force.SetSpringConst(1.0 * 1e6)\n", + "ib_modifier.AddImmersedBoundaryForce(interaction_force)\n", "# Set simulation properties\n", "dt = 0.05\n", "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", @@ -447,7 +451,7 @@ }, { "cell_type": "markdown", - "id": "cd6c6d09", + "id": "9ffd7e3c", "metadata": {}, "source": [ "### Adding Fluid Sources\n", @@ -458,7 +462,7 @@ }, { "cell_type": "markdown", - "id": "cfa8c872", + "id": "1750226e", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", @@ -469,7 +473,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cea19b8c", + "id": "abfce3f6", "metadata": {}, "outputs": [], "source": [ @@ -478,7 +482,7 @@ }, { "cell_type": "markdown", - "id": "18b44048", + "id": "a7ab24b0", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -494,7 +498,7 @@ { "cell_type": "code", "execution_count": null, - "id": "beae54d5", + "id": "ef651e17", "metadata": {}, "outputs": [], "source": [ @@ -503,7 +507,7 @@ }, { "cell_type": "markdown", - "id": "52ca6674", + "id": "dbd100f9", "metadata": {}, "source": [ "Now, we must associate the source with an element in the simulation\n", @@ -514,7 +518,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30354ec0", + "id": "9992df47", "metadata": {}, "outputs": [], "source": [ @@ -528,7 +532,7 @@ }, { "cell_type": "markdown", - "id": "d682896b", + "id": "f61f28ba", "metadata": {}, "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", @@ -538,11 +542,12 @@ { "cell_type": "code", "execution_count": null, - "id": "3ec64e67", + "id": "e217d335", "metadata": {}, "outputs": [], "source": [ "# Set up the cell population\n", + "SimulationTime.Instance().SetStartTime(0.0)\n", "cell_type = DifferentiatedCellProliferativeType()\n", "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", @@ -553,7 +558,7 @@ }, { "cell_type": "markdown", - "id": "1ee49811", + "id": "730b0219", "metadata": {}, "source": [ "#### Varying the Source Location\n", @@ -569,22 +574,23 @@ { "cell_type": "code", "execution_count": null, - "id": "a16602d7", + "id": "6e3d3d75", "metadata": {}, "outputs": [], "source": [ "# Create a simulator\n", - "SimulationTime.Instance().SetStartTime(0.0)\n", "simulator = OffLatticeSimulation2_2(cell_population)\n", "numerical_method = ForwardEulerNumericalMethod2_2()\n", "numerical_method.SetUseUpdateNodeLocation(True)\n", "simulator.SetNumericalMethod(numerical_method)\n", - "# Add an immersed boundary simulation modifier" + "# Add an immersed boundary simulation modifier\n", + "ib_modifier = ImmersedBoundarySimulationModifier2()\n", + "simulator.AddSimulationModifier(ib_modifier)" ] }, { "cell_type": "markdown", - "id": "861d9003", + "id": "befe2e0b", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -597,19 +603,21 @@ { "cell_type": "code", "execution_count": null, - "id": "65828444", + "id": "bab58d4a", "metadata": {}, "outputs": [], "source": [ "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(boundary_force)\n", "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", - "interaction_force.SetSpringConst(1.0 * 1e6)" + "interaction_force.SetSpringConst(1.0 * 1e6)\n", + "ib_modifier.AddImmersedBoundaryForce(interaction_force)" ] }, { "cell_type": "markdown", - "id": "03ac75c6", + "id": "ccba3052", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -622,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "945d4565", + "id": "a69bc075", "metadata": {}, "outputs": [], "source": [ @@ -640,7 +648,7 @@ }, { "cell_type": "markdown", - "id": "d272679b", + "id": "29722570", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index 8b81ba45..ba5994d2 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [de6c6f92](https://github.com/Chaste/PyChaste/commit/de6c6f9256f00ad5a80ce1e2f5ab1a8c4c9cf58d). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [3964667c](https://github.com/Chaste/PyChaste/commit/3964667c5f950bbbb77687d2024795105278294b). Note that the code is given in full at the bottom of the page. @@ -22,8 +22,8 @@ influences the flow of the fluid. In this tutorial, we demonstrate: 1. Building single-cell immersed boundary capable simulations. -2. Building multi-cellular simulations. -3. Adding and manipulating fluid sources. +2. Building multi-cellular immersed boundary simulations. +3. Adding and manipulating immersed boundary fluid sources. ## Imports @@ -39,7 +39,6 @@ from chaste.cell_based import ( CellsGeneratorUniformCellCycleModel_2, DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, - FluidSource2, ImmersedBoundaryCellPopulation2, ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, @@ -48,7 +47,9 @@ from chaste.cell_based import ( SimulationTime, TearDownNotebookTest, ) -from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator + +from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator + import chaste.visualization class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): @@ -149,10 +150,8 @@ the fluid. ```python # Add an immersed boundary simulation modifier. - # The modifier is responsible for managing the fluid simulation - # and propagating forces between the fluid & cell. - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) ``` We must also provide the modifier with a force model to govern @@ -164,7 +163,7 @@ they do not control interactions between cells. # Add a force law to model the behaviour of the cell membrane boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) ``` The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary @@ -231,6 +230,9 @@ modifying the 5th parameter. # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() @@ -242,23 +244,20 @@ modifying the 5th parameter. # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) - # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) - # Add an immersed boundary simulation modifier. - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + # Add an immersed boundary simulation modifier + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) # Add a force law to model the behaviour of the cell membrane boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) ``` #### Intercellular Interactions @@ -273,7 +272,7 @@ also be modified using the `SetRestLength` method. # Add a new intercellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) - main_modifier.AddImmersedBoundaryForce(interaction_force) + ib_modifier.AddImmersedBoundaryForce(interaction_force) # Set simulation properties dt = 0.05 @@ -333,6 +332,7 @@ Finally, we must tell the cell population that fluid sources are present. ```python # Set up the cell population + SimulationTime.Instance().SetStartTime(0.0) cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) @@ -352,15 +352,14 @@ the cell shapes. ```python # Create a simulator - SimulationTime.Instance().SetStartTime(0.0) simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) # Add an immersed boundary simulation modifier - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) ``` #### Fluid-Cell Interaction @@ -371,11 +370,11 @@ effect of the fluid source on the cells. ```python boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) - main_modifier.AddImmersedBoundaryForce(interaction_force) + ib_modifier.AddImmersedBoundaryForce(interaction_force) ``` #### Adding More Sources @@ -428,7 +427,6 @@ from chaste.cell_based import ( CellsGeneratorUniformCellCycleModel_2, DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, - FluidSource2, ImmersedBoundaryCellPopulation2, ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, @@ -437,7 +435,9 @@ from chaste.cell_based import ( SimulationTime, TearDownNotebookTest, ) -from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator + +from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator + import chaste.visualization class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): @@ -471,15 +471,13 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): simulator.SetNumericalMethod(numerical_method) # Add an immersed boundary simulation modifier. - # The modifier is responsible for managing the fluid simulation - # and propagating forces between the fluid & cell. - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) # Add a force law to model the behaviour of the cell membrane boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) # Set simulation properties dt = 0.05 @@ -504,6 +502,9 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() @@ -515,28 +516,25 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) - # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) - # Add an immersed boundary simulation modifier. - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + # Add an immersed boundary simulation modifier + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) # Add a force law to model the behaviour of the cell membrane boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) # Add a new intercellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) - main_modifier.AddImmersedBoundaryForce(interaction_force) + ib_modifier.AddImmersedBoundaryForce(interaction_force) # Set simulation properties dt = 0.05 @@ -566,6 +564,7 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): mesh.GetElement(0).SetFluidSource(source) # Set up the cell population + SimulationTime.Instance().SetStartTime(0.0) cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) @@ -575,23 +574,22 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): cell_population.SetIfPopulationHasActiveSources(True) # Create a simulator - SimulationTime.Instance().SetStartTime(0.0) simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) # Add an immersed boundary simulation modifier - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) - main_modifier.AddImmersedBoundaryForce(interaction_force) + ib_modifier.AddImmersedBoundaryForce(interaction_force) # Set simulation properties dt = 0.05 diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index acc350ea..e2a9eed9 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -43,8 +43,8 @@ ## ## In this tutorial, we demonstrate: ## 1. Building single-cell immersed boundary capable simulations. -## 2. Building multi-cellular simulations. -## 3. Adding and manipulating fluid sources. +## 2. Building multi-cellular immersed boundary simulations. +## 3. Adding and manipulating immersed boundary fluid sources. ## ## ## Imports @@ -59,7 +59,6 @@ CellsGeneratorUniformCellCycleModel_2, DifferentiatedCellProliferativeType, ForwardEulerNumericalMethod2_2, - FluidSource2, ImmersedBoundaryCellPopulation2, ImmersedBoundaryLinearInteractionForce2, ImmersedBoundaryLinearMembraneForce2, @@ -68,7 +67,9 @@ SimulationTime, TearDownNotebookTest, ) -from chaste.mesh import ImmersedBoundaryPalisadeMeshGenerator + +from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator + import chaste.visualization @@ -156,10 +157,8 @@ def test_simple_immersed_boundary_simulation(self): ## the fluid. # Add an immersed boundary simulation modifier. - # The modifier is responsible for managing the fluid simulation - # and propagating forces between the fluid & cell. - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) ## We must also provide the modifier with a force model to govern ## interactions between the nodes forming the boundary of the cells. @@ -169,7 +168,7 @@ def test_simple_immersed_boundary_simulation(self): # Add a force law to model the behaviour of the cell membrane boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) ## The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary ## is. You can experiment with adjusting the spring constant to change @@ -228,6 +227,9 @@ def test_multicell_immersed_boundary_simulation(self): # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) + # Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) + # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() @@ -239,23 +241,20 @@ def test_multicell_immersed_boundary_simulation(self): # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) - # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) - # Add an immersed boundary simulation modifier. - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + # Add an immersed boundary simulation modifier + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) # Add a force law to model the behaviour of the cell membrane boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) ## #### Intercellular Interactions ## So far, we have encountered forces that act to maintain the shape @@ -268,7 +267,7 @@ def test_multicell_immersed_boundary_simulation(self): # Add a new intercellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) - main_modifier.AddImmersedBoundaryForce(interaction_force) + ib_modifier.AddImmersedBoundaryForce(interaction_force) # Set simulation properties dt = 0.05 @@ -318,6 +317,7 @@ def test_fluid_source_immersed_boundary_simulation(self): ## Finally, we must tell the cell population that fluid sources are present. # Set up the cell population + SimulationTime.Instance().SetStartTime(0.0) cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) @@ -335,15 +335,14 @@ def test_fluid_source_immersed_boundary_simulation(self): ## the cell shapes. # Create a simulator - SimulationTime.Instance().SetStartTime(0.0) simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() numerical_method.SetUseUpdateNodeLocation(True) simulator.SetNumericalMethod(numerical_method) # Add an immersed boundary simulation modifier - main_modifier = ImmersedBoundarySimulationModifier2() - simulator.AddSimulationModifier(main_modifier) + ib_modifier = ImmersedBoundarySimulationModifier2() + simulator.AddSimulationModifier(ib_modifier) ## #### Fluid-Cell Interaction ## Have a go at modifying the spring constant of the @@ -352,11 +351,11 @@ def test_fluid_source_immersed_boundary_simulation(self): boundary_force = ImmersedBoundaryLinearMembraneForce2() boundary_force.SetElementSpringConst(1.0 * 1e7) - main_modifier.AddImmersedBoundaryForce(boundary_force) + ib_modifier.AddImmersedBoundaryForce(boundary_force) interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) - main_modifier.AddImmersedBoundaryForce(interaction_force) + ib_modifier.AddImmersedBoundaryForce(interaction_force) ## #### Adding More Sources ## Try adding second fluid source. You will need to use a unique index, From d548c83ded45c0fcaad7ad93106b73e46df81971 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 25 Mar 2024 19:40:38 +0000 Subject: [PATCH 29/40] #62 update immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 96 +++++++++---------- doc/tutorials/TestImmersedBoundaryTutorial.md | 8 +- .../tutorials/TestImmersedBoundaryTutorial.py | 8 +- 3 files changed, 56 insertions(+), 56 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index d92b859b..c94cd81f 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "10d49fc0", + "id": "07e7e9a5", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37e0eb83", + "id": "ff390f7f", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "af011b03", + "id": "f8697aae", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "485d8440", + "id": "71c87705", "metadata": {}, "outputs": [], "source": [ @@ -73,10 +73,10 @@ }, { "cell_type": "markdown", - "id": "98d21225", + "id": "cabca5c3", "metadata": {}, "source": [ - "### Simple Immersed Boundary Simulations\n", + "### 1. Simple Immersed Boundary Simulations\n", "We begin by exploring simulations containing a single cell. This will\n", "familiarise you with how to generate immersed boundary cells, the steps\n", "involved in setting up an immersed boundary simulation, and the options\n", @@ -95,7 +95,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8575bb86", + "id": "a2c6d43e", "metadata": {}, "outputs": [], "source": [ @@ -105,7 +105,7 @@ }, { "cell_type": "markdown", - "id": "d52abc31", + "id": "c277e3dd", "metadata": {}, "source": [ " **Tip** Lines of code beginning with `#` are comments in Python\n", @@ -117,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64212899", + "id": "6b986d82", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "c07e0482", + "id": "4ae0e94c", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -149,7 +149,7 @@ { "cell_type": "code", "execution_count": null, - "id": "719b46a7", + "id": "a417b318", "metadata": {}, "outputs": [], "source": [ @@ -159,7 +159,7 @@ }, { "cell_type": "markdown", - "id": "4cdd3480", + "id": "5f0fa862", "metadata": {}, "source": [ "Next, we set up the cell population\n", @@ -169,7 +169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da032fda", + "id": "dcb381af", "metadata": {}, "outputs": [], "source": [ @@ -183,7 +183,7 @@ }, { "cell_type": "markdown", - "id": "50f88c8e", + "id": "6a64a096", "metadata": {}, "source": [ "We specify a cell type and cell cycle model. These can be\n", @@ -199,7 +199,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ab7d7c00", + "id": "0aaf8412", "metadata": {}, "outputs": [], "source": [ @@ -209,7 +209,7 @@ }, { "cell_type": "markdown", - "id": "98bbfbd8", + "id": "b82ab11c", "metadata": {}, "source": [ "Here, we use an `OffLatticeSimulation` simulator to control the\n", @@ -221,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0f275a93", + "id": "e1f2e161", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "cc1c2b31", + "id": "cf0adeab", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -250,7 +250,7 @@ { "cell_type": "code", "execution_count": null, - "id": "26e89451", + "id": "1cec907d", "metadata": {}, "outputs": [], "source": [ @@ -261,7 +261,7 @@ }, { "cell_type": "markdown", - "id": "7a50e537", + "id": "a15b92ab", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0d8dbd4f", + "id": "b4e3a234", "metadata": {}, "outputs": [], "source": [ @@ -286,7 +286,7 @@ }, { "cell_type": "markdown", - "id": "eef19d3d", + "id": "4ab0df21", "metadata": {}, "source": [ "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a0a48881", + "id": "ad19e90c", "metadata": {}, "outputs": [], "source": [ @@ -322,16 +322,16 @@ }, { "cell_type": "markdown", - "id": "bfe1b482", + "id": "1098b8d4", "metadata": {}, "source": [ - "### Adding More Cells\n", + "### 2. Adding More Cells\n", "\n" ] }, { "cell_type": "markdown", - "id": "de09605a", + "id": "dad51910", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -345,7 +345,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8f076763", + "id": "58548f10", "metadata": {}, "outputs": [], "source": [ @@ -355,7 +355,7 @@ }, { "cell_type": "markdown", - "id": "7925d86f", + "id": "9bf2448f", "metadata": {}, "source": [ "#### Laminas\n", @@ -379,7 +379,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbb3ab72", + "id": "9f18798b", "metadata": {}, "outputs": [], "source": [ @@ -413,7 +413,7 @@ }, { "cell_type": "markdown", - "id": "dec897cd", + "id": "5206cddf", "metadata": {}, "source": [ "#### Intercellular Interactions\n", @@ -429,7 +429,7 @@ { "cell_type": "code", "execution_count": null, - "id": "850bcc64", + "id": "dfdfe719", "metadata": {}, "outputs": [], "source": [ @@ -451,10 +451,10 @@ }, { "cell_type": "markdown", - "id": "9ffd7e3c", + "id": "0acce2a5", "metadata": {}, "source": [ - "### Adding Fluid Sources\n", + "### 3. Adding Fluid Sources\n", "Now that we are familiar with how to generate the cells, we will\n", "introduce fluid sources.\n", "\n" @@ -462,7 +462,7 @@ }, { "cell_type": "markdown", - "id": "1750226e", + "id": "e798b7f0", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", @@ -473,7 +473,7 @@ { "cell_type": "code", "execution_count": null, - "id": "abfce3f6", + "id": "697f504c", "metadata": {}, "outputs": [], "source": [ @@ -482,7 +482,7 @@ }, { "cell_type": "markdown", - "id": "a7ab24b0", + "id": "7d3d85f5", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -498,7 +498,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ef651e17", + "id": "5a6a43de", "metadata": {}, "outputs": [], "source": [ @@ -507,7 +507,7 @@ }, { "cell_type": "markdown", - "id": "dbd100f9", + "id": "28e71f94", "metadata": {}, "source": [ "Now, we must associate the source with an element in the simulation\n", @@ -518,7 +518,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9992df47", + "id": "c5a7e94d", "metadata": {}, "outputs": [], "source": [ @@ -532,7 +532,7 @@ }, { "cell_type": "markdown", - "id": "f61f28ba", + "id": "c77b23e6", "metadata": {}, "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", @@ -542,7 +542,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e217d335", + "id": "baf7bc5f", "metadata": {}, "outputs": [], "source": [ @@ -558,7 +558,7 @@ }, { "cell_type": "markdown", - "id": "730b0219", + "id": "6ae811c0", "metadata": {}, "source": [ "#### Varying the Source Location\n", @@ -574,7 +574,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e3d3d75", + "id": "096d021b", "metadata": {}, "outputs": [], "source": [ @@ -590,7 +590,7 @@ }, { "cell_type": "markdown", - "id": "befe2e0b", + "id": "7e30f8ef", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -603,7 +603,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bab58d4a", + "id": "f7c3a288", "metadata": {}, "outputs": [], "source": [ @@ -617,7 +617,7 @@ }, { "cell_type": "markdown", - "id": "ccba3052", + "id": "4d08fc2a", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -630,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a69bc075", + "id": "3c67819f", "metadata": {}, "outputs": [], "source": [ @@ -648,7 +648,7 @@ }, { "cell_type": "markdown", - "id": "29722570", + "id": "80876078", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index ba5994d2..5d08ba35 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [3964667c](https://github.com/Chaste/PyChaste/commit/3964667c5f950bbbb77687d2024795105278294b). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [5e0d0a44](https://github.com/Chaste/PyChaste/commit/5e0d0a44af4a3ba6db0eb8a89f7a538f4c6d6656). Note that the code is given in full at the bottom of the page. @@ -55,7 +55,7 @@ import chaste.visualization class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): ``` -### Simple Immersed Boundary Simulations +### 1. Simple Immersed Boundary Simulations We begin by exploring simulations containing a single cell. This will familiarise you with how to generate immersed boundary cells, the steps involved in setting up an immersed boundary simulation, and the options @@ -191,7 +191,7 @@ Finally, we set up the simulation properties and run it. TearDownNotebookTest() ``` -### Adding More Cells +### 2. Adding More Cells ```python def test_multicell_immersed_boundary_simulation(self): @@ -288,7 +288,7 @@ also be modified using the `SetRestLength` method. TearDownNotebookTest() ``` -### Adding Fluid Sources +### 3. Adding Fluid Sources Now that we are familiar with how to generate the cells, we will introduce fluid sources. diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index e2a9eed9..e2683b5e 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -75,7 +75,7 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): - ## ### Simple Immersed Boundary Simulations + ## ### 1. Simple Immersed Boundary Simulations ## We begin by exploring simulations containing a single cell. This will ## familiarise you with how to generate immersed boundary cells, the steps ## involved in setting up an immersed boundary simulation, and the options @@ -193,7 +193,7 @@ def test_simple_immersed_boundary_simulation(self): SimulationTime.Instance().Destroy() TearDownNotebookTest() - ## ### Adding More Cells + ## ### 2. Adding More Cells def test_multicell_immersed_boundary_simulation(self): ## #### Multiple Cells @@ -229,7 +229,7 @@ def test_multicell_immersed_boundary_simulation(self): # Set the start time for the simulation SimulationTime.Instance().SetStartTime(0.0) - + # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() @@ -282,7 +282,7 @@ def test_multicell_immersed_boundary_simulation(self): SimulationTime.Instance().Destroy() TearDownNotebookTest() - ## ### Adding Fluid Sources + ## ### 3. Adding Fluid Sources ## Now that we are familiar with how to generate the cells, we will ## introduce fluid sources. From 587e149426fa155143fa689fda67207c14154e14 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 26 Mar 2024 15:52:58 +0000 Subject: [PATCH 30/40] #62 dont' support vtk5 --- src/visualization/VtkScene.cpp | 15 +++------------ src/visualization/VtkScene.hpp | 22 ++++------------------ 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/src/visualization/VtkScene.cpp b/src/visualization/VtkScene.cpp index af957708..478a9c52 100644 --- a/src/visualization/VtkScene.cpp +++ b/src/visualization/VtkScene.cpp @@ -34,7 +34,6 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -#define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning #include #include #include @@ -43,9 +42,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#if VTK_MAJOR_VERSION > 5 - #include -#endif +#include #include #include #include @@ -110,9 +107,7 @@ VtkScene::VtkScene() mpRenderWindow(vtkSmartPointer::New()), mpRenderWindowInteractor(vtkSmartPointer::New()), mOutputFilePath(), - #if VTK_MAJOR_VERSION > 5 mAnimationWriter(vtkSmartPointer::New()), - #endif mWindowToImageFilter(vtkSmartPointer::New()), mIsInteractive(false), mSaveAsAnimation(false), @@ -214,7 +209,7 @@ void VtkScene::ResetRenderer(unsigned time_step) p_writer->Write(); } } - #if VTK_MAJOR_VERSION > 5 + if(mSaveAsAnimation) { if(!mSaveAsImages) @@ -225,7 +220,7 @@ void VtkScene::ResetRenderer(unsigned time_step) } mAnimationWriter->Write(); } - #endif // VTK_MAJOR_VERSION > 5 + if(mIsInteractive) { mpRenderWindow->SetOffScreenRendering(0); @@ -254,12 +249,10 @@ void VtkScene::SetCellPopulation(boost::shared_ptr void VtkScene::End() { - #if VTK_MAJOR_VERSION > 5 if(mSaveAsAnimation and mHasStarted) { mAnimationWriter->End(); } - #endif } template @@ -285,12 +278,10 @@ void VtkScene::Start() if(mSaveAsAnimation) { - #if VTK_MAJOR_VERSION > 5 mAnimationWriter->SetInputConnection(mWindowToImageFilter->GetOutputPort()); mAnimationWriter->SetFileName((mOutputFilePath+".ogg").c_str()); mAnimationWriter->SetRate(1.0); mAnimationWriter->Start(); - #endif } mHasStarted = true; diff --git a/src/visualization/VtkScene.hpp b/src/visualization/VtkScene.hpp index 5833c848..beea2f37 100644 --- a/src/visualization/VtkScene.hpp +++ b/src/visualization/VtkScene.hpp @@ -38,23 +38,11 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "SmartPointers.hpp" -#define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning #include -#if VTK_MAJOR_VERSION > 5 - #include - #if VTK_MINOR_VERSION > 0 - #include - #if VTK_MAJOR_VERSION > 6 - VTK_MODULE_INIT(vtkRenderingOpenGL2); - #else - VTK_MODULE_INIT(vtkRenderingOpenGL); - #endif - VTK_MODULE_INIT(vtkRenderingFreeType); - #else - #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL) - #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL) - #endif -#endif +#include +#include +VTK_MODULE_INIT(vtkRenderingOpenGL2); +VTK_MODULE_INIT(vtkRenderingFreeType); #include #include #include @@ -92,12 +80,10 @@ class VtkScene */ std::string mOutputFilePath; - #if VTK_MAJOR_VERSION > 5 /** * The animation writer */ vtkSmartPointer mAnimationWriter; - #endif /** * The image to window filter From 52b9ed36473b0616119ae828f3b41062e55e10d2 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 8 Apr 2024 17:32:50 +0100 Subject: [PATCH 31/40] #62 vtk5 not supported --- .../AbstractPyChasteActorGenerator.cpp | 40 +------------------ .../AbstractPyChasteActorGenerator.hpp | 1 - 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/src/visualization/AbstractPyChasteActorGenerator.cpp b/src/visualization/AbstractPyChasteActorGenerator.cpp index 2499401b..7ab1f423 100644 --- a/src/visualization/AbstractPyChasteActorGenerator.cpp +++ b/src/visualization/AbstractPyChasteActorGenerator.cpp @@ -33,52 +33,14 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - -Copyright (c) 2005-2024, University of Oxford. - All rights reserved. - - University of Oxford means the Chancellor, Masters and Scholars of the - University of Oxford, having an administrative office at Wellington - Square, Oxford OX1 2JD, UK. - - This file is Abstract of Chaste. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the University of Oxford nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A AbstractICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - #include -#define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning #include #include #include #include #include #include -#if VTK_MAJOR_VERSION > 5 - #include -#endif +#include #include #include #include diff --git a/src/visualization/AbstractPyChasteActorGenerator.hpp b/src/visualization/AbstractPyChasteActorGenerator.hpp index 8dd1e85c..24ad122d 100644 --- a/src/visualization/AbstractPyChasteActorGenerator.hpp +++ b/src/visualization/AbstractPyChasteActorGenerator.hpp @@ -38,7 +38,6 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "SmartPointers.hpp" -#define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning #include #include #include From 5c26634b69e109c2a340756eed6742b9fd0d3d29 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 8 Apr 2024 17:33:42 +0100 Subject: [PATCH 32/40] #62 add immersed boundary actor generators --- .../CellPopulationPyChasteActorGenerator.cpp | 220 ++++++++++++++++-- .../CellPopulationPyChasteActorGenerator.hpp | 7 +- 2 files changed, 211 insertions(+), 16 deletions(-) diff --git a/src/visualization/CellPopulationPyChasteActorGenerator.cpp b/src/visualization/CellPopulationPyChasteActorGenerator.cpp index 7e946757..acebae1c 100644 --- a/src/visualization/CellPopulationPyChasteActorGenerator.cpp +++ b/src/visualization/CellPopulationPyChasteActorGenerator.cpp @@ -70,7 +70,6 @@ Copyright (c) 2005-2024, University of Oxford. #include #include -#define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning #include #include #include @@ -106,6 +105,7 @@ Copyright (c) 2005-2024, University of Oxford. #include "Exception.hpp" #include "CellLabel.hpp" #include "CaBasedCellPopulation.hpp" +#include "ImmersedBoundaryCellPopulation.hpp" #include "PottsBasedCellPopulation.hpp" #include "NodeBasedCellPopulation.hpp" #include "VertexBasedCellPopulation.hpp" @@ -147,7 +147,7 @@ void CellPopulationPyChasteActorGenerator::AddCaBasedCellPopulationActor(vt boost::shared_ptr > p_ca_population = boost::dynamic_pointer_cast >(mpCellPopulation); - if(p_ca_population and mShowPottsMeshEdges) + if(p_ca_population && mShowPottsMeshEdges) { vtkSmartPointer p_points = vtkSmartPointer::New(); p_points->GetData()->SetName("Vertex positions"); @@ -221,7 +221,7 @@ void CellPopulationPyChasteActorGenerator::AddPottsBasedCellPopulationActor boost::shared_ptr > p_potts_population = boost::dynamic_pointer_cast >(mpCellPopulation); - if(p_potts_population and mShowPottsMeshEdges) + if(p_potts_population && mShowPottsMeshEdges) { vtkSmartPointer p_points = vtkSmartPointer::New(); p_points->GetData()->SetName("Vertex positions"); @@ -297,7 +297,7 @@ void CellPopulationPyChasteActorGenerator::AddPottsBasedCellPopulationActor { p_element_ids->InsertNextTuple1((*cell_iter)->GetCellProliferativeType()->GetColour()); } - else if(mColorByCellData and !this->mDataLabel.empty()) + else if(mColorByCellData && !this->mDataLabel.empty()) { std::vector keys = (*cell_iter)->GetCellData()->GetKeys(); if (std::find(keys.begin(), keys.end(), this->mDataLabel) != keys.end()) @@ -455,7 +455,7 @@ void CellPopulationPyChasteActorGenerator::AddActor(vtkSmartPointer >(mpCellPopulation) or + if(mShowCellCentres || boost::dynamic_pointer_cast >(mpCellPopulation) || boost::dynamic_pointer_cast >(mpCellPopulation)) { vtkSmartPointer p_points = vtkSmartPointer::New(); @@ -480,7 +480,7 @@ void CellPopulationPyChasteActorGenerator::AddActor(vtkSmartPointerInsertNextTuple1((*cell_iter)->GetCellProliferativeType()->GetColour()); } - else if(mColorByCellData and !this->mDataLabel.empty()) + else if(mColorByCellData && !this->mDataLabel.empty()) { std::vector keys = (*cell_iter)->GetCellData()->GetKeys(); if (std::find(keys.begin(), keys.end(), this->mDataLabel) != keys.end()) @@ -588,7 +588,7 @@ void CellPopulationPyChasteActorGenerator::AddActor(vtkSmartPointerAddActor(p_actor); - if(!this->mDataLabel.empty() and this->mShowScaleBar) + if(!this->mDataLabel.empty() && this->mShowScaleBar) { this->mpScaleBar->SetLookupTable(p_scaled_ctf); this->mpScaleBar->SetTitle(this->mDataLabel.c_str()); @@ -596,22 +596,26 @@ void CellPopulationPyChasteActorGenerator::AddActor(vtkSmartPointer >(mpCellPopulation) and (mShowMutableMeshEdges or mShowVoronoiMeshEdges)) + if(boost::dynamic_pointer_cast >(mpCellPopulation) && (mShowMutableMeshEdges || mShowVoronoiMeshEdges)) { AddMeshBasedCellPopulationActor(pRenderer); } - else if (boost::dynamic_pointer_cast >(mpCellPopulation) and mShowVoronoiMeshEdges) + else if (boost::dynamic_pointer_cast >(mpCellPopulation) && mShowVoronoiMeshEdges) { AddVertexBasedCellPopulationActor(pRenderer); } - else if (boost::dynamic_pointer_cast >(mpCellPopulation) and (mShowPottsMeshEdges or mShowPottsMeshOutlines)) + else if (boost::dynamic_pointer_cast >(mpCellPopulation) && (mShowPottsMeshEdges || mShowPottsMeshOutlines)) { AddPottsBasedCellPopulationActor(pRenderer); } - else if (boost::dynamic_pointer_cast >(mpCellPopulation) and mShowPottsMeshEdges) + else if (boost::dynamic_pointer_cast >(mpCellPopulation) && mShowPottsMeshEdges) { AddCaBasedCellPopulationActor(pRenderer); } + else if (boost::dynamic_pointer_cast >(mpCellPopulation)) + { + AddImmersedBoundaryCellPopulationActor(pRenderer); + } } template @@ -674,7 +678,193 @@ void CellPopulationPyChasteActorGenerator::AddVertexBasedCellPopulationActo p_cell_color_reference_data->InsertNextTuple1(p_biological_cell->GetCellProliferativeType()->GetColour()); } - else if(mColorByCellData and !this->mDataLabel.empty()) + else if(mColorByCellData && !this->mDataLabel.empty()) + { + std::vector keys = p_biological_cell->GetCellData()->GetKeys(); + if (std::find(keys.begin(), keys.end(), this->mDataLabel) != keys.end()) + { + p_cell_color_reference_data->InsertNextTuple1(p_biological_cell->GetCellData()->GetItem(this->mDataLabel)); + } + else + { + p_cell_color_reference_data->InsertNextTuple1(0.0); + } + } + + else if(mColorByCellMutationState) + { + double mutation_state = p_biological_cell->GetMutationState()->GetColour(); + + CellPropertyCollection collection = p_biological_cell->rGetCellPropertyCollection(); + CellPropertyCollection label_collection = collection.GetProperties(); + + if (label_collection.GetSize() == 1) + { + boost::shared_ptr p_label = boost::static_pointer_cast(label_collection.GetProperty()); + mutation_state = p_label->GetColour(); + } + p_cell_color_reference_data->InsertNextTuple1(mutation_state); + } + else if(mColorByCellLabel) + { + double label = 0.0; + if (p_biological_cell->HasCellProperty()) + { + CellPropertyCollection collection = p_biological_cell->rGetCellPropertyCollection().GetProperties(); + boost::shared_ptr p_label = boost::static_pointer_cast(collection.GetProperty()); + label = p_label->GetColour(); + } + p_cell_color_reference_data->InsertNextTuple1(label); + } + else + { + p_cell_color_reference_data->InsertNextTuple1(p_biological_cell->GetCellId()); + } + } + + p_voronoi_grid->GetCellData()->AddArray(p_cell_color_reference_data); + p_voronoi_grid->GetCellData()->SetScalars(p_cell_color_reference_data); + + vtkSmartPointer p_scaled_ctf = vtkSmartPointer::New(); + if(!mColorByCellData) + { + double range[2]; + p_voronoi_grid->GetCellData()->GetArray("CellColors")->GetRange(range); + for(unsigned idx=0; idx<255; idx++) + { + double color[3]; + this->mpDiscreteColorTransferFunction->GetColor((255.0-double(idx))/255.0, color); + p_scaled_ctf->AddRGBPoint(range[0] + double(idx)*(range[1]-range[0])/255.0, color[0], color[1], color[2]); + } + } + else + { + double range[2]; + p_voronoi_grid->GetCellData()->GetArray("CellColors")->GetRange(range); + for(unsigned idx=0; idx<255; idx++) + { + double color[3]; + this->mpColorTransferFunction->GetColor(double(idx)/255.0, color); + p_scaled_ctf->AddRGBPoint(range[0] + double(idx)*(range[1]-range[0])/255.0, color[0], color[1], color[2]); + } + } + p_scaled_ctf->Build(); + + vtkSmartPointer p_geom_filter = vtkSmartPointer::New(); + #if VTK_MAJOR_VERSION <= 5 + p_geom_filter->SetInput(p_voronoi_grid); + #else + p_geom_filter->SetInputData(p_voronoi_grid); + #endif + + vtkSmartPointer p_mapper = vtkSmartPointer::New(); + p_mapper->SetInputConnection(p_geom_filter->GetOutputPort()); + p_mapper->SetLookupTable(p_scaled_ctf); + p_mapper->ScalarVisibilityOn(); + p_mapper->SelectColorArray("CellColors"); + p_mapper->SetScalarModeToUseCellData(); + p_mapper->SetColorModeToMapScalars(); + + vtkSmartPointer p_actor = vtkSmartPointer::New(); + p_actor->SetMapper(p_mapper); + p_actor->GetProperty()->SetOpacity(this->mVolumeOpacity); + if(mColorCellByUserDefined) + { + p_actor->GetProperty()->SetColor(this->mPointColor[0], this->mPointColor[1], this->mPointColor[2]); + } + pRenderer->AddActor(p_actor); + + vtkSmartPointer p_voronoi_extract_edges = vtkSmartPointer::New(); + p_voronoi_extract_edges->SetInputConnection(p_geom_filter->GetOutputPort()); + p_voronoi_extract_edges->SetFeatureEdges(false); + p_voronoi_extract_edges->SetBoundaryEdges(true); + p_voronoi_extract_edges->SetManifoldEdges(true); + p_voronoi_extract_edges->SetNonManifoldEdges(false); + + vtkSmartPointer p_voronoi_tubes = vtkSmartPointer::New(); + p_voronoi_tubes->SetInputConnection(p_voronoi_extract_edges->GetOutputPort()); + p_voronoi_tubes->SetRadius(this->mEdgeSize); + p_voronoi_tubes->SetNumberOfSides(12); + + vtkSmartPointer p_voronoi_tube_mapper = vtkSmartPointer::New(); + p_voronoi_tube_mapper->SetInputConnection(p_voronoi_tubes->GetOutputPort()); + p_voronoi_tube_mapper->ScalarVisibilityOff(); + + vtkSmartPointer p_voronoi_tube_actor = vtkSmartPointer::New(); + p_voronoi_tube_actor->SetMapper(p_voronoi_tube_mapper); + p_voronoi_tube_actor->GetProperty()->SetColor(this->mEdgeColor[0], this->mEdgeColor[1], this->mEdgeColor[2]); + pRenderer->AddActor(p_voronoi_tube_actor); + + if(!this->mDataLabel.empty() && this->mShowScaleBar) + { + this->mpScaleBar->SetLookupTable(p_scaled_ctf); + this->mpScaleBar->SetTitle(this->mDataLabel.c_str()); + pRenderer->AddActor(this->mpScaleBar); + } + } +} + +template +void CellPopulationPyChasteActorGenerator::AddImmersedBoundaryCellPopulationActor(vtkSmartPointer pRenderer) +{ + boost::shared_ptr > p_cell_population = boost::dynamic_pointer_cast >(mpCellPopulation); + + if(!p_cell_population) + { + EXCEPTION("Could not cast mesh to Immersed Boundary type."); + } + + if(mShowVoronoiMeshEdges) + { + vtkSmartPointer p_voronoi_grid = vtkSmartPointer::New(); + vtkSmartPointer p_cell_color_reference_data = vtkSmartPointer::New(); + p_cell_color_reference_data->SetName("CellColors"); + + vtkSmartPointer p_points = vtkSmartPointer::New(); + p_points->GetData()->SetName("Vertex positions"); + for (unsigned node_num=0; node_numrGetMesh().GetNumNodes(); node_num++) + { + c_vector position = p_cell_population->rGetMesh().GetNode(node_num)->rGetLocation(); + if (DIM==2) + { + p_points->InsertPoint(node_num, position[0], position[1], 0.0); + } + else + { + p_points->InsertPoint(node_num, position[0], position[1], position[2]); + } + } + p_voronoi_grid->SetPoints(p_points); + + for (typename ImmersedBoundaryMesh::ImmersedBoundaryElementIterator iter = p_cell_population->rGetMesh().GetElementIteratorBegin(); + iter != p_cell_population->rGetMesh().GetElementIteratorEnd(); ++iter) + { + vtkSmartPointer p_cell; + if (DIM == 2) + { + p_cell = vtkSmartPointer::New(); + } + else + { + p_cell = vtkSmartPointer::New(); + } + vtkSmartPointer p_cell_id_list = p_cell->GetPointIds(); + p_cell_id_list->SetNumberOfIds(iter->GetNumNodes()); + for (unsigned j=0; jGetNumNodes(); ++j) + { + p_cell_id_list->SetId(j, iter->GetNodeGlobalIndex(j)); + } + p_voronoi_grid->InsertNextCell(p_cell->GetCellType(), p_cell_id_list); + + unsigned element_index = iter->GetIndex(); + CellPtr p_biological_cell = p_cell_population->GetCellUsingLocationIndex(element_index); + + if(mColorByCellType) + { + p_cell_color_reference_data->InsertNextTuple1(p_biological_cell->GetCellProliferativeType()->GetColour()); + } + + else if(mColorByCellData && !this->mDataLabel.empty()) { std::vector keys = p_biological_cell->GetCellData()->GetKeys(); if (std::find(keys.begin(), keys.end(), this->mDataLabel) != keys.end()) @@ -791,7 +981,7 @@ void CellPopulationPyChasteActorGenerator::AddVertexBasedCellPopulationActo p_voronoi_tube_actor->GetProperty()->SetColor(this->mEdgeColor[0], this->mEdgeColor[1], this->mEdgeColor[2]); pRenderer->AddActor(p_voronoi_tube_actor); - if(!this->mDataLabel.empty() and this->mShowScaleBar) + if(!this->mDataLabel.empty() && this->mShowScaleBar) { this->mpScaleBar->SetLookupTable(p_scaled_ctf); this->mpScaleBar->SetTitle(this->mDataLabel.c_str()); @@ -877,7 +1067,7 @@ void CellPopulationPyChasteActorGenerator::AddMeshBasedCellPopulationActor( p_cell_color_reference_data->InsertNextTuple1(p_biological_cell->GetCellProliferativeType()->GetColour()); } - else if(mColorByCellData and !this->mDataLabel.empty()) + else if(mColorByCellData && !this->mDataLabel.empty()) { std::vector keys = p_biological_cell->GetCellData()->GetKeys(); if (std::find(keys.begin(), keys.end(), this->mDataLabel) != keys.end()) @@ -1005,7 +1195,7 @@ void CellPopulationPyChasteActorGenerator::AddMeshBasedCellPopulationActor( p_voronoi_tube_actor->GetProperty()->SetColor(this->mEdgeColor[0], this->mEdgeColor[1], this->mEdgeColor[2]); pRenderer->AddActor(p_voronoi_tube_actor); - if(!this->mDataLabel.empty() and this->mShowScaleBar) + if(!this->mDataLabel.empty() && this->mShowScaleBar) { this->mpScaleBar->SetLookupTable(p_scaled_ctf); this->mpScaleBar->SetTitle(this->mDataLabel.c_str()); diff --git a/src/visualization/CellPopulationPyChasteActorGenerator.hpp b/src/visualization/CellPopulationPyChasteActorGenerator.hpp index db288294..57f0ef8e 100644 --- a/src/visualization/CellPopulationPyChasteActorGenerator.hpp +++ b/src/visualization/CellPopulationPyChasteActorGenerator.hpp @@ -73,7 +73,6 @@ Copyright (c) 2005-2024, University of Oxford. #include #include "SmartPointers.hpp" -#define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning #include #include #include @@ -173,6 +172,12 @@ class CellPopulationPyChasteActorGenerator : public AbstractPyChasteActorGenerat */ void AddVertexBasedCellPopulationActor(vtkSmartPointer pRenderer); + /** + * Specialized class for adding Immersed boundary population + * @param pRenderer the current renderer + */ + void AddImmersedBoundaryCellPopulationActor(vtkSmartPointer pRenderer); + /** * Specialized class for adding Ca based population * @param pRenderer the current renderer From 2591aa28a9f249a15abedeb19380e54fcace28c4 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 8 Apr 2024 18:05:03 +0100 Subject: [PATCH 33/40] #62 add image viz to immersed boundary tutorial --- .../tutorials/TestImmersedBoundaryTutorial.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index e2683b5e..663d30d7 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -70,7 +70,7 @@ from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator -import chaste.visualization +from chaste.visualization import JupyterNotebookManager, VtkScene2 class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): @@ -117,13 +117,15 @@ def test_simple_immersed_boundary_simulation(self): # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) - ## Next, we set up the cell population + ## Next, we generate the cells # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + ## Then we set up the cell population + # Set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) @@ -138,6 +140,14 @@ def test_simple_immersed_boundary_simulation(self): # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) + ## We can set up a `VtkScene` to do a quick visualization of the + ## population before running the simulation. + + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=600) + ## Here, we use an `OffLatticeSimulation` simulator to control the ## simulation. Although the fluid is simulated on a lattice (grid), ## the nodes/cells are not bound to a lattice. From bef45fe96dd2224b1aa0b31ad3e343be9dc42e14 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 8 Apr 2024 21:35:12 +0100 Subject: [PATCH 34/40] #62 add animation to immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 254 ++++++++++++++---- doc/tutorials/TestImmersedBoundaryTutorial.md | 4 +- .../tutorials/TestImmersedBoundaryTutorial.py | 60 ++++- 3 files changed, 253 insertions(+), 65 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index c94cd81f..63341394 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "07e7e9a5", + "id": "26baf2e3", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff390f7f", + "id": "7fd12c47", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "f8697aae", + "id": "2087ec3c", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71c87705", + "id": "0b11ca52", "metadata": {}, "outputs": [], "source": [ @@ -64,16 +64,21 @@ " ImmersedBoundaryLinearMembraneForce2,\n", " ImmersedBoundarySimulationModifier2,\n", " OffLatticeSimulation2_2,\n", + " SetupNotebookTest,\n", " SimulationTime,\n", " TearDownNotebookTest,\n", ")\n", "from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator\n", - "import chaste.visualization" + "from chaste.visualization import (\n", + " JupyterNotebookManager,\n", + " JupyterSceneModifier2,\n", + " VtkScene2\n", + ")" ] }, { "cell_type": "markdown", - "id": "cabca5c3", + "id": "dfd555e6", "metadata": {}, "source": [ "### 1. Simple Immersed Boundary Simulations\n", @@ -95,17 +100,19 @@ { "cell_type": "code", "execution_count": null, - "id": "a2c6d43e", + "id": "444a9678", "metadata": {}, "outputs": [], "source": [ + "# Setup the notebook environment for the simulation\n", + "SetupNotebookTest()\n", "# Set the start time for the simulation\n", "SimulationTime.Instance().SetStartTime(0.0)" ] }, { "cell_type": "markdown", - "id": "c277e3dd", + "id": "e5d61e98", "metadata": {}, "source": [ " **Tip** Lines of code beginning with `#` are comments in Python\n", @@ -117,7 +124,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6b986d82", + "id": "aa6861ee", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +135,7 @@ }, { "cell_type": "markdown", - "id": "4ae0e94c", + "id": "fe98ea4f", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -149,7 +156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a417b318", + "id": "fa797cc4", "metadata": {}, "outputs": [], "source": [ @@ -159,31 +166,49 @@ }, { "cell_type": "markdown", - "id": "5f0fa862", + "id": "a6726194", "metadata": {}, "source": [ - "Next, we set up the cell population\n", + "Next, we generate the cells\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "dcb381af", + "id": "131f91a3", "metadata": {}, "outputs": [], "source": [ "# Generate the cells\n", "cell_type = DifferentiatedCellProliferativeType()\n", "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", - "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" + ] + }, + { + "cell_type": "markdown", + "id": "5aa8c42f", + "metadata": {}, + "source": [ + "Then we set up the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c2259d03", + "metadata": {}, + "outputs": [], + "source": [ "# Set up the cell population\n", "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)" ] }, { "cell_type": "markdown", - "id": "6a64a096", + "id": "eb69137d", "metadata": {}, "source": [ "We specify a cell type and cell cycle model. These can be\n", @@ -199,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0aaf8412", + "id": "580c635e", "metadata": {}, "outputs": [], "source": [ @@ -209,7 +234,30 @@ }, { "cell_type": "markdown", - "id": "b82ab11c", + "id": "34fe8f32", + "metadata": {}, + "source": [ + "We can set up a `VtkScene` to do a quick visualization of the\n", + "population before running the simulation.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3d55aa62", + "metadata": {}, + "outputs": [], + "source": [ + "scene = VtkScene2()\n", + "scene.SetCellPopulation(cell_population)\n", + "nb_manager = JupyterNotebookManager()\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "d49a98dc", "metadata": {}, "source": [ "Here, we use an `OffLatticeSimulation` simulator to control the\n", @@ -221,7 +269,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e1f2e161", + "id": "7de4b3e9", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +282,7 @@ }, { "cell_type": "markdown", - "id": "cf0adeab", + "id": "ada31816", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -250,7 +298,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1cec907d", + "id": "2365f9f9", "metadata": {}, "outputs": [], "source": [ @@ -261,7 +309,7 @@ }, { "cell_type": "markdown", - "id": "a15b92ab", + "id": "1eb0a6e2", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -274,7 +322,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4e3a234", + "id": "0f28b898", "metadata": {}, "outputs": [], "source": [ @@ -286,7 +334,7 @@ }, { "cell_type": "markdown", - "id": "4ab0df21", + "id": "23386c61", "metadata": {}, "source": [ "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", @@ -296,15 +344,36 @@ "membrane nodes using linear springs i.e, the force applied is\n", "proportional to the deviation of the distance between nodes\n", "from a rest length.\n", - "\n", - "Finally, we set up the simulation properties and run it.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "ad19e90c", + "id": "e647f780", + "metadata": {}, + "outputs": [], + "source": [ + "# Add a modifier to visualize the simulation progress\n", + "scene_modifier = JupyterSceneModifier2(nb_manager)\n", + "scene_modifier.SetVtkScene(scene)\n", + "scene_modifier.SetUpdateFrequency(100)\n", + "simulator.AddSimulationModifier(scene_modifier)" + ] + }, + { + "cell_type": "markdown", + "id": "3bc3a799", + "metadata": {}, + "source": [ + "Finally, we set the simulation properties and run it.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bea3df51", "metadata": {}, "outputs": [], "source": [ @@ -313,16 +382,37 @@ "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", "simulator.SetDt(dt)\n", "simulator.SetSamplingTimestepMultiple(4)\n", - "simulator.SetEndTime(1000 * dt)\n", + "simulator.SetEndTime(1000 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "77f5a9d9", + "metadata": {}, + "source": [ + "To run the simulation, we call the `Solve()` method. We can also\n", + "start and end the scene to visualize the simulation progress.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "808a45b9", + "metadata": {}, + "outputs": [], + "source": [ "# Perform the simulation\n", + "scene.Start()\n", "simulator.Solve()\n", - "SimulationTime.Instance().Destroy()\n", + "scene.End()\n", + "# Clear the notebook environment\n", "TearDownNotebookTest()" ] }, { "cell_type": "markdown", - "id": "1098b8d4", + "id": "6f272242", "metadata": {}, "source": [ "### 2. Adding More Cells\n", @@ -331,10 +421,29 @@ }, { "cell_type": "markdown", - "id": "dad51910", + "id": "6b30f229", "metadata": {}, "source": [ "#### Multiple Cells\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8f3a7b08", + "metadata": {}, + "outputs": [], + "source": [ + "# Setup the notebook environment for the simulation\n", + "SetupNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "58a685fb", + "metadata": {}, + "source": [ "We can use the mesh generator to generate multiple cells. The first\n", "parameter of the mesh generator constructor controls the number of\n", "cells. Try increasing the number of cells by adjusting the parameter\n", @@ -345,17 +454,17 @@ { "cell_type": "code", "execution_count": null, - "id": "58548f10", + "id": "52e73116", "metadata": {}, "outputs": [], "source": [ "# Create a mesh generator\n", - "gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False)" + "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)" ] }, { "cell_type": "markdown", - "id": "9bf2448f", + "id": "d08f23a8", "metadata": {}, "source": [ "#### Laminas\n", @@ -379,7 +488,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f18798b", + "id": "c102b03e", "metadata": {}, "outputs": [], "source": [ @@ -397,6 +506,11 @@ "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", "# Specify whether the population has active fluid sources\n", "cell_population.SetIfPopulationHasActiveSources(False)\n", + "# Visualize the cell population\n", + "scene = VtkScene2()\n", + "scene.SetCellPopulation(cell_population)\n", + "nb_manager = JupyterNotebookManager()\n", + "nb_manager.vtk_show(scene, height=300)\n", "# Create a simulator to manage our simulation\n", "simulator = OffLatticeSimulation2_2(cell_population)\n", "numerical_method = ForwardEulerNumericalMethod2_2()\n", @@ -413,7 +527,7 @@ }, { "cell_type": "markdown", - "id": "5206cddf", + "id": "8d36c08d", "metadata": {}, "source": [ "#### Intercellular Interactions\n", @@ -429,7 +543,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dfdfe719", + "id": "447fe538", "metadata": {}, "outputs": [], "source": [ @@ -445,13 +559,15 @@ "simulator.SetEndTime(1000 * dt)\n", "# Perform the simulation\n", "simulator.Solve()\n", - "SimulationTime.Instance().Destroy()\n", + "# Visualize the end state\n", + "nb_manager.vtk_show(scene, height=300)\n", + "# Clear the notebook environment\n", "TearDownNotebookTest()" ] }, { "cell_type": "markdown", - "id": "0acce2a5", + "id": "e84b4e15", "metadata": {}, "source": [ "### 3. Adding Fluid Sources\n", @@ -462,10 +578,29 @@ }, { "cell_type": "markdown", - "id": "e798b7f0", + "id": "9a623831", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8c539e99", + "metadata": {}, + "outputs": [], + "source": [ + "# Setup the notebook environment for the simulation\n", + "SetupNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "0adcc24b", + "metadata": {}, + "source": [ "We begin by constructing a fluid source object.\n", "\n" ] @@ -473,7 +608,7 @@ { "cell_type": "code", "execution_count": null, - "id": "697f504c", + "id": "f51de5f6", "metadata": {}, "outputs": [], "source": [ @@ -482,7 +617,7 @@ }, { "cell_type": "markdown", - "id": "7d3d85f5", + "id": "8eab9b38", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -498,7 +633,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5a6a43de", + "id": "14058ddb", "metadata": {}, "outputs": [], "source": [ @@ -507,7 +642,7 @@ }, { "cell_type": "markdown", - "id": "28e71f94", + "id": "0497c959", "metadata": {}, "source": [ "Now, we must associate the source with an element in the simulation\n", @@ -518,7 +653,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5a7e94d", + "id": "b7c5490a", "metadata": {}, "outputs": [], "source": [ @@ -532,7 +667,7 @@ }, { "cell_type": "markdown", - "id": "c77b23e6", + "id": "91c90d69", "metadata": {}, "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", @@ -542,7 +677,7 @@ { "cell_type": "code", "execution_count": null, - "id": "baf7bc5f", + "id": "b250f787", "metadata": {}, "outputs": [], "source": [ @@ -553,12 +688,17 @@ "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", "# Specify that fluid sources are present\n", - "cell_population.SetIfPopulationHasActiveSources(True)" + "cell_population.SetIfPopulationHasActiveSources(True)\n", + "# Visualize the cell population\n", + "scene = VtkScene2()\n", + "scene.SetCellPopulation(cell_population)\n", + "nb_manager = JupyterNotebookManager()\n", + "nb_manager.vtk_show(scene, height=300)" ] }, { "cell_type": "markdown", - "id": "6ae811c0", + "id": "668dec6d", "metadata": {}, "source": [ "#### Varying the Source Location\n", @@ -574,7 +714,7 @@ { "cell_type": "code", "execution_count": null, - "id": "096d021b", + "id": "e39f59bf", "metadata": {}, "outputs": [], "source": [ @@ -590,7 +730,7 @@ }, { "cell_type": "markdown", - "id": "7e30f8ef", + "id": "d8e7c76f", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -603,7 +743,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7c3a288", + "id": "f4a8381b", "metadata": {}, "outputs": [], "source": [ @@ -617,7 +757,7 @@ }, { "cell_type": "markdown", - "id": "4d08fc2a", + "id": "69bafed2", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -630,7 +770,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c67819f", + "id": "9fd45e60", "metadata": {}, "outputs": [], "source": [ @@ -642,13 +782,15 @@ "simulator.SetEndTime(1000 * dt)\n", "# Perform the simulation\n", "simulator.Solve()\n", - "SimulationTime.Instance().Destroy()\n", + "# Visualize the end state\n", + "nb_manager.vtk_show(scene, height=300)\n", + "# Clear the notebook environment\n", "TearDownNotebookTest()" ] }, { "cell_type": "markdown", - "id": "80876078", + "id": "d492c027", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index 5d08ba35..a7ff2618 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [5e0d0a44](https://github.com/Chaste/PyChaste/commit/5e0d0a44af4a3ba6db0eb8a89f7a538f4c6d6656). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [d548c83d](https://github.com/Chaste/PyChaste/commit/d548c83ded45c0fcaad7ad93106b73e46df81971). Note that the code is given in full at the bottom of the page. @@ -111,6 +111,8 @@ Next, we set up the cell population cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) +``` +```python # Set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index 663d30d7..0badcfe5 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -64,14 +64,18 @@ ImmersedBoundaryLinearMembraneForce2, ImmersedBoundarySimulationModifier2, OffLatticeSimulation2_2, + SetupNotebookTest, SimulationTime, TearDownNotebookTest, ) from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator -from chaste.visualization import JupyterNotebookManager, VtkScene2 - +from chaste.visualization import ( + JupyterNotebookManager, + JupyterSceneModifier2, + VtkScene2 +) class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): @@ -90,6 +94,9 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): ## **Tip** Make sure all your coordinates are between `0` and `1`. def test_simple_immersed_boundary_simulation(self): + # Setup the notebook environment for the simulation + SetupNotebookTest() + # Set the start time for the simulation SimulationTime.Instance().SetStartTime(0.0) @@ -146,7 +153,7 @@ def test_simple_immersed_boundary_simulation(self): scene = VtkScene2() scene.SetCellPopulation(cell_population) nb_manager = JupyterNotebookManager() - nb_manager.vtk_show(scene, height=600) + nb_manager.vtk_show(scene, height=300) ## Here, we use an `OffLatticeSimulation` simulator to control the ## simulation. Although the fluid is simulated on a lattice (grid), @@ -188,7 +195,13 @@ def test_simple_immersed_boundary_simulation(self): ## proportional to the deviation of the distance between nodes ## from a rest length. - ## Finally, we set up the simulation properties and run it. + # Add a modifier to visualize the simulation progress + scene_modifier = JupyterSceneModifier2(nb_manager) + scene_modifier.SetVtkScene(scene) + scene_modifier.SetUpdateFrequency(100) + simulator.AddSimulationModifier(scene_modifier) + + ## Finally, we set the simulation properties and run it. # Set simulation properties dt = 0.05 @@ -196,24 +209,33 @@ def test_simple_immersed_boundary_simulation(self): simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) + + ## To run the simulation, we call the `Solve()` method. We can also + ## start and end the scene to visualize the simulation progress. # Perform the simulation + scene.Start() simulator.Solve() + scene.End() - SimulationTime.Instance().Destroy() + # Clear the notebook environment TearDownNotebookTest() ## ### 2. Adding More Cells def test_multicell_immersed_boundary_simulation(self): ## #### Multiple Cells + + # Setup the notebook environment for the simulation + SetupNotebookTest() + ## We can use the mesh generator to generate multiple cells. The first ## parameter of the mesh generator constructor controls the number of ## cells. Try increasing the number of cells by adjusting the parameter ## value. A sensible range for this tutorial is 4-10 cells. # Create a mesh generator - gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) ## #### Laminas ## In addition to the cells we have seen so far, we can introduce @@ -251,6 +273,12 @@ def test_multicell_immersed_boundary_simulation(self): # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) + # Visualize the cell population + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) numerical_method = ForwardEulerNumericalMethod2_2() @@ -289,7 +317,10 @@ def test_multicell_immersed_boundary_simulation(self): # Perform the simulation simulator.Solve() - SimulationTime.Instance().Destroy() + # Visualize the end state + nb_manager.vtk_show(scene, height=300) + + # Clear the notebook environment TearDownNotebookTest() ## ### 3. Adding Fluid Sources @@ -299,6 +330,10 @@ def test_multicell_immersed_boundary_simulation(self): def test_fluid_source_immersed_boundary_simulation(self): ## #### Adding a Fluid Source + + # Setup the notebook environment for the simulation + SetupNotebookTest() + ## We begin by constructing a fluid source object. source = FluidSource2(0, 0.5, 0.7) @@ -336,6 +371,12 @@ def test_fluid_source_immersed_boundary_simulation(self): # Specify that fluid sources are present cell_population.SetIfPopulationHasActiveSources(True) + # Visualize the cell population + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + ## #### Varying the Source Location ## You can experiment with the source location. Try moving it closer to ## and further away from the cells. @@ -382,7 +423,10 @@ def test_fluid_source_immersed_boundary_simulation(self): # Perform the simulation simulator.Solve() - SimulationTime.Instance().Destroy() + # Visualize the end state + nb_manager.vtk_show(scene, height=300) + + # Clear the notebook environment TearDownNotebookTest() ## #### Further Exercises From 1e60b9b23dc4d0ca1b77fb8a48a8f9d8f3e95feb Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 11 Apr 2024 12:50:55 +0100 Subject: [PATCH 35/40] #62 Update immersed boundary tutorial --- .../tutorials/TestImmersedBoundaryTutorial.py | 296 ++++++++++-------- 1 file changed, 163 insertions(+), 133 deletions(-) diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index 0badcfe5..35c391a8 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -85,242 +85,256 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): ## involved in setting up an immersed boundary simulation, and the options ## available for controlling how the cells are generated and behave. ## + ## Immersed boundary simulations operate over a square domain, with `x` and `y` ## coordinates lying in the range `0` to `1`. The domain wraps on both axes - ## this means that if a cell moves off the right hand edge of the domain, ## the segment will appear on the left hand side. This is not purely visual; ## forces are also transmitted across these boundaries. ## + ## **Tip** Make sure all your coordinates are between `0` and `1`. def test_simple_immersed_boundary_simulation(self): - # Setup the notebook environment for the simulation + + ## Setup the simulation environment in the notebook + SetupNotebookTest() - # Set the start time for the simulation + ## Set the start time for the simulation + SimulationTime.Instance().SetStartTime(0.0) - ## **Tip** Lines of code beginning with `#` are comments in Python - ## - ## Next, we define the necessary geometry. + ## Next, we define the necessary geometry by generating a mesh to + ## contain a single cell. - # Generate a mesh containing a single cell gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() ## The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator` - ## called `gen`. The 3rd and 4th parameters control the exponent of the - ## superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can + ## called `gen`. The 3rd parameter controls the exponent of the superellipse(`0.1`) + ## and the 4th parameter controls the aspect ratio of the cell(`2.0`). You can ## experiment with modifying these to change the initial shape of the cell. ## + ## The second line of code instructs the mesh generator to generate a mesh. ## Checking the type of mesh with `type(mesh)` will show it as ## `ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using ## a 2-dimensional space, and 2-dimensional elements to define the mesh. ## + ## We now set the fluid grid resolution. The following code specifies ## that we are using a 64x64 grid to simulate our fluid over. - # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) - ## Next, we generate the cells + ## Next, we generate the cells. We specify a cell type and cell cycle model. + ## These can be changed to modify the life cycle of the cells. The + ## cell generator then constructs the necessary information for each + ## of the elements in the mesh. - # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - ## Then we set up the cell population - - # Set up the cell population - cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - - ## We specify a cell type and cell cycle model. These can be - ## interchanged to modify the life cycle of the cells. The - ## `CellsGenerator` then constructs the necessary information for each - ## of the elements in the mesh. Finally, we construct an - ## `ImmersedBoundaryCellPopulation`. We then specify whether the + ## Finally, we construct the cell population. We then specify whether the ## population has active fluid sources or not. For now, we are not - ## using any fluid sources, so we set this to false + ## using any fluid sources, so we set this to `False` - # Specify whether the population has active fluid sources + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) cell_population.SetIfPopulationHasActiveSources(False) - ## We can set up a `VtkScene` to do a quick visualization of the - ## population before running the simulation. + ## We can make a quick visualization of the cell population scene = VtkScene2() scene.SetCellPopulation(cell_population) nb_manager = JupyterNotebookManager() nb_manager.vtk_show(scene, height=300) - ## Here, we use an `OffLatticeSimulation` simulator to control the + ## Next, we create an `OffLatticeSimulation` simulator to control the ## simulation. Although the fluid is simulated on a lattice (grid), ## the nodes/cells are not bound to a lattice. - # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) ## As we have an off-lattice simulation, we need a way to model the ## fluid. This is handled by the `ImmersedBoundarySimulationModifier`. - ## Modifiers in chaste are classes that can be attached to simulations + ## Modifiers in Chaste are classes that can be attached to simulations ## to perform some additional custom functionality each timestep. ## In this case, the modifier is responsible for solving the ## Navier-Stokes equations and propagating forces between the nodes and ## the fluid. - # Add an immersed boundary simulation modifier. ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) ## We must also provide the modifier with a force model to govern - ## interactions between the nodes forming the boundary of the cells. - ## Note that these forces only act between nodes in the same cell, + ## interactions between the nodes forming the cell membrane. + ## Note that these forces only act between nodes in the same cell; ## they do not control interactions between cells. - # Add a force law to model the behaviour of the cell membrane - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) - ## The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary - ## is. You can experiment with adjusting the spring constant to change - ## the force behaviour between nodes of the cell boundary. ## The `ImmersedBoundaryLinearMembraneForce` models forces between ## membrane nodes using linear springs i.e, the force applied is ## proportional to the deviation of the distance between nodes - ## from a rest length. + ## from a rest length. The spring constant(`1.0 * 1e7`) defines how + ## stiff the cell boundary is. + ## - # Add a modifier to visualize the simulation progress - scene_modifier = JupyterSceneModifier2(nb_manager) - scene_modifier.SetVtkScene(scene) - scene_modifier.SetUpdateFrequency(100) - simulator.AddSimulationModifier(scene_modifier) + ## **Practice** Experiment with adjusting the spring constant to + ## change the force behaviour between nodes of the cell boundary. + ## - ## Finally, we set the simulation properties and run it. + ## Next, we set the simulation properties - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_1") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - ## To run the simulation, we call the `Solve()` method. We can also - ## start and end the scene to visualize the simulation progress. + ## We can add a modifier to visualize the cell population while the + ## simulation is in progress + + scene_modifier = JupyterSceneModifier2(nb_manager) + scene_modifier.SetVtkScene(scene) + scene_modifier.SetUpdateFrequency(1000) + simulator.AddSimulationModifier(scene_modifier) + + ## Finally, to run the simulation we call the `Solve()` method. - # Perform the simulation - scene.Start() simulator.Solve() - scene.End() - # Clear the notebook environment + ## Reset the simulation environment in the notebook + TearDownNotebookTest() ## ### 2. Adding More Cells def test_multicell_immersed_boundary_simulation(self): + ## #### Multiple Cells - # Setup the notebook environment for the simulation + ## Setup the simulation environment in the notebook + SetupNotebookTest() + ## Set the start time for the simulation + + SimulationTime.Instance().SetStartTime(0.0) + ## We can use the mesh generator to generate multiple cells. The first ## parameter of the mesh generator constructor controls the number of - ## cells. Try increasing the number of cells by adjusting the parameter - ## value. A sensible range for this tutorial is 4-10 cells. + ## cells. + ## + + ## **Practice** Try increasing the number of cells by adjusting the + ## parameter value. A sensible range for this tutorial is 4-10 cells. - # Create a mesh generator gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) ## #### Laminas ## In addition to the cells we have seen so far, we can introduce ## laminas to the simulation. Laminas are surfaces with reduced ## dimensionality. For 3D elements, a lamina is a 2D surface. For the - ## 2D elements we are working with, laminas are lines. Changing the last - ## parameter of the mesh generator constructor from `False` to `True` - ## will generate a basal lamina spanning the palisade cells. + ## 2D elements we are currently working with, laminas are lines. + ## Changing the last parameter of the mesh generator constructor from `False` + ## to `True` will generate a basal lamina spanning the palisade cells. ## Laminas can also interact with the fluid field, and can be made - ## 'leaky' to allow some flow across their boundary. This can be used + ## "leaky" to allow some flow across their boundary. This can be used ## to model a permeable boundary. ## + + ## **Practice** Try changing the 6th constructor parameter to create a lamina. + ## + + ## #### Cell Variations ## Apart from using the 3rd and 4th constructor parameters to modify ## the cell shapes, we can also introduce variation between cells by ## modifying the 5th parameter. + ## - # Generate the mesh - mesh = gen.GetMesh() + ## **Practice** Try adjusting the 3rd and 4th constructor parameters to + ## introduce cell variations. + ## + + ## Next, we generate the mesh and set the fluid grid resolution - # Set the fluid grid resolution + mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) + ## Below, we generate the cells - # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - # Set up the cell population - cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + ## Then we set up the cell population with no active fluid sources - # Specify whether the population has active fluid sources + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) cell_population.SetIfPopulationHasActiveSources(False) - # Visualize the cell population + ## We can visualize the cell population below + scene = VtkScene2() scene.SetCellPopulation(cell_population) nb_manager = JupyterNotebookManager() nb_manager.vtk_show(scene, height=300) - # Create a simulator to manage our simulation + ## Now we create a simulator to manage the simulation + simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) + + ## We add an immersed boundary simulation modifier to the simulator - # Add an immersed boundary simulation modifier ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) - # Add a force law to model the behaviour of the cell membrane - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + ## We then add a force law to the simulation modifier to model the + ## behaviour of the cell membrane + + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) - ## #### Intercellular Interactions + ## #### Inter-cellular Interactions ## So far, we have encountered forces that act to maintain the shape - ## of the cell membrane. We can also introduce forces that apply - ## between cells using `ImmersedBoundaryLinearInteractionForce`. I - ## Instead of the `SetElementSpringConst` method, it has a - ## `SetSpringConst` method which we should use. The rest length can - ## also be modified using the `SetRestLength` method. + ## of the cell membrane. We can also introduce an inter-cellular + ## force law using `ImmersedBoundaryLinearInteractionForce`. + ## This has a `SetSpringConst` method instead of a `SetElementSpringConst` + ## method. It also has a `SetRestLength` method that we can use to + ## modify the rest length. - # Add a new intercellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) ib_modifier.AddImmersedBoundaryForce(interaction_force) - # Set simulation properties + ## Next, we set the simulation properties + dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_2") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation + ## Finally, we run the simulation + simulator.Solve() - # Visualize the end state + ## We can visualize the end state of the cell population + nb_manager.vtk_show(scene, height=300) - # Clear the notebook environment + ## Reset the simulation environment in the notebook + TearDownNotebookTest() ## ### 3. Adding Fluid Sources @@ -331,102 +345,118 @@ def test_fluid_source_immersed_boundary_simulation(self): ## #### Adding a Fluid Source - # Setup the notebook environment for the simulation + ## Setup the simulation environment in the notebook + SetupNotebookTest() - ## We begin by constructing a fluid source object. + ## Set the start time for the simulation + + SimulationTime.Instance().SetStartTime(0.0) + + ## We begin by constructing a fluid source object: source = FluidSource2(0, 0.5, 0.7) ## This constructs a `FluidSource` object in 2 dimensions. The first - ## parameter gives the index of the fluid source. Each source you - ## create must have a unique index. The next parameters are the - ## `x` and `y` coordinates of the source. Fluid sources in chaste are + ## parameter supplies the index of the fluid source. Each source we + ## create must have a unique index. The next two parameters are the + ## `x` and `y` coordinates of the source. Fluid sources in Chaste are ## point-like, that is to say they do not have any area/volume. ## ## Having created the fluid source, we set its strength: source.SetStrength(0.012) - ## Now, we must associate the source with an element in the simulation - ## so that the simulation is aware of the source. - - # Create the mesh + # Next, we create the mesh gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) - # Associate the fluid source with an element in the mesh + ## We must associate the source with an element in the simulation + ## so that the simulation is aware of the source. + mesh.GetElement(0).SetFluidSource(source) - ## Finally, we must tell the cell population that fluid sources are present. + ## We now generate the cells - # Set up the cell population - SimulationTime.Instance().SetStartTime(0.0) cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + + ## Then we set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - # Specify that fluid sources are present + ## Finally, we must tell the cell population that fluid sources are present. + cell_population.SetIfPopulationHasActiveSources(True) - # Visualize the cell population + ## #### Varying the Source Location + ## **Practice** You can experiment with the source location. Try moving it + ## closer to and further away from the cells. + ## + + ## #### Varying the Source Strength + ## **Practice** Try modifying the source strength to see what impact this + ## has on the cell shapes. + ## + + ## Below, we visualize the cell population + scene = VtkScene2() scene.SetCellPopulation(cell_population) nb_manager = JupyterNotebookManager() nb_manager.vtk_show(scene, height=300) - ## #### Varying the Source Location - ## You can experiment with the source location. Try moving it closer to - ## and further away from the cells. - ## - ## #### Varying the Source Strength - ## Try modifying the source strength to see what impact this has on - ## the cell shapes. + ## Create a simulator to manage the simulation - # Create a simulator simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) + + ## Add an immersed boundary simulation modifier - # Add an immersed boundary simulation modifier ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) ## #### Fluid-Cell Interaction - ## Have a go at modifying the spring constant of the + ## **Practice** Try modifying the spring constant of the ## `ImmersedBoundaryLinearMembraneForce` to see how this changes the ## effect of the fluid source on the cells. - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) + + ## Add an inter-cellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) ib_modifier.AddImmersedBoundaryForce(interaction_force) ## #### Adding More Sources - ## Try adding second fluid source. You will need to use a unique index, - ## and attach it to a different element as each element can only manage - ## a single fluid source. + ## **Practice** Try adding a second fluid source. You will need to + ## use a unique index, and attach it to a different element as + ## each element can only manage a single fluid source. + ## + + ## Set the simulation properties - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_3") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation + # Run the simulation + simulator.Solve() # Visualize the end state + nb_manager.vtk_show(scene, height=300) - # Clear the notebook environment + ## Reset the simulation environment in the notebook + TearDownNotebookTest() ## #### Further Exercises From c238afe658a4392521745231677f1d4a3e59d419 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 11 Apr 2024 12:52:06 +0100 Subject: [PATCH 36/40] #62 Fix typo in VtkScene --- src/visualization/VtkScene.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visualization/VtkScene.hpp b/src/visualization/VtkScene.hpp index beea2f37..82d64eaa 100644 --- a/src/visualization/VtkScene.hpp +++ b/src/visualization/VtkScene.hpp @@ -143,7 +143,7 @@ class VtkScene void End(); /** - * Render the current scene and return is as a char array, can be passed + * Render the current scene and return it as a char array that can be passed * into a Python buffer for display. * @return the scene as a char array */ From a17a4092069eaa64fe77e1e5d286ef0595ebc04f Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 11 Apr 2024 12:55:55 +0100 Subject: [PATCH 37/40] #62 Regenerate immersed boundary tutorial markdown --- .../TestImmersedBoundaryTutorial.ipynb | 748 +++++++---- doc/tutorials/TestImmersedBoundaryTutorial.md | 489 +++++--- ...stImmersedBoundaryTutorial.nbconvert.ipynb | 1116 +++++++++++++++++ 3 files changed, 1948 insertions(+), 405 deletions(-) create mode 100644 doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index 63341394..4b2ca3d5 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "26baf2e3", + "id": "55fe99de", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7fd12c47", + "id": "50298239", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "2087ec3c", + "id": "7a4de7c6", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0b11ca52", + "id": "3a9b150c", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "dfd555e6", + "id": "8557c948", "metadata": {}, "source": [ "### 1. Simple Immersed Boundary Simulations\n", @@ -97,50 +97,73 @@ "\n" ] }, + { + "cell_type": "markdown", + "id": "30090843", + "metadata": {}, + "source": [ + "Setup the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e0cd9dcd", + "metadata": {}, + "outputs": [], + "source": [ + "SetupNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "03f07a48", + "metadata": {}, + "source": [ + "Set the start time for the simulation\n", + "\n" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "444a9678", + "id": "97319c25", "metadata": {}, "outputs": [], "source": [ - "# Setup the notebook environment for the simulation\n", - "SetupNotebookTest()\n", - "# Set the start time for the simulation\n", "SimulationTime.Instance().SetStartTime(0.0)" ] }, { "cell_type": "markdown", - "id": "e5d61e98", + "id": "1b33416d", "metadata": {}, "source": [ - " **Tip** Lines of code beginning with `#` are comments in Python\n", - " \n", - "Next, we define the necessary geometry.\n", + "Next, we define the necessary geometry by generating a mesh to\n", + "contain a single cell.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "aa6861ee", + "id": "49179217", "metadata": {}, "outputs": [], "source": [ - "# Generate a mesh containing a single cell\n", "gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False)\n", "mesh = gen.GetMesh()" ] }, { "cell_type": "markdown", - "id": "fe98ea4f", + "id": "a1d5f481", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", - "called `gen`. The 3rd and 4th parameters control the exponent of the\n", - "superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can\n", + "called `gen`. The 3rd parameter controls the exponent of the superellipse(`0.1`)\n", + "and the 4th parameter controls the aspect ratio of the cell(`2.0`). You can\n", "experiment with modifying these to change the initial shape of the cell.\n", "\n", "The second line of code instructs the mesh generator to generate a mesh.\n", @@ -156,31 +179,32 @@ { "cell_type": "code", "execution_count": null, - "id": "fa797cc4", + "id": "844ec9b1", "metadata": {}, "outputs": [], "source": [ - "# Set the fluid grid resolution\n", "mesh.SetNumGridPtsXAndY(64)" ] }, { "cell_type": "markdown", - "id": "a6726194", + "id": "add300c3", "metadata": {}, "source": [ - "Next, we generate the cells\n", + "Next, we generate the cells. We specify a cell type and cell cycle model.\n", + "These can be changed to modify the life cycle of the cells. The\n", + "cell generator then constructs the necessary information for each\n", + "of the elements in the mesh.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "131f91a3", + "id": "a5019e1b", "metadata": {}, "outputs": [], "source": [ - "# Generate the cells\n", "cell_type = DifferentiatedCellProliferativeType()\n", "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" @@ -188,64 +212,39 @@ }, { "cell_type": "markdown", - "id": "5aa8c42f", - "metadata": {}, - "source": [ - "Then we set up the cell population\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c2259d03", - "metadata": {}, - "outputs": [], - "source": [ - "# Set up the cell population\n", - "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)" - ] - }, - { - "cell_type": "markdown", - "id": "eb69137d", + "id": "be6c6d9d", "metadata": {}, "source": [ - "We specify a cell type and cell cycle model. These can be\n", - "interchanged to modify the life cycle of the cells. The\n", - "`CellsGenerator` then constructs the necessary information for each\n", - "of the elements in the mesh. Finally, we construct an\n", - "`ImmersedBoundaryCellPopulation`. We then specify whether the\n", + "Finally, we construct the cell population. We then specify whether the\n", "population has active fluid sources or not. For now, we are not\n", - "using any fluid sources, so we set this to false\n", + "using any fluid sources, so we set this to `False`\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "580c635e", + "id": "3d83d1ba", "metadata": {}, "outputs": [], "source": [ - "# Specify whether the population has active fluid sources\n", + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", "cell_population.SetIfPopulationHasActiveSources(False)" ] }, { "cell_type": "markdown", - "id": "34fe8f32", + "id": "e395f842", "metadata": {}, "source": [ - "We can set up a `VtkScene` to do a quick visualization of the\n", - "population before running the simulation.\n", + "We can make a quick visualization of the cell population\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "3d55aa62", + "id": "437d6946", "metadata": {}, "outputs": [], "source": [ @@ -257,10 +256,10 @@ }, { "cell_type": "markdown", - "id": "d49a98dc", + "id": "33a529b8", "metadata": {}, "source": [ - "Here, we use an `OffLatticeSimulation` simulator to control the\n", + "Next, we create an `OffLatticeSimulation` simulator to control the\n", "simulation. Although the fluid is simulated on a lattice (grid),\n", "the nodes/cells are not bound to a lattice.\n", "\n" @@ -269,25 +268,23 @@ { "cell_type": "code", "execution_count": null, - "id": "7de4b3e9", + "id": "fe5eddf0", "metadata": {}, "outputs": [], "source": [ - "# Create a simulator to manage our simulation\n", "simulator = OffLatticeSimulation2_2(cell_population)\n", - "numerical_method = ForwardEulerNumericalMethod2_2()\n", - "numerical_method.SetUseUpdateNodeLocation(True)\n", - "simulator.SetNumericalMethod(numerical_method)" + "simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2())\n", + "simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True)" ] }, { "cell_type": "markdown", - "id": "ada31816", + "id": "1cdf753d", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", "fluid. This is handled by the `ImmersedBoundarySimulationModifier`.\n", - "Modifiers in chaste are classes that can be attached to simulations\n", + "Modifiers in Chaste are classes that can be attached to simulations\n", "to perform some additional custom functionality each timestep.\n", "In this case, the modifier is responsible for solving the\n", "Navier-Stokes equations and propagating forces between the nodes and\n", @@ -298,23 +295,22 @@ { "cell_type": "code", "execution_count": null, - "id": "2365f9f9", + "id": "32f1c59c", "metadata": {}, "outputs": [], "source": [ - "# Add an immersed boundary simulation modifier.\n", "ib_modifier = ImmersedBoundarySimulationModifier2()\n", "simulator.AddSimulationModifier(ib_modifier)" ] }, { "cell_type": "markdown", - "id": "1eb0a6e2", + "id": "0f8cf6b1", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", - "interactions between the nodes forming the boundary of the cells.\n", - "Note that these forces only act between nodes in the same cell,\n", + "interactions between the nodes forming the cell membrane.\n", + "Note that these forces only act between nodes in the same cell;\n", "they do not control interactions between cells.\n", "\n" ] @@ -322,97 +318,111 @@ { "cell_type": "code", "execution_count": null, - "id": "0f28b898", + "id": "dca89d9c", "metadata": {}, "outputs": [], "source": [ - "# Add a force law to model the behaviour of the cell membrane\n", - "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", - "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", - "ib_modifier.AddImmersedBoundaryForce(boundary_force)" + "membrane_force = ImmersedBoundaryLinearMembraneForce2()\n", + "membrane_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(membrane_force)" ] }, { "cell_type": "markdown", - "id": "23386c61", + "id": "e9b94479", "metadata": {}, "source": [ - "The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary\n", - "is. You can experiment with adjusting the spring constant to change\n", - "the force behaviour between nodes of the cell boundary.\n", "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", "membrane nodes using linear springs i.e, the force applied is\n", "proportional to the deviation of the distance between nodes\n", - "from a rest length.\n", + "from a rest length. The spring constant(`1.0 * 1e7`) defines how\n", + "stiff the cell boundary is.\n", + "\n", + " **Practice** Experiment with adjusting the spring constant to\n", + " change the force behaviour between nodes of the cell boundary.\n", + " \n", + "Next, we set the simulation properties\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "137c8067", + "metadata": {}, + "outputs": [], + "source": [ + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_1\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "c0472257", + "metadata": {}, + "source": [ + "We can add a modifier to visualize the cell population while the\n", + "simulation is in progress\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "e647f780", + "id": "f5de7e3d", "metadata": {}, "outputs": [], "source": [ - "# Add a modifier to visualize the simulation progress\n", "scene_modifier = JupyterSceneModifier2(nb_manager)\n", "scene_modifier.SetVtkScene(scene)\n", - "scene_modifier.SetUpdateFrequency(100)\n", + "scene_modifier.SetUpdateFrequency(1000)\n", "simulator.AddSimulationModifier(scene_modifier)" ] }, { "cell_type": "markdown", - "id": "3bc3a799", + "id": "6f7f84f5", "metadata": {}, "source": [ - "Finally, we set the simulation properties and run it.\n", + "Finally, to run the simulation we call the `Solve()` method.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "bea3df51", + "id": "25679f36", "metadata": {}, "outputs": [], "source": [ - "# Set simulation properties\n", - "dt = 0.05\n", - "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", - "simulator.SetDt(dt)\n", - "simulator.SetSamplingTimestepMultiple(4)\n", - "simulator.SetEndTime(1000 * dt)" + "simulator.Solve()" ] }, { "cell_type": "markdown", - "id": "77f5a9d9", + "id": "db47e34e", "metadata": {}, "source": [ - "To run the simulation, we call the `Solve()` method. We can also\n", - "start and end the scene to visualize the simulation progress.\n", + "Reset the simulation environment in the notebook\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "808a45b9", + "id": "16483d5f", "metadata": {}, "outputs": [], "source": [ - "# Perform the simulation\n", - "scene.Start()\n", - "simulator.Solve()\n", - "scene.End()\n", - "# Clear the notebook environment\n", "TearDownNotebookTest()" ] }, { "cell_type": "markdown", - "id": "6f272242", + "id": "59e72e4b", "metadata": {}, "source": [ "### 2. Adding More Cells\n", @@ -421,153 +431,345 @@ }, { "cell_type": "markdown", - "id": "6b30f229", + "id": "936209fc", "metadata": {}, "source": [ "#### Multiple Cells\n", + "\n", + "Setup the simulation environment in the notebook\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "8f3a7b08", + "id": "497b08e0", "metadata": {}, "outputs": [], "source": [ - "# Setup the notebook environment for the simulation\n", "SetupNotebookTest()" ] }, { "cell_type": "markdown", - "id": "58a685fb", + "id": "70219074", + "metadata": {}, + "source": [ + "Set the start time for the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad7a725d", + "metadata": {}, + "outputs": [], + "source": [ + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "6eab105a", "metadata": {}, "source": [ "We can use the mesh generator to generate multiple cells. The first\n", "parameter of the mesh generator constructor controls the number of\n", - "cells. Try increasing the number of cells by adjusting the parameter\n", - "value. A sensible range for this tutorial is 4-10 cells.\n", + "cells.\n", + "\n", + " **Practice** Try increasing the number of cells by adjusting the\n", + " parameter value. A sensible range for this tutorial is 4-10 cells.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "52e73116", + "id": "d6110f34", "metadata": {}, "outputs": [], "source": [ - "# Create a mesh generator\n", "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)" ] }, { "cell_type": "markdown", - "id": "d08f23a8", + "id": "4df5639f", "metadata": {}, "source": [ "#### Laminas\n", "In addition to the cells we have seen so far, we can introduce\n", "laminas to the simulation. Laminas are surfaces with reduced\n", "dimensionality. For 3D elements, a lamina is a 2D surface. For the\n", - "2D elements we are working with, laminas are lines. Changing the last\n", - "parameter of the mesh generator constructor from `False` to `True`\n", - "will generate a basal lamina spanning the palisade cells.\n", + "2D elements we are currently working with, laminas are lines.\n", + "Changing the last parameter of the mesh generator constructor from `False`\n", + "to `True` will generate a basal lamina spanning the palisade cells.\n", "Laminas can also interact with the fluid field, and can be made\n", - "'leaky' to allow some flow across their boundary. This can be used\n", + "\"leaky\" to allow some flow across their boundary. This can be used\n", "to model a permeable boundary.\n", "\n", + " **Practice** Try changing the 6th constructor parameter to create a lamina.\n", + " \n", "#### Cell Variations\n", "Apart from using the 3rd and 4th constructor parameters to modify\n", "the cell shapes, we can also introduce variation between cells by\n", "modifying the 5th parameter.\n", + "\n", + " **Practice** Try adjusting the 3rd and 4th constructor parameters to\n", + " introduce cell variations.\n", + " \n", + "Next, we generate the mesh and set the fluid grid resolution\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "c102b03e", + "id": "a50c59d8", "metadata": {}, "outputs": [], "source": [ - "# Generate the mesh\n", "mesh = gen.GetMesh()\n", - "# Set the fluid grid resolution\n", - "mesh.SetNumGridPtsXAndY(64)\n", - "# Set the start time for the simulation\n", - "SimulationTime.Instance().SetStartTime(0.0)\n", - "# Generate the cells\n", + "mesh.SetNumGridPtsXAndY(64)" + ] + }, + { + "cell_type": "markdown", + "id": "bdaf78ca", + "metadata": {}, + "source": [ + "Below, we generate the cells\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "449bd44f", + "metadata": {}, + "outputs": [], + "source": [ "cell_type = DifferentiatedCellProliferativeType()\n", "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", - "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", - "# Set up the cell population\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" + ] + }, + { + "cell_type": "markdown", + "id": "8846c4d6", + "metadata": {}, + "source": [ + "Then we set up the cell population with no active fluid sources\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "535ac16a", + "metadata": {}, + "outputs": [], + "source": [ "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", - "# Specify whether the population has active fluid sources\n", - "cell_population.SetIfPopulationHasActiveSources(False)\n", - "# Visualize the cell population\n", + "cell_population.SetIfPopulationHasActiveSources(False)" + ] + }, + { + "cell_type": "markdown", + "id": "cffc290b", + "metadata": {}, + "source": [ + "We can visualize the cell population below\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "94012f4a", + "metadata": {}, + "outputs": [], + "source": [ "scene = VtkScene2()\n", "scene.SetCellPopulation(cell_population)\n", "nb_manager = JupyterNotebookManager()\n", - "nb_manager.vtk_show(scene, height=300)\n", - "# Create a simulator to manage our simulation\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "880ed9aa", + "metadata": {}, + "source": [ + "Now we create a simulator to manage the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "24284940", + "metadata": {}, + "outputs": [], + "source": [ "simulator = OffLatticeSimulation2_2(cell_population)\n", - "numerical_method = ForwardEulerNumericalMethod2_2()\n", - "numerical_method.SetUseUpdateNodeLocation(True)\n", - "simulator.SetNumericalMethod(numerical_method)\n", - "# Add an immersed boundary simulation modifier\n", + "simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2())\n", + "simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True)" + ] + }, + { + "cell_type": "markdown", + "id": "11497a9f", + "metadata": {}, + "source": [ + "We add an immersed boundary simulation modifier to the simulator\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da1764c6", + "metadata": {}, + "outputs": [], + "source": [ "ib_modifier = ImmersedBoundarySimulationModifier2()\n", - "simulator.AddSimulationModifier(ib_modifier)\n", - "# Add a force law to model the behaviour of the cell membrane\n", - "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", - "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", - "ib_modifier.AddImmersedBoundaryForce(boundary_force)" + "simulator.AddSimulationModifier(ib_modifier)" + ] + }, + { + "cell_type": "markdown", + "id": "46bffd78", + "metadata": {}, + "source": [ + "We then add a force law to the simulation modifier to model the\n", + "behaviour of the cell membrane\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f9cb8c89", + "metadata": {}, + "outputs": [], + "source": [ + "membrane_force = ImmersedBoundaryLinearMembraneForce2()\n", + "membrane_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(membrane_force)" ] }, { "cell_type": "markdown", - "id": "8d36c08d", + "id": "d8fcec8b", "metadata": {}, "source": [ - "#### Intercellular Interactions\n", + "#### Inter-cellular Interactions\n", "So far, we have encountered forces that act to maintain the shape\n", - "of the cell membrane. We can also introduce forces that apply\n", - "between cells using `ImmersedBoundaryLinearInteractionForce`. I\n", - "Instead of the `SetElementSpringConst` method, it has a\n", - "`SetSpringConst` method which we should use. The rest length can\n", - "also be modified using the `SetRestLength` method.\n", + "of the cell membrane. We can also introduce an inter-cellular\n", + "force law using `ImmersedBoundaryLinearInteractionForce`.\n", + "This has a `SetSpringConst` method instead of a `SetElementSpringConst`\n", + "method. It also has a `SetRestLength` method that we can use to\n", + "modify the rest length.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "447fe538", + "id": "345ea70f", "metadata": {}, "outputs": [], "source": [ - "# Add a new intercellular force law\n", "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", "interaction_force.SetSpringConst(1.0 * 1e6)\n", - "ib_modifier.AddImmersedBoundaryForce(interaction_force)\n", - "# Set simulation properties\n", + "ib_modifier.AddImmersedBoundaryForce(interaction_force)" + ] + }, + { + "cell_type": "markdown", + "id": "f4de7864", + "metadata": {}, + "source": [ + "Next, we set the simulation properties\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "72c428ab", + "metadata": {}, + "outputs": [], + "source": [ "dt = 0.05\n", - "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_2\")\n", "simulator.SetDt(dt)\n", "simulator.SetSamplingTimestepMultiple(4)\n", - "simulator.SetEndTime(1000 * dt)\n", - "# Perform the simulation\n", - "simulator.Solve()\n", - "# Visualize the end state\n", - "nb_manager.vtk_show(scene, height=300)\n", - "# Clear the notebook environment\n", + "simulator.SetEndTime(1000 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "97b5b658", + "metadata": {}, + "source": [ + "Finally, we run the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a167204d", + "metadata": {}, + "outputs": [], + "source": [ + "simulator.Solve()" + ] + }, + { + "cell_type": "markdown", + "id": "dddbc94e", + "metadata": {}, + "source": [ + "We can visualize the end state of the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a6de9ce9", + "metadata": {}, + "outputs": [], + "source": [ + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "a438961c", + "metadata": {}, + "source": [ + "Reset the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86e9b33c", + "metadata": {}, + "outputs": [], + "source": [ "TearDownNotebookTest()" ] }, { "cell_type": "markdown", - "id": "e84b4e15", + "id": "2a5dc6f7", "metadata": {}, "source": [ "### 3. Adding Fluid Sources\n", @@ -578,37 +780,57 @@ }, { "cell_type": "markdown", - "id": "9a623831", + "id": "c08d4ce5", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", + "\n", + "Setup the simulation environment in the notebook\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "8c539e99", + "id": "4c6e58ae", "metadata": {}, "outputs": [], "source": [ - "# Setup the notebook environment for the simulation\n", "SetupNotebookTest()" ] }, { "cell_type": "markdown", - "id": "0adcc24b", + "id": "45e59e32", + "metadata": {}, + "source": [ + "Set the start time for the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ff59adf2", + "metadata": {}, + "outputs": [], + "source": [ + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "f08a3267", "metadata": {}, "source": [ - "We begin by constructing a fluid source object.\n", + "We begin by constructing a fluid source object:\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "f51de5f6", + "id": "15e927af", "metadata": {}, "outputs": [], "source": [ @@ -617,13 +839,13 @@ }, { "cell_type": "markdown", - "id": "8eab9b38", + "id": "fc9652e0", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", - "parameter gives the index of the fluid source. Each source you\n", - "create must have a unique index. The next parameters are the\n", - "`x` and `y` coordinates of the source. Fluid sources in chaste are\n", + "parameter supplies the index of the fluid source. Each source we\n", + "create must have a unique index. The next two parameters are the\n", + "`x` and `y` coordinates of the source. Fluid sources in Chaste are\n", "point-like, that is to say they do not have any area/volume.\n", "\n", "Having created the fluid source, we set its strength:\n", @@ -633,19 +855,23 @@ { "cell_type": "code", "execution_count": null, - "id": "14058ddb", + "id": "06cd35c3", "metadata": {}, "outputs": [], "source": [ - "source.SetStrength(0.012)" + "source.SetStrength(0.012)\n", + "# Next, we create the mesh\n", + "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)\n", + "mesh = gen.GetMesh()\n", + "mesh.SetNumGridPtsXAndY(64)" ] }, { "cell_type": "markdown", - "id": "0497c959", + "id": "fd8038c3", "metadata": {}, "source": [ - "Now, we must associate the source with an element in the simulation\n", + "We must associate the source with an element in the simulation\n", "so that the simulation is aware of the source.\n", "\n" ] @@ -653,43 +879,80 @@ { "cell_type": "code", "execution_count": null, - "id": "b7c5490a", + "id": "bca93f1f", "metadata": {}, "outputs": [], "source": [ - "# Create the mesh\n", - "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)\n", - "mesh = gen.GetMesh()\n", - "mesh.SetNumGridPtsXAndY(64)\n", - "# Associate the fluid source with an element in the mesh\n", "mesh.GetElement(0).SetFluidSource(source)" ] }, { "cell_type": "markdown", - "id": "91c90d69", + "id": "e19686b8", "metadata": {}, "source": [ - "Finally, we must tell the cell population that fluid sources are present.\n", + "We now generate the cells\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "b250f787", + "id": "5aab6e98", "metadata": {}, "outputs": [], "source": [ - "# Set up the cell population\n", - "SimulationTime.Instance().SetStartTime(0.0)\n", "cell_type = DifferentiatedCellProliferativeType()\n", "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", - "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" + ] + }, + { + "cell_type": "markdown", + "id": "0f3a9b93", + "metadata": {}, + "source": [ + "Then we set up the cell population\n", "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", - "# Specify that fluid sources are present\n", - "cell_population.SetIfPopulationHasActiveSources(True)\n", - "# Visualize the cell population\n", + "\n", + "Finally, we must tell the cell population that fluid sources are present.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "57cc7bcc", + "metadata": {}, + "outputs": [], + "source": [ + "cell_population.SetIfPopulationHasActiveSources(True)" + ] + }, + { + "cell_type": "markdown", + "id": "45ad91af", + "metadata": {}, + "source": [ + "#### Varying the Source Location\n", + " **Practice** You can experiment with the source location. Try moving it\n", + " closer to and further away from the cells.\n", + " \n", + "#### Varying the Source Strength\n", + " **Practice** Try modifying the source strength to see what impact this\n", + " has on the cell shapes.\n", + " \n", + "Below, we visualize the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c840945e", + "metadata": {}, + "outputs": [], + "source": [ "scene = VtkScene2()\n", "scene.SetCellPopulation(cell_population)\n", "nb_manager = JupyterNotebookManager()\n", @@ -698,58 +961,85 @@ }, { "cell_type": "markdown", - "id": "668dec6d", + "id": "67861494", "metadata": {}, "source": [ - "#### Varying the Source Location\n", - "You can experiment with the source location. Try moving it closer to\n", - "and further away from the cells.\n", - "\n", - "#### Varying the Source Strength\n", - "Try modifying the source strength to see what impact this has on\n", - "the cell shapes.\n", + "Create a simulator to manage the simulation\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "e39f59bf", + "id": "587db969", "metadata": {}, "outputs": [], "source": [ - "# Create a simulator\n", "simulator = OffLatticeSimulation2_2(cell_population)\n", - "numerical_method = ForwardEulerNumericalMethod2_2()\n", - "numerical_method.SetUseUpdateNodeLocation(True)\n", - "simulator.SetNumericalMethod(numerical_method)\n", - "# Add an immersed boundary simulation modifier\n", + "simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2())\n", + "simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True)" + ] + }, + { + "cell_type": "markdown", + "id": "338b22ef", + "metadata": {}, + "source": [ + "Add an immersed boundary simulation modifier\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9563dc2e", + "metadata": {}, + "outputs": [], + "source": [ "ib_modifier = ImmersedBoundarySimulationModifier2()\n", "simulator.AddSimulationModifier(ib_modifier)" ] }, { "cell_type": "markdown", - "id": "d8e7c76f", + "id": "c28e28d4", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", - "Have a go at modifying the spring constant of the\n", - "`ImmersedBoundaryLinearMembraneForce` to see how this changes the\n", - "effect of the fluid source on the cells.\n", + " **Practice** Try modifying the spring constant of the\n", + " `ImmersedBoundaryLinearMembraneForce` to see how this changes the\n", + " effect of the fluid source on the cells.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "f4a8381b", + "id": "054df66a", + "metadata": {}, + "outputs": [], + "source": [ + "membrane_force = ImmersedBoundaryLinearMembraneForce2()\n", + "membrane_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(membrane_force)" + ] + }, + { + "cell_type": "markdown", + "id": "26278c92", + "metadata": {}, + "source": [ + "Add an inter-cellular force law\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "43304dfb", "metadata": {}, "outputs": [], "source": [ - "boundary_force = ImmersedBoundaryLinearMembraneForce2()\n", - "boundary_force.SetElementSpringConst(1.0 * 1e7)\n", - "ib_modifier.AddImmersedBoundaryForce(boundary_force)\n", "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", "interaction_force.SetSpringConst(1.0 * 1e6)\n", "ib_modifier.AddImmersedBoundaryForce(interaction_force)" @@ -757,40 +1047,58 @@ }, { "cell_type": "markdown", - "id": "69bafed2", + "id": "6218903e", "metadata": {}, "source": [ "#### Adding More Sources\n", - "Try adding second fluid source. You will need to use a unique index,\n", - "and attach it to a different element as each element can only manage\n", - "a single fluid source.\n", + " **Practice** Try adding a second fluid source. You will need to\n", + " use a unique index, and attach it to a different element as\n", + " each element can only manage a single fluid source.\n", + " \n", + "Set the simulation properties\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "9fd45e60", + "id": "bb66c283", "metadata": {}, "outputs": [], "source": [ - "# Set simulation properties\n", "dt = 0.05\n", - "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary\")\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_3\")\n", "simulator.SetDt(dt)\n", "simulator.SetSamplingTimestepMultiple(4)\n", "simulator.SetEndTime(1000 * dt)\n", - "# Perform the simulation\n", + "# Run the simulation\n", "simulator.Solve()\n", "# Visualize the end state\n", - "nb_manager.vtk_show(scene, height=300)\n", - "# Clear the notebook environment\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "3b9fe252", + "metadata": {}, + "source": [ + "Reset the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "efbf9530", + "metadata": {}, + "outputs": [], + "source": [ "TearDownNotebookTest()" ] }, { "cell_type": "markdown", - "id": "d492c027", + "id": "109da48b", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index a7ff2618..eff777fe 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [d548c83d](https://github.com/Chaste/PyChaste/commit/d548c83ded45c0fcaad7ad93106b73e46df81971). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [c238afe6](https://github.com/Chaste/PyChaste/commit/c238afe658a4392521745231677f1d4a3e59d419). Note that the code is given in full at the bottom of the page. @@ -44,13 +44,18 @@ from chaste.cell_based import ( ImmersedBoundaryLinearMembraneForce2, ImmersedBoundarySimulationModifier2, OffLatticeSimulation2_2, + SetupNotebookTest, SimulationTime, TearDownNotebookTest, ) from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator -import chaste.visualization +from chaste.visualization import ( + JupyterNotebookManager, + JupyterSceneModifier2, + VtkScene2 +) class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): @@ -71,23 +76,31 @@ forces are also transmitted across these boundaries. ```python def test_simple_immersed_boundary_simulation(self): - # Set the start time for the simulation + +``` +Setup the simulation environment in the notebook + +```python + SetupNotebookTest() + +``` +Set the start time for the simulation + +```python SimulationTime.Instance().SetStartTime(0.0) ``` - **Tip** Lines of code beginning with `#` are comments in Python - -Next, we define the necessary geometry. +Next, we define the necessary geometry by generating a mesh to +contain a single cell. ```python - # Generate a mesh containing a single cell gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() ``` The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator` -called `gen`. The 3rd and 4th parameters control the exponent of the -superellipse(`0.1`) and the aspect ratio of the cell(`2.0`). You can +called `gen`. The 3rd parameter controls the exponent of the superellipse(`0.1`) +and the 4th parameter controls the aspect ratio of the cell(`2.0`). You can experiment with modifying these to change the initial shape of the cell. The second line of code instructs the mesh generator to generate a mesh. @@ -99,97 +112,110 @@ We now set the fluid grid resolution. The following code specifies that we are using a 64x64 grid to simulate our fluid over. ```python - # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) ``` -Next, we set up the cell population +Next, we generate the cells. We specify a cell type and cell cycle model. +These can be changed to modify the life cycle of the cells. The +cell generator then constructs the necessary information for each +of the elements in the mesh. ```python - # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) ``` +Finally, we construct the cell population. We then specify whether the +population has active fluid sources or not. For now, we are not +using any fluid sources, so we set this to `False` + ```python - # Set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + cell_population.SetIfPopulationHasActiveSources(False) ``` -We specify a cell type and cell cycle model. These can be -interchanged to modify the life cycle of the cells. The -`CellsGenerator` then constructs the necessary information for each -of the elements in the mesh. Finally, we construct an -`ImmersedBoundaryCellPopulation`. We then specify whether the -population has active fluid sources or not. For now, we are not -using any fluid sources, so we set this to false +We can make a quick visualization of the cell population ```python - # Specify whether the population has active fluid sources - cell_population.SetIfPopulationHasActiveSources(False) + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) ``` -Here, we use an `OffLatticeSimulation` simulator to control the +Next, we create an `OffLatticeSimulation` simulator to control the simulation. Although the fluid is simulated on a lattice (grid), the nodes/cells are not bound to a lattice. ```python - # Create a simulator to manage our simulation simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) ``` As we have an off-lattice simulation, we need a way to model the fluid. This is handled by the `ImmersedBoundarySimulationModifier`. -Modifiers in chaste are classes that can be attached to simulations +Modifiers in Chaste are classes that can be attached to simulations to perform some additional custom functionality each timestep. In this case, the modifier is responsible for solving the Navier-Stokes equations and propagating forces between the nodes and the fluid. ```python - # Add an immersed boundary simulation modifier. ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) ``` We must also provide the modifier with a force model to govern -interactions between the nodes forming the boundary of the cells. -Note that these forces only act between nodes in the same cell, +interactions between the nodes forming the cell membrane. +Note that these forces only act between nodes in the same cell; they do not control interactions between cells. ```python - # Add a force law to model the behaviour of the cell membrane - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) ``` -The spring constant(`1.0 * 1e7`) defines how stiff the cell boundary -is. You can experiment with adjusting the spring constant to change -the force behaviour between nodes of the cell boundary. The `ImmersedBoundaryLinearMembraneForce` models forces between membrane nodes using linear springs i.e, the force applied is proportional to the deviation of the distance between nodes -from a rest length. +from a rest length. The spring constant(`1.0 * 1e7`) defines how +stiff the cell boundary is. -Finally, we set up the simulation properties and run it. + **Practice** Experiment with adjusting the spring constant to + change the force behaviour between nodes of the cell boundary. + +Next, we set the simulation properties ```python - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_1") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation +``` +We can add a modifier to visualize the cell population while the +simulation is in progress + +```python + scene_modifier = JupyterSceneModifier2(nb_manager) + scene_modifier.SetVtkScene(scene) + scene_modifier.SetUpdateFrequency(1000) + simulator.AddSimulationModifier(scene_modifier) + +``` +Finally, to run the simulation we call the `Solve()` method. + +```python simulator.Solve() - SimulationTime.Instance().Destroy() +``` +Reset the simulation environment in the notebook + +```python TearDownNotebookTest() ``` @@ -197,96 +223,148 @@ Finally, we set up the simulation properties and run it. ```python def test_multicell_immersed_boundary_simulation(self): + ``` #### Multiple Cells + +Setup the simulation environment in the notebook + +```python + SetupNotebookTest() + +``` +Set the start time for the simulation + +```python + SimulationTime.Instance().SetStartTime(0.0) + +``` We can use the mesh generator to generate multiple cells. The first parameter of the mesh generator constructor controls the number of -cells. Try increasing the number of cells by adjusting the parameter -value. A sensible range for this tutorial is 4-10 cells. +cells. + + **Practice** Try increasing the number of cells by adjusting the + parameter value. A sensible range for this tutorial is 4-10 cells. ```python - # Create a mesh generator - gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) ``` #### Laminas In addition to the cells we have seen so far, we can introduce laminas to the simulation. Laminas are surfaces with reduced dimensionality. For 3D elements, a lamina is a 2D surface. For the -2D elements we are working with, laminas are lines. Changing the last -parameter of the mesh generator constructor from `False` to `True` -will generate a basal lamina spanning the palisade cells. +2D elements we are currently working with, laminas are lines. +Changing the last parameter of the mesh generator constructor from `False` +to `True` will generate a basal lamina spanning the palisade cells. Laminas can also interact with the fluid field, and can be made -'leaky' to allow some flow across their boundary. This can be used +"leaky" to allow some flow across their boundary. This can be used to model a permeable boundary. + **Practice** Try changing the 6th constructor parameter to create a lamina. + #### Cell Variations Apart from using the 3rd and 4th constructor parameters to modify the cell shapes, we can also introduce variation between cells by modifying the 5th parameter. + **Practice** Try adjusting the 3rd and 4th constructor parameters to + introduce cell variations. + +Next, we generate the mesh and set the fluid grid resolution + ```python - # Generate the mesh mesh = gen.GetMesh() - - # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) - # Set the start time for the simulation - SimulationTime.Instance().SetStartTime(0.0) +``` +Below, we generate the cells - # Generate the cells +```python cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - # Set up the cell population - cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) +``` +Then we set up the cell population with no active fluid sources - # Specify whether the population has active fluid sources +```python + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) cell_population.SetIfPopulationHasActiveSources(False) - # Create a simulator to manage our simulation +``` +We can visualize the cell population below + +```python + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + +``` +Now we create a simulator to manage the simulation + +```python simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) + +``` +We add an immersed boundary simulation modifier to the simulator - # Add an immersed boundary simulation modifier +```python ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) - # Add a force law to model the behaviour of the cell membrane - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) +``` +We then add a force law to the simulation modifier to model the +behaviour of the cell membrane + +```python + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) ``` -#### Intercellular Interactions +#### Inter-cellular Interactions So far, we have encountered forces that act to maintain the shape -of the cell membrane. We can also introduce forces that apply -between cells using `ImmersedBoundaryLinearInteractionForce`. I -Instead of the `SetElementSpringConst` method, it has a -`SetSpringConst` method which we should use. The rest length can -also be modified using the `SetRestLength` method. +of the cell membrane. We can also introduce an inter-cellular +force law using `ImmersedBoundaryLinearInteractionForce`. +This has a `SetSpringConst` method instead of a `SetElementSpringConst` +method. It also has a `SetRestLength` method that we can use to +modify the rest length. ```python - # Add a new intercellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) ib_modifier.AddImmersedBoundaryForce(interaction_force) - # Set simulation properties +``` +Next, we set the simulation properties + +```python dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_2") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation +``` +Finally, we run the simulation + +```python simulator.Solve() - SimulationTime.Instance().Destroy() +``` +We can visualize the end state of the cell population + +```python + nb_manager.vtk_show(scene, height=300) + +``` +Reset the simulation environment in the notebook + +```python TearDownNotebookTest() ``` @@ -299,16 +377,29 @@ introduce fluid sources. ``` #### Adding a Fluid Source -We begin by constructing a fluid source object. + +Setup the simulation environment in the notebook + +```python + SetupNotebookTest() + +``` +Set the start time for the simulation + +```python + SimulationTime.Instance().SetStartTime(0.0) + +``` +We begin by constructing a fluid source object: ```python source = FluidSource2(0, 0.5, 0.7) ``` This constructs a `FluidSource` object in 2 dimensions. The first -parameter gives the index of the fluid source. Each source you -create must have a unique index. The next parameters are the -`x` and `y` coordinates of the source. Fluid sources in chaste are +parameter supplies the index of the fluid source. Each source we +create must have a unique index. The next two parameters are the +`x` and `y` coordinates of the source. Fluid sources in Chaste are point-like, that is to say they do not have any area/volume. Having created the fluid source, we set its strength: @@ -316,86 +407,113 @@ Having created the fluid source, we set its strength: ```python source.SetStrength(0.012) -``` -Now, we must associate the source with an element in the simulation -so that the simulation is aware of the source. - -```python - # Create the mesh + # Next, we create the mesh gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) - # Associate the fluid source with an element in the mesh +``` +We must associate the source with an element in the simulation +so that the simulation is aware of the source. + +```python mesh.GetElement(0).SetFluidSource(source) ``` -Finally, we must tell the cell population that fluid sources are present. +We now generate the cells ```python - # Set up the cell population - SimulationTime.Instance().SetStartTime(0.0) cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - # Specify that fluid sources are present +``` +Then we set up the cell population +cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + +Finally, we must tell the cell population that fluid sources are present. + +```python cell_population.SetIfPopulationHasActiveSources(True) ``` #### Varying the Source Location -You can experiment with the source location. Try moving it closer to -and further away from the cells. - + **Practice** You can experiment with the source location. Try moving it + closer to and further away from the cells. + #### Varying the Source Strength -Try modifying the source strength to see what impact this has on -the cell shapes. + **Practice** Try modifying the source strength to see what impact this + has on the cell shapes. + +Below, we visualize the cell population + +```python + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + +``` +Create a simulator to manage the simulation ```python - # Create a simulator simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) + +``` +Add an immersed boundary simulation modifier - # Add an immersed boundary simulation modifier +```python ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) ``` #### Fluid-Cell Interaction -Have a go at modifying the spring constant of the -`ImmersedBoundaryLinearMembraneForce` to see how this changes the -effect of the fluid source on the cells. + **Practice** Try modifying the spring constant of the + `ImmersedBoundaryLinearMembraneForce` to see how this changes the + effect of the fluid source on the cells. ```python - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) +``` +Add an inter-cellular force law + +```python interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) ib_modifier.AddImmersedBoundaryForce(interaction_force) ``` #### Adding More Sources -Try adding second fluid source. You will need to use a unique index, -and attach it to a different element as each element can only manage -a single fluid source. + **Practice** Try adding a second fluid source. You will need to + use a unique index, and attach it to a different element as + each element can only manage a single fluid source. + +Set the simulation properties ```python - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_3") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation + # Run the simulation + simulator.Solve() - SimulationTime.Instance().Destroy() + # Visualize the end state + + nb_manager.vtk_show(scene, height=300) + +``` +Reset the simulation environment in the notebook + +```python TearDownNotebookTest() ``` @@ -434,176 +552,177 @@ from chaste.cell_based import ( ImmersedBoundaryLinearMembraneForce2, ImmersedBoundarySimulationModifier2, OffLatticeSimulation2_2, + SetupNotebookTest, SimulationTime, TearDownNotebookTest, ) from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator -import chaste.visualization +from chaste.visualization import ( + JupyterNotebookManager, + JupyterSceneModifier2, + VtkScene2 +) class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): def test_simple_immersed_boundary_simulation(self): - # Set the start time for the simulation + + SetupNotebookTest() + SimulationTime.Instance().SetStartTime(0.0) - # Generate a mesh containing a single cell gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() - # Set the fluid grid resolution mesh.SetNumGridPtsXAndY(64) - # Generate the cells cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - # Set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - - # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) - # Create a simulator to manage our simulation + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) - # Add an immersed boundary simulation modifier. ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) - # Add a force law to model the behaviour of the cell membrane - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_1") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation + scene_modifier = JupyterSceneModifier2(nb_manager) + scene_modifier.SetVtkScene(scene) + scene_modifier.SetUpdateFrequency(1000) + simulator.AddSimulationModifier(scene_modifier) + simulator.Solve() - SimulationTime.Instance().Destroy() TearDownNotebookTest() def test_multicell_immersed_boundary_simulation(self): - # Create a mesh generator - gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False) - # Generate the mesh - mesh = gen.GetMesh() + SetupNotebookTest() - # Set the fluid grid resolution - mesh.SetNumGridPtsXAndY(64) - - # Set the start time for the simulation SimulationTime.Instance().SetStartTime(0.0) - # Generate the cells + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) + + mesh = gen.GetMesh() + mesh.SetNumGridPtsXAndY(64) + cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - # Set up the cell population cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - - # Specify whether the population has active fluid sources cell_population.SetIfPopulationHasActiveSources(False) - # Create a simulator to manage our simulation + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) - # Add an immersed boundary simulation modifier ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) - # Add a force law to model the behaviour of the cell membrane - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) - # Add a new intercellular force law interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) ib_modifier.AddImmersedBoundaryForce(interaction_force) - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_2") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation simulator.Solve() - SimulationTime.Instance().Destroy() + nb_manager.vtk_show(scene, height=300) + TearDownNotebookTest() def test_fluid_source_immersed_boundary_simulation(self): + SetupNotebookTest() + + SimulationTime.Instance().SetStartTime(0.0) + source = FluidSource2(0, 0.5, 0.7) source.SetStrength(0.012) - # Create the mesh + # Next, we create the mesh gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) - # Associate the fluid source with an element in the mesh mesh.GetElement(0).SetFluidSource(source) - # Set up the cell population - SimulationTime.Instance().SetStartTime(0.0) cell_type = DifferentiatedCellProliferativeType() cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) - cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) - # Specify that fluid sources are present cell_population.SetIfPopulationHasActiveSources(True) - # Create a simulator + scene = VtkScene2() + scene.SetCellPopulation(cell_population) + nb_manager = JupyterNotebookManager() + nb_manager.vtk_show(scene, height=300) + simulator = OffLatticeSimulation2_2(cell_population) - numerical_method = ForwardEulerNumericalMethod2_2() - numerical_method.SetUseUpdateNodeLocation(True) - simulator.SetNumericalMethod(numerical_method) + simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2()) + simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True) - # Add an immersed boundary simulation modifier ib_modifier = ImmersedBoundarySimulationModifier2() simulator.AddSimulationModifier(ib_modifier) - boundary_force = ImmersedBoundaryLinearMembraneForce2() - boundary_force.SetElementSpringConst(1.0 * 1e7) - ib_modifier.AddImmersedBoundaryForce(boundary_force) + membrane_force = ImmersedBoundaryLinearMembraneForce2() + membrane_force.SetElementSpringConst(1.0 * 1e7) + ib_modifier.AddImmersedBoundaryForce(membrane_force) interaction_force = ImmersedBoundaryLinearInteractionForce2() interaction_force.SetSpringConst(1.0 * 1e6) ib_modifier.AddImmersedBoundaryForce(interaction_force) - # Set simulation properties dt = 0.05 - simulator.SetOutputDirectory("Python/TestImmersedBoundary") + simulator.SetOutputDirectory("Python/TestImmersedBoundary_3") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) simulator.SetEndTime(1000 * dt) - # Perform the simulation + # Run the simulation + simulator.Solve() - SimulationTime.Instance().Destroy() + # Visualize the end state + + nb_manager.vtk_show(scene, height=300) + TearDownNotebookTest() if __name__ == "__main__": diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb new file mode 100644 index 00000000..4b2ca3d5 --- /dev/null +++ b/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb @@ -0,0 +1,1116 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "55fe99de", + "metadata": {}, + "source": [ + "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "50298239", + "metadata": {}, + "outputs": [], + "source": [ + "# Jupyter notebook specific imports \n", + "import matplotlib as mpl \n", + "from IPython import display \n", + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "id": "7a4de7c6", + "metadata": {}, + "source": [ + "\n", + "## Introduction\n", + "This tutorial is a demonstration of the immersed boundary method, a technique\n", + "for simulating fluid-structure interactions. We can use the immersed boundary\n", + "method to simulate a cell as a structure with its outer **boundary immersed**\n", + "in a fluid. There is a two-way coupling between the fluid and the structure:\n", + "the flow of the fluid exerts a force on the structure, and the structure\n", + "influences the flow of the fluid.\n", + "\n", + "In this tutorial, we demonstrate:\n", + "1. Building single-cell immersed boundary capable simulations.\n", + "2. Building multi-cellular immersed boundary simulations.\n", + "3. Adding and manipulating immersed boundary fluid sources.\n", + "\n", + "## Imports\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3a9b150c", + "metadata": {}, + "outputs": [], + "source": [ + "import chaste\n", + "chaste.init() # setup MPI\n", + "from chaste.cell_based import (\n", + " AbstractCellBasedTestSuite,\n", + " CellsGeneratorUniformCellCycleModel_2,\n", + " DifferentiatedCellProliferativeType,\n", + " ForwardEulerNumericalMethod2_2,\n", + " ImmersedBoundaryCellPopulation2,\n", + " ImmersedBoundaryLinearInteractionForce2,\n", + " ImmersedBoundaryLinearMembraneForce2,\n", + " ImmersedBoundarySimulationModifier2,\n", + " OffLatticeSimulation2_2,\n", + " SetupNotebookTest,\n", + " SimulationTime,\n", + " TearDownNotebookTest,\n", + ")\n", + "from chaste.mesh import FluidSource2, ImmersedBoundaryPalisadeMeshGenerator\n", + "from chaste.visualization import (\n", + " JupyterNotebookManager,\n", + " JupyterSceneModifier2,\n", + " VtkScene2\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "8557c948", + "metadata": {}, + "source": [ + "### 1. Simple Immersed Boundary Simulations\n", + "We begin by exploring simulations containing a single cell. This will\n", + "familiarise you with how to generate immersed boundary cells, the steps\n", + "involved in setting up an immersed boundary simulation, and the options\n", + "available for controlling how the cells are generated and behave.\n", + "\n", + "Immersed boundary simulations operate over a square domain, with `x` and `y`\n", + "coordinates lying in the range `0` to `1`. The domain wraps on both axes -\n", + "this means that if a cell moves off the right hand edge of the domain,\n", + "the segment will appear on the left hand side. This is not purely visual;\n", + "forces are also transmitted across these boundaries.\n", + "\n", + " **Tip** Make sure all your coordinates are between `0` and `1`.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "30090843", + "metadata": {}, + "source": [ + "Setup the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e0cd9dcd", + "metadata": {}, + "outputs": [], + "source": [ + "SetupNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "03f07a48", + "metadata": {}, + "source": [ + "Set the start time for the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "97319c25", + "metadata": {}, + "outputs": [], + "source": [ + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "1b33416d", + "metadata": {}, + "source": [ + "Next, we define the necessary geometry by generating a mesh to\n", + "contain a single cell.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "49179217", + "metadata": {}, + "outputs": [], + "source": [ + "gen = ImmersedBoundaryPalisadeMeshGenerator(1, 128, 0.1, 2.0, 0.0, False)\n", + "mesh = gen.GetMesh()" + ] + }, + { + "cell_type": "markdown", + "id": "a1d5f481", + "metadata": {}, + "source": [ + "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", + "called `gen`. The 3rd parameter controls the exponent of the superellipse(`0.1`)\n", + "and the 4th parameter controls the aspect ratio of the cell(`2.0`). You can\n", + "experiment with modifying these to change the initial shape of the cell.\n", + "\n", + "The second line of code instructs the mesh generator to generate a mesh.\n", + "Checking the type of mesh with `type(mesh)` will show it as\n", + "`ImmersedBoundaryMesh2_2`. The `2_2` suffix denotes that we are using\n", + "a 2-dimensional space, and 2-dimensional elements to define the mesh.\n", + "\n", + "We now set the fluid grid resolution. The following code specifies\n", + "that we are using a 64x64 grid to simulate our fluid over.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "844ec9b1", + "metadata": {}, + "outputs": [], + "source": [ + "mesh.SetNumGridPtsXAndY(64)" + ] + }, + { + "cell_type": "markdown", + "id": "add300c3", + "metadata": {}, + "source": [ + "Next, we generate the cells. We specify a cell type and cell cycle model.\n", + "These can be changed to modify the life cycle of the cells. The\n", + "cell generator then constructs the necessary information for each\n", + "of the elements in the mesh.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a5019e1b", + "metadata": {}, + "outputs": [], + "source": [ + "cell_type = DifferentiatedCellProliferativeType()\n", + "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" + ] + }, + { + "cell_type": "markdown", + "id": "be6c6d9d", + "metadata": {}, + "source": [ + "Finally, we construct the cell population. We then specify whether the\n", + "population has active fluid sources or not. For now, we are not\n", + "using any fluid sources, so we set this to `False`\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3d83d1ba", + "metadata": {}, + "outputs": [], + "source": [ + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", + "cell_population.SetIfPopulationHasActiveSources(False)" + ] + }, + { + "cell_type": "markdown", + "id": "e395f842", + "metadata": {}, + "source": [ + "We can make a quick visualization of the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "437d6946", + "metadata": {}, + "outputs": [], + "source": [ + "scene = VtkScene2()\n", + "scene.SetCellPopulation(cell_population)\n", + "nb_manager = JupyterNotebookManager()\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "33a529b8", + "metadata": {}, + "source": [ + "Next, we create an `OffLatticeSimulation` simulator to control the\n", + "simulation. Although the fluid is simulated on a lattice (grid),\n", + "the nodes/cells are not bound to a lattice.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fe5eddf0", + "metadata": {}, + "outputs": [], + "source": [ + "simulator = OffLatticeSimulation2_2(cell_population)\n", + "simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2())\n", + "simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True)" + ] + }, + { + "cell_type": "markdown", + "id": "1cdf753d", + "metadata": {}, + "source": [ + "As we have an off-lattice simulation, we need a way to model the\n", + "fluid. This is handled by the `ImmersedBoundarySimulationModifier`.\n", + "Modifiers in Chaste are classes that can be attached to simulations\n", + "to perform some additional custom functionality each timestep.\n", + "In this case, the modifier is responsible for solving the\n", + "Navier-Stokes equations and propagating forces between the nodes and\n", + "the fluid.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "32f1c59c", + "metadata": {}, + "outputs": [], + "source": [ + "ib_modifier = ImmersedBoundarySimulationModifier2()\n", + "simulator.AddSimulationModifier(ib_modifier)" + ] + }, + { + "cell_type": "markdown", + "id": "0f8cf6b1", + "metadata": {}, + "source": [ + "We must also provide the modifier with a force model to govern\n", + "interactions between the nodes forming the cell membrane.\n", + "Note that these forces only act between nodes in the same cell;\n", + "they do not control interactions between cells.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dca89d9c", + "metadata": {}, + "outputs": [], + "source": [ + "membrane_force = ImmersedBoundaryLinearMembraneForce2()\n", + "membrane_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(membrane_force)" + ] + }, + { + "cell_type": "markdown", + "id": "e9b94479", + "metadata": {}, + "source": [ + "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", + "membrane nodes using linear springs i.e, the force applied is\n", + "proportional to the deviation of the distance between nodes\n", + "from a rest length. The spring constant(`1.0 * 1e7`) defines how\n", + "stiff the cell boundary is.\n", + "\n", + " **Practice** Experiment with adjusting the spring constant to\n", + " change the force behaviour between nodes of the cell boundary.\n", + " \n", + "Next, we set the simulation properties\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "137c8067", + "metadata": {}, + "outputs": [], + "source": [ + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_1\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "c0472257", + "metadata": {}, + "source": [ + "We can add a modifier to visualize the cell population while the\n", + "simulation is in progress\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f5de7e3d", + "metadata": {}, + "outputs": [], + "source": [ + "scene_modifier = JupyterSceneModifier2(nb_manager)\n", + "scene_modifier.SetVtkScene(scene)\n", + "scene_modifier.SetUpdateFrequency(1000)\n", + "simulator.AddSimulationModifier(scene_modifier)" + ] + }, + { + "cell_type": "markdown", + "id": "6f7f84f5", + "metadata": {}, + "source": [ + "Finally, to run the simulation we call the `Solve()` method.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "25679f36", + "metadata": {}, + "outputs": [], + "source": [ + "simulator.Solve()" + ] + }, + { + "cell_type": "markdown", + "id": "db47e34e", + "metadata": {}, + "source": [ + "Reset the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "16483d5f", + "metadata": {}, + "outputs": [], + "source": [ + "TearDownNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "59e72e4b", + "metadata": {}, + "source": [ + "### 2. Adding More Cells\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "936209fc", + "metadata": {}, + "source": [ + "#### Multiple Cells\n", + "\n", + "Setup the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "497b08e0", + "metadata": {}, + "outputs": [], + "source": [ + "SetupNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "70219074", + "metadata": {}, + "source": [ + "Set the start time for the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad7a725d", + "metadata": {}, + "outputs": [], + "source": [ + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "6eab105a", + "metadata": {}, + "source": [ + "We can use the mesh generator to generate multiple cells. The first\n", + "parameter of the mesh generator constructor controls the number of\n", + "cells.\n", + "\n", + " **Practice** Try increasing the number of cells by adjusting the\n", + " parameter value. A sensible range for this tutorial is 4-10 cells.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d6110f34", + "metadata": {}, + "outputs": [], + "source": [ + "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)" + ] + }, + { + "cell_type": "markdown", + "id": "4df5639f", + "metadata": {}, + "source": [ + "#### Laminas\n", + "In addition to the cells we have seen so far, we can introduce\n", + "laminas to the simulation. Laminas are surfaces with reduced\n", + "dimensionality. For 3D elements, a lamina is a 2D surface. For the\n", + "2D elements we are currently working with, laminas are lines.\n", + "Changing the last parameter of the mesh generator constructor from `False`\n", + "to `True` will generate a basal lamina spanning the palisade cells.\n", + "Laminas can also interact with the fluid field, and can be made\n", + "\"leaky\" to allow some flow across their boundary. This can be used\n", + "to model a permeable boundary.\n", + "\n", + " **Practice** Try changing the 6th constructor parameter to create a lamina.\n", + " \n", + "#### Cell Variations\n", + "Apart from using the 3rd and 4th constructor parameters to modify\n", + "the cell shapes, we can also introduce variation between cells by\n", + "modifying the 5th parameter.\n", + "\n", + " **Practice** Try adjusting the 3rd and 4th constructor parameters to\n", + " introduce cell variations.\n", + " \n", + "Next, we generate the mesh and set the fluid grid resolution\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a50c59d8", + "metadata": {}, + "outputs": [], + "source": [ + "mesh = gen.GetMesh()\n", + "mesh.SetNumGridPtsXAndY(64)" + ] + }, + { + "cell_type": "markdown", + "id": "bdaf78ca", + "metadata": {}, + "source": [ + "Below, we generate the cells\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "449bd44f", + "metadata": {}, + "outputs": [], + "source": [ + "cell_type = DifferentiatedCellProliferativeType()\n", + "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" + ] + }, + { + "cell_type": "markdown", + "id": "8846c4d6", + "metadata": {}, + "source": [ + "Then we set up the cell population with no active fluid sources\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "535ac16a", + "metadata": {}, + "outputs": [], + "source": [ + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", + "cell_population.SetIfPopulationHasActiveSources(False)" + ] + }, + { + "cell_type": "markdown", + "id": "cffc290b", + "metadata": {}, + "source": [ + "We can visualize the cell population below\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "94012f4a", + "metadata": {}, + "outputs": [], + "source": [ + "scene = VtkScene2()\n", + "scene.SetCellPopulation(cell_population)\n", + "nb_manager = JupyterNotebookManager()\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "880ed9aa", + "metadata": {}, + "source": [ + "Now we create a simulator to manage the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "24284940", + "metadata": {}, + "outputs": [], + "source": [ + "simulator = OffLatticeSimulation2_2(cell_population)\n", + "simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2())\n", + "simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True)" + ] + }, + { + "cell_type": "markdown", + "id": "11497a9f", + "metadata": {}, + "source": [ + "We add an immersed boundary simulation modifier to the simulator\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da1764c6", + "metadata": {}, + "outputs": [], + "source": [ + "ib_modifier = ImmersedBoundarySimulationModifier2()\n", + "simulator.AddSimulationModifier(ib_modifier)" + ] + }, + { + "cell_type": "markdown", + "id": "46bffd78", + "metadata": {}, + "source": [ + "We then add a force law to the simulation modifier to model the\n", + "behaviour of the cell membrane\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f9cb8c89", + "metadata": {}, + "outputs": [], + "source": [ + "membrane_force = ImmersedBoundaryLinearMembraneForce2()\n", + "membrane_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(membrane_force)" + ] + }, + { + "cell_type": "markdown", + "id": "d8fcec8b", + "metadata": {}, + "source": [ + "#### Inter-cellular Interactions\n", + "So far, we have encountered forces that act to maintain the shape\n", + "of the cell membrane. We can also introduce an inter-cellular\n", + "force law using `ImmersedBoundaryLinearInteractionForce`.\n", + "This has a `SetSpringConst` method instead of a `SetElementSpringConst`\n", + "method. It also has a `SetRestLength` method that we can use to\n", + "modify the rest length.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "345ea70f", + "metadata": {}, + "outputs": [], + "source": [ + "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", + "interaction_force.SetSpringConst(1.0 * 1e6)\n", + "ib_modifier.AddImmersedBoundaryForce(interaction_force)" + ] + }, + { + "cell_type": "markdown", + "id": "f4de7864", + "metadata": {}, + "source": [ + "Next, we set the simulation properties\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "72c428ab", + "metadata": {}, + "outputs": [], + "source": [ + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_2\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "97b5b658", + "metadata": {}, + "source": [ + "Finally, we run the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a167204d", + "metadata": {}, + "outputs": [], + "source": [ + "simulator.Solve()" + ] + }, + { + "cell_type": "markdown", + "id": "dddbc94e", + "metadata": {}, + "source": [ + "We can visualize the end state of the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a6de9ce9", + "metadata": {}, + "outputs": [], + "source": [ + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "a438961c", + "metadata": {}, + "source": [ + "Reset the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86e9b33c", + "metadata": {}, + "outputs": [], + "source": [ + "TearDownNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "2a5dc6f7", + "metadata": {}, + "source": [ + "### 3. Adding Fluid Sources\n", + "Now that we are familiar with how to generate the cells, we will\n", + "introduce fluid sources.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "c08d4ce5", + "metadata": {}, + "source": [ + "#### Adding a Fluid Source\n", + "\n", + "Setup the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4c6e58ae", + "metadata": {}, + "outputs": [], + "source": [ + "SetupNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "45e59e32", + "metadata": {}, + "source": [ + "Set the start time for the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ff59adf2", + "metadata": {}, + "outputs": [], + "source": [ + "SimulationTime.Instance().SetStartTime(0.0)" + ] + }, + { + "cell_type": "markdown", + "id": "f08a3267", + "metadata": {}, + "source": [ + "We begin by constructing a fluid source object:\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "15e927af", + "metadata": {}, + "outputs": [], + "source": [ + "source = FluidSource2(0, 0.5, 0.7)" + ] + }, + { + "cell_type": "markdown", + "id": "fc9652e0", + "metadata": {}, + "source": [ + "This constructs a `FluidSource` object in 2 dimensions. The first\n", + "parameter supplies the index of the fluid source. Each source we\n", + "create must have a unique index. The next two parameters are the\n", + "`x` and `y` coordinates of the source. Fluid sources in Chaste are\n", + "point-like, that is to say they do not have any area/volume.\n", + "\n", + "Having created the fluid source, we set its strength:\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "06cd35c3", + "metadata": {}, + "outputs": [], + "source": [ + "source.SetStrength(0.012)\n", + "# Next, we create the mesh\n", + "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)\n", + "mesh = gen.GetMesh()\n", + "mesh.SetNumGridPtsXAndY(64)" + ] + }, + { + "cell_type": "markdown", + "id": "fd8038c3", + "metadata": {}, + "source": [ + "We must associate the source with an element in the simulation\n", + "so that the simulation is aware of the source.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bca93f1f", + "metadata": {}, + "outputs": [], + "source": [ + "mesh.GetElement(0).SetFluidSource(source)" + ] + }, + { + "cell_type": "markdown", + "id": "e19686b8", + "metadata": {}, + "source": [ + "We now generate the cells\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5aab6e98", + "metadata": {}, + "outputs": [], + "source": [ + "cell_type = DifferentiatedCellProliferativeType()\n", + "cell_generator = CellsGeneratorUniformCellCycleModel_2()\n", + "cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type)" + ] + }, + { + "cell_type": "markdown", + "id": "0f3a9b93", + "metadata": {}, + "source": [ + "Then we set up the cell population\n", + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", + "\n", + "Finally, we must tell the cell population that fluid sources are present.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "57cc7bcc", + "metadata": {}, + "outputs": [], + "source": [ + "cell_population.SetIfPopulationHasActiveSources(True)" + ] + }, + { + "cell_type": "markdown", + "id": "45ad91af", + "metadata": {}, + "source": [ + "#### Varying the Source Location\n", + " **Practice** You can experiment with the source location. Try moving it\n", + " closer to and further away from the cells.\n", + " \n", + "#### Varying the Source Strength\n", + " **Practice** Try modifying the source strength to see what impact this\n", + " has on the cell shapes.\n", + " \n", + "Below, we visualize the cell population\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c840945e", + "metadata": {}, + "outputs": [], + "source": [ + "scene = VtkScene2()\n", + "scene.SetCellPopulation(cell_population)\n", + "nb_manager = JupyterNotebookManager()\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "67861494", + "metadata": {}, + "source": [ + "Create a simulator to manage the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "587db969", + "metadata": {}, + "outputs": [], + "source": [ + "simulator = OffLatticeSimulation2_2(cell_population)\n", + "simulator.SetNumericalMethod(ForwardEulerNumericalMethod2_2())\n", + "simulator.GetNumericalMethod().SetUseUpdateNodeLocation(True)" + ] + }, + { + "cell_type": "markdown", + "id": "338b22ef", + "metadata": {}, + "source": [ + "Add an immersed boundary simulation modifier\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9563dc2e", + "metadata": {}, + "outputs": [], + "source": [ + "ib_modifier = ImmersedBoundarySimulationModifier2()\n", + "simulator.AddSimulationModifier(ib_modifier)" + ] + }, + { + "cell_type": "markdown", + "id": "c28e28d4", + "metadata": {}, + "source": [ + "#### Fluid-Cell Interaction\n", + " **Practice** Try modifying the spring constant of the\n", + " `ImmersedBoundaryLinearMembraneForce` to see how this changes the\n", + " effect of the fluid source on the cells.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "054df66a", + "metadata": {}, + "outputs": [], + "source": [ + "membrane_force = ImmersedBoundaryLinearMembraneForce2()\n", + "membrane_force.SetElementSpringConst(1.0 * 1e7)\n", + "ib_modifier.AddImmersedBoundaryForce(membrane_force)" + ] + }, + { + "cell_type": "markdown", + "id": "26278c92", + "metadata": {}, + "source": [ + "Add an inter-cellular force law\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "43304dfb", + "metadata": {}, + "outputs": [], + "source": [ + "interaction_force = ImmersedBoundaryLinearInteractionForce2()\n", + "interaction_force.SetSpringConst(1.0 * 1e6)\n", + "ib_modifier.AddImmersedBoundaryForce(interaction_force)" + ] + }, + { + "cell_type": "markdown", + "id": "6218903e", + "metadata": {}, + "source": [ + "#### Adding More Sources\n", + " **Practice** Try adding a second fluid source. You will need to\n", + " use a unique index, and attach it to a different element as\n", + " each element can only manage a single fluid source.\n", + " \n", + "Set the simulation properties\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb66c283", + "metadata": {}, + "outputs": [], + "source": [ + "dt = 0.05\n", + "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_3\")\n", + "simulator.SetDt(dt)\n", + "simulator.SetSamplingTimestepMultiple(4)\n", + "simulator.SetEndTime(1000 * dt)\n", + "# Run the simulation\n", + "simulator.Solve()\n", + "# Visualize the end state\n", + "nb_manager.vtk_show(scene, height=300)" + ] + }, + { + "cell_type": "markdown", + "id": "3b9fe252", + "metadata": {}, + "source": [ + "Reset the simulation environment in the notebook\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "efbf9530", + "metadata": {}, + "outputs": [], + "source": [ + "TearDownNotebookTest()" + ] + }, + { + "cell_type": "markdown", + "id": "109da48b", + "metadata": {}, + "source": [ + "#### Further Exercises\n", + " * Try integrating a different cell cycle model to introduce cell\n", + " division. See how the presence of a fluid source impacts the\n", + " structure that is formed.\n", + " * Use one of the cell writers to collect some statistics\n", + "\n" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} From 1f56164c1cef48fadacfaf3312c8fc04801e180c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 11 Apr 2024 13:12:39 +0100 Subject: [PATCH 38/40] #62 Fix immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 255 +++++++++++------- doc/tutorials/TestImmersedBoundaryTutorial.md | 30 ++- ...stImmersedBoundaryTutorial.nbconvert.ipynb | 255 +++++++++++------- .../tutorials/TestImmersedBoundaryTutorial.py | 14 +- 4 files changed, 328 insertions(+), 226 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index 4b2ca3d5..7585c8ab 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "55fe99de", + "id": "73a90130", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "50298239", + "id": "4b0a5451", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "7a4de7c6", + "id": "4a75e64e", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3a9b150c", + "id": "3ea333b2", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "8557c948", + "id": "7e0d4d71", "metadata": {}, "source": [ "### 1. Simple Immersed Boundary Simulations\n", @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "30090843", + "id": "73334510", "metadata": {}, "source": [ "Setup the simulation environment in the notebook\n", @@ -109,7 +109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0cd9dcd", + "id": "b6d5da0d", "metadata": {}, "outputs": [], "source": [ @@ -118,7 +118,7 @@ }, { "cell_type": "markdown", - "id": "03f07a48", + "id": "bfb904a6", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -128,7 +128,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97319c25", + "id": "90176201", "metadata": {}, "outputs": [], "source": [ @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "1b33416d", + "id": "bce1f6c3", "metadata": {}, "source": [ "Next, we define the necessary geometry by generating a mesh to\n", @@ -148,7 +148,7 @@ { "cell_type": "code", "execution_count": null, - "id": "49179217", + "id": "aa41e578", "metadata": {}, "outputs": [], "source": [ @@ -158,7 +158,7 @@ }, { "cell_type": "markdown", - "id": "a1d5f481", + "id": "caafc20d", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -179,7 +179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "844ec9b1", + "id": "5cdc16dd", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "add300c3", + "id": "06e6f635", "metadata": {}, "source": [ "Next, we generate the cells. We specify a cell type and cell cycle model.\n", @@ -201,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5019e1b", + "id": "7ca5c826", "metadata": {}, "outputs": [], "source": [ @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "be6c6d9d", + "id": "d873942d", "metadata": {}, "source": [ "Finally, we construct the cell population. We then specify whether the\n", @@ -224,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d83d1ba", + "id": "725a462f", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "e395f842", + "id": "b19f20f1", "metadata": {}, "source": [ "We can make a quick visualization of the cell population\n", @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "437d6946", + "id": "05dc9cf1", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "33a529b8", + "id": "4bd9c640", "metadata": {}, "source": [ "Next, we create an `OffLatticeSimulation` simulator to control the\n", @@ -268,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fe5eddf0", + "id": "690d637c", "metadata": {}, "outputs": [], "source": [ @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "1cdf753d", + "id": "198e3155", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -295,7 +295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32f1c59c", + "id": "0297a32f", "metadata": {}, "outputs": [], "source": [ @@ -305,7 +305,7 @@ }, { "cell_type": "markdown", - "id": "0f8cf6b1", + "id": "ee7065f2", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dca89d9c", + "id": "0bdcd1db", "metadata": {}, "outputs": [], "source": [ @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "e9b94479", + "id": "20126e0a", "metadata": {}, "source": [ "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", @@ -348,7 +348,7 @@ { "cell_type": "code", "execution_count": null, - "id": "137c8067", + "id": "cacbe3f2", "metadata": {}, "outputs": [], "source": [ @@ -361,7 +361,7 @@ }, { "cell_type": "markdown", - "id": "c0472257", + "id": "9a583b55", "metadata": {}, "source": [ "We can add a modifier to visualize the cell population while the\n", @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f5de7e3d", + "id": "a3b94fd4", "metadata": {}, "outputs": [], "source": [ @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "6f7f84f5", + "id": "24cfd4f0", "metadata": {}, "source": [ "Finally, to run the simulation we call the `Solve()` method.\n", @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25679f36", + "id": "999d3ede", "metadata": {}, "outputs": [], "source": [ @@ -403,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "db47e34e", + "id": "4651d7be", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -413,7 +413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16483d5f", + "id": "771dce57", "metadata": {}, "outputs": [], "source": [ @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "59e72e4b", + "id": "7a6e3571", "metadata": {}, "source": [ "### 2. Adding More Cells\n", @@ -431,7 +431,7 @@ }, { "cell_type": "markdown", - "id": "936209fc", + "id": "597b2076", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -443,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "497b08e0", + "id": "82631006", "metadata": {}, "outputs": [], "source": [ @@ -452,7 +452,7 @@ }, { "cell_type": "markdown", - "id": "70219074", + "id": "44b8e4c8", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -462,7 +462,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad7a725d", + "id": "364479a6", "metadata": {}, "outputs": [], "source": [ @@ -471,7 +471,7 @@ }, { "cell_type": "markdown", - "id": "6eab105a", + "id": "bddaf5cd", "metadata": {}, "source": [ "We can use the mesh generator to generate multiple cells. The first\n", @@ -486,7 +486,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d6110f34", + "id": "87a4a013", "metadata": {}, "outputs": [], "source": [ @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "4df5639f", + "id": "57262981", "metadata": {}, "source": [ "#### Laminas\n", @@ -526,7 +526,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a50c59d8", + "id": "648897cb", "metadata": {}, "outputs": [], "source": [ @@ -536,7 +536,7 @@ }, { "cell_type": "markdown", - "id": "bdaf78ca", + "id": "236d2143", "metadata": {}, "source": [ "Below, we generate the cells\n", @@ -546,7 +546,7 @@ { "cell_type": "code", "execution_count": null, - "id": "449bd44f", + "id": "45125d43", "metadata": {}, "outputs": [], "source": [ @@ -557,7 +557,7 @@ }, { "cell_type": "markdown", - "id": "8846c4d6", + "id": "46e58807", "metadata": {}, "source": [ "Then we set up the cell population with no active fluid sources\n", @@ -567,7 +567,7 @@ { "cell_type": "code", "execution_count": null, - "id": "535ac16a", + "id": "a1992a25", "metadata": {}, "outputs": [], "source": [ @@ -577,7 +577,7 @@ }, { "cell_type": "markdown", - "id": "cffc290b", + "id": "7d57c842", "metadata": {}, "source": [ "We can visualize the cell population below\n", @@ -587,7 +587,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94012f4a", + "id": "13f808a6", "metadata": {}, "outputs": [], "source": [ @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "880ed9aa", + "id": "d3c75fd4", "metadata": {}, "source": [ "Now we create a simulator to manage the simulation\n", @@ -609,7 +609,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24284940", + "id": "2f6f9712", "metadata": {}, "outputs": [], "source": [ @@ -620,7 +620,7 @@ }, { "cell_type": "markdown", - "id": "11497a9f", + "id": "03f27fa3", "metadata": {}, "source": [ "We add an immersed boundary simulation modifier to the simulator\n", @@ -630,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da1764c6", + "id": "efbbe815", "metadata": {}, "outputs": [], "source": [ @@ -640,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "46bffd78", + "id": "f3ccb3bb", "metadata": {}, "source": [ "We then add a force law to the simulation modifier to model the\n", @@ -651,7 +651,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f9cb8c89", + "id": "e23df1f2", "metadata": {}, "outputs": [], "source": [ @@ -662,7 +662,7 @@ }, { "cell_type": "markdown", - "id": "d8fcec8b", + "id": "f1407df1", "metadata": {}, "source": [ "#### Inter-cellular Interactions\n", @@ -678,7 +678,7 @@ { "cell_type": "code", "execution_count": null, - "id": "345ea70f", + "id": "87750739", "metadata": {}, "outputs": [], "source": [ @@ -689,7 +689,7 @@ }, { "cell_type": "markdown", - "id": "f4de7864", + "id": "5018a063", "metadata": {}, "source": [ "Next, we set the simulation properties\n", @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72c428ab", + "id": "c962ee02", "metadata": {}, "outputs": [], "source": [ @@ -712,7 +712,7 @@ }, { "cell_type": "markdown", - "id": "97b5b658", + "id": "b654e3d0", "metadata": {}, "source": [ "Finally, we run the simulation\n", @@ -722,7 +722,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a167204d", + "id": "4afd64a3", "metadata": {}, "outputs": [], "source": [ @@ -731,7 +731,7 @@ }, { "cell_type": "markdown", - "id": "dddbc94e", + "id": "ce85639b", "metadata": {}, "source": [ "We can visualize the end state of the cell population\n", @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6de9ce9", + "id": "82db0658", "metadata": {}, "outputs": [], "source": [ @@ -750,7 +750,7 @@ }, { "cell_type": "markdown", - "id": "a438961c", + "id": "1d965082", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -760,7 +760,7 @@ { "cell_type": "code", "execution_count": null, - "id": "86e9b33c", + "id": "cdab3f61", "metadata": {}, "outputs": [], "source": [ @@ -769,7 +769,7 @@ }, { "cell_type": "markdown", - "id": "2a5dc6f7", + "id": "54766d75", "metadata": {}, "source": [ "### 3. Adding Fluid Sources\n", @@ -780,7 +780,7 @@ }, { "cell_type": "markdown", - "id": "c08d4ce5", + "id": "a1979cc6", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", @@ -792,7 +792,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4c6e58ae", + "id": "0e090577", "metadata": {}, "outputs": [], "source": [ @@ -801,7 +801,7 @@ }, { "cell_type": "markdown", - "id": "45e59e32", + "id": "a10f4203", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -811,7 +811,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff59adf2", + "id": "9b1da1a3", "metadata": {}, "outputs": [], "source": [ @@ -820,7 +820,7 @@ }, { "cell_type": "markdown", - "id": "f08a3267", + "id": "f562d980", "metadata": {}, "source": [ "We begin by constructing a fluid source object:\n", @@ -830,7 +830,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15e927af", + "id": "c2479ccb", "metadata": {}, "outputs": [], "source": [ @@ -839,7 +839,7 @@ }, { "cell_type": "markdown", - "id": "fc9652e0", + "id": "a48de769", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -855,7 +855,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06cd35c3", + "id": "1d7f3d0f", "metadata": {}, "outputs": [], "source": [ @@ -868,7 +868,7 @@ }, { "cell_type": "markdown", - "id": "fd8038c3", + "id": "ecda58ad", "metadata": {}, "source": [ "We must associate the source with an element in the simulation\n", @@ -879,7 +879,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bca93f1f", + "id": "48333402", "metadata": {}, "outputs": [], "source": [ @@ -888,7 +888,7 @@ }, { "cell_type": "markdown", - "id": "e19686b8", + "id": "47b0686f", "metadata": {}, "source": [ "We now generate the cells\n", @@ -898,7 +898,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5aab6e98", + "id": "2448b7b9", "metadata": {}, "outputs": [], "source": [ @@ -909,12 +909,28 @@ }, { "cell_type": "markdown", - "id": "0f3a9b93", + "id": "4958df35", "metadata": {}, "source": [ "Then we set up the cell population\n", - "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", - "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4d8dbfdc", + "metadata": {}, + "outputs": [], + "source": [ + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)" + ] + }, + { + "cell_type": "markdown", + "id": "01e36810", + "metadata": {}, + "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", "\n" ] @@ -922,7 +938,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57cc7bcc", + "id": "99eb5f62", "metadata": {}, "outputs": [], "source": [ @@ -931,14 +947,13 @@ }, { "cell_type": "markdown", - "id": "45ad91af", + "id": "0136eba7", "metadata": {}, "source": [ - "#### Varying the Source Location\n", + "#### Varying the Source Location and Strength\n", " **Practice** You can experiment with the source location. Try moving it\n", " closer to and further away from the cells.\n", " \n", - "#### Varying the Source Strength\n", " **Practice** Try modifying the source strength to see what impact this\n", " has on the cell shapes.\n", " \n", @@ -949,7 +964,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c840945e", + "id": "6f1bcde7", "metadata": {}, "outputs": [], "source": [ @@ -961,7 +976,7 @@ }, { "cell_type": "markdown", - "id": "67861494", + "id": "95e357a1", "metadata": {}, "source": [ "Create a simulator to manage the simulation\n", @@ -971,7 +986,7 @@ { "cell_type": "code", "execution_count": null, - "id": "587db969", + "id": "7e051bf5", "metadata": {}, "outputs": [], "source": [ @@ -982,7 +997,7 @@ }, { "cell_type": "markdown", - "id": "338b22ef", + "id": "56177da1", "metadata": {}, "source": [ "Add an immersed boundary simulation modifier\n", @@ -992,7 +1007,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9563dc2e", + "id": "7970a544", "metadata": {}, "outputs": [], "source": [ @@ -1002,7 +1017,7 @@ }, { "cell_type": "markdown", - "id": "c28e28d4", + "id": "dbd869a3", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -1015,7 +1030,7 @@ { "cell_type": "code", "execution_count": null, - "id": "054df66a", + "id": "6e2d1952", "metadata": {}, "outputs": [], "source": [ @@ -1026,7 +1041,7 @@ }, { "cell_type": "markdown", - "id": "26278c92", + "id": "36497ffd", "metadata": {}, "source": [ "Add an inter-cellular force law\n", @@ -1036,7 +1051,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43304dfb", + "id": "dd64ce22", "metadata": {}, "outputs": [], "source": [ @@ -1047,7 +1062,7 @@ }, { "cell_type": "markdown", - "id": "6218903e", + "id": "adf49a4a", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -1055,14 +1070,14 @@ " use a unique index, and attach it to a different element as\n", " each element can only manage a single fluid source.\n", " \n", - "Set the simulation properties\n", + "Next, we set the simulation properties\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "bb66c283", + "id": "1acafdd1", "metadata": {}, "outputs": [], "source": [ @@ -1070,16 +1085,50 @@ "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_3\")\n", "simulator.SetDt(dt)\n", "simulator.SetSamplingTimestepMultiple(4)\n", - "simulator.SetEndTime(1000 * dt)\n", - "# Run the simulation\n", - "simulator.Solve()\n", - "# Visualize the end state\n", + "simulator.SetEndTime(300 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "c8dc46b0", + "metadata": {}, + "source": [ + "Finally, we run the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f3ab0dc7", + "metadata": {}, + "outputs": [], + "source": [ + "simulator.Solve()" + ] + }, + { + "cell_type": "markdown", + "id": "222c955f", + "metadata": {}, + "source": [ + "Then we visualize the end state\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cdc21f27", + "metadata": {}, + "outputs": [], + "source": [ "nb_manager.vtk_show(scene, height=300)" ] }, { "cell_type": "markdown", - "id": "3b9fe252", + "id": "98c9b1bd", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -1089,7 +1138,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efbf9530", + "id": "0834b0a5", "metadata": {}, "outputs": [], "source": [ @@ -1098,7 +1147,7 @@ }, { "cell_type": "markdown", - "id": "109da48b", + "id": "08208b55", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index eff777fe..517234e0 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [c238afe6](https://github.com/Chaste/PyChaste/commit/c238afe658a4392521745231677f1d4a3e59d419). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [a17a4092](https://github.com/Chaste/PyChaste/commit/a17a4092069eaa64fe77e1e5d286ef0595ebc04f). Note that the code is given in full at the bottom of the page. @@ -429,19 +429,21 @@ We now generate the cells ``` Then we set up the cell population -cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) +```python + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + +``` Finally, we must tell the cell population that fluid sources are present. ```python cell_population.SetIfPopulationHasActiveSources(True) ``` -#### Varying the Source Location +#### Varying the Source Location and Strength **Practice** You can experiment with the source location. Try moving it closer to and further away from the cells. -#### Varying the Source Strength **Practice** Try modifying the source strength to see what impact this has on the cell shapes. @@ -493,21 +495,25 @@ Add an inter-cellular force law use a unique index, and attach it to a different element as each element can only manage a single fluid source. -Set the simulation properties +Next, we set the simulation properties ```python dt = 0.05 simulator.SetOutputDirectory("Python/TestImmersedBoundary_3") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) - simulator.SetEndTime(1000 * dt) + simulator.SetEndTime(300 * dt) - # Run the simulation +``` +Finally, we run the simulation +```python simulator.Solve() - # Visualize the end state +``` +Then we visualize the end state +```python nb_manager.vtk_show(scene, height=300) ``` @@ -687,6 +693,8 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): cell_generator = CellsGeneratorUniformCellCycleModel_2() cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) + cell_population.SetIfPopulationHasActiveSources(True) scene = VtkScene2() @@ -713,14 +721,10 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): simulator.SetOutputDirectory("Python/TestImmersedBoundary_3") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) - simulator.SetEndTime(1000 * dt) - - # Run the simulation + simulator.SetEndTime(300 * dt) simulator.Solve() - # Visualize the end state - nb_manager.vtk_show(scene, height=300) TearDownNotebookTest() diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb index 4b2ca3d5..7585c8ab 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "55fe99de", + "id": "73a90130", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "50298239", + "id": "4b0a5451", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "7a4de7c6", + "id": "4a75e64e", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3a9b150c", + "id": "3ea333b2", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "8557c948", + "id": "7e0d4d71", "metadata": {}, "source": [ "### 1. Simple Immersed Boundary Simulations\n", @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "30090843", + "id": "73334510", "metadata": {}, "source": [ "Setup the simulation environment in the notebook\n", @@ -109,7 +109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0cd9dcd", + "id": "b6d5da0d", "metadata": {}, "outputs": [], "source": [ @@ -118,7 +118,7 @@ }, { "cell_type": "markdown", - "id": "03f07a48", + "id": "bfb904a6", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -128,7 +128,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97319c25", + "id": "90176201", "metadata": {}, "outputs": [], "source": [ @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "1b33416d", + "id": "bce1f6c3", "metadata": {}, "source": [ "Next, we define the necessary geometry by generating a mesh to\n", @@ -148,7 +148,7 @@ { "cell_type": "code", "execution_count": null, - "id": "49179217", + "id": "aa41e578", "metadata": {}, "outputs": [], "source": [ @@ -158,7 +158,7 @@ }, { "cell_type": "markdown", - "id": "a1d5f481", + "id": "caafc20d", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -179,7 +179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "844ec9b1", + "id": "5cdc16dd", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "add300c3", + "id": "06e6f635", "metadata": {}, "source": [ "Next, we generate the cells. We specify a cell type and cell cycle model.\n", @@ -201,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5019e1b", + "id": "7ca5c826", "metadata": {}, "outputs": [], "source": [ @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "be6c6d9d", + "id": "d873942d", "metadata": {}, "source": [ "Finally, we construct the cell population. We then specify whether the\n", @@ -224,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d83d1ba", + "id": "725a462f", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "e395f842", + "id": "b19f20f1", "metadata": {}, "source": [ "We can make a quick visualization of the cell population\n", @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "437d6946", + "id": "05dc9cf1", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "33a529b8", + "id": "4bd9c640", "metadata": {}, "source": [ "Next, we create an `OffLatticeSimulation` simulator to control the\n", @@ -268,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fe5eddf0", + "id": "690d637c", "metadata": {}, "outputs": [], "source": [ @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "1cdf753d", + "id": "198e3155", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -295,7 +295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32f1c59c", + "id": "0297a32f", "metadata": {}, "outputs": [], "source": [ @@ -305,7 +305,7 @@ }, { "cell_type": "markdown", - "id": "0f8cf6b1", + "id": "ee7065f2", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dca89d9c", + "id": "0bdcd1db", "metadata": {}, "outputs": [], "source": [ @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "e9b94479", + "id": "20126e0a", "metadata": {}, "source": [ "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", @@ -348,7 +348,7 @@ { "cell_type": "code", "execution_count": null, - "id": "137c8067", + "id": "cacbe3f2", "metadata": {}, "outputs": [], "source": [ @@ -361,7 +361,7 @@ }, { "cell_type": "markdown", - "id": "c0472257", + "id": "9a583b55", "metadata": {}, "source": [ "We can add a modifier to visualize the cell population while the\n", @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f5de7e3d", + "id": "a3b94fd4", "metadata": {}, "outputs": [], "source": [ @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "6f7f84f5", + "id": "24cfd4f0", "metadata": {}, "source": [ "Finally, to run the simulation we call the `Solve()` method.\n", @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25679f36", + "id": "999d3ede", "metadata": {}, "outputs": [], "source": [ @@ -403,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "db47e34e", + "id": "4651d7be", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -413,7 +413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16483d5f", + "id": "771dce57", "metadata": {}, "outputs": [], "source": [ @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "59e72e4b", + "id": "7a6e3571", "metadata": {}, "source": [ "### 2. Adding More Cells\n", @@ -431,7 +431,7 @@ }, { "cell_type": "markdown", - "id": "936209fc", + "id": "597b2076", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -443,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "497b08e0", + "id": "82631006", "metadata": {}, "outputs": [], "source": [ @@ -452,7 +452,7 @@ }, { "cell_type": "markdown", - "id": "70219074", + "id": "44b8e4c8", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -462,7 +462,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad7a725d", + "id": "364479a6", "metadata": {}, "outputs": [], "source": [ @@ -471,7 +471,7 @@ }, { "cell_type": "markdown", - "id": "6eab105a", + "id": "bddaf5cd", "metadata": {}, "source": [ "We can use the mesh generator to generate multiple cells. The first\n", @@ -486,7 +486,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d6110f34", + "id": "87a4a013", "metadata": {}, "outputs": [], "source": [ @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "4df5639f", + "id": "57262981", "metadata": {}, "source": [ "#### Laminas\n", @@ -526,7 +526,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a50c59d8", + "id": "648897cb", "metadata": {}, "outputs": [], "source": [ @@ -536,7 +536,7 @@ }, { "cell_type": "markdown", - "id": "bdaf78ca", + "id": "236d2143", "metadata": {}, "source": [ "Below, we generate the cells\n", @@ -546,7 +546,7 @@ { "cell_type": "code", "execution_count": null, - "id": "449bd44f", + "id": "45125d43", "metadata": {}, "outputs": [], "source": [ @@ -557,7 +557,7 @@ }, { "cell_type": "markdown", - "id": "8846c4d6", + "id": "46e58807", "metadata": {}, "source": [ "Then we set up the cell population with no active fluid sources\n", @@ -567,7 +567,7 @@ { "cell_type": "code", "execution_count": null, - "id": "535ac16a", + "id": "a1992a25", "metadata": {}, "outputs": [], "source": [ @@ -577,7 +577,7 @@ }, { "cell_type": "markdown", - "id": "cffc290b", + "id": "7d57c842", "metadata": {}, "source": [ "We can visualize the cell population below\n", @@ -587,7 +587,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94012f4a", + "id": "13f808a6", "metadata": {}, "outputs": [], "source": [ @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "880ed9aa", + "id": "d3c75fd4", "metadata": {}, "source": [ "Now we create a simulator to manage the simulation\n", @@ -609,7 +609,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24284940", + "id": "2f6f9712", "metadata": {}, "outputs": [], "source": [ @@ -620,7 +620,7 @@ }, { "cell_type": "markdown", - "id": "11497a9f", + "id": "03f27fa3", "metadata": {}, "source": [ "We add an immersed boundary simulation modifier to the simulator\n", @@ -630,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da1764c6", + "id": "efbbe815", "metadata": {}, "outputs": [], "source": [ @@ -640,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "46bffd78", + "id": "f3ccb3bb", "metadata": {}, "source": [ "We then add a force law to the simulation modifier to model the\n", @@ -651,7 +651,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f9cb8c89", + "id": "e23df1f2", "metadata": {}, "outputs": [], "source": [ @@ -662,7 +662,7 @@ }, { "cell_type": "markdown", - "id": "d8fcec8b", + "id": "f1407df1", "metadata": {}, "source": [ "#### Inter-cellular Interactions\n", @@ -678,7 +678,7 @@ { "cell_type": "code", "execution_count": null, - "id": "345ea70f", + "id": "87750739", "metadata": {}, "outputs": [], "source": [ @@ -689,7 +689,7 @@ }, { "cell_type": "markdown", - "id": "f4de7864", + "id": "5018a063", "metadata": {}, "source": [ "Next, we set the simulation properties\n", @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72c428ab", + "id": "c962ee02", "metadata": {}, "outputs": [], "source": [ @@ -712,7 +712,7 @@ }, { "cell_type": "markdown", - "id": "97b5b658", + "id": "b654e3d0", "metadata": {}, "source": [ "Finally, we run the simulation\n", @@ -722,7 +722,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a167204d", + "id": "4afd64a3", "metadata": {}, "outputs": [], "source": [ @@ -731,7 +731,7 @@ }, { "cell_type": "markdown", - "id": "dddbc94e", + "id": "ce85639b", "metadata": {}, "source": [ "We can visualize the end state of the cell population\n", @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6de9ce9", + "id": "82db0658", "metadata": {}, "outputs": [], "source": [ @@ -750,7 +750,7 @@ }, { "cell_type": "markdown", - "id": "a438961c", + "id": "1d965082", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -760,7 +760,7 @@ { "cell_type": "code", "execution_count": null, - "id": "86e9b33c", + "id": "cdab3f61", "metadata": {}, "outputs": [], "source": [ @@ -769,7 +769,7 @@ }, { "cell_type": "markdown", - "id": "2a5dc6f7", + "id": "54766d75", "metadata": {}, "source": [ "### 3. Adding Fluid Sources\n", @@ -780,7 +780,7 @@ }, { "cell_type": "markdown", - "id": "c08d4ce5", + "id": "a1979cc6", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", @@ -792,7 +792,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4c6e58ae", + "id": "0e090577", "metadata": {}, "outputs": [], "source": [ @@ -801,7 +801,7 @@ }, { "cell_type": "markdown", - "id": "45e59e32", + "id": "a10f4203", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -811,7 +811,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff59adf2", + "id": "9b1da1a3", "metadata": {}, "outputs": [], "source": [ @@ -820,7 +820,7 @@ }, { "cell_type": "markdown", - "id": "f08a3267", + "id": "f562d980", "metadata": {}, "source": [ "We begin by constructing a fluid source object:\n", @@ -830,7 +830,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15e927af", + "id": "c2479ccb", "metadata": {}, "outputs": [], "source": [ @@ -839,7 +839,7 @@ }, { "cell_type": "markdown", - "id": "fc9652e0", + "id": "a48de769", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -855,7 +855,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06cd35c3", + "id": "1d7f3d0f", "metadata": {}, "outputs": [], "source": [ @@ -868,7 +868,7 @@ }, { "cell_type": "markdown", - "id": "fd8038c3", + "id": "ecda58ad", "metadata": {}, "source": [ "We must associate the source with an element in the simulation\n", @@ -879,7 +879,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bca93f1f", + "id": "48333402", "metadata": {}, "outputs": [], "source": [ @@ -888,7 +888,7 @@ }, { "cell_type": "markdown", - "id": "e19686b8", + "id": "47b0686f", "metadata": {}, "source": [ "We now generate the cells\n", @@ -898,7 +898,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5aab6e98", + "id": "2448b7b9", "metadata": {}, "outputs": [], "source": [ @@ -909,12 +909,28 @@ }, { "cell_type": "markdown", - "id": "0f3a9b93", + "id": "4958df35", "metadata": {}, "source": [ "Then we set up the cell population\n", - "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)\n", - "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4d8dbfdc", + "metadata": {}, + "outputs": [], + "source": [ + "cell_population = ImmersedBoundaryCellPopulation2(mesh, cells)" + ] + }, + { + "cell_type": "markdown", + "id": "01e36810", + "metadata": {}, + "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", "\n" ] @@ -922,7 +938,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57cc7bcc", + "id": "99eb5f62", "metadata": {}, "outputs": [], "source": [ @@ -931,14 +947,13 @@ }, { "cell_type": "markdown", - "id": "45ad91af", + "id": "0136eba7", "metadata": {}, "source": [ - "#### Varying the Source Location\n", + "#### Varying the Source Location and Strength\n", " **Practice** You can experiment with the source location. Try moving it\n", " closer to and further away from the cells.\n", " \n", - "#### Varying the Source Strength\n", " **Practice** Try modifying the source strength to see what impact this\n", " has on the cell shapes.\n", " \n", @@ -949,7 +964,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c840945e", + "id": "6f1bcde7", "metadata": {}, "outputs": [], "source": [ @@ -961,7 +976,7 @@ }, { "cell_type": "markdown", - "id": "67861494", + "id": "95e357a1", "metadata": {}, "source": [ "Create a simulator to manage the simulation\n", @@ -971,7 +986,7 @@ { "cell_type": "code", "execution_count": null, - "id": "587db969", + "id": "7e051bf5", "metadata": {}, "outputs": [], "source": [ @@ -982,7 +997,7 @@ }, { "cell_type": "markdown", - "id": "338b22ef", + "id": "56177da1", "metadata": {}, "source": [ "Add an immersed boundary simulation modifier\n", @@ -992,7 +1007,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9563dc2e", + "id": "7970a544", "metadata": {}, "outputs": [], "source": [ @@ -1002,7 +1017,7 @@ }, { "cell_type": "markdown", - "id": "c28e28d4", + "id": "dbd869a3", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -1015,7 +1030,7 @@ { "cell_type": "code", "execution_count": null, - "id": "054df66a", + "id": "6e2d1952", "metadata": {}, "outputs": [], "source": [ @@ -1026,7 +1041,7 @@ }, { "cell_type": "markdown", - "id": "26278c92", + "id": "36497ffd", "metadata": {}, "source": [ "Add an inter-cellular force law\n", @@ -1036,7 +1051,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43304dfb", + "id": "dd64ce22", "metadata": {}, "outputs": [], "source": [ @@ -1047,7 +1062,7 @@ }, { "cell_type": "markdown", - "id": "6218903e", + "id": "adf49a4a", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -1055,14 +1070,14 @@ " use a unique index, and attach it to a different element as\n", " each element can only manage a single fluid source.\n", " \n", - "Set the simulation properties\n", + "Next, we set the simulation properties\n", "\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "bb66c283", + "id": "1acafdd1", "metadata": {}, "outputs": [], "source": [ @@ -1070,16 +1085,50 @@ "simulator.SetOutputDirectory(\"Python/TestImmersedBoundary_3\")\n", "simulator.SetDt(dt)\n", "simulator.SetSamplingTimestepMultiple(4)\n", - "simulator.SetEndTime(1000 * dt)\n", - "# Run the simulation\n", - "simulator.Solve()\n", - "# Visualize the end state\n", + "simulator.SetEndTime(300 * dt)" + ] + }, + { + "cell_type": "markdown", + "id": "c8dc46b0", + "metadata": {}, + "source": [ + "Finally, we run the simulation\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f3ab0dc7", + "metadata": {}, + "outputs": [], + "source": [ + "simulator.Solve()" + ] + }, + { + "cell_type": "markdown", + "id": "222c955f", + "metadata": {}, + "source": [ + "Then we visualize the end state\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cdc21f27", + "metadata": {}, + "outputs": [], + "source": [ "nb_manager.vtk_show(scene, height=300)" ] }, { "cell_type": "markdown", - "id": "3b9fe252", + "id": "98c9b1bd", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -1089,7 +1138,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efbf9530", + "id": "0834b0a5", "metadata": {}, "outputs": [], "source": [ @@ -1098,7 +1147,7 @@ }, { "cell_type": "markdown", - "id": "109da48b", + "id": "08208b55", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index 35c391a8..0ea25f4f 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -384,18 +384,18 @@ def test_fluid_source_immersed_boundary_simulation(self): cells = cell_generator.GenerateBasicRandom(mesh.GetNumElements(), cell_type) ## Then we set up the cell population + cell_population = ImmersedBoundaryCellPopulation2(mesh, cells) ## Finally, we must tell the cell population that fluid sources are present. cell_population.SetIfPopulationHasActiveSources(True) - ## #### Varying the Source Location + ## #### Varying the Source Location and Strength ## **Practice** You can experiment with the source location. Try moving it ## closer to and further away from the cells. ## - ## #### Varying the Source Strength ## **Practice** Try modifying the source strength to see what impact this ## has on the cell shapes. ## @@ -439,20 +439,20 @@ def test_fluid_source_immersed_boundary_simulation(self): ## each element can only manage a single fluid source. ## - ## Set the simulation properties + ## Next, we set the simulation properties dt = 0.05 simulator.SetOutputDirectory("Python/TestImmersedBoundary_3") simulator.SetDt(dt) simulator.SetSamplingTimestepMultiple(4) - simulator.SetEndTime(1000 * dt) + simulator.SetEndTime(300 * dt) - # Run the simulation + ## Finally, we run the simulation simulator.Solve() - # Visualize the end state - + ## Then we visualize the end state + nb_manager.vtk_show(scene, height=300) ## Reset the simulation environment in the notebook From 942b38aff6fd6d620ae77a81388582842caa131c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 11 Apr 2024 13:20:57 +0100 Subject: [PATCH 39/40] #62 Update immersed boundary tutorial --- .../TestImmersedBoundaryTutorial.ipynb | 221 ++++++++++-------- doc/tutorials/TestImmersedBoundaryTutorial.md | 8 +- ...stImmersedBoundaryTutorial.nbconvert.ipynb | 221 ++++++++++-------- .../tutorials/TestImmersedBoundaryTutorial.py | 3 +- 4 files changed, 245 insertions(+), 208 deletions(-) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb index 7585c8ab..ff696900 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "73a90130", + "id": "b3c54201", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4b0a5451", + "id": "95b3e89a", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "4a75e64e", + "id": "db9729f7", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ea333b2", + "id": "d4ced0c9", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "7e0d4d71", + "id": "1d01e102", "metadata": {}, "source": [ "### 1. Simple Immersed Boundary Simulations\n", @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "73334510", + "id": "d125a0f4", "metadata": {}, "source": [ "Setup the simulation environment in the notebook\n", @@ -109,7 +109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b6d5da0d", + "id": "18f22aa7", "metadata": {}, "outputs": [], "source": [ @@ -118,7 +118,7 @@ }, { "cell_type": "markdown", - "id": "bfb904a6", + "id": "87432256", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -128,7 +128,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90176201", + "id": "76644e4f", "metadata": {}, "outputs": [], "source": [ @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "bce1f6c3", + "id": "75801e10", "metadata": {}, "source": [ "Next, we define the necessary geometry by generating a mesh to\n", @@ -148,7 +148,7 @@ { "cell_type": "code", "execution_count": null, - "id": "aa41e578", + "id": "8e89d05a", "metadata": {}, "outputs": [], "source": [ @@ -158,7 +158,7 @@ }, { "cell_type": "markdown", - "id": "caafc20d", + "id": "9261fc02", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -179,7 +179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5cdc16dd", + "id": "12b402f7", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "06e6f635", + "id": "25a7c7ce", "metadata": {}, "source": [ "Next, we generate the cells. We specify a cell type and cell cycle model.\n", @@ -201,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ca5c826", + "id": "a47b2965", "metadata": {}, "outputs": [], "source": [ @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "d873942d", + "id": "95871cf1", "metadata": {}, "source": [ "Finally, we construct the cell population. We then specify whether the\n", @@ -224,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "725a462f", + "id": "b77dfade", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "b19f20f1", + "id": "f5455bd3", "metadata": {}, "source": [ "We can make a quick visualization of the cell population\n", @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05dc9cf1", + "id": "2666d89d", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "4bd9c640", + "id": "47130577", "metadata": {}, "source": [ "Next, we create an `OffLatticeSimulation` simulator to control the\n", @@ -268,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "690d637c", + "id": "18d58d09", "metadata": {}, "outputs": [], "source": [ @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "198e3155", + "id": "35c39a46", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -295,7 +295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0297a32f", + "id": "40ca1b17", "metadata": {}, "outputs": [], "source": [ @@ -305,7 +305,7 @@ }, { "cell_type": "markdown", - "id": "ee7065f2", + "id": "407d1312", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0bdcd1db", + "id": "2abeb8fa", "metadata": {}, "outputs": [], "source": [ @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "20126e0a", + "id": "b72986b8", "metadata": {}, "source": [ "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", @@ -348,7 +348,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cacbe3f2", + "id": "eda611ef", "metadata": {}, "outputs": [], "source": [ @@ -361,7 +361,7 @@ }, { "cell_type": "markdown", - "id": "9a583b55", + "id": "420805f1", "metadata": {}, "source": [ "We can add a modifier to visualize the cell population while the\n", @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3b94fd4", + "id": "b8e38213", "metadata": {}, "outputs": [], "source": [ @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "24cfd4f0", + "id": "be93eddd", "metadata": {}, "source": [ "Finally, to run the simulation we call the `Solve()` method.\n", @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "999d3ede", + "id": "9cc37872", "metadata": {}, "outputs": [], "source": [ @@ -403,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "4651d7be", + "id": "98429afa", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -413,7 +413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "771dce57", + "id": "26d8fe0c", "metadata": {}, "outputs": [], "source": [ @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "7a6e3571", + "id": "df554a43", "metadata": {}, "source": [ "### 2. Adding More Cells\n", @@ -431,7 +431,7 @@ }, { "cell_type": "markdown", - "id": "597b2076", + "id": "193fe3d3", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -443,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82631006", + "id": "90a33404", "metadata": {}, "outputs": [], "source": [ @@ -452,7 +452,7 @@ }, { "cell_type": "markdown", - "id": "44b8e4c8", + "id": "7e419495", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -462,7 +462,7 @@ { "cell_type": "code", "execution_count": null, - "id": "364479a6", + "id": "4ccfdfd8", "metadata": {}, "outputs": [], "source": [ @@ -471,7 +471,7 @@ }, { "cell_type": "markdown", - "id": "bddaf5cd", + "id": "fa6f8515", "metadata": {}, "source": [ "We can use the mesh generator to generate multiple cells. The first\n", @@ -486,7 +486,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87a4a013", + "id": "fffb1781", "metadata": {}, "outputs": [], "source": [ @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "57262981", + "id": "65fd54f6", "metadata": {}, "source": [ "#### Laminas\n", @@ -526,7 +526,7 @@ { "cell_type": "code", "execution_count": null, - "id": "648897cb", + "id": "3e9b9169", "metadata": {}, "outputs": [], "source": [ @@ -536,7 +536,7 @@ }, { "cell_type": "markdown", - "id": "236d2143", + "id": "28331b6d", "metadata": {}, "source": [ "Below, we generate the cells\n", @@ -546,7 +546,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45125d43", + "id": "34439832", "metadata": {}, "outputs": [], "source": [ @@ -557,7 +557,7 @@ }, { "cell_type": "markdown", - "id": "46e58807", + "id": "40d93acb", "metadata": {}, "source": [ "Then we set up the cell population with no active fluid sources\n", @@ -567,7 +567,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1992a25", + "id": "063c4b53", "metadata": {}, "outputs": [], "source": [ @@ -577,7 +577,7 @@ }, { "cell_type": "markdown", - "id": "7d57c842", + "id": "9f8b8f0b", "metadata": {}, "source": [ "We can visualize the cell population below\n", @@ -587,7 +587,7 @@ { "cell_type": "code", "execution_count": null, - "id": "13f808a6", + "id": "49250c88", "metadata": {}, "outputs": [], "source": [ @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "d3c75fd4", + "id": "01178b85", "metadata": {}, "source": [ "Now we create a simulator to manage the simulation\n", @@ -609,7 +609,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2f6f9712", + "id": "8355133c", "metadata": {}, "outputs": [], "source": [ @@ -620,7 +620,7 @@ }, { "cell_type": "markdown", - "id": "03f27fa3", + "id": "777207e1", "metadata": {}, "source": [ "We add an immersed boundary simulation modifier to the simulator\n", @@ -630,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efbbe815", + "id": "30f98d43", "metadata": {}, "outputs": [], "source": [ @@ -640,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "f3ccb3bb", + "id": "0ab33e58", "metadata": {}, "source": [ "We then add a force law to the simulation modifier to model the\n", @@ -651,7 +651,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e23df1f2", + "id": "00b7c052", "metadata": {}, "outputs": [], "source": [ @@ -662,7 +662,7 @@ }, { "cell_type": "markdown", - "id": "f1407df1", + "id": "76259032", "metadata": {}, "source": [ "#### Inter-cellular Interactions\n", @@ -678,7 +678,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87750739", + "id": "2b5bb62c", "metadata": {}, "outputs": [], "source": [ @@ -689,7 +689,7 @@ }, { "cell_type": "markdown", - "id": "5018a063", + "id": "ce3afc39", "metadata": {}, "source": [ "Next, we set the simulation properties\n", @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c962ee02", + "id": "cac23cdd", "metadata": {}, "outputs": [], "source": [ @@ -712,7 +712,7 @@ }, { "cell_type": "markdown", - "id": "b654e3d0", + "id": "7c62c0c7", "metadata": {}, "source": [ "Finally, we run the simulation\n", @@ -722,7 +722,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4afd64a3", + "id": "a7e99b90", "metadata": {}, "outputs": [], "source": [ @@ -731,7 +731,7 @@ }, { "cell_type": "markdown", - "id": "ce85639b", + "id": "c6c269d9", "metadata": {}, "source": [ "We can visualize the end state of the cell population\n", @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82db0658", + "id": "779bece1", "metadata": {}, "outputs": [], "source": [ @@ -750,7 +750,7 @@ }, { "cell_type": "markdown", - "id": "1d965082", + "id": "c6633ce1", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -760,7 +760,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cdab3f61", + "id": "4e02cc87", "metadata": {}, "outputs": [], "source": [ @@ -769,7 +769,7 @@ }, { "cell_type": "markdown", - "id": "54766d75", + "id": "8200177a", "metadata": {}, "source": [ "### 3. Adding Fluid Sources\n", @@ -780,7 +780,7 @@ }, { "cell_type": "markdown", - "id": "a1979cc6", + "id": "70aebcb0", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", @@ -792,7 +792,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e090577", + "id": "5a74249c", "metadata": {}, "outputs": [], "source": [ @@ -801,7 +801,7 @@ }, { "cell_type": "markdown", - "id": "a10f4203", + "id": "88128bc4", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -811,7 +811,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9b1da1a3", + "id": "b34d1d4b", "metadata": {}, "outputs": [], "source": [ @@ -820,7 +820,7 @@ }, { "cell_type": "markdown", - "id": "f562d980", + "id": "df7dbbb9", "metadata": {}, "source": [ "We begin by constructing a fluid source object:\n", @@ -830,7 +830,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c2479ccb", + "id": "391c5088", "metadata": {}, "outputs": [], "source": [ @@ -839,7 +839,7 @@ }, { "cell_type": "markdown", - "id": "a48de769", + "id": "89084277", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -855,12 +855,29 @@ { "cell_type": "code", "execution_count": null, - "id": "1d7f3d0f", + "id": "a918c5ed", + "metadata": {}, + "outputs": [], + "source": [ + "source.SetStrength(0.012)" + ] + }, + { + "cell_type": "markdown", + "id": "c67f0044", + "metadata": {}, + "source": [ + "Next, we create the mesh\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d287e73", "metadata": {}, "outputs": [], "source": [ - "source.SetStrength(0.012)\n", - "# Next, we create the mesh\n", "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)\n", "mesh = gen.GetMesh()\n", "mesh.SetNumGridPtsXAndY(64)" @@ -868,7 +885,7 @@ }, { "cell_type": "markdown", - "id": "ecda58ad", + "id": "492d0e56", "metadata": {}, "source": [ "We must associate the source with an element in the simulation\n", @@ -879,7 +896,7 @@ { "cell_type": "code", "execution_count": null, - "id": "48333402", + "id": "70629793", "metadata": {}, "outputs": [], "source": [ @@ -888,7 +905,7 @@ }, { "cell_type": "markdown", - "id": "47b0686f", + "id": "63261c91", "metadata": {}, "source": [ "We now generate the cells\n", @@ -898,7 +915,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2448b7b9", + "id": "0c826a2a", "metadata": {}, "outputs": [], "source": [ @@ -909,7 +926,7 @@ }, { "cell_type": "markdown", - "id": "4958df35", + "id": "b08e9d92", "metadata": {}, "source": [ "Then we set up the cell population\n", @@ -919,7 +936,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4d8dbfdc", + "id": "01ebb5a7", "metadata": {}, "outputs": [], "source": [ @@ -928,7 +945,7 @@ }, { "cell_type": "markdown", - "id": "01e36810", + "id": "0879cc2c", "metadata": {}, "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", @@ -938,7 +955,7 @@ { "cell_type": "code", "execution_count": null, - "id": "99eb5f62", + "id": "25aff911", "metadata": {}, "outputs": [], "source": [ @@ -947,7 +964,7 @@ }, { "cell_type": "markdown", - "id": "0136eba7", + "id": "1d73af5e", "metadata": {}, "source": [ "#### Varying the Source Location and Strength\n", @@ -964,7 +981,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f1bcde7", + "id": "5c8f1641", "metadata": {}, "outputs": [], "source": [ @@ -976,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "95e357a1", + "id": "41707707", "metadata": {}, "source": [ "Create a simulator to manage the simulation\n", @@ -986,7 +1003,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e051bf5", + "id": "e085e526", "metadata": {}, "outputs": [], "source": [ @@ -997,7 +1014,7 @@ }, { "cell_type": "markdown", - "id": "56177da1", + "id": "78258cd6", "metadata": {}, "source": [ "Add an immersed boundary simulation modifier\n", @@ -1007,7 +1024,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7970a544", + "id": "91ddd04d", "metadata": {}, "outputs": [], "source": [ @@ -1017,7 +1034,7 @@ }, { "cell_type": "markdown", - "id": "dbd869a3", + "id": "7209f61f", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -1030,7 +1047,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e2d1952", + "id": "2aa20b09", "metadata": {}, "outputs": [], "source": [ @@ -1041,7 +1058,7 @@ }, { "cell_type": "markdown", - "id": "36497ffd", + "id": "ce742c4b", "metadata": {}, "source": [ "Add an inter-cellular force law\n", @@ -1051,7 +1068,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd64ce22", + "id": "eb5dcc19", "metadata": {}, "outputs": [], "source": [ @@ -1062,7 +1079,7 @@ }, { "cell_type": "markdown", - "id": "adf49a4a", + "id": "9655bc31", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -1077,7 +1094,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1acafdd1", + "id": "57d2a340", "metadata": {}, "outputs": [], "source": [ @@ -1090,7 +1107,7 @@ }, { "cell_type": "markdown", - "id": "c8dc46b0", + "id": "089d64c4", "metadata": {}, "source": [ "Finally, we run the simulation\n", @@ -1100,7 +1117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f3ab0dc7", + "id": "82f4d62b", "metadata": {}, "outputs": [], "source": [ @@ -1109,7 +1126,7 @@ }, { "cell_type": "markdown", - "id": "222c955f", + "id": "9a1d7c20", "metadata": {}, "source": [ "Then we visualize the end state\n", @@ -1119,7 +1136,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cdc21f27", + "id": "50308e78", "metadata": {}, "outputs": [], "source": [ @@ -1128,7 +1145,7 @@ }, { "cell_type": "markdown", - "id": "98c9b1bd", + "id": "bac3a9c4", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -1138,7 +1155,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0834b0a5", + "id": "1f0547c5", "metadata": {}, "outputs": [], "source": [ @@ -1147,7 +1164,7 @@ }, { "cell_type": "markdown", - "id": "08208b55", + "id": "4c9225fe", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.md b/doc/tutorials/TestImmersedBoundaryTutorial.md index 517234e0..ab4ac2a0 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.md +++ b/doc/tutorials/TestImmersedBoundaryTutorial.md @@ -8,7 +8,7 @@ toc: true layout: "single" --- -This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [a17a4092](https://github.com/Chaste/PyChaste/commit/a17a4092069eaa64fe77e1e5d286ef0595ebc04f). +This tutorial is automatically generated from [TestImmersedBoundaryTutorial](https://github.com/Chaste/PyChaste/blob/develop/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py) at revision [1f56164c](https://github.com/Chaste/PyChaste/commit/1f56164c1cef48fadacfaf3312c8fc04801e180c). Note that the code is given in full at the bottom of the page. @@ -407,7 +407,10 @@ Having created the fluid source, we set its strength: ```python source.SetStrength(0.012) - # Next, we create the mesh +``` +Next, we create the mesh + +```python gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) @@ -682,7 +685,6 @@ class TestImmersedBoundaryTutorial(AbstractCellBasedTestSuite): source.SetStrength(0.012) - # Next, we create the mesh gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) diff --git a/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb b/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb index 7585c8ab..ff696900 100644 --- a/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb +++ b/doc/tutorials/TestImmersedBoundaryTutorial.nbconvert.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "73a90130", + "id": "b3c54201", "metadata": {}, "source": [ "This tutorial is automatically generated from the file /home/kwabena/repo/PyChaste/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py.\n", @@ -12,7 +12,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4b0a5451", + "id": "95b3e89a", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "markdown", - "id": "4a75e64e", + "id": "db9729f7", "metadata": {}, "source": [ "\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ea333b2", + "id": "d4ced0c9", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "7e0d4d71", + "id": "1d01e102", "metadata": {}, "source": [ "### 1. Simple Immersed Boundary Simulations\n", @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "73334510", + "id": "d125a0f4", "metadata": {}, "source": [ "Setup the simulation environment in the notebook\n", @@ -109,7 +109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b6d5da0d", + "id": "18f22aa7", "metadata": {}, "outputs": [], "source": [ @@ -118,7 +118,7 @@ }, { "cell_type": "markdown", - "id": "bfb904a6", + "id": "87432256", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -128,7 +128,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90176201", + "id": "76644e4f", "metadata": {}, "outputs": [], "source": [ @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "bce1f6c3", + "id": "75801e10", "metadata": {}, "source": [ "Next, we define the necessary geometry by generating a mesh to\n", @@ -148,7 +148,7 @@ { "cell_type": "code", "execution_count": null, - "id": "aa41e578", + "id": "8e89d05a", "metadata": {}, "outputs": [], "source": [ @@ -158,7 +158,7 @@ }, { "cell_type": "markdown", - "id": "caafc20d", + "id": "9261fc02", "metadata": {}, "source": [ "The first line of code defines an `ImmersedBoundaryPalisadeMeshGenerator`\n", @@ -179,7 +179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5cdc16dd", + "id": "12b402f7", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "06e6f635", + "id": "25a7c7ce", "metadata": {}, "source": [ "Next, we generate the cells. We specify a cell type and cell cycle model.\n", @@ -201,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ca5c826", + "id": "a47b2965", "metadata": {}, "outputs": [], "source": [ @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "d873942d", + "id": "95871cf1", "metadata": {}, "source": [ "Finally, we construct the cell population. We then specify whether the\n", @@ -224,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "725a462f", + "id": "b77dfade", "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "markdown", - "id": "b19f20f1", + "id": "f5455bd3", "metadata": {}, "source": [ "We can make a quick visualization of the cell population\n", @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05dc9cf1", + "id": "2666d89d", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "4bd9c640", + "id": "47130577", "metadata": {}, "source": [ "Next, we create an `OffLatticeSimulation` simulator to control the\n", @@ -268,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "690d637c", + "id": "18d58d09", "metadata": {}, "outputs": [], "source": [ @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "198e3155", + "id": "35c39a46", "metadata": {}, "source": [ "As we have an off-lattice simulation, we need a way to model the\n", @@ -295,7 +295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0297a32f", + "id": "40ca1b17", "metadata": {}, "outputs": [], "source": [ @@ -305,7 +305,7 @@ }, { "cell_type": "markdown", - "id": "ee7065f2", + "id": "407d1312", "metadata": {}, "source": [ "We must also provide the modifier with a force model to govern\n", @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0bdcd1db", + "id": "2abeb8fa", "metadata": {}, "outputs": [], "source": [ @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "20126e0a", + "id": "b72986b8", "metadata": {}, "source": [ "The `ImmersedBoundaryLinearMembraneForce` models forces between\n", @@ -348,7 +348,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cacbe3f2", + "id": "eda611ef", "metadata": {}, "outputs": [], "source": [ @@ -361,7 +361,7 @@ }, { "cell_type": "markdown", - "id": "9a583b55", + "id": "420805f1", "metadata": {}, "source": [ "We can add a modifier to visualize the cell population while the\n", @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3b94fd4", + "id": "b8e38213", "metadata": {}, "outputs": [], "source": [ @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "24cfd4f0", + "id": "be93eddd", "metadata": {}, "source": [ "Finally, to run the simulation we call the `Solve()` method.\n", @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "999d3ede", + "id": "9cc37872", "metadata": {}, "outputs": [], "source": [ @@ -403,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "4651d7be", + "id": "98429afa", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -413,7 +413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "771dce57", + "id": "26d8fe0c", "metadata": {}, "outputs": [], "source": [ @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "7a6e3571", + "id": "df554a43", "metadata": {}, "source": [ "### 2. Adding More Cells\n", @@ -431,7 +431,7 @@ }, { "cell_type": "markdown", - "id": "597b2076", + "id": "193fe3d3", "metadata": {}, "source": [ "#### Multiple Cells\n", @@ -443,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82631006", + "id": "90a33404", "metadata": {}, "outputs": [], "source": [ @@ -452,7 +452,7 @@ }, { "cell_type": "markdown", - "id": "44b8e4c8", + "id": "7e419495", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -462,7 +462,7 @@ { "cell_type": "code", "execution_count": null, - "id": "364479a6", + "id": "4ccfdfd8", "metadata": {}, "outputs": [], "source": [ @@ -471,7 +471,7 @@ }, { "cell_type": "markdown", - "id": "bddaf5cd", + "id": "fa6f8515", "metadata": {}, "source": [ "We can use the mesh generator to generate multiple cells. The first\n", @@ -486,7 +486,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87a4a013", + "id": "fffb1781", "metadata": {}, "outputs": [], "source": [ @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "57262981", + "id": "65fd54f6", "metadata": {}, "source": [ "#### Laminas\n", @@ -526,7 +526,7 @@ { "cell_type": "code", "execution_count": null, - "id": "648897cb", + "id": "3e9b9169", "metadata": {}, "outputs": [], "source": [ @@ -536,7 +536,7 @@ }, { "cell_type": "markdown", - "id": "236d2143", + "id": "28331b6d", "metadata": {}, "source": [ "Below, we generate the cells\n", @@ -546,7 +546,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45125d43", + "id": "34439832", "metadata": {}, "outputs": [], "source": [ @@ -557,7 +557,7 @@ }, { "cell_type": "markdown", - "id": "46e58807", + "id": "40d93acb", "metadata": {}, "source": [ "Then we set up the cell population with no active fluid sources\n", @@ -567,7 +567,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1992a25", + "id": "063c4b53", "metadata": {}, "outputs": [], "source": [ @@ -577,7 +577,7 @@ }, { "cell_type": "markdown", - "id": "7d57c842", + "id": "9f8b8f0b", "metadata": {}, "source": [ "We can visualize the cell population below\n", @@ -587,7 +587,7 @@ { "cell_type": "code", "execution_count": null, - "id": "13f808a6", + "id": "49250c88", "metadata": {}, "outputs": [], "source": [ @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "d3c75fd4", + "id": "01178b85", "metadata": {}, "source": [ "Now we create a simulator to manage the simulation\n", @@ -609,7 +609,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2f6f9712", + "id": "8355133c", "metadata": {}, "outputs": [], "source": [ @@ -620,7 +620,7 @@ }, { "cell_type": "markdown", - "id": "03f27fa3", + "id": "777207e1", "metadata": {}, "source": [ "We add an immersed boundary simulation modifier to the simulator\n", @@ -630,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efbbe815", + "id": "30f98d43", "metadata": {}, "outputs": [], "source": [ @@ -640,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "f3ccb3bb", + "id": "0ab33e58", "metadata": {}, "source": [ "We then add a force law to the simulation modifier to model the\n", @@ -651,7 +651,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e23df1f2", + "id": "00b7c052", "metadata": {}, "outputs": [], "source": [ @@ -662,7 +662,7 @@ }, { "cell_type": "markdown", - "id": "f1407df1", + "id": "76259032", "metadata": {}, "source": [ "#### Inter-cellular Interactions\n", @@ -678,7 +678,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87750739", + "id": "2b5bb62c", "metadata": {}, "outputs": [], "source": [ @@ -689,7 +689,7 @@ }, { "cell_type": "markdown", - "id": "5018a063", + "id": "ce3afc39", "metadata": {}, "source": [ "Next, we set the simulation properties\n", @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c962ee02", + "id": "cac23cdd", "metadata": {}, "outputs": [], "source": [ @@ -712,7 +712,7 @@ }, { "cell_type": "markdown", - "id": "b654e3d0", + "id": "7c62c0c7", "metadata": {}, "source": [ "Finally, we run the simulation\n", @@ -722,7 +722,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4afd64a3", + "id": "a7e99b90", "metadata": {}, "outputs": [], "source": [ @@ -731,7 +731,7 @@ }, { "cell_type": "markdown", - "id": "ce85639b", + "id": "c6c269d9", "metadata": {}, "source": [ "We can visualize the end state of the cell population\n", @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82db0658", + "id": "779bece1", "metadata": {}, "outputs": [], "source": [ @@ -750,7 +750,7 @@ }, { "cell_type": "markdown", - "id": "1d965082", + "id": "c6633ce1", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -760,7 +760,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cdab3f61", + "id": "4e02cc87", "metadata": {}, "outputs": [], "source": [ @@ -769,7 +769,7 @@ }, { "cell_type": "markdown", - "id": "54766d75", + "id": "8200177a", "metadata": {}, "source": [ "### 3. Adding Fluid Sources\n", @@ -780,7 +780,7 @@ }, { "cell_type": "markdown", - "id": "a1979cc6", + "id": "70aebcb0", "metadata": {}, "source": [ "#### Adding a Fluid Source\n", @@ -792,7 +792,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e090577", + "id": "5a74249c", "metadata": {}, "outputs": [], "source": [ @@ -801,7 +801,7 @@ }, { "cell_type": "markdown", - "id": "a10f4203", + "id": "88128bc4", "metadata": {}, "source": [ "Set the start time for the simulation\n", @@ -811,7 +811,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9b1da1a3", + "id": "b34d1d4b", "metadata": {}, "outputs": [], "source": [ @@ -820,7 +820,7 @@ }, { "cell_type": "markdown", - "id": "f562d980", + "id": "df7dbbb9", "metadata": {}, "source": [ "We begin by constructing a fluid source object:\n", @@ -830,7 +830,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c2479ccb", + "id": "391c5088", "metadata": {}, "outputs": [], "source": [ @@ -839,7 +839,7 @@ }, { "cell_type": "markdown", - "id": "a48de769", + "id": "89084277", "metadata": {}, "source": [ "This constructs a `FluidSource` object in 2 dimensions. The first\n", @@ -855,12 +855,29 @@ { "cell_type": "code", "execution_count": null, - "id": "1d7f3d0f", + "id": "a918c5ed", + "metadata": {}, + "outputs": [], + "source": [ + "source.SetStrength(0.012)" + ] + }, + { + "cell_type": "markdown", + "id": "c67f0044", + "metadata": {}, + "source": [ + "Next, we create the mesh\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d287e73", "metadata": {}, "outputs": [], "source": [ - "source.SetStrength(0.012)\n", - "# Next, we create the mesh\n", "gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False)\n", "mesh = gen.GetMesh()\n", "mesh.SetNumGridPtsXAndY(64)" @@ -868,7 +885,7 @@ }, { "cell_type": "markdown", - "id": "ecda58ad", + "id": "492d0e56", "metadata": {}, "source": [ "We must associate the source with an element in the simulation\n", @@ -879,7 +896,7 @@ { "cell_type": "code", "execution_count": null, - "id": "48333402", + "id": "70629793", "metadata": {}, "outputs": [], "source": [ @@ -888,7 +905,7 @@ }, { "cell_type": "markdown", - "id": "47b0686f", + "id": "63261c91", "metadata": {}, "source": [ "We now generate the cells\n", @@ -898,7 +915,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2448b7b9", + "id": "0c826a2a", "metadata": {}, "outputs": [], "source": [ @@ -909,7 +926,7 @@ }, { "cell_type": "markdown", - "id": "4958df35", + "id": "b08e9d92", "metadata": {}, "source": [ "Then we set up the cell population\n", @@ -919,7 +936,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4d8dbfdc", + "id": "01ebb5a7", "metadata": {}, "outputs": [], "source": [ @@ -928,7 +945,7 @@ }, { "cell_type": "markdown", - "id": "01e36810", + "id": "0879cc2c", "metadata": {}, "source": [ "Finally, we must tell the cell population that fluid sources are present.\n", @@ -938,7 +955,7 @@ { "cell_type": "code", "execution_count": null, - "id": "99eb5f62", + "id": "25aff911", "metadata": {}, "outputs": [], "source": [ @@ -947,7 +964,7 @@ }, { "cell_type": "markdown", - "id": "0136eba7", + "id": "1d73af5e", "metadata": {}, "source": [ "#### Varying the Source Location and Strength\n", @@ -964,7 +981,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f1bcde7", + "id": "5c8f1641", "metadata": {}, "outputs": [], "source": [ @@ -976,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "95e357a1", + "id": "41707707", "metadata": {}, "source": [ "Create a simulator to manage the simulation\n", @@ -986,7 +1003,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e051bf5", + "id": "e085e526", "metadata": {}, "outputs": [], "source": [ @@ -997,7 +1014,7 @@ }, { "cell_type": "markdown", - "id": "56177da1", + "id": "78258cd6", "metadata": {}, "source": [ "Add an immersed boundary simulation modifier\n", @@ -1007,7 +1024,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7970a544", + "id": "91ddd04d", "metadata": {}, "outputs": [], "source": [ @@ -1017,7 +1034,7 @@ }, { "cell_type": "markdown", - "id": "dbd869a3", + "id": "7209f61f", "metadata": {}, "source": [ "#### Fluid-Cell Interaction\n", @@ -1030,7 +1047,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e2d1952", + "id": "2aa20b09", "metadata": {}, "outputs": [], "source": [ @@ -1041,7 +1058,7 @@ }, { "cell_type": "markdown", - "id": "36497ffd", + "id": "ce742c4b", "metadata": {}, "source": [ "Add an inter-cellular force law\n", @@ -1051,7 +1068,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd64ce22", + "id": "eb5dcc19", "metadata": {}, "outputs": [], "source": [ @@ -1062,7 +1079,7 @@ }, { "cell_type": "markdown", - "id": "adf49a4a", + "id": "9655bc31", "metadata": {}, "source": [ "#### Adding More Sources\n", @@ -1077,7 +1094,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1acafdd1", + "id": "57d2a340", "metadata": {}, "outputs": [], "source": [ @@ -1090,7 +1107,7 @@ }, { "cell_type": "markdown", - "id": "c8dc46b0", + "id": "089d64c4", "metadata": {}, "source": [ "Finally, we run the simulation\n", @@ -1100,7 +1117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f3ab0dc7", + "id": "82f4d62b", "metadata": {}, "outputs": [], "source": [ @@ -1109,7 +1126,7 @@ }, { "cell_type": "markdown", - "id": "222c955f", + "id": "9a1d7c20", "metadata": {}, "source": [ "Then we visualize the end state\n", @@ -1119,7 +1136,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cdc21f27", + "id": "50308e78", "metadata": {}, "outputs": [], "source": [ @@ -1128,7 +1145,7 @@ }, { "cell_type": "markdown", - "id": "98c9b1bd", + "id": "bac3a9c4", "metadata": {}, "source": [ "Reset the simulation environment in the notebook\n", @@ -1138,7 +1155,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0834b0a5", + "id": "1f0547c5", "metadata": {}, "outputs": [], "source": [ @@ -1147,7 +1164,7 @@ }, { "cell_type": "markdown", - "id": "08208b55", + "id": "4c9225fe", "metadata": {}, "source": [ "#### Further Exercises\n", diff --git a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py index 0ea25f4f..0469e81a 100644 --- a/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py +++ b/test/python/cell_based/tutorials/TestImmersedBoundaryTutorial.py @@ -367,7 +367,8 @@ def test_fluid_source_immersed_boundary_simulation(self): source.SetStrength(0.012) - # Next, we create the mesh + ## Next, we create the mesh + gen = ImmersedBoundaryPalisadeMeshGenerator(5, 128, 0.1, 2.0, 0.0, False) mesh = gen.GetMesh() mesh.SetNumGridPtsXAndY(64) From 6b5643d74bd292ad31377874a2d6514c57f313e2 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 11 Apr 2024 13:37:49 +0100 Subject: [PATCH 40/40] #62 Add immersed boundary tutorial to tests --- test/ContinuousTestPack.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ContinuousTestPack.txt b/test/ContinuousTestPack.txt index 392698a0..7e6e9680 100644 --- a/test/ContinuousTestPack.txt +++ b/test/ContinuousTestPack.txt @@ -14,6 +14,7 @@ python/cell_based/TestCaBasedCellPopulationPython.py python/cell_based/TestMeshBasedCellPopulationPython.py python/cell_based/TestVertexBasedCellPopulationPython.py python/cell_based/TestNodeBasedCellPopulationPython.py +python/cell_based/tutorials/TestImmersedBoundaryTutorial.py python/cell_based/tutorials/TestMeshBasedCellSimulationsPythonTutorial.py python/cell_based/tutorials/TestNodeBasedCellSimulationsPythonTutorial.py python/cell_based/tutorials/TestPottsBasedCellSimulationsPythonTutorial.py