diff --git a/homework4/README.md b/homework4/README.md index 43d310b..ddee533 100644 --- a/homework4/README.md +++ b/homework4/README.md @@ -1,8 +1,38 @@ -# Python wrapper +# Python Wrapper for Particles Code (SP4E 2018, Homework 4)
Authors: Sajjad Azimi, Alessia Ferraro -Answer to 1.2: -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. - + +## 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. + +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 + + +### 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. +