Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
TiedInterface.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/* TiedInterface.h (C) 2000-2014 */
9/* */
10/* Information on mesh semi-conformities. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_TIEDINTERFACE_H
13#define ARCANE_MESH_TIEDINTERFACE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/MultiArray2.h"
18#include "arcane/utils/TraceAccessor.h"
19
20#include "arcane/core/ITiedInterface.h"
22#include "arcane/core/IMeshPartitionConstraint.h"
23
24#include "arcane/core/VariableTypes.h"
25
26#include "arcane/mesh/MeshGlobal.h"
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Arcane
32{
34}
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39namespace Arcane::mesh
40{
41
42/*---------------------------------------------------------------------------*/
43/*---------------------------------------------------------------------------*/
44
46{
47 public:
48
49 virtual ~ITiedInterfaceRebuilder() {}
50
51 public:
52
53 virtual void fillTiedInfos(Face face,
54 Int32ArrayView tied_nodes_lid,
55 Real2ArrayView tied_nodes_isos,
56 Int32ArrayView tied_faces_lid) = 0;
57};
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
67class TiedInterface
68: public TraceAccessor
69, public ITiedInterface
70{
71 public:
72
75 {
76 public:
77
78 virtual void setInitialRepartition(bool is_initial) = 0;
79 };
80
81 public:
82
83 TiedInterface(IMesh* mesh);
84 virtual ~TiedInterface(); //<! Releases resources
85
86 public:
87
88 virtual FaceGroup masterInterface() const;
89 virtual FaceGroup slaveInterface() const;
90 virtual TiedInterfaceNodeList tiedNodes() const;
91 virtual TiedInterfaceFaceList tiedFaces() const;
92 virtual String masterInterfaceName() const;
93 virtual String slaveInterfaceName() const;
94
95 public:
96
98
100 virtual void build(const FaceGroup& interface, bool is_structured);
101
103
105 virtual void setPlanarTolerance(Real tol);
106
107 virtual void reload(IItemFamily* face_family,
108 const String& master_interface_name,
109 const String& slave_interface_name);
110
111 void resizeNodes(IntegerConstArrayView new_sizes);
112
113 void setNodes(Integer index, ConstArrayView<TiedNode> nodes);
114
115 void resizeFaces(IntegerConstArrayView new_sizes);
116
117 void setFaces(Integer index, ConstArrayView<TiedFace> faces);
118
119 static bool isDebug()
120 {
121 return m_is_debug;
122 }
123
124 void rebuild(ITiedInterfaceRebuilder* rebuilder,
125 IntegerConstArrayView nb_slave_node,
126 IntegerConstArrayView nb_slave_face);
127
128 void checkValid();
129
130 private:
131
132 static bool m_is_debug;
133
134 private:
135
136 IMesh* m_mesh;
137 String m_master_interface_name;
138 String m_slave_interface_name;
139 FaceGroup m_master_interface;
140 FaceGroup m_slave_interface;
141 UniqueMultiArray2<TiedNode> m_tied_nodes;
142 UniqueMultiArray2<TiedFace> m_tied_faces;
143 Real m_planar_tolerance;
144
145 void _checkValid(bool is_print);
146};
147
148/*---------------------------------------------------------------------------*/
149/*---------------------------------------------------------------------------*/
150
151} // namespace Arcane::mesh
152
153/*---------------------------------------------------------------------------*/
154/*---------------------------------------------------------------------------*/
155
156#endif
Declarations of types on entities.
Constant view of an array of type T.
Face of a cell.
Definition Item.h:1032
Interface of an entity family.
Definition IItemFamily.h:83
Interface of a mesh partitioning constraint.
Interface of a class managing semi-conforming mesh.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
Multi-sized 2D array with value semantics.
virtual FaceGroup slaveInterface() const
Group containing the slave faces.
virtual String slaveInterfaceName() const
Name of the group containing the slave cells.
static PartitionConstraintBase * createConstraint(IMesh *mesh, ConstArrayView< FaceGroup > slave_interfaces)
Creates information for the tied interface slave_interface/.
virtual void setPlanarTolerance(Real tol)
Defines the relative acceptance threshold for a point projected onto a candidate face.
virtual String masterInterfaceName() const
Name of the group containing the master cells.
virtual void build(const FaceGroup &interface, bool is_structured)
Builds the tied interface on the group interface.
virtual TiedInterfaceFaceList tiedFaces() const
List of information about the slave faces of a master face.
virtual FaceGroup masterInterface() const
Group containing the master faces.
virtual TiedInterfaceNodeList tiedNodes() const
List of information about the slave nodes of a master face.
ItemGroupT< Face > FaceGroup
Group of faces.
Definition ItemTypes.h:179
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:453
double Real
Type representing a real number.
ArrayView< Real2 > Real2ArrayView
C equivalent of a 1D array of Real2.
Definition UtilsTypes.h:465
ConstArrayView< Integer > IntegerConstArrayView
C equivalent of a 1D array of integers.
Definition UtilsTypes.h:486