7#ifndef ARCGEOSIM_SURFACEUTILS_GEOMETRYKERNELSURFACETOOLS_GEOMETRYKERNELSURFACEINTERNALUTILS_H
8#define ARCGEOSIM_SURFACEUTILS_GEOMETRYKERNELSURFACETOOLS_GEOMETRYKERNELSURFACEINTERNALUTILS_H
13#include <arcane/Item.h>
14#include <arcane/utils/Array.h>
15#include <arcane/utils/Real3.h>
16#include "arcane/VariableTypes.h"
17#include <arcane/ItemGroup.h>
18#include <arcane/IMeshSubMeshTransition.h>
20#include <GeometryKernel/datamodel/micro/surface/triangulation-data-structure.h>
21#include <GeometryKernel/datamodel/geometry/vector.h>
26NUMERICS_BEGIN_NAMESPACE
34 GeometryKernel::TriangulationDataStructurePtr m_triangulation,
38 Real3 & m_mean_normal);
40void saveSurface(
const char * filename, GeometryKernel::TriangulationDataStructure & tr);
42void loadSurface(
const char * filename, GeometryKernel::TriangulationDataStructure & tr);
45inline GeometryKernel::Vector convertGKVector(
const Real3 & v) {
return GeometryKernel::Vector(v.
x,v.
y,v.
z); }
55 : m_nodes_coordinates(PRIMARYMESH_CAST(mesh)->nodesCoordinates()),
62 GeometryKernel::TObjectId getNodeId(
const Node node)
65 std::pair<KnownNodes::iterator,bool>
inserter = m_known_nodes.insert(KnownNodes::value_type(
inode,NULL_ID));
68 const Real3 coords = m_nodes_coordinates[node];
69 const GeometryKernel::TObjectId
new_id = m_triangulation.newVertex(GeometryKernel::Vector(coords.
x,coords.
y,coords.
z));
70 ARCANE_ASSERT(((Integer)m_node_array.size()==(Integer)
new_id),(
"Non-synchronized GeometryKernel with internal SurfaceImpl [%d vs %d]",
new_id,m_node_array.size()));
71 m_node_array.add(node);
90 GeometryKernel::TriangulationDataStructure & m_triangulation;
92 typedef std::map<Integer,GeometryKernel::TObjectId> KnownNodes;
93 KnownNodes m_known_nodes;
constexpr Int32 localId() const
Identifiant local de l'entité dans le sous-domaine du processeur.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Classe gérant un vecteur de réel de dimension 3.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Real3 convertGKVector(const GeometryKernel::Vector &v)
convert GeometryKernel vector to Real3
void loadSurface(const char *filename, GeometryKernel::TriangulationDataStructure &tr)
Load surface utility for debugging purpose (binary format)
void saveSurface(const char *filename, GeometryKernel::TriangulationDataStructure &tr)
Save surface utility for debugging purpose (binary format)
void buildFaceGroupSurface(FaceGroup group, GeometryKernel::TriangulationDataStructurePtr surface, Array< Node > &node_array, Array< Face > &face_array, Array< bool > &face_reorient, Real3 &normal)
Build GK triangulation and additional data from a face group.
Real y
deuxième composante du triplet
Real z
troisième composante du triplet
Real x
première composante du triplet