13#include "arcane/core/internal/LimaUtils.h"
15#include "arcane/utils/CheckedConvert.h"
16#include "arcane/utils/ITraceMng.h"
18#include "arcane/core/IItemFamily.h"
19#include "arcane/core/IMeshReader.h"
20#include "arcane/core/ItemGroup.h"
22#include "arcane/core/internal/LimaMalippT.h"
26#ifdef ARCANE_LIMA_HAS_MLI
27#include <Lima/malipp.h>
29#ifdef ARCANE_LIMA_HAS_MLI2
30#include <Lima/malipp2.h>
46 if (!local_ids.
empty())
47 std::sort(std::begin(local_ids),std::end(local_ids));
51 for(
Integer i=1; i<nb_item; ++i )
52 if (local_ids[i]==local_ids[i-1]){
55 if (nb_duplicated!=0){
56 tm->
warning() <<
"Duplicated items in group name=" << name
57 <<
" nb_duplicated=" << nb_duplicated;
58 auto xbegin = std::begin(local_ids);
59 auto xend = std::end(local_ids);
60 Integer new_size = CheckedConvert::toInteger(std::unique(xbegin,xend)-xbegin);
61 tm->
info() <<
"NEW_SIZE=" << new_size <<
" old=" << nb_item;
62 local_ids = local_ids.
subView(0,new_size);
73 const String& filename,
Real length_multiplier)
75#ifdef ARCANE_LIMA_HAS_MLI
80 ARCANE_UNUSED(timer_mng);
82 ARCANE_UNUSED(filename);
83 ARCANE_UNUSED(length_multiplier);
92LimaUtils::_directLimaPartitionMalipp2(ITimerMng* timer_mng,IPrimaryMesh* mesh,
93 const String& filename, Real length_multiplier)
95#ifdef ARCANE_LIMA_HAS_MLI2
96 LimaMalippReader<Lima::MaliPPReader2> reader(mesh->traceMng());
97 auto rt = reader.readMeshFromFile(timer_mng,mesh,filename,length_multiplier);
100 ARCANE_UNUSED(timer_mng);
102 ARCANE_UNUSED(filename);
103 ARCANE_UNUSED(length_multiplier);
constexpr ArrayView< T > subView(Integer abegin, Integer asize) noexcept
Sous-vue à partir de l'élément abegin et contenant asize éléments.
constexpr Integer size() const noexcept
Retourne la taille du tableau.
constexpr bool empty() const noexcept
Retourne true si le tableau est vide (dimension nulle)
Interface d'une famille d'entités.
virtual ItemGroup createGroup(const String &name, Int32ConstArrayView local_ids, bool do_override=false)=0
Créé un groupe d'entités de nom name contenant les entités local_ids.
virtual ITraceMng * traceMng() const =0
Gestionnaire de trace associé
eReturnType
Types des codes de retour d'une lecture ou écriture.
@ RTIrrelevant
Non concerné par l'opération. Cela signifie que le format de fichier ne correspond pas à ce lecteur o...
Interface d'un gestionnaire de timer.
Interface du gestionnaire de traces.
virtual TraceMessage warning()=0
Flot pour un message d'avertissement.
virtual TraceMessage info()=0
Flot pour un message d'information.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
static void createGroup(IItemFamily *family, const String &name, Int32ArrayView local_ids)
Créé un groupe d'entités.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.
ArrayView< Int32 > Int32ArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
double Real
Type représentant un réel.