From: Manav Bhatia <bhatiamanav@gm...>  20130401 03:12:21

Hi, Has anyone managed to get around Paraview's issue of treating sides with hanging nodes as boundaries? I need to extract the data on domain boundary, and I have been using Feature Edges for this. But this does not work as expected with AMR data. Any suggestions would be appreciated. On a related note, are there open source postprocessors that do not have this limitation? Anyone has experience with Visit? Thanks, Manav 
From: Derek Gaston <friedmud@gm...>  20130401 04:02:21

VisIt is the only other reasonable opensource alternative. We have used it quite a bit and it can do some very interesting things. You should definitely try it out. If you don't mind closed source you should look at Ensight: http://www.ensight.com/ . There is a free version that is a bit limited, but it might work for your purposes. The pay version is _very_ powerful... we've relied on it for years for many of our biggest postprocessing jobs. Derek On Sun, Mar 31, 2013 at 9:12 PM, Manav Bhatia <bhatiamanav@...> wrote: > Hi, > > Has anyone managed to get around Paraview's issue of treating sides with > hanging nodes as boundaries? I need to extract the data on domain boundary, > and I have been using Feature Edges for this. But this does not work as > expected with AMR data. > > Any suggestions would be appreciated. > > On a related note, are there open source postprocessors that do not > have this limitation? Anyone has experience with Visit? > > Thanks, > Manav > > > >  > Own the FutureIntel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: Manav Bhatia <bhatiamanav@gm...>  20130401 06:22:35

