Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IParticleFamily.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IParticleFamily.h (C) 2000-2025 */
9/* */
10/* Interface of a particle family. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARTICLEFAMILY_H
13#define ARCANE_CORE_IPARTICLEFAMILY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
43class ARCANE_CORE_EXPORT IParticleFamily
44{
45 public:
46
47 virtual ~IParticleFamily() {} //<! Releases resources
48
49 public:
50
51 virtual void build() = 0;
52
54 virtual void setEnableGhostItems(bool value) = 0;
55
57 virtual bool getEnableGhostItems() const = 0;
58
59 public:
60
62 virtual String name() const = 0;
63
65 virtual String fullName() const = 0;
66
68 virtual Integer nbItem() const = 0;
69
71 virtual ItemGroup allItems() const = 0;
72
73 public:
74
88 Int32ArrayView items_local_id) = 0;
89 virtual ParticleVectorView addParticles2(Int64ConstArrayView unique_ids,
91 Int32ArrayView items) = 0;
92
100 Int32ConstArrayView cells_local_id,
101 Int32ArrayView items_local_id) = 0;
102
103 virtual void removeParticles(Int32ConstArrayView items_local_id) = 0;
104
108 virtual void endUpdate() = 0;
109
113 virtual void setParticleCell(Particle particle, Cell new_cell) = 0;
114
118 virtual void setParticlesCell(ParticleVectorView particles, CellVectorView new_cells) = 0;
119
120 public:
121
132 virtual void exchangeParticles() = 0;
133
134 public:
135
137 virtual IItemFamily* itemFamily() = 0;
138};
139
140/*---------------------------------------------------------------------------*/
141/*---------------------------------------------------------------------------*/
142
143} // namespace Arcane
144
145/*---------------------------------------------------------------------------*/
146/*---------------------------------------------------------------------------*/
147
148#endif
Declarations of Arcane's general types.
Declarations of types on entities.
Cell of a mesh.
Definition Item.h:1300
Interface of an entity family.
Definition IItemFamily.h:83
Interface of a particle family.
virtual Integer nbItem() const =0
Number of entities.
virtual String name() const =0
Name of the family.
virtual void setParticleCell(Particle particle, Cell new_cell)=0
Moves the particle particle into the cell new_cell.
virtual void setEnableGhostItems(bool value)=0
Sets the flag to manage ghost particles for the family.
virtual void endUpdate()=0
virtual bool getEnableGhostItems() const =0
Retrieves the flag to manage ghost particles for the family.
virtual void exchangeParticles()=0
Exchanging entities.
virtual ParticleVectorView addParticles(Int64ConstArrayView unique_ids, Int32ArrayView items_local_id)=0
Allocates particles.
virtual ItemGroup allItems() const =0
Group of all particles.
virtual IItemFamily * itemFamily()=0
Interface on the family.
virtual void setParticlesCell(ParticleVectorView particles, CellVectorView new_cells)=0
Moves the list of particles particles into the new cells new_cells.
virtual ParticleVectorView addParticles(Int64ConstArrayView unique_ids, Int32ConstArrayView cells_local_id, Int32ArrayView items_local_id)=0
Allocates particles in cells.
virtual String fullName() const =0
Full name of the family (including the mesh name).
Mesh entity group.
Definition ItemGroup.h:51
Particle.
Definition Item.h:1529
ItemVectorViewT< Cell > CellVectorView
View over a vector of cells.
Definition ItemTypes.h:305
ItemVectorViewT< Particle > ParticleVectorView
View over a vector of particles.
Definition ItemTypes.h:310
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:480
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:453