|
From: | Andrew Roberts |
Subject: | Re: [Getfem-users] Random Region and Reset Clearing |
Date: | Tue, 7 Jun 2016 21:18:22 -0500 |
Here's my segment of code:Hello All,I have a region ("1") that is defined geometrically on import. I want to randomly select surfaces and put them on region "10", where I have a source condition defined. Then I want to clear region "10" per each step of the transient analysis.
md.shift_variables_for_time_integration();
getfem::mesh_region(10).clear();
for (getfem::mr_visitor i(mesh.region(1)); !i.finished(); ++i) {
if (distribution(generator) > .25) {
mesh.region(10).add(i.cv(),i.f());
}
}I think my method for clearing region 10 is throwing up the "Segmentation fault (core dumped".Any ideas or alternatives?Thanks,Andy
[Prev in Thread] | Current Thread | [Next in Thread] |