/*
 $Id: templates.cc,v 1.1.1.1 1996/10/02 10:35:45 roitzsch Exp $
 (C)opyright 1996 by Konrad-Zuse-Center, Berlin
 All rights reserved.
 Part of the Kaskade distribution
*/

#ifndef INCLUDE_TEMPLATE_DEFS

#include "dimension.h"

//-------------------------------------------------------------------------
#include "vector.h"
#include "vector.cc"
#include "stack.h"
#include "stack.cc"
#include "matrix.h"
#include "matrix.cc"
#include "array3.h"
#include "array3.cc"
//-------------------------------------------------------------------------
#include "alloc.h"
#include "alloc.cc"
//-------------------------------------------------------------------------
#include "dlist.h"
#include "dlist.cc"
#include "slist.h"
#include "slist.cc"
//-------------------------------------------------------------------------

#include "general.h"


#include "elementsA.h"
#include "connect.h"
#include "familyA.h"
#include "sysmatmlnodes.h"
#include "block.h"

// --  here only templates for pointers are generated:

class FEPlot;		// int
class PATCH;		// intA
class MLMatrix;		// intB
class TransferMatrix;	// intB
class SystemMatrix;	// precond

//-------------------------------------------------------------------------


    // --  	the rather general templates:
#ifndef __DECCXX                  // no DEC C++
class Vector<void*>;
class Vector<char>;
class Vector<char*>;
class Vector<short>;
class Vector<int>;
class Vector<float>;
class Vector<Real>;
class Vector<Num>;
class Vector<Num*>;
class Vector<Complex>;
class Vector<Vector<char>*>;

class Vector<Matrix<float>*>;

class Stack<void*>;
class Stack<char*>;
class Stack<int>;
class Stack<Real>;
class Stack<Num>;
class Stack<Complex>;

class Matrix<int>;
class Matrix<float>;
class Matrix<Real>;
class Matrix<Num>;
class Matrix<Complex>;
class Matrix<Vector<Num>*>;


class Array3<Real>;


    // --  	the more specific templates:

    // connect

class StaticAllocator<NeighbourNode>;
class Allocator<NeighbourNode>;
class Vector<NeighbourNode*>;
class Stack<NeighbourNode*>;
class SList<NeighbourNode>;
class Vector<SList<NeighbourNode>*>;

    // family

class Vector<Generation*>;
class Stack<Generation*>;

class Vector<Son*>;
class Stack<PointSon*>;
class Vector<PointSon*>;
class Stack<EdgeSon*>;
class Vector<EdgeSon*>;


class StaticAllocator<PointSon>;
class StaticAllocator<EdgeSon>;


    // int

class Vector<FEPlot*>;
class Stack<FEPlot*>;

    // intA

class Vector<PATCH*>;
class Stack<PATCH*>;

    // intB

class Vector<SystemMatrix*>;
class Stack<SystemMatrix*>;
class Vector<MLMatrix*>;
class Stack<MLMatrix*>;
class Vector<TransferMatrix*>;
class Stack<TransferMatrix*>;

    // intedge

class Matrix<PATCH*>;

    // materials

class Vector<Matrix<Real>*>;
class Vector<Vector<Real>*>;
 
    // pecond


class Stack<Vector<Num>*>;
class Stack<Vector<Real>*>;
class Stack<Vector<SBool>*>;

    // block, sysmatbl

class StaticAllocator<BlockNode>;
class Vector<BlockNode*>;
class Stack<BlockNode*>;

class StaticAllocator<NeighbourBlock>;
class Stack<NeighbourBlock*>;
class Vector<NeighbourBlock*>;

class StaticAllocator<AsymNeighbourBlock>;
class Vector<AsymNeighbourBlock*>;
class Stack<AsymNeighbourBlock*>;


    // sysmatmlnodes, sysmatml

// class Vector<MLMatrix*>;

class StaticAllocator<NodeNeighbour>;
class Vector<NodeNeighbour*>;
class Stack<NodeNeighbour*>;

class StaticAllocator<AsymNodeNeighbour>;
class Vector<AsymNodeNeighbour*>;
class Stack<AsymNodeNeighbour*>;


//-------------------------------------------------------------------------
//-------------------------------------------------------------------------

//	the implementations for the specific space dimensions:


