3.3. 3.3 Communicating Sequential Elements

The Communicating Sequential Elements pattern is a domain parallelism pattern in which each component performs the same operations on different pieces of data. Operations in each component depend on partial results in neighbor components. This pattern is normally conceived as a logical structure that reflects the particular order of the data present in the problem [OR98] [Ort00].

3.3.1. Example: Heat Equation

Heat is a level of energy present in any physical body, perceptible by its temperature. However, even though an average temperature can be measured, in general heat is not evenly distributed throughout the body. Observing more carefully, it is noticeable that in different parts of the body it is possible to find different temperatures, and hence different levels of heat. Moreover, these different temperatures vary through time, tending to increase or decrease depending on the interchange of heat between parts of the body. Thus different parts of the body show different temperatures, determining a particular heat distribution at different times.

In physical and engineering areas, this distribution of heat is particularly important in determining particular thermal properties of materials. The main objective is to obtain a proper representation of the values of the variables as they change through time, to allow scientists and engineers to analyze such thermal properties efficiently. The difficulty of this problem lies in the time ...

Get Patterns for Parallel Software Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.