Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ISurfaceUtils.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#ifndef ARCGEOSIM_SURFACEUTILS_ISURFACEUTILS_H
8#define ARCGEOSIM_SURFACEUTILS_ISURFACEUTILS_H
9/*---------------------------------------------------------------------------*/
10/*---------------------------------------------------------------------------*/
11
12#include <arcane/utils/Real3.h>
13#include <arcane/core/Item.h>
14
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
18namespace Arcane::Numerics
19{
20using namespace Arcane;
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25class ISurface;
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
31{
32 public:
33
34 struct FaceFaceContact
35 {
36 FaceFaceContact() {}
37 FaceFaceContact(const FaceFaceContact& c)
38 : faceA(c.faceA)
39 , faceB(c.faceB)
40 , centerA(c.centerA)
41 , centerB(c.centerB)
42 , normalA(c.normalA)
43 , normalB(c.normalB)
44 {}
45 FaceFaceContact(const Face& fA, const Face& fB)
46 : faceA(fA)
47 , faceB(fB)
48 {}
49 Face faceA, faceB;
50 Real3 centerA, centerB;
51 Real3 normalA, normalB;
52 };
53 typedef UniqueArray<FaceFaceContact> FaceFaceContactList;
54
55 public:
56
59
61 virtual ~ISurfaceUtils() {};
62
64 virtual void init() = 0;
65
67 virtual ISurface* createSurface() = 0;
68
70 virtual void setFaceToSurface(ISurface* surface, FaceGroup face_group) = 0;
71
73 virtual void computeSurfaceContact(ISurface* surface1,
74 ISurface* surface2,
75 FaceFaceContactList& contact) = 0;
76};
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81} // namespace Arcane::Numerics
82
83/*---------------------------------------------------------------------------*/
84/*---------------------------------------------------------------------------*/
85
86#endif
Face of a cell.
Definition Item.h:1032
virtual void setFaceToSurface(ISurface *surface, FaceGroup face_group)=0
Sets the faces of a surface.
virtual void computeSurfaceContact(ISurface *surface1, ISurface *surface2, FaceFaceContactList &contact)=0
compute for each face of surface1 the nearest face of surface2
virtual ISurface * createSurface()=0
Creation of a new surface.
virtual ~ISurfaceUtils()
Destructor.
virtual void init()=0
Initialization.
Purely virtual interface for surface representation.
Definition ISurface.h:32
Class managing a 3-dimensional real vector.
Definition Real3.h:132
1D data vector with value semantics (STL style).
ItemGroupT< Face > FaceGroup
Group of faces.
Definition ItemTypes.h:179