FreePOOMA  2.4.1
Classes
DomainTraits.Grid.h File Reference

DomainTraits<Grid<N>> is a specialization of the general DomainTraits class, for the case of Grid domain objects. More...

#include "Domain/DomainTraits.h"
#include "Domain/IndirectionList.h"
Include dependency graph for DomainTraits.Grid.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  DomainTraits< Grid< Dim > >
 DomainTraits<Grid<Dim>>: The specialization of DomainTraits for Grid, for dimensions greater than one. More...
struct  DomainTraits< Grid< 1 > >
 DomainTraits<Grid<1>>: The specialization of DomainTraits for Grid, for dimension == 1. More...
struct  DomainChangeDim< Grid< Dim1 >, Dim2 >
 DomainChangeDim<T, int> is used to convert from a domain of one dimension to another dimension (the second template parameter). More...

Detailed Description

DomainTraits<Grid<N>> is a specialization of the general DomainTraits class, for the case of Grid domain objects.

It defines the general behavior of Grid, including its typedef and static data characteristics, how to store data for a Grid, etc. It is used by the Domain base class of Grid to implement most of the public interface.

DomainTraits<Grid<Dim>> stores the characteristics and much of the implementation details for Grid domain objects. A Grid represents a sequence of numbers [a0, a1, ... aN] for each dimension; the numbers a0 ... aN can be any list, as long as they are sorted in ascending or descending order. Data is stored internally for each dimension using an IndirectionList<int>, and the total domain is the tensor product of the 1D lists.

A general version of DomainTraits<Grid<Dim>> is defined here, which only includes the basic information to make Grid<Dim> look like an array of Grid<1> objects. DomainTraits<Grid<1>> is a more specific specialization which provides most of the necessary interface information for items which need to know about Grid. Since most of the interface for a domain object is only available for 1D versions of that domain object, the Grid<1> specialization defines more interface functions than the Grid<Dim> case.