Joshua,

> I have run into a similar problem before, and implemented a fourth
> option you may want to try.  I implemented a MeshMovement class that
> takes my triangulation and dof_handler as constructor arguments.  Once
> the triangulation is initialized in the reference configuration, the
> class has a function "record_reference_configuration()" which
> basically stores the nodal coordinates of the mesh for later use.  It
> then has two functions, "move_mesh_to_reference_configuration()" and
> "move_mesh_to_deformed_configuration(..)".  The latter takes a
> displacement vector and optional scaling value.  Using these two
> functions, you can move the mesh back and forth between the deformed
> and the (stored) reference configurations, writing output in the
> deformed config and calculating fe_values in the reference config.
> Obviously this may be a little slow,

You can make this much more efficient using the following functions in the 
Triangulation class:
  n_vertices()
  get_vertices()
  get_used_vertices()
This at least makes the record_reference_configuration() function faster. 
Obviously, the class is missing a set_vertices() function -- if you want 
to write one, I'd be happy to include it into the library.

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/


_______________________________________________

Reply via email to