Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
Space.h
Go to the documentation of this file.
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
23
24#pragma once
25
26#include <alien/data/ISpace.h>
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Alien
32{
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
46class ALIEN_EXPORT Space final : public ISpace
47{
48 public:
50 Space();
51
56 Space(Arccore::Integer size);
57
63 Space(Arccore::Integer size, Arccore::String name);
64
69 Space(const Space& s);
70
75 Space(Space&& s);
76
78 ~Space();
79
85 Space& operator=(const Space& src);
86
92 Space& operator=(Space&& src);
93
99 bool operator==(const ISpace& space) const;
100
106 bool operator!=(const ISpace& space) const;
107
112 Arccore::Integer size() const;
113
118 const Arccore::String& name() const;
119
126 Arccore::String label, const Arccore::UniqueArray<Arccore::Integer>& indices);
127
132 Arccore::Integer nbField() const;
133
139 Arccore::String fieldLabel(Arccore::Integer i) const;
140
146 const Arccore::UniqueArray<Arccore::Integer>& field(Arccore::Integer i) const;
147
153 const Arccore::UniqueArray<Arccore::Integer>& field(Arccore::String label) const;
154
159 std::shared_ptr<ISpace> clone() const;
160
161 private:
162 class Internal;
164 std::shared_ptr<Internal> m_internal;
165};
166
167/*---------------------------------------------------------------------------*/
168/*---------------------------------------------------------------------------*/
169
170} // namespace Alien
171
172/*---------------------------------------------------------------------------*/
173/*---------------------------------------------------------------------------*/
ISpace.h.
ISpace()
Constructor.
Definition ISpace.h:47
Internal structure of Space object.
Definition Space.cc:49
Space(Arccore::Integer size, Arccore::String name)
Full constructor.
Space & operator=(const Space &src)
Equal operator.
Definition Space.cc:191
Arccore::Integer nbField() const
Get the number of fields.
Definition Space.cc:253
Arccore::String fieldLabel(Arccore::Integer i) const
Get the label of the i-th field.
const Arccore::String & name() const
Get space name.
Definition Space.cc:236
Arccore::Integer size() const
Get space size.
Definition Space.cc:211
void setField(Arccore::String label, const Arccore::UniqueArray< Arccore::Integer > &indices)
Set label on matrix entries.
Space(Arccore::Integer size)
Anonymous constructor. The space have no name.
Space()
Constructor.
Definition Space.cc:149
const Arccore::UniqueArray< Arccore::Integer > & field(Arccore::String label) const
Get the indices associated to a label.
std::shared_ptr< Internal > m_internal
Internal implementation of a space.
Definition Space.h:164
const Arccore::UniqueArray< Arccore::Integer > & field(Arccore::Integer i) const
Get indices associated to the i-th field \para[in] i The requested field.
std::shared_ptr< ISpace > clone() const
Clone this object.
Definition Space.cc:289
bool operator!=(const ISpace &space) const
Comparison operator.
Definition Space.cc:227
bool operator==(const ISpace &space) const
Comparison operator.
Definition Space.cc:219
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17