Class to aid visualisation of the values on a set of points. NOTE: in a distributed problem, output is only done on processor 0. More...
#include <line_visualiser.h>
Public Member Functions | |
LineVisualiser (Mesh *mesh_pt, const Vector< Vector< double >> &coord_vec, const double &max_search_radius=DBL_MAX) | |
Constructor: Pass pointer to mesh and coordinates of desired plot points: coord_vec[j][i] is the i-th coordinate of the j-th plot point. Optional final parameter specifies the maximum search radius in bin when locating the plot points. Defaults to DBL_MAX and will therefore keep searching through the entire bin structure if a point cannot be found. It's worth limiting this to the order of the size of a typical element in the mesh in parallel computations with fine meshes, otherwise the setup can take forever. More... | |
LineVisualiser (Mesh *mesh_pt, const std::string file_name, const double &scale=1.0) | |
Constructor reading centerline file. More... | |
LineVisualiser (Mesh *mesh_pt, const double &max_search_radius, const std::string file_name, const double &scale=1.0) | |
Constructor reading centerline file. More... | |
void | output (std::ostream &outfile) |
Output function: output each plot point. NOTE: in a distributed problem, output is only done on processor 0. More... | |
void | get_output_data (Vector< Vector< double >> &data) |
Output data function: store data associated with each plot point in data array. More... | |
void | update_plot_points_coordinates (Vector< Vector< double >> &coord_vec) |
Update plot points coordinates (in preparation of remesh, say). More... | |
Private Member Functions | |
void | setup_from_file (Mesh *mesh_pt, const std::string file_name, const double &scale) |
Helper function to setup from file. More... | |
void | setup (Mesh *mesh_pt, const Vector< Vector< double >> &coord_vec) |
Helper function to setup the output structures. More... | |
void | get_local_plot_points_coordinates (Vector< Vector< double >> &data) |
Private Attributes | |
double | Max_search_radius |
Max radius beyond which we stop searching the bin. Initialised to DBL_MAX so keep going until the point is found or until we've searched every single bin. Overwriting this means we won't search in bins whose closest vertex is at a distance greater than Max_search_radius from the point to be located. More... | |
OomphCommunicator * | Comm_pt |
Pointer to communicator – allows us to collect data on processor 0 if the mesh is distributed. More... | |
Vector< std::pair< FiniteElement *, Vector< double > > > | Plot_point |
Vector of pairs containing points to finite elements and local coordinates. More... | |
unsigned | Nplot_points |
Number of plot points. More... | |
Class to aid visualisation of the values on a set of points. NOTE: in a distributed problem, output is only done on processor 0.
Definition at line 48 of file line_visualiser.h.
|
inline |
Constructor: Pass pointer to mesh and coordinates of desired plot points: coord_vec[j][i] is the i-th coordinate of the j-th plot point. Optional final parameter specifies the maximum search radius in bin when locating the plot points. Defaults to DBL_MAX and will therefore keep searching through the entire bin structure if a point cannot be found. It's worth limiting this to the order of the size of a typical element in the mesh in parallel computations with fine meshes, otherwise the setup can take forever.
Definition at line 60 of file line_visualiser.h.
References setup().
|
inline |
Constructor reading centerline file.
Definition at line 75 of file line_visualiser.h.
References setup_from_file().
|
inline |
Constructor reading centerline file.
Definition at line 93 of file line_visualiser.h.
References setup_from_file().
|
inlineprivate |
Definition at line 801 of file line_visualiser.h.
References i, Nplot_points, and Plot_point.
Referenced by update_plot_points_coordinates().
Output data function: store data associated with each plot point in data array.
Definition at line 134 of file line_visualiser.h.
References Comm_pt, i, Nplot_points, and Plot_point.
Referenced by output().
|
inline |
Output function: output each plot point. NOTE: in a distributed problem, output is only done on processor 0.
Definition at line 107 of file line_visualiser.h.
References get_output_data(), i, and Nplot_points.
|
inlineprivate |
Helper function to setup the output structures.
Definition at line 668 of file line_visualiser.h.
References Comm_pt, i, oomph::MeshAsGeomObject::locate_zeta(), Max_search_radius, SamplePointContainer::max_search_radius(), Nplot_points, oomph::oomph_info, Plot_point, s, oomph::MeshAsGeomObject::sample_point_container_pt(), and oomph::TimingHelpers::timer().
Referenced by LineVisualiser(), and setup_from_file().
|
inlineprivate |
Helper function to setup from file.
Definition at line 603 of file line_visualiser.h.
References i, oomph::oomph_info, setup(), and oomph::Global_string_for_annotation::string().
Referenced by LineVisualiser().
|
inline |
Update plot points coordinates (in preparation of remesh, say).
Definition at line 370 of file line_visualiser.h.
References Comm_pt, get_local_plot_points_coordinates(), i, Nplot_points, and Plot_point.
|
private |
Pointer to communicator – allows us to collect data on processor 0 if the mesh is distributed.
Definition at line 600 of file line_visualiser.h.
Referenced by get_output_data(), setup(), and update_plot_points_coordinates().
|
private |
Max radius beyond which we stop searching the bin. Initialised to DBL_MAX so keep going until the point is found or until we've searched every single bin. Overwriting this means we won't search in bins whose closest vertex is at a distance greater than Max_search_radius from the point to be located.
Definition at line 596 of file line_visualiser.h.
Referenced by setup().
|
private |
Number of plot points.
Definition at line 827 of file line_visualiser.h.
Referenced by get_local_plot_points_coordinates(), get_output_data(), output(), setup(), and update_plot_points_coordinates().
|
private |
Vector of pairs containing points to finite elements and local coordinates.
Definition at line 824 of file line_visualiser.h.
Referenced by get_local_plot_points_coordinates(), get_output_data(), setup(), and update_plot_points_coordinates().