From: blaisb Date: Wed, 27 Nov 2019 12:17:20 +0000 (-0500) Subject: Fixed according to comments X-Git-Tag: v9.2.0-rc1~834^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d663502d1a15c1c4d01f312df65bba0141a8f043;p=dealii.git Fixed according to comments - Added description for the patches member of the data out class - Added lines in between the functions - Added forward declaration of the particle handler in the data out class - Removed non-useful headers --- diff --git a/include/deal.II/particles/data_out.h b/include/deal.II/particles/data_out.h index 39374a2544..3feba4c23c 100644 --- a/include/deal.II/particles/data_out.h +++ b/include/deal.II/particles/data_out.h @@ -16,22 +16,20 @@ #define dealii_particles_data_out_h #include - #include -#include - -#include #include #include - DEAL_II_NAMESPACE_OPEN namespace Particles { + template + class ParticleHandler ; + /** - * This class manages the DataOut of a Particle Handler + * This class generates graphical output for the particles stored by a ParticleHandler object. * From a particle handler, it generates patches which can then be used to * write traditional output files. This class currently only supports witing * the particle position and their ID and does not allow to write the @@ -46,20 +44,20 @@ namespace Particles { public: /** - *Default constructor for the Particles::DataOut class. + * Default constructor for the Particles::DataOut class. */ DataOut() = default; /** - *Default destructor for the Particles::DataOut class. - */ + * Destructor for the Particles::DataOut class. + */ ~DataOut() = default; /** - * Build the patches for a given particles handler. + * Build the patches for a given particle handler. * - * @param [in] particle_handler A particle handler for which the patches will be built + * @param [in] particle_handler A particle handler for which the patches will be built. * A dim=0 patch is built for each particle. The position of the particle is * used to build the node position and the ID of the particle is added as a * single data element. @@ -78,13 +76,17 @@ namespace Particles get_patches() const override; /** - * Returns the name of the data sets associated with the patches. In the - * current implementation the particles only contain the ID + * Virtual function through which the names of data sets are obtained from this class */ virtual std::vector get_dataset_names() const override; private: + /** + * This is a list of patches that is created each time build_patches() is + * called. These patches are used in the output routines of the base + * classes. + */ std::vector> patches; /** diff --git a/source/particles/data_out.cc b/source/particles/data_out.cc index 44a249a14d..36ce34b49a 100644 --- a/source/particles/data_out.cc +++ b/source/particles/data_out.cc @@ -41,6 +41,8 @@ namespace Particles } } + + template const std::vector> & DataOut::get_patches() const @@ -48,6 +50,8 @@ namespace Particles return patches; } + + template std::vector DataOut::get_dataset_names() const