Commit 4ee7604c authored by Kévin Moreau's avatar Kévin Moreau

bug correction on transfer of sm_bnd_in_nonlocal and sm_int_in_nonlocal

parent 276058c8
......@@ -461,20 +461,37 @@ void TLSGeom::transferTLSNonlocal() {
void TLSGeom::transferBndIntInNonlocal() {
auto& mesh=getMesh();
auto& sm_duplicated=mesh.getSubMesh("duplicated");
auto& sm_int_duplicated=mesh.getSubMesh("int_duplicated");
auto& sm_int_fds=mesh.getSubMesh("int_fds");
auto& sm_bnd_in_nonlocal=mesh.getSubMesh("bnd_in_nonlocal");
auto& sm_int_in_nonlocal=mesh.getSubMesh("int_in_nonlocal");
// Remark: we remove too many entities in first loop and add it in second loop
for(auto it=sm_int_fds.begin(0); it!=sm_int_fds.end(0); ++it) {
sm_bnd_in_nonlocal.del(*it);
sm_int_in_nonlocal.del(*it);
xAttached duplicated_parent(was_created_by_tag);
std::vector<mEntity*> todump_bnd, todump_int;
todump_bnd.reserve(sm_int_duplicated.size(0));
todump_int.reserve(sm_int_duplicated.size(0));
for(auto it=sm_int_duplicated.begin(0); it!=sm_int_duplicated.end(0); ++it) {
auto vd=*it;
auto vp=duplicated_parent(vd);
if(sm_bnd_in_nonlocal.find(vp)) {
todump_bnd.push_back(vp);
sm_bnd_in_nonlocal.add(vd);
}
else if(sm_int_in_nonlocal.find(vp)) {
todump_int.push_back(vp);
sm_int_in_nonlocal.add(vd);
}
else {
std::cout<<"Error: in transferBndIntInNonlocal"<<std::endl;
std::abort();
}
}
for(auto it=sm_duplicated.begin(0); it!=sm_duplicated.end(0); ++it) {
sm_bnd_in_nonlocal.add(*it);
sm_int_in_nonlocal.add(*it);
for(auto v: todump_bnd) {
sm_bnd_in_nonlocal.del(v);
}
for(auto v: todump_int) {
sm_int_in_nonlocal.del(v);
}
xEvalConstant<double> eval_one(1.);
xIntegrationRuleBasic integ_rule(0);
......@@ -684,7 +701,7 @@ void TLSGeom::deleteBndIntInNonlocal() {
void TLSGeom::deleteFullyDamagedSupport() {
auto& mesh=getMesh();
auto fds=xRegion(&mesh.getSubMesh("fds"));
xRegion fds(&mesh.getSubMesh("fds"));
// for(auto it=fds.begin(); it!=fds.end(); ++it) {
// delete *it;
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment