mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-05 17:24:17 +05:00
fix archive of identifications that point to shapes that are not in geometrz
This commit is contained in:
parent
5856001819
commit
cf6c702d2c
@ -1772,8 +1772,19 @@ namespace netgen
|
|||||||
ar & has_identifications;
|
ar & has_identifications;
|
||||||
if(has_identifications)
|
if(has_identifications)
|
||||||
{
|
{
|
||||||
auto & idents = GetIdentifications(s);
|
int n_idents;
|
||||||
auto n_idents = idents.size();
|
std::vector<OCCIdentification> used_idents;
|
||||||
|
if(ar.Output())
|
||||||
|
{
|
||||||
|
// only use identifications that are used within the geometry
|
||||||
|
for(auto& id : GetIdentifications(s))
|
||||||
|
{
|
||||||
|
if(shape_map.Contains(id.from) && shape_map.Contains(id.to))
|
||||||
|
used_idents.push_back(id);
|
||||||
|
}
|
||||||
|
n_idents = used_idents.size();
|
||||||
|
}
|
||||||
|
auto & idents = ar.Output() ? used_idents : GetIdentifications(s);
|
||||||
ar & n_idents;
|
ar & n_idents;
|
||||||
idents.resize(n_idents);
|
idents.resize(n_idents);
|
||||||
for(auto i : Range(n_idents))
|
for(auto i : Range(n_idents))
|
||||||
|
Loading…
Reference in New Issue
Block a user