//-------------------------------------------------------------------------
#include "triangtempl.h"
#include "triangtempl.cc"
//-------------------------------------------------------------------------

#if (DIMENSION == 1 || DIMENSION > 3)

#include "triang1.h"
#include "triang1tr.h"


class Vector<PT1*>;
class Stack<PT1*>;
class Vector<EDG1*>;
class Stack<EDG1*>;
class Vector<EDG1TR*>;
class Stack<EDG1TR*>;

class Vector<DList<PT1>*>;
class Vector<DList<EDG1>*>;
class Stack<DList<PT1>*>;
class Stack<DList<EDG1>*>;
    
class DList<PT1>;
class DList<EDG1>;

class DListIter<PT1>;
class DListIter<EDG1>;
    
class Allocator<PT1>;
class Allocator<EDG1>;
class Allocator<EDG1TR>;

class StaticAllocator<PT1>;
class StaticAllocator<EDG1>;
class StaticAllocator<EDG1TR>;

#endif
//-------------------------------------------------------------------------

#if (DIMENSION == 2 || DIMENSION > 3)

#include "triang2.h"
#include "triang2tr.h"


class Vector<PT2*>;
class Stack<PT2*>;
class Vector<EDG2*>;
class Stack<EDG2*>;
class Vector<TR2*>;
class Stack<TR2*>;
class Vector<TR2TR*>;
class Stack<TR2TR*>;

class Vector<Stack<EDG2*>*>;

class DList<PT2>;
class DList<EDG2>;
class DList<TR2>;

class Vector<DList<PT2>*>;
class Vector<DList<TR2>*>;
class Vector<DList<EDG2>*>;
class Stack<DList<PT2>*>;
class Stack<DList<TR2>*>;
class Stack<DList<EDG2>*>;
    
class DListIter<PT2>;
class DListIter<EDG2>;
class DListIter<TR2>;
 
class Allocator<PT2>;
class Allocator<EDG2>;
class Allocator<TR2>;
class Allocator<TR2TR>;

class StaticAllocator<PT2>;
class StaticAllocator<EDG2>;
class StaticAllocator<TR2>;
class StaticAllocator<TR2TR>;
    
#endif
//-------------------------------------------------------------------------

#if (DIMENSION == 3 || DIMENSION > 3)

#include "triang3.h"
#include "triang3tr.h"


//-------------------------------------------------------------------------
//-------------------------------------------------------------------------

class Allocator<PT3>;
class StaticAllocator<PT3>;
class Vector<PT3*>;
class Stack<PT3*>;
class DList<PT3>;
class DListIter<PT3>;
class Vector<DList<PT3>*>;
class Stack<DList<PT3>*>;

class Allocator<EDG3>;
class StaticAllocator<EDG3>;
class Vector<EDG3*>;
class Stack<EDG3*>;
class Vector<Stack<EDG3*>*>;
class DList<EDG3>;
class DListIter<EDG3>;
class Vector<DList<EDG3>*>;
class Stack<DList<EDG3>*>;

class StaticAllocator<TR3>;
class Stack<TR3*>;
class Vector<TR3*>;
class Vector<Stack<TR3*>*>;
class DList<TR3>;
class DListIter<TR3>;
class Vector<DList<TR3>*>;
class Stack<DList<TR3>*>;

class Allocator<TET3>;
class StaticAllocator<TET3>;
class Vector<TET3*>;
class Stack<TET3*>;
class DList<TET3>;
class DListIter<TET3>;
class Vector<DList<TET3>*>;
class Stack<DList<TET3>*>;

class Allocator<EFTET3>;
class StaticAllocator<EFTET3>;
class Vector<EFTET3*>;
class Stack<EFTET3*>;

class Allocator<TET3TR>;
class StaticAllocator<TET3TR>;
class Vector<TET3TR*>;
class Stack<TET3TR*>;

//-------------------------------------------------------------------------
//-------------------------------------------------------------------------

#endif
#else //  __DECCXX

#pragma define_template Vector<void*>
#pragma define_template Vector<char>
#pragma define_template Vector<char*>
#pragma define_template Vector<short>
#pragma define_template Vector<int>
#pragma define_template Vector<float>
#pragma define_template Vector<Real>
#pragma define_template Vector<Num>
#pragma define_template Vector<Num*>
#pragma define_template Vector<Complex>
#pragma define_template Vector<Vector<char>*>

