6 #include "iterators.hpp" 7 #include "mkl_matrix.hpp" 9 #include "rect_fwd.hpp" 23 typedef STD_TR1::shared_ptr<index_connector> ref;
25 typedef std::vector<int>::const_iterator const_iterator;
27 const_iterator begin(){
return indizes.begin();};
28 const_iterator end(){
return indizes.end();};
30 int operator()(
const int i)
const {
return shift + indizes[i];};
31 row operator()(
const row i)
const {
return row(shift + indizes[i.get()]);};
34 size_t size(){
return indizes.size();};
36 size_t max_index(){
return (max + shift);};
38 void debug_print(std::string name=
"index_connector");
43 index_connector(
size_t n,
size_t s = 0): indizes(n,0), shift(0), max(0) {};
45 void add_shift(
size_t t){ shift += t;};
47 void connect(
size_t ind,
int j);
49 std::vector<int> indizes;
68 const index_connector::ref& i1,
69 const index_connector::ref& i2);
76 index_connector::ref row_connect;
77 index_connector::ref column_connect;
83 size_t num_rows()
const {
return row_connect->size();};
84 size_t num_cols()
const {
return column_connect->size();};
108 typedef STD_TR1::shared_ptr<Interface> ref;
109 typedef STD_TR1::shared_ptr<const Interface> const_ref;
113 const index_connector::ref,
114 const index_connector::ref,
118 reduce(
const Vector&,
119 const index_connector::ref,
123 const index_connector::ref);
126 expand(
const Vector&,
127 const index_connector::ref,
131 static index_connector::ref empty(
size_t ny );
135 index_connector::ref left()
const;
136 index_connector::ref right()
const;
138 double y_shift()
const {
return yshift();};
140 void create_full_Interface(
Matrix& m)
const;
142 void create_Hi(
Matrix& m)
const { createHi(m);};
143 void create_Hit(
Matrix& m)
const { createHit(m);};
145 void create_Hi_expand_left(
Matrix& m)
const;
146 void create_Hi_expand_right(
Matrix& m)
const;
147 void create_Hi_expand_both(
Matrix& m)
const;
148 void create_Hit_expand_left(
Matrix& m)
const;
149 void create_Hit_expand_right(
Matrix& m)
const;
150 void create_Hit_expand_both(
Matrix& m)
const;
152 mkl_Matrix::ref create_Hi()
const {
154 createHi(*p);
return p;
156 mkl_Matrix::ref create_Hi_expand_left()
const {
158 create_Hi_expand_left(*p);
return p;
160 mkl_Matrix::ref create_Hi_expand_right()
const {
162 create_Hi_expand_right(*p);
return p;
164 mkl_Matrix::ref create_Hi_expand_both()
const {
167 create_Hi_expand_both(*p);
return p;
170 mkl_Matrix::ref create_Hit()
const {
172 createHit(*p);
return p;
174 mkl_Matrix::ref create_Hit_expand_left()
const {
176 create_Hit_expand_left(*p);
return p;
178 mkl_Matrix::ref create_Hit_expand_right()
const {
180 create_Hit_expand_right(*p);
return p;
182 mkl_Matrix::ref create_Hit_expand_both()
const {
185 create_Hit_expand_both(*p);
return p;
189 size_t n_left()
const {
return nleft();};
204 { v.connect( i, j);};
206 void set_n_left_right(
size_t nl,
size_t nr) { nleft_rect = nl; nright_rect = nr;};
209 const char* name()
const {
return "Abstract_Interface";};
215 virtual void init_interface_params() = 0;
220 virtual void createHi(
Matrix& m)
const = 0;
221 virtual void createHit(
Matrix& m)
const = 0;
223 virtual double yshift()
const = 0;
225 virtual size_t nright()
const = 0;
226 virtual size_t nleft()
const = 0;
Definition: interface.hpp:64
size_t n_left() const
the number of virtual interface points to the left
Definition: interface.hpp:189
size_t n_right() const
the number of virtual interface points to the right
Definition: interface.hpp:191
size_t n_left_rect() const
the number of actual grid points for the rectangle to the left
Definition: interface.hpp:194
Definition: interface.hpp:21
size_t n_right_rect() const
the number of actual grid points for the rectangle to the right
Definition: interface.hpp:196
An abstract base class supporting xml_file_reading of input parameters.
Definition: input_file.hpp:79
Abstract base class describing the interface between adjacent Rectangles.
Definition: interface.hpp:104
Base Matrix class for access to 2D number grids.
Definition: matrix.hpp:82
Definition: mkl_matrix.hpp:216
Definition: mkl_matrix.hpp:7