14#include "arcane/utils/TraceAccessor.h"
15#include "arcane/utils/Array.h"
16#include "arcane/utils/IOException.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/Ref.h"
19#include "arcane/utils/NotSupportedException.h"
20#include "arcane/utils/Real3.h"
21#include "arcane/utils/OStringStream.h"
22#include "arcane/utils/FixedArray.h"
23#include "arcane/utils/PlatformUtils.h"
24#include "arcane/utils/CheckedConvert.h"
26#include "arcane/core/IMeshReader.h"
27#include "arcane/core/IPrimaryMesh.h"
28#include "arcane/core/IItemFamily.h"
29#include "arcane/core/ItemGroup.h"
30#include "arcane/core/VariableTypes.h"
31#include "arcane/core/IParallelMng.h"
35#include "arcane/std/internal/IosFile.h"
36#include "arcane/std/internal/IosGmsh.h"
99 Int64 entity_tag = -1;
115 bool isNull()
const {
return dimension == (-1); }
116 Int32 dimension = -1;
126 void add(Int32 dimension, Int64 tag,
String name)
132 for (
auto& x : m_physical_names[dimension])
171 Int32 m_entity_dim = -1;
172 Int32 m_entity_tag = -1;
173 Int32 m_entity_tag_master = -1;
175 Int32 m_nb_corresponding_node = 0;
195 for (
auto& x : entities_with_nodes_list[dimension - 1])
202 for (
auto& x : entities_nodes_list)
221 Real3 m_node_min_bounding_box;
222 Real3 m_node_max_bounding_box;
240 IMesh* m_mesh =
nullptr;
242 Int32 m_master_io_rank = A_NULL_RANK;
243 bool m_is_parallel =
false;
245 MeshInfo m_mesh_info;
258 void _readMeshFromFile();
260 void _allocateCells();
261 void _allocateGroups();
268 Int32 _switchMshType(Int64, Int32&)
const;
269 void _readPhysicalNames();
275 Int32 _getIntegerAndBroadcast();
276 Int64 _getInt64AndBroadcast();
286 void _goToNextLine();
301 inline std::pair<Int64, Int64>
324 s = f->getNextLine();
328 info() <<
"BroadcastNextLine: " << s;
329 m_parallel_mng->broadcastString(s, m_master_io_rank);
331 info() <<
"GetNextLine: " << s;
362Int32 MshParallelMeshReader::
363_getIntegerAndBroadcast()
368 v[0] = f->getInteger();
370 m_parallel_mng->broadcast(v.view(), m_master_io_rank);
378Int64 MshParallelMeshReader::
379_getInt64AndBroadcast()
381 IosFile* f = m_ios_file.get();
382 FixedArray<Int64, 1> v;
386 m_parallel_mng->broadcast(v.view(), m_master_io_rank);
394void MshParallelMeshReader::
395_getInt64ArrayAndBroadcast(ArrayView<Int64> values)
397 IosFile* f = m_ios_file.get();
400 f->binaryRead(values);
403 for (
Int64& v : values)
408 m_parallel_mng->broadcast(values, m_master_io_rank);
414void MshParallelMeshReader::
415_getInt32ArrayAndBroadcast(ArrayView<Int32> values)
417 IosFile* f = m_ios_file.get();
420 f->binaryRead(values);
423 for (
Int32& v : values)
428 m_parallel_mng->broadcast(values, m_master_io_rank);
434void MshParallelMeshReader::
435_getDoubleArrayAndBroadcast(ArrayView<double> values)
437 IosFile* f = m_ios_file.get();
440 f->binaryRead(values);
443 for (
double& v : values)
448 m_parallel_mng->broadcast(values, m_master_io_rank);
454Real3 MshParallelMeshReader::
457 IosFile* f = m_ios_file.get();
461 f->binaryRead(SmallSpan<Real3>(&v, 1));
464 Real x = f->getReal();
465 Real y = f->getReal();
466 Real z = f->getReal();
475Int32 MshParallelMeshReader::
478 IosFile* f = m_ios_file.get();
482 f->binaryRead(SmallSpan<Int32>(&v, 1));
491Int64 MshParallelMeshReader::
494 IosFile* f = m_ios_file.get();
498 f->binaryRead(SmallSpan<Int64>(&v, 1));
507void MshParallelMeshReader::
510 if (m_ios_file.get())
511 m_ios_file->getNextLine();
517Int32 MshParallelMeshReader::
518_switchMshType(
Int64 mshElemType,
Int32& nNodes)
const
520 switch (mshElemType) {
526 info() <<
"Could not decode IT_NullType with nNodes=" << nNodes;
527 throw IOException(
"_switchMshType",
"Could not decode IT_NullType with nNodes");
544 return IT_Tetraedron4;
547 return IT_Hexaedron8;
550 return IT_Pentaedron6;
556 return IT_Heptaedron10;
559 return IT_Octaedron12;
565 return IT_Tetraedron10;
579 ARCANE_THROW(NotSupportedException,
"Unknown GMSH element type '{0}'", mshElemType);
592 Real min_value = -max_value;
600 m_mesh_info.m_node_min_bounding_box =
min_box;
601 m_mesh_info.m_node_max_bounding_box =
max_box;
623 for (Int64 i = 0; i <
nb_node; ++i) {
625 part = std::clamp(part, 0,
m_nb_part - 1);
631 for (Int64 i = 0; i <
nb_node; ++i) {
671 _getInt64ArrayAndBroadcast(
nodes_info.view());
684 info() <<
"[Nodes] nb_entity=" << nb_entity
689 <<
" nb_rank=" << m_parallel_mng->
commSize();
704void MshParallelMeshReader::
716 Int64
nb_node2 = _getInt64AndBroadcast();
755 ios_file->binaryRead(nodes_uids.view());
758 for (Integer i = 0; i < nb_to_read; ++i) {
760 nodes_uids[i] = ios_file->getInt64();
764 if (dest_rank != m_master_io_rank) {
765 pm->send(nodes_uids, dest_rank);
768 else if (my_rank == dest_rank) {
769 pm->
recv(nodes_uids, m_master_io_rank);
773 if (my_rank == dest_rank) {
782 info() <<
"Reading COORDS part i=" << i_part <<
" dest_rank=" << dest_rank <<
" nb_to_read=" << nb_to_read;
783 if (my_rank == dest_rank || my_rank == m_master_io_rank) {
784 nodes_coordinates.resize(nb_to_read);
791 ios_file->binaryRead(nodes_coordinates.view());
794 for (Integer i = 0; i < nb_to_read; ++i) {
795 nodes_coordinates[i] = _getReal3();
799 if (dest_rank != m_master_io_rank) {
800 pm->send(nodes_coordinates, dest_rank);
803 else if (my_rank == dest_rank) {
804 pm->
recv(nodes_coordinates, m_master_io_rank);
808 if (my_rank == dest_rank) {
842 info() <<
"Reading block part i_part=" <<
i_part
857 for (Int64 i = 0; i <
nb_uid; ++i) {
861 for (Int32
j = 0;
j < item_nb_node; ++
j) {
869 for (Int64 i = 0; i <
nb_uid; ++i) {
872 for (Int32
j = 0;
j < item_nb_node; ++
j)
873 connectivities[(i * item_nb_node) +
j] =
ios_file->getInt64();
882 pm->
recv(uids, m_master_io_rank);
883 pm->
recv(connectivities, m_master_io_rank);
962 _getInt32ArrayAndBroadcast(
block_info.view());
969 Integer item_nb_node = 0;
970 Integer item_type = _switchMshType(
entity_type, item_nb_node);
972 info() <<
"[Elements] index=" << block.index <<
" entity_dim=" <<
entity_dim
973 <<
" entity_tag=" << entity_tag
975 <<
" item_type=" << item_type <<
" item_nb_node=" << item_nb_node;
978 block.item_type = item_type;
979 block.item_nb_node = item_nb_node;
981 block.entity_tag = entity_tag;
1021 _computeOwnCells(block);
1042 pm->broadcast(view, dest_rank);
1052 template <
typename DataType>
inline ArrayView<DataType>
1053 _broadcastArray(IParallelMng* pm, UniqueArray<DataType>& values,
1054 UniqueArray<DataType>& work_values,
Int32 dest_rank)
1059 if (dest_rank == my_rank)
1060 size = values.size();
1061 pm->broadcast(ArrayView<Int64>(1, &size), dest_rank);
1062 return _broadcastArrayWithSize(pm, values, work_values, dest_rank, size);
1067void MshParallelMeshReader::
1068_computeOwnCells(MeshV4ElementsBlock& block)
1072 IParallelMng* pm = m_parallel_mng;
1075 const Int32 item_type = block.item_type;
1076 const Int32 item_nb_node = block.item_nb_node;
1078 UniqueArray<Int64> connectivities;
1079 UniqueArray<Int64> uids;
1080 UniqueArray<Int32> nodes_rank;
1083 for (
Int32 i_part = 0; i_part < nb_part; ++i_part) {
1086 ArrayView<Int64> connectivities_view = _broadcastArray(pm, block.connectivities, connectivities, dest_rank);
1087 ArrayView<Int64> uids_view = _broadcastArray(pm, block.uids, uids, dest_rank);
1089 Int32 nb_item = uids_view.size();
1090 nodes_rank.resize(nb_item);
1091 nodes_rank.fill(-1);
1096 for (
Int32 i = 0; i < nb_item; ++i) {
1097 Int64 first_node_uid = connectivities_view[i * item_nb_node];
1102 Int32 rank = x->second;
1103 nodes_rank[i] = rank;
1105 pm->
reduce(Parallel::ReduceMax, nodes_rank);
1106 for (
Int32 i = 0; i < nb_item; ++i) {
1107 const Int32 rank = nodes_rank[i];
1108 if (rank != my_rank)
1113 m_mesh_info.cells_type.
add(item_type);
1114 m_mesh_info.cells_nb_node.
add(item_nb_node);
1115 m_mesh_info.cells_uid.
add(uids_view[i]);
1116 auto v = connectivities_view.subView(i * item_nb_node, item_nb_node);
1117 m_mesh_info.cells_connectivity.
addRange(v);
1161 for (Int32 i = 0; i <
nb_item; ++i) {
1172void MshParallelMeshReader::
1177 IMesh* mesh = m_mesh;
1178 Integer nb_elements = m_mesh_info.cells_type.
size();
1179 info() <<
"nb_of_elements=cells_type.size()=" << nb_elements;
1180 Integer nb_cell_node = m_mesh_info.cells_connectivity.
size();
1181 info() <<
"nb_cell_node=cells_connectivity.size()=" << nb_cell_node;
1184 info() <<
"Building cells, nb_cell=" << nb_elements <<
" nb_cell_node=" << nb_cell_node;
1192 for (Integer i = 0; i < nb_elements; ++i) {
1194 Integer
cell_type = m_mesh_info.cells_type[i];
1195 Int64 cell_uid = m_mesh_info.cells_uid[i];
1205 info() <<
"## Allocating ##";
1206 pmesh->allocateCells(nb_elements, cells_infos,
false);
1207 info() <<
"## Ending ##";
1208 pmesh->endAllocate();
1209 info() <<
"## Done ##";
1218void MshParallelMeshReader::
1221 IMesh* mesh = m_mesh;
1222 Int32 mesh_dim = mesh->dimension();
1223 Int32 face_dim = mesh_dim - 1;
1224 UniqueArray<MeshV4EntitiesWithNodes> entity_list;
1225 UniqueArray<MeshPhysicalName> physical_name_list;
1226 for (MeshV4ElementsBlock& block : m_mesh_info.blocks) {
1227 entity_list.clear();
1228 physical_name_list.clear();
1229 Int32 block_index = block.index;
1230 Int32 block_dim = block.dimension;
1233 Int64 block_entity_tag = block.entity_tag;
1234 if (block_entity_tag < 0) {
1235 info(5) <<
"[Groups] Skipping block index=" << block_index <<
" because it has no entity";
1238 if (block_dim == 0) {
1239 const MeshV4EntitiesNodes* entity = m_mesh_info.findNodeEntities(block_entity_tag);
1241 info(5) <<
"[Groups] Skipping block index=" << block_index
1242 <<
" because entity tag is invalid";
1245 Int64 entity_physical_tag = entity->physical_tag;
1246 MeshPhysicalName physical_name = m_mesh_info.physical_name_list.find(block_dim, entity_physical_tag);
1247 physical_name_list.add(physical_name);
1250 m_mesh_info.findEntities(block_dim, block_entity_tag, entity_list);
1251 for (
const MeshV4EntitiesWithNodes& x : entity_list) {
1252 Int64 entity_physical_tag = x.physical_tag;
1253 MeshPhysicalName physical_name = m_mesh_info.physical_name_list.find(block_dim, entity_physical_tag);
1254 physical_name_list.add(physical_name);
1257 for (
const MeshPhysicalName& physical_name : physical_name_list) {
1258 if (physical_name.isNull()) {
1259 info(5) <<
"[Groups] Skipping block index=" << block_index
1260 <<
" because entity physical tag is invalid";
1263 info(4) <<
"[Groups] Block index=" << block_index <<
" dim=" << block_dim
1264 <<
" name='" << physical_name.name <<
"'";
1265 if (block_dim == mesh_dim) {
1268 else if (block_dim == face_dim) {
1299void MshParallelMeshReader::
1303 IMesh* mesh = m_mesh;
1304 const Int32 nb_entity = connectivities.size() / item_nb_node;
1328 for (Integer z = 0; z < item_nb_node; ++z)
1332 for (Integer z = 0; z < item_nb_node; ++z)
1340 faces_nodes_unique_id_index = 0;
1341 for (Integer i_face = 0; i_face < nb_entity; ++i_face) {
1342 const Integer n = item_nb_node;
1343 Int32 face_first_node_lid = faces_first_node_local_id[i_face];
1344 if (face_first_node_lid != NULL_ITEM_LOCAL_ID) {
1345 Int64ConstArrayView face_nodes_id(item_nb_node, &faces_nodes_unique_id[faces_nodes_unique_id_index]);
1346 Node current_node(mesh_nodes[faces_first_node_local_id[i_face]]);
1347 Face face = MeshUtils::getFaceFromNodesUnique(current_node, face_nodes_id);
1352 if (!m_is_parallel) {
1354 ostr() <<
"(Nodes:";
1355 for (Integer z = 0; z < n; ++z)
1356 ostr() <<
' ' << face_nodes_id[z];
1357 ostr() <<
" - " << current_node.localId() <<
")";
1358 ARCANE_FATAL(
"INTERNAL: MeshMeshReader face index={0} with nodes '{1}' is not in node/face connectivity",
1359 i_face, ostr.str());
1363 faces_id.add(face.localId());
1366 faces_nodes_unique_id_index += n;
1368 info(4) <<
"Adding " << faces_id.size() <<
" faces from block index=" << block_index
1369 <<
" to group '" << face_group.
name() <<
"'";
1393void MshParallelMeshReader::
1397 const Int32 nb_entity = uids.size();
1409 if (m_is_parallel) {
1415 info() <<
"Adding " << items_lid.size() <<
" items from block index=" << block_index
1416 <<
" to group '" << group_name <<
"' for family=" << family->
name();
1430void MshParallelMeshReader::
1434 String quote_mark =
"\"";
1435 Int32 nb_name = _getIntegerAndBroadcast();
1436 info() <<
"nb_physical_name=" << nb_name;
1440 for (
Int32 i = 0; i < nb_name; ++i) {
1441 Int32 dim = _getIntegerAndBroadcast();
1442 Int32 tag = _getIntegerAndBroadcast();
1444 if (dim < 0 || dim > 3)
1445 ARCANE_FATAL(
"Invalid value for physical name dimension dim={0}", dim);
1449 if (s.startsWith(quote_mark))
1451 if (s.endsWith(quote_mark))
1452 s = s.substring(0, s.length() - 1);
1453 m_mesh_info.physical_name_list.add(dim, tag, s);
1454 info(4) <<
"[PhysicalName] index=" << i <<
" dim=" << dim <<
" tag=" << tag <<
" name='" << s <<
"'";
1458 if (s !=
"$EndPhysicalNames")
1459 ARCANE_FATAL(
"found '{0}' and expected '$EndPhysicalNames'", s);
1511 info() <<
"Reading entity index=" << i;
1513 Int32 tag = _getInt32();
1517 ARCANE_FATAL(
"NotImplemented numPhysicalTag>1 (n={0}, index={1} xyz={2})",
1520 Int32 physical_tag = -1;
1522 physical_tag = _getInt32();
1523 info(4) <<
"[Entities] point tag=" << tag <<
" pos=" <<
xyz <<
" phys_tag=" << physical_tag;
1528 m_parallel_mng->broadcast(
tag_info.view(), m_master_io_rank);
1536 _readOneEntity(
i_dim);
1547void MshParallelMeshReader::
1562 Int32 tag = _getInt32();
1571 Int32 physical_tag = _getInt32();
1573 info(4) <<
"[Entities] z=" << z <<
" physical_tag=" << physical_tag;
1576 Int64 num_bounding_group = _getInt64();
1577 for (
Int64 k = 0; k < num_bounding_group; ++k) {
1578 [[maybe_unused]]
Int32 group_tag = _getInt32();
1580 info(4) <<
"[Entities] dim=" << entity_dim <<
" tag=" << tag
1581 <<
" min_pos=" << min_pos <<
" max_pos=" << max_pos
1582 <<
" nb_phys_tag=" << nb_physical_tag;
1585 m_parallel_mng->broadcast(dim_and_tag_info.view(), m_master_io_rank);
1589 Int64 tag = dim_and_tag_info[1];
1590 Int64 nb_physical_tag = dim_and_tag_info[2];
1591 for (
Int32 z = 0; z < nb_physical_tag; ++z) {
1592 Int64 physical_tag = dim_and_tag_info[3 + z];
1593 info(4) <<
"[Entities] adding info dim=" << entity_dim <<
" tag=" << tag
1594 <<
" physical_tag=" << physical_tag;
1595 m_mesh_info.entities_with_nodes_list[dim - 1].add(MeshV4EntitiesWithNodes(dim, tag, physical_tag));
1625 Int64
nb_link = _getInt64AndBroadcast();
1647 _getDoubleArrayAndBroadcast(
one_info.m_affine_values);
1649 info() <<
"[Periodic] nb_corresponding_node=" <<
one_info.m_nb_corresponding_node;
1650 one_info.m_corresponding_nodes.resize(
one_info.m_nb_corresponding_node * 2);
1651 _getInt64ArrayAndBroadcast(
one_info.m_corresponding_nodes);
1658 if (s !=
"$EndPeriodic")
1659 ARCANE_FATAL(
"found '{0}' and expected '$EndPeriodic'", s);
1672 constexpr Int32 MAX_SIZE = 128;
1679 IosFile* f = m_ios_file.get();
1683 info() <<
"S=" << s;
1684 if (m_is_parallel) {
1685 m_parallel_mng->broadcastString(s, m_master_io_rank);
1701void MshParallelMeshReader::
1705 IMesh* mesh = m_mesh;
1706 info() <<
"Reading 'msh' file in parallel";
1708 const int MSH_BINARY_TYPE = 1;
1711 Real version =
ios_file->getReal();
1713 ARCANE_THROW(
IOException,
"Wrong msh file version '{0}'. Only version '4.1' is supported in parallel", version);
1719 pwarning() <<
"MSH reader for binary format is experimental";
1734 ios_file->getNextLine();
1737 if (!ios_file->lookForString(
"$EndMeshFormat"))
1747 if (next_line ==
"$PhysicalNames") {
1748 _readPhysicalNames();
1754 if (next_line ==
"$Entities") {
1759 if (next_line !=
"$Nodes")
1760 ARCANE_THROW(IOException,
"Unexpected string '{0}'. Valid values are '$Nodes'", next_line);
1766 if (ios_file && !ios_file->lookForString(
"$EndNodes"))
1770 if (ios_file && !ios_file->lookForString(
"$Elements"))
1776 if (ios_file && !ios_file->lookForString(
"$EndElements"))
1779 info() <<
"Computed mesh dimension = " << mesh_dimension;
1782 pmesh->setDimension(mesh_dimension);
1784 info() <<
"NextLine=" << next_line;
1790 if (next_line ==
"$Periodic") {
1807 info() <<
"Trying to read in parallel 'msh' file '" << filename;
1810 m_parallel_mng = pm;
1811 const Int32 nb_rank = pm->
commSize();
1836 bool is_readable = platform::isFileReadable(filename);
1840 error() <<
"Unable to read file '" << filename <<
"'";
1847 std::ifstream
ifile;
1856 _readMeshFromFile();
1860 info() <<
"The file does not begin with '$MeshFormat' returning RTError";
#define ARCANE_CHECK_POINTER(ptr)
Macro retournant le pointeur ptr s'il est non nul ou lancant une exception s'il est nul.
#define ARCANE_THROW(exception_class,...)
Macro pour envoyer une exception avec formattage.
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Fonctions utilitaires sur le maillage.
Informations sur le type flottant.
Interface d'une famille d'entités.
virtual ItemGroup findGroup(const String &name) const =0
Recherche un groupe.
virtual String name() const =0
Nom de la famille.
virtual void itemsUniqueIdToLocalId(Int32ArrayView local_ids, Int64ConstArrayView unique_ids, bool do_fatal=true) const =0
Converti un tableau de numéros uniques en numéros locaux.
virtual IItemFamily * nodeFamily()=0
Retourne la famille des noeuds.
virtual IItemFamily * faceFamily()=0
Retourne la famille des faces.
eReturnType
Types des codes de retour d'une lecture ou écriture.
@ RTError
Erreur lors de l'opération.
@ RTOk
Opération effectuée avec succès.
virtual VariableNodeReal3 & nodesCoordinates()=0
Coordonnées des noeuds.
virtual IParallelMng * parallelMng()=0
Gestionnaire de parallèlisme.
virtual IPrimaryMesh * toPrimaryMesh()=0
Retourne l'instance sous la forme d'un IPrimaryMesh.
Exception lorsqu'une erreur d'entrée/sortie est détectée.
Interface du gestionnaire de parallélisme pour un sous-domaine.
virtual Int32 commRank() const =0
Rang de cette instance dans le communicateur.
virtual void recv(ArrayView< char > values, Int32 rank)=0
virtual bool isMasterIO() const =0
true si l'instance est un gestionnaire maître des entrées/sorties.
virtual Int32 commSize() const =0
Nombre d'instance dans le communicateur.
virtual Integer masterIORank() const =0
Rang de l'instance gérant les entrées/sorties (pour laquelle isMasterIO() est vrai)
virtual bool isParallel() const =0
Retourne true si l'exécution est parallèle.
virtual char reduce(eReduceType rt, char v)=0
Effectue la réduction de type rt sur le réel v et retourne la valeur.
Routines des Lecture/Ecriture d'un fichier.
Groupe d'entités de maillage.
const String & name() const
Nom du groupe.
void addItems(Int32ConstArrayView items_local_id, bool check_if_present=true)
Ajoute des entités.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Informations sur le maillage créé
std::unordered_map< Int64, Int32 > nodes_rank_map
Tableau associatif (uniqueId(),rang) auquel le noeud appartiendra.
UniqueArray< Int64 > nodes_unique_id
UniqueId() des noeuds de ma partie.
UniqueArray< Real3 > nodes_coordinates
Coordonnées des noeuds de ma partie.
Informations sur la périodicité
Lecteur de fichiers de maillage au format msh.
bool _getIsEndOfFileAndBroadcast()
Retourne true si on est à la fin du fichier.
void _readPeriodic()
Lecture des informations périodiques.
void _addFaceGroup(MeshV4ElementsBlock &block, const String &group_name)
Ajoute des faces au groupe group_name.
Integer _readElementsFromFile()
Lecture des éléments (mailles,faces,...)
void _readAndCheck(const String &expected_value)
Tente de lire la valeur value.
UniqueArray< Int32 > m_parts_rank
Liste des rangs qui participent à la conservation des données.
void _readEntities()
Lecture des entités.
Int32 m_nb_part
Nombre de partitions pour la lecture des noeuds et blocs.
void _readOneElementBlock(MeshV4ElementsBlock &block)
Lit un bloc d'entité de type 'Element'.
void _readNodesFromFile()
Lecture des noeuds du maillage.
void _setNodesCoordinates()
Positionne les coordonnées des noeuds.
eReturnType readMeshFromMshFile(IMesh *mesh, const String &file_name) override
Lit le maillage contenu dans le fichier filename et le construit dans mesh.
bool m_is_binary
Vrai si le format est binaire.
void _addCellOrNodeGroup(MeshV4ElementsBlock &block, const String &group_name, IItemFamily *family)
Ajoute des faces au groupe group_name.
void _computeNodesPartition()
String _getNextLineAndBroadcast()
Lis la valeur de la prochaine ligne et la broadcast aux autres rangs.
Vue sur les informations des noeuds.
Classe gérant un vecteur de réel de dimension 3.
Integer size() const
Nombre d'éléments du vecteur.
Int64 largeSize() const
Nombre d'éléments du vecteur (en 64 bits)
void resize(Int64 s)
Change le nombre d'éléments du tableau à s.
void addRange(ConstReferenceType val, Int64 n)
Ajoute n élément de valeur val à la fin du tableau.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Interface du gestionnaire de traces.
Exception lorsqu'une opération n'est pas supportée.
Chaîne de caractères unicode.
static String collapseWhiteSpace(const String &rhs)
Effectue une normalisation des caractères espaces.
const char * localstr() const
Retourne la conversion de l'instance dans l'encodage UTF-8.
Classe d'accès aux traces.
TraceMessage pwarning() const
TraceMessage error() const
Flot pour un message d'erreur.
TraceMessage info() const
Flot pour un message d'information.
T max(const T &a, const T &b, const T &c)
Retourne le maximum de trois éléments.
ARCCORE_HOST_DEVICE Real2 min(Real2 a, Real2 b)
Retourne le minimum de deux Real2.
Int32 toInt32(Int64 v)
Converti un Int64 en un Int32.
constexpr ARCCORE_HOST_DEVICE bool isNearlyEqual(const _Type &a, const _Type &b)
Teste si deux valeurs sont à un peu près égales. Pour les types entiers, cette fonction est équivalen...
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
Infos du bloc '$PhysicalNames'.
Infos sur un nom physique.
Infos d'un bloc pour $Elements pour la version 4.
Int32 index
Index du bloc dans la liste.
Integer item_type
Type Arcane de l'entité
Int32 dimension
Dimension de l'entité
Int32 item_nb_node
Nombre de noeuds de l'entité.
Int64 nb_entity
Nombre d'entités du bloc.
UniqueArray< Int64 > connectivities
< Liste des uniqueId() du bloc
Infos pour les entités 0D.
Infos pour les entités 1D, 2D et 3D.