I have a temporary solution for this: I have defined another solution variable in a post processing system that writes out the boundary id for each node. Then, the Threshold filter in Paraview selects the cells on the boundary (can't find a way to select just the nodes). Manav On Apr 1, 2013, at 12:01 AM, Derek Gaston <friedmud@...> wrote: > VisIt is the only other reasonable opensource alternative. We have used it quite a bit and it can do some very interesting things. You should definitely try it out. > > If you don't mind closed source you should look at Ensight: http://www.ensight.com/ . There is a free version that is a bit limited, but it might work for your purposes. The pay version is _very_ powerful... we've relied on it for years for many of our biggest postprocessing jobs. > > Derek > > > On Sun, Mar 31, 2013 at 9:12 PM, Manav Bhatia <bhatiamanav@...> wrote: >> Hi, >> >> Has anyone managed to get around Paraview's issue of treating sides with hanging nodes as boundaries? I need to extract the data on domain boundary, and I have been using Feature Edges for this. But this does not work as expected with AMR data. >> >> Any suggestions would be appreciated. >> >> On a related note, are there open source postprocessors that do not have this limitation? Anyone has experience with Visit? >> >> Thanks, >> Manav >> >> >>  >> Own the FutureIntel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: Manav Bhatia <bhatiamanav@gm...>  20130401 04:35:22

Thanks, Derek. A related question about libMesh: If I need to output the solution values on the boundary nodes, can I use BoundaryMesh along with the IO classes for that? Meaning, if I do the following BoundaryMesh b_mesh(mesh.mesh_dimension()1); mesh.boundary_info>sync(b_mesh); VTKIO(b_mesh).write_equation_systems("boundary_output.pvtu", equation_systems); Would this write the solution values on the boundary nodes? Manav On Apr 1, 2013, at 12:01 AM, Derek Gaston <friedmud@...> wrote: > VisIt is the only other reasonable opensource alternative. We have used it quite a bit and it can do some very interesting things. You should definitely try it out. > > If you don't mind closed source you should look at Ensight: http://www.ensight.com/ . There is a free version that is a bit limited, but it might work for your purposes. The pay version is _very_ powerful... we've relied on it for years for many of our biggest postprocessing jobs. > > Derek > 
From: Kirk, Benjamin (JSCEG311) <benjamin.kirk1@na...>  20130401 11:50:29

On Mar 31, 2013, at 11:35 PM, "Manav Bhatia" <bhatiamanav@...> wrote: > Thanks, Derek. > > A related question about libMesh: > > If I need to output the solution values on the boundary nodes, can I use BoundaryMesh along with the IO classes for that? > > Meaning, if I do the following > > BoundaryMesh b_mesh(mesh.mesh_dimension()1); > mesh.boundary_info>sync(b_mesh); > VTKIO(b_mesh).write_equation_systems("boundary_output.pvtu", equation_systems); > > > Would this write the solution values on the boundary nodes? Almost. Unfortunately it is a little more manual than this, but that's the right idea. In your example the equation systems object can only be associated with one mesh, so it won't work. The fix is to create a second equation systems object that lives on the boundary and then extract the trace values. This is not automated because in general the user will want physicsdependent things like shear stress, heat flux, whatever... I suppose we could automate the valuesonly case though. Ben 
From: David Knezevic <dknezevic@se...>  20130401 13:06:09

On 04/01/2013 07:50 AM, Kirk, Benjamin (JSCEG311) wrote: > On Mar 31, 2013, at 11:35 PM, "Manav Bhatia" <bhatiamanav@...> wrote: > >> Thanks, Derek. >> >> A related question about libMesh: >> >> If I need to output the solution values on the boundary nodes, can I use BoundaryMesh along with the IO classes for that? >> >> Meaning, if I do the following >> >> BoundaryMesh b_mesh(mesh.mesh_dimension()1); >> mesh.boundary_info>sync(b_mesh); >> VTKIO(b_mesh).write_equation_systems("boundary_output.pvtu", equation_systems); >> >> >> Would this write the solution values on the boundary nodes? > Almost. Unfortunately it is a little more manual than this, but that's the right idea. In your example the equation systems object can only be associated with one mesh, so it won't work. The fix is to create a second equation systems object that lives on the boundary and then extract the trace values. > > This is not automated because in general the user will want physicsdependent things like shear stress, heat flux, whatever... > > I suppose we could automate the valuesonly case though. > > Ben To get the "boundary only values" I first make a "boundary_dofmap", as in the code below. Then copying the solution values over from system to boundary_system is easy. void create_disp_boundary_dofmap(System& system, System& boundary_system, std::vector<unsigned int>& boundary_dofmap) { boundary_dofmap.resize(boundary_system.n_dofs()); // make a point locator for system AutoPtr<PointLocatorBase> point_locator = system.get_mesh().sub_point_locator(); // loop over the boundary nodes and locate them // then fill in boundary_dofmap MeshBase::node_iterator node_it = boundary_system.get_mesh().nodes_begin(); const MeshBase::node_iterator node_end = boundary_system.get_mesh().nodes_end(); for( ; node_it != node_end; node_it++) { Node* node = *node_it; // get an element in the full mesh that contains node const Elem* element = point_locator>operator()(*node); // loop over the nodes of element until we find the one that matches node for(unsigned int node_id=0; node_id<element>n_nodes(); node_id++) { Node* new_node = element>get_node(node_id); Real dist = std::sqrt( pow(node>operator()(0)new_node>operator()(0),2.) + pow(node>operator()(1)new_node>operator()(1),2.) + pow(node>operator()(2)new_node>operator()(2),2.) ); if(dist < TOLERANCE) { for(unsigned int var=0; var<system.n_vars(); var++) { unsigned int index1 = node>dof_number(boundary_system.number(), var, 0); unsigned int index2 = new_node>dof_number(system.number(), var, 0); boundary_dofmap[index1] = index2; } continue; } } } } 
From: Manav Bhatia <bhatiamanav@gm...>  20130403 01:01:23

To get the boundary surface mesh, I ended up hacking into the vtk_io class. In the cells_to_vtk method, I added an IF block based on a flag passed during construction (true=write whole mesh, false=write mesh on boundary). So, when true, the method operates as usual, and when false, it iterate on the sides of the element, and if it lies on the boundary, it is written to the output file. So far, this seems to be working alright, except that I have a lot of unwanted nodal data in the output file. I will be happy to share the patch if anyone is interested. Manav On Mon, Apr 1, 2013 at 9:05 AM, David Knezevic <dknezevic@...>wrote: > On 04/01/2013 07:50 AM, Kirk, Benjamin (JSCEG311) wrote: > > On Mar 31, 2013, at 11:35 PM, "Manav Bhatia" <bhatiamanav@...> > wrote: > > > >> Thanks, Derek. > >> > >> A related question about libMesh: > >> > >> If I need to output the solution values on the boundary nodes, can I > use BoundaryMesh along with the IO classes for that? > >> > >> Meaning, if I do the following > >> > >> BoundaryMesh b_mesh(mesh.mesh_dimension()1); > >> mesh.boundary_info>sync(b_mesh); > >> > VTKIO(b_mesh).write_equation_systems("boundary_output.pvtu", > equation_systems); > >> > >> > >> Would this write the solution values on the boundary nodes? > > Almost. Unfortunately it is a little more manual than this, but that's > the right idea. In your example the equation systems object can only be > associated with one mesh, so it won't work. The fix is to create a second > equation systems object that lives on the boundary and then extract the > trace values. > > > > This is not automated because in general the user will want > physicsdependent things like shear stress, heat flux, whatever... > > > > I suppose we could automate the valuesonly case though. > > > > Ben > > > To get the "boundary only values" I first make a "boundary_dofmap", as > in the code below. Then copying the solution values over from system to > boundary_system is easy. > > > > void create_disp_boundary_dofmap(System& system, > System& boundary_system, > std::vector<unsigned int>& > boundary_dofmap) > { > boundary_dofmap.resize(boundary_system.n_dofs()); > > // make a point locator for system > AutoPtr<PointLocatorBase> point_locator = > system.get_mesh().sub_point_locator(); > > // loop over the boundary nodes and locate them > // then fill in boundary_dofmap > MeshBase::node_iterator node_it = > boundary_system.get_mesh().nodes_begin(); > const MeshBase::node_iterator node_end = > boundary_system.get_mesh().nodes_end(); > > for( ; node_it != node_end; node_it++) > { > Node* node = *node_it; > > // get an element in the full mesh that contains node > const Elem* element = point_locator>operator()(*node); > > // loop over the nodes of element until we find the one that > matches node > for(unsigned int node_id=0; node_id<element>n_nodes(); node_id++) > { > Node* new_node = element>get_node(node_id); > > Real dist = std::sqrt( > pow(node>operator()(0)new_node>operator()(0),2.) + > pow(node>operator()(1)new_node>operator()(1),2.) + > pow(node>operator()(2)new_node>operator()(2),2.) ); > > if(dist < TOLERANCE) > { > for(unsigned int var=0; var<system.n_vars(); var++) > { > unsigned int index1 = > node>dof_number(boundary_system.number(), var, 0); > unsigned int index2 = new_node>dof_number(system.number(), > var, 0); > boundary_dofmap[index1] = index2; > } > continue; > } > > } > } > > } > > >  > Own the FutureIntel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 