diff --git a/homework4/README.md b/homework4/README.md index ddee533..9a62b34 100644 --- a/homework4/README.md +++ b/homework4/README.md @@ -1,38 +1,42 @@ # Python Wrapper for Particles Code (SP4E 2018, Homework 4)
Authors: Sajjad Azimi, Alessia Ferraro ## Description The goal of this project is to create a Python wrapper for the C++ Particles code using the library Pybind11. ### 1. Factory Interface A new member is added to the material points factory which is a function called createComputes. This function which is set by defalut in the constructor is responsible for creating and setting all the computes that should be added to system evolution. If the first createSimulation is called the function member does not change and a defalut compute will be added to the system evolution by this function. BUT if the second createSimulation which takes a function as an argument is called, createComputes will be replaced by the given function. The advantage of this property is that this function can be anything that is provided by the user and can add any computes that the user wants to the system. ### 2. Compute Class A python binding for the Compute and ComputeTemperature classes is implemented. +Since Compute type objects are added to SystemEvolution as shared pointers, the holder type of the binding generator has +been changend to `std::shared_ptr< >` to ensure that the references of Compute objects are correctly managed by the binding. + In the main.py some of the private members of the class ComputeTemperature are exposed (Conductivity, Capacity, Density, L, Deltat). This is made possible by using in the binding the `class::def_property( )` method that creates a sort of "interface" that calls the getter and the setter functions necessary to access those members. To do so the setter methods (setConductivity, setCapacity ...) were implemented in the ComputeTemperature class. ### 3. Other Classes +According to the `main.py` structure the binding for the System, SystemEvolution and for the CsvWriter classes were implemented. ### Workflow The work was divided between the two authors as follows: * Alessia Ferraro: Implementation of the bindings for the Compute and the ComputeTemperature classes and related functions and README file. * Sajjad Azimi: Implementation of the bindings for the factory interface classes, for the CreateSimulation function and for the other related classes.
diff --git a/homework4/starting_point/.idea/workspace.xml b/homework4/starting_point/.idea/workspace.xml index af71b1b..622ec16 100644 --- a/homework4/starting_point/.idea/workspace.xml +++ b/homework4/starting_point/.idea/workspace.xml @@ -1,660 +1,625 @@ + - - + - - + + - + - - + + - + - - + + - + - + - - + + true DEFINITION_ORDER - +