getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] Random Region and Reset Clearing


From: Andrew Roberts
Subject: [Getfem-users] Random Region and Reset Clearing
Date: Tue, 7 Jun 2016 18:09:38 -0500

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.

Here's my segment of code:

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]