From eed10753e927c683b26b8a06f4353da8e4f56762 Mon Sep 17 00:00:00 2001 From: Roland Greffe <r.greffe@uliege.be> Date: Wed, 14 May 2025 12:23:50 +0200 Subject: [PATCH] Demain constructor faster when there are a lot of subdomains --- src/domain/Domain.cpp | 8 ++++++++ src/domain/Domain.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/domain/Domain.cpp b/src/domain/Domain.cpp index 06d9a491..af79983b 100644 --- a/src/domain/Domain.cpp +++ b/src/domain/Domain.cpp @@ -96,6 +96,14 @@ namespace gmshfem::domain } } + Domain::Domain(const std::vector< std::pair< int, int > > &dimTagEntities) : + GeometricObject() + { + for(auto i = 0ULL; i < dimTagEntities.size(); ++i) { + _addEntity(dimTagEntities[i].first, dimTagEntities[i].second); + } + } + Domain::Domain(const Domain &other) : GeometricObject(other) { diff --git a/src/domain/Domain.h b/src/domain/Domain.h index 9ff7b920..d56ceae1 100644 --- a/src/domain/Domain.h +++ b/src/domain/Domain.h @@ -26,6 +26,7 @@ namespace gmshfem::domain Domain(const std::string &name); Domain(const std::string &name, const JacobiansModificator &jacMod); Domain(const Domain &other); + Domain(const std::vector< std::pair< int, int > > &dimTagEntities); Domain(Domain &&other); virtual ~Domain(); -- GitLab