#pragma define_template Vector<Matrix<float>*>

#pragma define_template Stack<void*>
#pragma define_template Stack<char*>
#pragma define_template Stack<int>
#pragma define_template Stack<Real>
#pragma define_template Stack<Num>
#pragma define_template Stack<Complex>

#pragma define_template Matrix<int>
#pragma define_template Matrix<float>
#pragma define_template Matrix<Real>
#pragma define_template Matrix<Num>
#pragma define_template Matrix<Complex>
#pragma define_template Matrix<Vector<Num>*>


#pragma define_template Array3<Real>


    // --       the more specific templates:

    // connect

#pragma define_template StaticAllocator<NeighbourNode>
#pragma define_template Allocator<NeighbourNode>
#pragma define_template Vector<NeighbourNode*>
#pragma define_template Stack<NeighbourNode*>
#pragma define_template SList<NeighbourNode>
#pragma define_template Vector<SList<NeighbourNode>*>

    // family

#pragma define_template Vector<Generation*>
#pragma define_template Stack<Generation*>

#pragma define_template Vector<Son*>
#pragma define_template Stack<PointSon*>
#pragma define_template Vector<PointSon*>
#pragma define_template Stack<EdgeSon*>
#pragma define_template Vector<EdgeSon*>


#pragma define_template StaticAllocator<PointSon>
#pragma define_template StaticAllocator<EdgeSon>


    // int

#pragma define_template Vector<FEPlot*>
#pragma define_template Stack<FEPlot*>

    // intA

#pragma define_template Vector<PATCH*>
#pragma define_template Stack<PATCH*>

    // intB

#pragma define_template Vector<SystemMatrix*>
#pragma define_template Stack<SystemMatrix*>
#pragma define_template Vector<MLMatrix*>
#pragma define_template Stack<MLMatrix*>
#pragma define_template Vector<TransferMatrix*>
#pragma define_template Stack<TransferMatrix*>

    // intedge

#pragma define_template Matrix<PATCH*>

    // materials

#pragma define_template Vector<Matrix<Real>*>
#pragma define_template Vector<Vector<Real>*>

    // pecond


#pragma define_template Stack<Vector<Num>*>
#pragma define_template Stack<Vector<Real>*>
#pragma define_template Stack<Vector<SBool>*>

    // block, sysmatbl

#pragma define_template StaticAllocator<BlockNode>
#pragma define_template Vector<BlockNode*>
#pragma define_template Stack<BlockNode*>

#pragma define_template StaticAllocator<NeighbourBlock>
#pragma define_template Stack<NeighbourBlock*>
#pragma define_template Vector<NeighbourBlock*>

#pragma define_template StaticAllocator<AsymNeighbourBlock>
#pragma define_template Vector<AsymNeighbourBlock*>
#pragma define_template Stack<AsymNeighbourBlock*>


    // sysmatmlnodes, sysmatml

// #pragma define_template Vector<MLMatrix*>

#pragma define_template StaticAllocator<NodeNeighbour>
#pragma define_template Vector<NodeNeighbour*>
#pragma define_template Stack<NodeNeighbour*>

#pragma define_template StaticAllocator<AsymNodeNeighbour>
#pragma define_template Vector<AsymNodeNeighbour*>
#pragma define_template Stack<AsymNodeNeighbour*>


//-------------------------------------------------------------------------
//-------------------------------------------------------------------------

//      the implementations for the specific space dimensions:


//-------------------------------------------------------------------------
#include "triangtempl.h"
#include "triangtempl.cc"
//-------------------------------------------------------------------------

#if (DIMENSION == 1 || DIMENSION > 3)

#include "triang1.h"
#include "triang1tr.h"


#pragma define_template Vector<PT1*>
#pragma define_template Stack<PT1*>
#pragma define_template Vector<EDG1*>
#pragma define_template Stack<EDG1*>
#pragma define_template Vector<EDG1TR*>
#pragma define_template Stack<EDG1TR*>

#pragma define_template Vector<DList<PT1>*>
#pragma define_template Vector<DList<EDG1>*>
#pragma define_template Stack<DList<PT1>*>
#pragma define_template Stack<DList<EDG1>*>

