Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
VBlockVector.h
1/*
2 * Copyright 2020 IFPEN-CEA
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 */
18
19#pragma once
20
22#include <alien/data/IVector.h>
23#include <alien/data/Space.h>
25#include <alien/ref/AlienRefSemanticPrecomp.h>
26#include <cstdlib>
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Alien
32{
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37class ALIEN_REFSEMANTIC_EXPORT VBlockVector final : public IVector
38{
39 public:
40 VBlockVector();
41
42 VBlockVector(const VBlock& block, const VectorDistribution& dist);
43
44 VBlockVector(Integer nrows, Integer nrows_local, const VBlock& block,
45 IMessagePassingMng* parallel_mng);
46
47 VBlockVector(Integer nrows, const VBlock& block, IMessagePassingMng* parallel_mng);
48
49 VBlockVector(VBlockVector&& vector);
50
51 ~VBlockVector() {}
52
53 VBlockVector& operator=(VBlockVector&& vector);
54
55 VBlockVector(const VBlockVector&) = delete;
56 VBlockVector& operator=(const VBlockVector&) = delete;
57
58 public:
59 void init(const VBlock& block, const VectorDistribution& dist);
60
61 void free();
62
63 void clear();
64
65 // Pour les expressions
66 void visit(ICopyOnWriteVector&) const;
67
68 const VectorDistribution& distribution() const;
69
70 const ISpace& space() const;
71
72 void setUserFeature(String feature);
73
74 bool hasUserFeature(String feature) const;
75
76 const VBlock& vblock() const;
77
78 public:
80
81 const MultiVectorImpl* impl() const;
82
83 private:
84 std::shared_ptr<MultiVectorImpl> m_impl;
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90} // namespace Alien
91
92/*---------------------------------------------------------------------------*/
93/*---------------------------------------------------------------------------*/
IVector.h.
Space.h.
VBlock.h.
VectorDistribution.h.
Interface for algebraic space objects.
Definition ISpace.h:44
IVector()
Constructor.
Definition IVector.h:54
void visit(ICopyOnWriteVector &) const
Visit method.
const ISpace & space() const
Get the space associated to the vector.
MultiVectorImpl * impl()
Get the multivector implementation.
Variable size block elements for block matrices.
Definition VBlock.h:46
Computes a vector distribution.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17