/*
 $Id: templates.cc,v 1.5 1996/11/19 13:57:47 roitzsch Exp $
 (C)opyright 1996 by Konrad-Zuse-Center, Berlin
 All rights reserved.
 Part of the Kaskade distribution
*/

#include "dimension.h"

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

#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++
template class Vector<void*>;
template class Vector<char>;
template class Vector<char*>;
template class Vector<short>;
template class Vector<int>;
template class Vector<float>;
template class Vector<double>;
//template class Vector<Real>;
//template class Vector<Num>;
template class Vector<Num*>;
template class Vector<Complex>;
template class Vector<Vector<char>*>;

template class Vector<Matrix<float>*>;

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

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


template class Array3<Real>;


    // --  	the more specific templates:

    // connect

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

    // family

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

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


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


    // int

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

    // intA

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

    // intB

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

    // intedge

template class Matrix<PATCH*>;

    // materials

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


template class Stack<Vector<double>*>;
//template class Stack<Vector<Num>*>;
//template class Stack<Vector<Real>*>;
template class Stack<Vector<SBool>*>;

    // block, sysmatbl

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

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

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


    // sysmatmlnodes, sysmatml

// template class Vector<MLMatrix*>;

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

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


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

//	the implementations for the specific space dimensions:


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


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

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


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

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

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

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

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

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

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


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

template class Vector<Stack<EDG2*>*>;

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

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

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

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

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


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

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

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

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

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

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

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

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

#endif

template class Vector<PT*>;
template class Vector<EDG*>;

#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.c"
//-------------------------------------------------------------------------

#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
