Giter VIP home page Giter VIP logo

Comments (9)

kwabenantim avatar kwabenantim commented on June 22, 2024

New classes to wrap

See Chaste/Chaste#104:

  • BiasedBernoulliTrialCellCycleModel
  • SlidingBoundaryCondition
  • VonMisesVertexBasedDivisionRule
  • ConstantTargetAreaModifier
  • DivisionBiasTrackingModifier
  • LabelDependentBernoulliTrialCellCycleModel
  • PlanarPolarisedFarhadifarForce
  • ExtrinsicPullModifier

See Chaste/Chaste#56:

  • AlwaysDivideCellCycleModel
  • CellEdgeData
  • CellSrnModel
  • DeltaNotchEdgeSrnModel
  • DeltaNotchInteriorSrnModel
  • DeltaNotchEdgeOdeSystem
  • DeltaNotchInteriorOdeSystem
  • VertexBasedPopulationSrn
  • DeltaNotchEdgeInteriorTrackingModifier
  • Edge
  • EdgeHelper
  • EdgeOperation

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

CPPWG Error Description

Unable to find declaration Clazz< 2, 2 >

Error Message

Traceback (most recent call last):
  File "~/Chaste/projects/PyChaste/dynamic/wrapper_generators/generate.py", line 55, in <module>
    generator.generate_wrapper()
  File "~/cppwg/cppwg/generators.py", line 200, in generate_wrapper
    module_writer.write()
  File "~/cppwg/cppwg/writers/module_writer.py", line 112, in write
    class_decl = self.source_ns.class_(fullName.replace(" ",""))
  File "~/.local/lib/python3.10/site-packages/pygccxml/declarations/scopedef.py", line 546, in class_
    self._find_single(
  File "~/.local/lib/python3.10/site-packages/pygccxml/declarations/scopedef.py", line 464, in _find_single
    found = matcher.get_single(decl_matcher, decls, False)
  File "~/.local/lib/python3.10/site-packages/pygccxml/declarations/scopedef.py", line 90, in get_single
    raise runtime_errors.declaration_not_found_t(decl_matcher)
pygccxml.declarations.runtime_errors.declaration_not_found_t: Unable to find declaration. Matcher: [(decl type==class_t) and (name==AbstractCellBasedSimulationModifier< 2, 2 >)]
make[3]: *** [projects/PyChaste/CMakeFiles/project_PyChaste_Python_Bindings.dir/build.make:70: project_PyChaste_Python_Bindings] Error 1
make[2]: *** [CMakeFiles/Makefile2:21607: projects/PyChaste/CMakeFiles/project_PyChaste_Python_Bindings.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:21614: projects/PyChaste/CMakeFiles/project_PyChaste_Python_Bindings.dir/rule] Error 2
make: *** [Makefile:8103: project_PyChaste_Python_Bindings] Error 2

Affected Classes

AbstractLinearPde
AbstractLinearParabolicPde
RandomDirectionCentreBasedDivisionRule
FixedCentreBasedDivisionRule
AbstractCentreBasedDivisionRule
GeneralisedLinearSpringForce
DifferentialAdhesionGeneralisedLinearSpringForce
AbstractCellPopulationBoundaryCondition
PlaneBoundaryCondition
AttractingPlaneBoundaryCondition
AbstractCellPopulation
AbstractOffLatticeCellPopulation
AbstractCentreBasedCellPopulation
MeshBasedCellPopulation
OffLatticeSimulation
AbstractForce
AbstractTwoBodyInteractionForce
AbstractCellBasedSimulationModifier

Fix
The investigation continues on cppwg/issues/1

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

CPPWG Error Description

Unable to find declaration Clazz

Error Message

Traceback (most recent call last):
  File "~/Chaste/projects/PyChaste/dynamic/wrapper_generators/generate.py", line 55, in <module>
    generator.generate_wrapper()
  File "~/cppwg/cppwg/generators.py", line 200, in generate_wrapper
    module_writer.write()
  File "~/cppwg/cppwg/writers/module_writer.py", line 112, in write
    class_decl = self.source_ns.class_(fullName.replace(" ",""))
  File "~/.local/lib/python3.10/site-packages/pygccxml/declarations/scopedef.py", line 546, in class_
    self._find_single(
  File "~/.local/lib/python3.10/site-packages/pygccxml/declarations/scopedef.py", line 464, in _find_single
    found = matcher.get_single(decl_matcher, decls, False)
  File "~/.local/lib/python3.10/site-packages/pygccxml/declarations/scopedef.py", line 90, in get_single
    raise runtime_errors.declaration_not_found_t(decl_matcher)
pygccxml.declarations.runtime_errors.declaration_not_found_t: Unable to find declaration. Matcher: [(decl type==class_t) and (name==EdgeHelper)]
make[3]: *** [projects/PyChaste/CMakeFiles/project_PyChaste_Python_Bindings.dir/build.make:70: project_PyChaste_Python_Bindings] Error 1
make[2]: *** [CMakeFiles/Makefile2:21607: projects/PyChaste/CMakeFiles/project_PyChaste_Python_Bindings.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:21614: projects/PyChaste/CMakeFiles/project_PyChaste_Python_Bindings.dir/rule] Error 2
make: *** [Makefile:8103: project_PyChaste_Python_Bindings] Error 2

Affected Classes

CellwiseOdeSystemInformation
CellCycleModelOdeSolver
EdgeHelper

Fix
The investigation continues on cppwg/issues/1

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Continuing Wrapper Creation Strategy

  • Generate wrappers that can be generated with CPPWG
  • Manually add remaining wrappers
  • Fix Unable to find declaration errors (cppwg/issues/1) later.

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Error: "Already Registered"

import chaste.mesh
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/tmp/ipykernel_49991/3595748004.py in <module>
----> 1 import chaste.mesh

~/Chaste/build/projects/PyChaste/python/chaste/mesh/__init__.py in <module>
     41 warnings.filterwarnings("ignore")
     42 
---> 43 from chaste.mesh._chaste_project_PyChaste_mesh import *

ImportError: generic_type: type "ChastePoint2" is already registered!

Fix

  • It's not clear why we have this error. ChastePoint2 is registered only once in the codebase. However, this fixes it:
py::class_<ChastePoint2  ...  >(m, "ChastePoint2", py::module_local())
  • Root cause was order of registrations. Resolved by correcting order and removing duplicate registrations by other modules. py::module_local() not necessary.

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Error: "could not convert default argument"

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/Chaste/build/projects/PyChaste/python/chaste/cell_based/__init__.py", line 40, in <module>
    from chaste.cell_based._chaste_project_PyChaste_cell_based import *
ImportError: arg(): could not convert default argument 'pMeshCuboid: boost::shared_ptr<ChasteCuboid<2u> >' in method '<class 'chaste.cell_based._chaste_project_PyChaste_cell_based.EllipticBoxDomainPdeModifier2'>.__init__' into a Python object (type not registered yet?)

Fix

  • Wrap ChasteCuboid

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Excluded Classes (All Now Included)

  • Alarcon2004OxygenBasedCellCycleModel
  • EllipticBoxDomainPdeModifier
  • ParabolicBoxDomainPdeModifier
  • RandomCaSwitchingUpdateRule
  • TysonNovakCellCycleModel

Excluded Methods

  • Cylindrical2dNodesOnlyMesh::SetUpBoxCollection (unit_vector argument)
  • PeriodicNodesOnlyMesh::SetUpBoxCollection (zero_vector argument)
  • TysonNovak2001OdeSystem::AnalyticJacobian (double ** argument)
  • VertexMesh::GetEdgeHelper (EdgeHelper is not constructible)

To Add Manually

  • CylindricalHoneycombMeshGenerator
  • ToroidalHoneycombMeshGenerator
  • ToroidalHoneycombVertexMeshGenerator
  • VoronoiVertexMeshGenerator
  • ChasteCuboid

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Missing Parent Classes is some wrappers
See cppwg/5

Fix
Add parent classes in all wrappers where they are missing.

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Conda Build Issues
gcc 11.4.0 from conda has trouble with:

mEdges.push_back(std::make_unique<Edge<SPACE_DIM>> (mEdges.size(), nodeA, nodeB));

Error

Edge<SPACE_DIM>* EdgeHelper<SPACE_DIM>::GetEdgeFromNodes(Node<SPACE_DIM>*, Node<SPACE_DIM>*)':
/home/conda/feedstock_root/build_artifacts/chaste_1686921952219/work/mesh/src/common/EdgeHelper.cpp:49:31: error: 'make_unique' is not a member of 'std'
   49 |         mEdges.push_back(std::make_unique<Edge<SPACE_DIM>> (mEdges.size(), nodeA, nodeB));
      |                               ^~~~~~~~~~~
/home/conda/feedstock_root/build_artifacts/chaste_1686921952219/work/mesh/src/common/EdgeHelper.cpp:49:31: note: 'std::make_unique' is only available from C++14 onwards
/home/conda/feedstock_root/build_artifacts/chaste_1686921952219/work/mesh/src/common/EdgeHelper.cpp:49:57: error: expected primary-expression before '>' token
   49 |         mEdges.push_back(std::make_unique<Edge<SPACE_DIM>> (mEdges.size(), nodeA, nodeB));

However, this compiles fine with gcc 11.3.0 on Ubuntu 22.04

Temporary Workaround

mEdges.push_back(std::unique_ptr<Edge<SPACE_DIM>> (new Edge<SPACE_DIM>{mEdges.size(), nodeA, nodeB}));

from pychaste.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.