Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IGeometry.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_GEOMETRY_IGEOMETRY_H
8#define ARCGEOSIM_GEOMETRY_IGEOMETRY_H
9/*---------------------------------------------------------------------------*/
10/*---------------------------------------------------------------------------*/
11
12#include "arcane/utils/Real3.h"
13#include "arcane/core/Item.h"
15
16/*---------------------------------------------------------------------------*/
17/*---------------------------------------------------------------------------*/
18
19namespace Arcane::Numerics
20{
21using namespace Arcane;
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26/*!
27 * \brief Geometric calculation interface.
28 */
29class ARCANE_GEOMETRY_EXPORT IGeometry
30{
31 public:
32
33 /** Class constructor */
35 {
36 ;
37 }
38
39 /** Class destructor */
40 virtual ~IGeometry() {}
41
42 public:
43
44 //! Calculation of the center of mass
45 virtual Real3 computeCenter(const ItemWithNodes& item) = 0;
46
47 //! Calculation of the oriented measure
48 /*! In the case of a planar element, this corresponds to
49 * the unit average normal * element measure
50 * and in the case of a simple volumetric element we obtain
51 * volume * z (or z=(0,0,1))
52 */
53 virtual Real3 computeOrientedMeasure(const ItemWithNodes& item) = 0;
54
55 //! Calculation of the measure (without orientation)
56 virtual Real computeMeasure(const ItemWithNodes& item) = 0;
57
58 //! Calculation of the length
59 /*! Only for linear Items */
60 virtual Real computeLength(const ItemWithNodes& item) = 0;
61
62 //! Calculation of the area
63 /*! Only for surface Items */
64 virtual Real computeArea(const ItemWithNodes& item) = 0;
65
66 //! Calculation of the volume
67 /*! Only for volumetric Items */
68 virtual Real computeVolume(const ItemWithNodes& item) = 0;
69
70 //! Calculation of the center
71 /*! Only for surface Items */
72 virtual Real3 computeSurfaceCenter(Integer n, const Real3* coords) = 0;
73
74 //! Calculation of the oriented area (i.e., normal)
75 /*! Only for surface Items */
76 virtual Real3 computeOrientedArea(Integer n, const Real3* coords) = 0;
77
78 //! Calculation of the length of a segment defined by two points
79 virtual Real computeLength(const Real3& m, const Real3& n) = 0;
80};
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85} // namespace Arcane::Numerics
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90#endif
Various mathematical functions.
Mesh element based on nodes (Edge,Face,Cell).
Definition Item.h:773
virtual Real computeVolume(const ItemWithNodes &item)=0
Calculation of the volume.
virtual Real3 computeOrientedMeasure(const ItemWithNodes &item)=0
Calculation of the oriented measure.
virtual Real3 computeCenter(const ItemWithNodes &item)=0
Calculation of the center of mass.
virtual Real3 computeSurfaceCenter(Integer n, const Real3 *coords)=0
Calculation of the center.
virtual Real computeLength(const Real3 &m, const Real3 &n)=0
Calculation of the length of a segment defined by two points.
virtual Real computeMeasure(const ItemWithNodes &item)=0
Calculation of the measure (without orientation).
virtual Real computeLength(const ItemWithNodes &item)=0
Calculation of the length.
virtual Real computeArea(const ItemWithNodes &item)=0
Calculation of the area.
virtual Real3 computeOrientedArea(Integer n, const Real3 *coords)=0
Calculation of the oriented area (i.e., normal).
Class managing a 3-dimensional real vector.
Definition Real3.h:132
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.