~fluidity-core/fluidity/checkpoint-sighup

« back to all changes in this revision

Viewing changes to assemble/tests/test_adapt_mesh.F90

  • Committer: cwilson
  • Date: 2010-12-03 14:03:36 UTC
  • Revision ID: svn-v4:5bf5533e-7014-46e3-b1bb-cce4b9d03719:trunk:2599
Modifying the bounding box metric so that it uses the bounding box calculated in populate_state__compute_domain_statistics consistent with the periodic case.  This is then recalculated after every adapt rather than once per simulation.  Previously in adaptive parallel simulations the domain could resize (in my case quite significantly) after the load balancing.  This lead to strange constraints on my metric and the resolution suddenly changing over large areas of the domain.  As the load balancing occurs three times per adapt this fix isn't necessarily sufficient but hopefully, as the already bounded metric is interpolated and transferred, cutting this corner won't make much difference.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  use state_module
38
38
  use unittest_tools
39
39
  use vtk_interfaces
 
40
  use populate_state_module, only: compute_domain_statistics
40
41
  
41
42
  implicit none
42
43
 
86
87
 
87
88
  call allocate(metric, mesh, "Metric")
88
89
  state_array(1) = state
 
90
  call compute_domain_statistics(state_array)
89
91
  call assemble_metric(state_array, metric)
90
92
  
91
93
  call adapt_mesh(input_mesh_field, metric, output_mesh_field)