KASKADE 7 development version
vectorOps.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the library KASKADE 7 */
4/* https://www.zib.de/research/projects/kaskade7-finite-element-toolbox */
5/* */
6/* Copyright (C) 2002-2024 Zuse Institute Berlin */
7/* */
8/* KASKADE 7 is distributed under the terms of the ZIB Academic License. */
9/* see $KASKADE/academic.txt */
10/* */
11/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
13#ifndef VECTOROPS_HH
14#define VECTOROPS_HH
15
17// forward declarations
18namespace Dune
19{
20 template <class Entry, int dim>
21 class FieldVector;
22
23 template <class Entry, class A>
24 class BlockVector;
25}
27
28namespace Kaskade
29{
30 template <class Entry, class A>
33 {
34 Dune::BlockVector<Entry,A> z(x.N()+y.N());
35
36 for (int i=0; i<x.N(); ++i)
37 z[i] = x[i];
38
39 for (int i=0; i<y.N(); ++i)
40 z[x.N()+i] = y[i];
41
42 return z;
43 }
44
45}
46
47#endif
Dune::BlockVector< Dune::FieldVector< Scalar, n >, Allocator > BlockVector
Dune::BlockVector< Entry, A > vertcat(Dune::BlockVector< Entry, A > const &x, Dune::BlockVector< Entry, A > const &y)
Definition: vectorOps.hh:31