1D Cross Sections

Cross Section Data consist of three objects, shown below along with the header files in which the objects are declared. The toplevel definition of all data sets is in dataset.h

( For Contours see 1D Contours )

The biggest difference between 1D Data Sets and 2D Data Sets is that the 1D Data Sets only have Geometry points and these points have the solution values. In 2D Data Sets there may typically be a Geometry and a Mesh but it will be the mesh points which have the solution values.

The 1D Cross Section Objects are created when the user selects a cross section point using the option Create 1D Cross Section under the File menu. Then the following happens.

The algorithm first loops through every element and calculates how many of the elements intersect with the line defined by the user. Once the number of intersections is known, space is allocated for an appropriate number of new points, edges and solutions.

The the process repeats, finding the intersection points and interpolating new solution values. This is done in the function x_intersect. All of the new points, edges, point types and solutions are put into local arrays and are then passed into functions that build the Cross Section Data Objects

The coordinates are swapped during this process so that the depth of the material can be plotted along the x-axis. At the same time it records the maximum depth value. Using the maximum depth value the algorithm further transforms the data so that the maximum depth appears at the far right, instead of the far left of the x-axis.

The objects are then built from the local arrays. First space is allocated.

These functions just allocate space. Then the Geometry Point List and the Geometry Edge List are filled in with valuable data.

The solution lists are also filled in with valuable data. Note: the Fill1DMeshSolutionLists function will fill in the names and properties of the solutions in the Mesh Category of the IPlot Data Set, but the actual solution values will be held by the points in the Geometry Point List since there is no Mesh Point List This is done one solution at a time.

Then we set the ContourPlot flags to be on, only for solutions who are of type log10. (This is set in the GetParameters functions in dataset.c based on the name of the solution - all concentrations will be set to log10 type) All Contours are set to be computed.

Then we set the material types of the points. The types were also returned during the call to x_intersect described above. During this time we also count the number of different materials.

Each different material will represent a region in the 1D Data Set and a Region Object must be created for each. Note: The number of regions in the 2D parent data set may be greater than the resulting number of regions in the 1D data set. The reason I rebuild the region information based solely on number of different materials is so that only regions that the cross section passes through will be listed. It is possible, however, for one material to be present non-contiguously but still only listed once - which does not happen in the 2D case.

Finally the regions are created (space allocated) and are filled in with data. All boundary information is left empty as it is not needed.


IPlot Home Page Technical Doc's User's Guide
IPlot and its accompanying WWW pages were written by Gene McKenna
a member of Stanford University's famous TCAD Group