Flow123d
neighbours.cc
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id$
21  * $Revision$
22  * $LastChangedBy$
23  * $LastChangedDate$
24  *
25  *
26  * @file
27  * @ingroup mesh
28  * @brief Initialize neighbouring
29  *
30  */
31 
32 #include "system/system.hh"
33 #include "neighbours.h"
34 #include "mesh/mesh.h"
35 /*
36 static void parse_neighbour_line(struct Neighbour*,char*);
37 static char supported_neighbour_type(int);
38 static void neighbour_type_specific(struct Neighbour* , char * line );
39 //static void neighbour_specs_bb_e(struct Neighbour*);
40 static void neighbour_specs_bb_el(struct Neighbour*, char * line );
41 static void neighbour_specs_vb_es(struct Neighbour*, char * line );
42 static void neighbour_specs_vv_2e(struct Neighbour*);
43 */
44 
45 //=============================================================================
46 // READ DATA OF ALL NEIGHBOURS
47 //=============================================================================
49 {
50 
51 }
52 
53 //=============================================================================
54 // INIT DATA OF NEIGHBOUR
55 //=============================================================================
56 /*
57 Neighbour_both::Neighbour_both()
58 {
59  type = NDEF;
60  n_sides = NDEF;
61  sid = NULL;
62  eid = NULL;
63 
64  sigma = 0.0;
65 }
66 */
67 
69 : edge_idx_(-1)
70 {}
71 
72 void Neighbour::reinit(ElementIter ele, unsigned int edg_idx)
73 {
74  element_=ele;
75  edge_idx_=edg_idx;
76 }
77 
78 
79 
80 /**
81  * boundary - boundary neigbouring, given by list of neigbouring elements,
82  * sides are given implicitely by shared nodes
83  */
84 /*
85 void neighbour_specs_bb_e( struct Neighbour *ngh )
86 {
87  int ei;
88 
89  xstrtok( ngh->line);
90  xstrtok( NULL);
91  ngh->n_elements = atoi( xstrtok( NULL) );
92  INPUT_CHECK(!( ngh->n_elements < 2 ),"Neighbour %d has bad number of elements: %d\n", ngh->id, ngh->n_elements );
93  ngh->n_sides = ngh->n_elements;
94  ngh->eid = (int*) xmalloc( ngh->n_elements * sizeof( int ) );
95  ngh->element = (ElementIter *) xmalloc( ngh->n_elements * sizeof( ElementIter ) );
96  ngh->side = (struct Side**) xmalloc( ngh->n_elements * sizeof( struct Side* ) );
97  FOR_NEIGH_ELEMENTS( ngh, ei ) {
98  ngh->element[ ei ] = NULL;
99  ngh->side[ ei ] = NULL;
100  }
101  FOR_NEIGH_ELEMENTS( ngh, ei )
102  ngh->eid[ ei ] = atoi( xstrtok( NULL) );
103  xfree( ngh->line );
104  ngh->line = NULL;
105 }*/
106 /**
107  * volume - volume neighbouring of different dimensions (non-compatible)
108  */
109 /*
110 void neighbour_specs_vv_2e( struct Neighbour *ngh )
111 {
112  xstrtok( ngh->line);
113  xstrtok( NULL);
114  ngh->n_elements = 2;
115  ngh->element = (ElementIter *) xmalloc( ngh->n_elements * sizeof( ElementIter ) );
116  ngh->eid = (int*) xmalloc( ngh->n_elements * sizeof( int ) );
117  ngh->eid[ 0 ] = atoi( xstrtok( NULL) );
118  ngh->eid[ 1 ] = atoi( xstrtok( NULL) );
119  ngh->geom_factor = atof( xstrtok( NULL) ); // fraction of lower dim. element measure
120  ngh->sigma= atof( xstrtok( NULL) ); // transition coefficient
121  ngh->element[ 0 ] = NULL;
122  ngh->element[ 1 ] = NULL;
123  xfree( ngh->line );
124  ngh->line = NULL;
125 }*/
126 //-----------------------------------------------------------------------------
127 // vim: set cindent: