1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 /** \defgroup std The Standard Domain
4  * \ingroup dom
5  */
6 /*! \file std_domain.h
7  * \ingroup std
8  */
9 
10 /** \addtogroup std
11  *
12  * @{
13  */
14 
15 /****************************************************************************/
16 /*                                                                          */
17 /* File:      std_domain.h                                                  */
18 /*                                                                          */
19 /* Purpose:   standard domain declaration                                   */
20 /*                                                                          */
21 /* Author:    Peter Bastian/Klaus Johannsen                                 */
22 /*            Institut fuer Computeranwendungen III                         */
23 /*            Universitaet Stuttgart                                        */
24 /*            Pfaffenwaldring 27                                            */
25 /*            70550 Stuttgart                                               */
26 /*            email: ug@ica3.uni-stuttgart.de                               */
27 /*                                                                          */
28 /* History:   29.01.92 begin, ug version 2.0                                */
29 /*                                                                          */
30 /* Remarks:                                                                 */
31 /*                                                                          */
32 /****************************************************************************/
33 
34 
35 /****************************************************************************/
36 /*                                                                          */
37 /* auto include mechanism and other include files                           */
38 /*                                                                          */
39 /****************************************************************************/
40 
41 #ifndef __STD_DOMAIN__
42 #define __STD_DOMAIN__
43 
44 #include <dune/uggrid/low/dimension.h>
45 #include <dune/uggrid/low/namespace.h>
46 
47 #include "domain.h"
48 
49 START_UGDIM_NAMESPACE
50 
51 #undef  CORNERS_OF_BND_SEG
52 #define CORNERS_OF_BND_SEG               2*DIM_OF_BND
53 
54 
55 /** \todo Please doc me! */
56 typedef struct {
57 
58   /** \brief Table subdomain to part */
59   const INT *sd2part;
60 
61   /** \brief Table segment to part */
62   const INT *sg2part;
63 
64 # ifdef __THREEDIM__
65   /** \brief Table line to part */
66   const INT **ln2part;
67 # endif
68 
69   /** \brief Table point to part */
70   const INT *pt2part;
71 
72 } DOMAIN_PART_INFO;
73 
74 /*----------- typedef for functions ----------------------------------------*/
75 /** \brief ???
76  *
77  * \todo Please doc me!
78  */
79 typedef INT (*BndSegFuncPtr)(void *,DOUBLE *,DOUBLE *);
80 
81 /** \brief ???
82  *
83  * \todo Please doc me!
84  */
85 typedef INT (*BndCondProcPtr)(void *, void *, DOUBLE *, DOUBLE *, INT *);
86 
87 
88 /* --- public functions --- */
89 
90 
91 /* domain definition */
92 void                     *CreateDomainWithParts       (const char *name,
93                                                        INT segments,
94                                                        INT corners,
95                                                        INT nParts, const DOMAIN_PART_INFO *dpi);
96 
97 void                     *CreateDomain                        (const char *name,
98                                                                INT segments,
99                                                                INT corners);
100 
101 void RemoveDomain(const char* name);
102 
103 void   *CreateBoundarySegment       (const char *name, INT left, INT right,
104                                      INT id, enum BoundaryType type,
105                                      const INT *point,
106                                      const DOUBLE *alpha, const DOUBLE *beta,
107                                      BndSegFuncPtr BndSegFunc,
108                                      void *data);
109 
110 void *CreateLinearSegment (const char *name,
111                            INT left, INT right,INT id,
112                            INT n, const INT *point,
113                            DOUBLE x[CORNERS_OF_BND_SEG][DIM]);
114 
115 /** \brief Access the id of the segment (used by DUNE) */
116 UINT GetBoundarySegmentId(BNDS* boundarySegment);
117 
118 BVP   *CreateBoundaryValueProblem (const char *BVPname, BndCondProcPtr theBndCond,
119                                    int numOfCoeffFct, CoeffProcPtr coeffs[],
120                                    int numOfUserFct, UserProcPtr userfct[]);
121 
122 END_UGDIM_NAMESPACE
123 
124 /** @} */
125 
126 #endif
127