#pragma define_template DList<PT1>
#pragma define_template DList<EDG1>

#pragma define_template DListIter<PT1>
#pragma define_template DListIter<EDG1>

#pragma define_template Allocator<PT1>
#pragma define_template Allocator<EDG1>
#pragma define_template Allocator<EDG1TR>

#pragma define_template StaticAllocator<PT1>
#pragma define_template StaticAllocator<EDG1>
#pragma define_template StaticAllocator<EDG1TR>

#endif
//-------------------------------------------------------------------------

#if (DIMENSION == 2 || DIMENSION > 3)

#include "triang2.h"
#include "triang2tr.h"


#pragma define_template Vector<PT2*>
#pragma define_template Stack<PT2*>
#pragma define_template Vector<EDG2*>
#pragma define_template Stack<EDG2*>
#pragma define_template Vector<TR2*>
#pragma define_template Stack<TR2*>
#pragma define_template Vector<TR2TR*>
#pragma define_template Stack<TR2TR*>

#pragma define_template Vector<Stack<EDG2*>*>

#pragma define_template DList<PT2>
#pragma define_template DList<EDG2>
#pragma define_template DList<TR2>

#pragma define_template Vector<DList<PT2>*>
#pragma define_template Vector<DList<TR2>*>
#pragma define_template Vector<DList<EDG2>*>
#pragma define_template Stack<DList<PT2>*>
#pragma define_template Stack<DList<TR2>*>
#pragma define_template Stack<DList<EDG2>*>

#pragma define_template DListIter<PT2>
#pragma define_template DListIter<EDG2>
#pragma define_template DListIter<TR2>

#pragma define_template Allocator<PT2>
#pragma define_template Allocator<EDG2>
#pragma define_template Allocator<TR2>
#pragma define_template Allocator<TR2TR>

#pragma define_template StaticAllocator<PT2>
#pragma define_template StaticAllocator<EDG2>
#pragma define_template StaticAllocator<TR2>
#pragma define_template StaticAllocator<TR2TR>

#endif
//-------------------------------------------------------------------------

#if (DIMENSION == 3 || DIMENSION > 3)

#include "triang3.h"
#include "triang3tr.h"


//-------------------------------------------------------------------------
//-------------------------------------------------------------------------

#pragma define_template Allocator<PT3>
#pragma define_template StaticAllocator<PT3>
#pragma define_template Vector<PT3*>
#pragma define_template Stack<PT3*>
#pragma define_template DList<PT3>
#pragma define_template DListIter<PT3>
#pragma define_template Vector<DList<PT3>*>
#pragma define_template Stack<DList<PT3>*>

#pragma define_template Allocator<EDG3>
#pragma define_template StaticAllocator<EDG3>
#pragma define_template Vector<EDG3*>
#pragma define_template Stack<EDG3*>
#pragma define_template Vector<Stack<EDG3*>*>
#pragma define_template DList<EDG3>
#pragma define_template DListIter<EDG3>
#pragma define_template Vector<DList<EDG3>*>
#pragma define_template Stack<DList<EDG3>*>

#pragma define_template StaticAllocator<TR3>
#pragma define_template Stack<TR3*>
#pragma define_template Vector<TR3*>
#pragma define_template Vector<Stack<TR3*>*>
#pragma define_template DList<TR3>
#pragma define_template DListIter<TR3>
#pragma define_template Vector<DList<TR3>*>
#pragma define_template Stack<DList<TR3>*>

#pragma define_template Allocator<TET3>
#pragma define_template StaticAllocator<TET3>
#pragma define_template Vector<TET3*>
#pragma define_template Stack<TET3*>
#pragma define_template DList<TET3>
#pragma define_template DListIter<TET3>
#pragma define_template Vector<DList<TET3>*>
#pragma define_template Stack<DList<TET3>*>

#pragma define_template Allocator<EFTET3>
#pragma define_template StaticAllocator<EFTET3>
#pragma define_template Vector<EFTET3*>
#pragma define_template Stack<EFTET3*>

#pragma define_template Allocator<TET3TR>
#pragma define_template StaticAllocator<TET3TR>
#pragma define_template Vector<TET3TR*>
#pragma define_template Stack<TET3TR*>
#endif
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
#endif

#endif


