Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Euclidian3GeometryService.cc
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#include <arcane/geometry/euclidian/Euclidian3GeometryService.h>
8/* Author : havep at Wed Nov 14 13:55:36 2007
9 * Generated by createNew
10 */
11
12#include <arcane/core/IMesh.h>
13#include <arcane/core/IMeshSubMeshTransition.h>
14#include <arcane/core/IItemFamily.h>
15using namespace Arcane;
16
17#include <arcane/geometry/euclidian/Euclidian3Geometry.h>
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Numerics
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/* A few words about possible optimizations:
29 * Next possible optimizations (when necessary) are:
30 * - Compute common properties on maximal group
31 (instead of re-computing the same property on all groups with shared items)
32 * - Different properties may use the same computation. Then, maximal group factorization
33 * may be considered by a system of "what properties may compute this kernel" even if not
34 * shared by alls group in a maximal set.
35 * - Mandatory storage parameter in addItemGroupProperty (up to now, this is optional)
36 * - Geometry computations by constraints
37 e.g.: for volume computations, we need face center on Quad4. This center is computed twice
38 for each shared face. Moreover, this computation may also be needed by the user.
39 * The idea is to define requirements for each geometry computation by kind and type.
40 * Then computations are done following the order of the weakest constraints.
41 */
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
54
57{
58 if (m_geometry)
59 delete m_geometry;
60}
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
66init()
67{
68 if (m_geometry) {
69 info() << className() << " already initialized";
70 return;
71 }
72
73 // The current implementation is built upon the default mesh
74 m_geometry = new Euclidian3Geometry(PRIMARYMESH_CAST(this->mesh())->nodesCoordinates());
75
76 if (options()->variableSuffix.size() > 0) {
77 setSuffix(options()->variableSuffix[0]);
78 }
79}
80
81/*---------------------------------------------------------------------------*/
82
84update(ItemGroup group)
85{
86 updateGroup(group, *m_geometry);
87}
88
90reset(ItemGroup group)
91{
92 ARCANE_UNUSED(group);
93}
94
95/*---------------------------------------------------------------------------*/
96
97/*---------------------------------------------------------------------------*/
98
101geometry()
102{
103 return m_geometry;
104}
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109ARCANE_REGISTER_SERVICE_EUCLIDIAN3GEOMETRY(Euclidian3Geometry, Euclidian3GeometryService);
110
111/*---------------------------------------------------------------------------*/
112/*---------------------------------------------------------------------------*/
113
114} // namespace Arcane::Numerics
115
116/*---------------------------------------------------------------------------*/
117/*---------------------------------------------------------------------------*/
CaseOptionsEuclidian3Geometry * options() const
Options du jeu de données du service.
ArcaneEuclidian3GeometryObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
Mesh entity group.
Definition ItemGroup.h:51
VariableNodeReal3 & nodesCoordinates() const
Returns the coordinates of the mesh nodes.
IGeometry * geometry()
Get underlying geometry.
const char * className() const
Name of instancied class.
Euclidian3GeometryService(const Arcane::ServiceBuildInfo &sbi)
virtual void update()=0
Update property values for all ItemGroups.
virtual void reset()=0
Reset property for all ItemGroups.
Geometric calculation interface.
Definition IGeometry.h:30
Structure containing the information to create a service.
TraceMessage info() const
Flow for an information message.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --