From: bangerth Date: Tue, 14 Feb 2012 08:51:04 +0000 (+0000) Subject: Move the DataEntryBase and derived classes out of the DataOut_DoFData class and into... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b975e7e9a22841f2e408b31a2007eaf334dfb77;p=dealii-svn.git Move the DataEntryBase and derived classes out of the DataOut_DoFData class and into namespace internal. This is the first step to allowing completely different vector types for add_data_vector. git-svn-id: https://svn.dealii.org/trunk@25063 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/numerics/data_out.h b/deal.II/include/deal.II/numerics/data_out.h index 7397c59529..f8b125fa5a 100644 --- a/deal.II/include/deal.II/numerics/data_out.h +++ b/deal.II/include/deal.II/numerics/data_out.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -36,6 +36,190 @@ namespace internal { namespace DataOut { + /** + * For each vector that has been added + * through the add_data_vector() + * functions, we need to keep track of a + * pointer to it, and allow data + * extraction from it when we generate + * patches. Unfortunately, we need to do + * this for a number of different vector + * types. Fortunately, they all have the + * same interface. So the way we go is to + * have a base class that provides the + * functions to access the vector's + * information, and to have a derived + * template class that can be + * instantiated for each vector + * type. Since the vectors all have the + * same interface, this is no big + * problem, as they can all use the same + * general templatized code. + * + * @author Wolfgang Bangerth, 2004 + */ + template + class DataEntryBase + { + public: + /** + * Constructor. Give a list of names + * for the individual components of + * the vector and their + * interpretation as scalar or vector + * data. This constructor assumes + * that no postprocessor is going to + * be used. + */ + DataEntryBase (const std::vector &names, + const std::vector &data_component_interpretation); + + /** + * Constructor when a data + * postprocessor is going to be + * used. In that case, the names and + * vector declarations are going to + * be aquired from the postprocessor. + */ + DataEntryBase (const DataPostprocessor *data_postprocessor); + + /** + * Destructor made virtual. + */ + virtual ~DataEntryBase (); + + /** + * Assuming that the stored vector is + * a cell vector, extract the given + * element from it. + */ + virtual + double + get_cell_data_value (const unsigned int cell_number) const = 0; + + /** + * Given a FEValuesBase object, + * extract the values on the present + * cell from the vector we actually + * store. + */ + virtual + void + get_function_values (const FEValuesBase &fe_patch_values, + std::vector &patch_values) const = 0; + + /** + * Given a FEValuesBase object, + * extract the values on the present + * cell from the vector we actually + * store. This function does the same + * as the one above but for + * vector-valued finite elements. + */ + virtual + void + get_function_values (const FEValuesBase &fe_patch_values, + std::vector > &patch_values_system) const = 0; + + /** + * Given a FEValuesBase object, + * extract the gradients on the present + * cell from the vector we actually + * store. + */ + virtual + void + get_function_gradients (const FEValuesBase &fe_patch_values, + std::vector > &patch_gradients) const = 0; + + /** + * Given a FEValuesBase object, + * extract the gradients on the present + * cell from the vector we actually + * store. This function does the same + * as the one above but for + * vector-valued finite elements. + */ + virtual + void + get_function_gradients (const FEValuesBase &fe_patch_values, + std::vector > > &patch_gradients_system) const = 0; + + /** + * Given a FEValuesBase object, extract + * the second derivatives on the + * present cell from the vector we + * actually store. + */ + virtual + void + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const = 0; + + /** + * Given a FEValuesBase object, extract + * the second derivatives on the + * present cell from the vector we + * actually store. This function does + * the same as the one above but for + * vector-valued finite elements. + */ + virtual + void + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const = 0; + + /** + * Clear all references to the + * vectors. + */ + virtual void clear () = 0; + + /** + * Determine an estimate for + * the memory consumption (in + * bytes) of this object. + */ + virtual std::size_t memory_consumption () const = 0; + + /** + * Names of the components of this + * data vector. + */ + const std::vector names; + + /** + * A vector that for each of the + * n_output_variables variables of + * the current data set indicates + * whether they are scalar fields, + * parts of a vector-field, or any of + * the other supported kinds of data. + */ + const std::vector + data_component_interpretation; + + /** + * Pointer to a DataPostprocessing + * object which shall be applied to + * this data vector. + */ + SmartPointer > postprocessor; + + /** + * Number of output variables this + * dataset provides (either number of + * components in vector valued function + * / data vector or number of computed + * quantities, if DataPostprocessor is + * applied). This variable is + * determined via and thus equivalent + * to names.size(). + */ + unsigned int n_output_variables; + }; + + /** * A data structure that holds * all data needed in one thread @@ -720,330 +904,6 @@ class DataOut_DoFData : public DataOutInterface << "> does not satisfy these conditions."); protected: - /** - * For each vector that has been added - * through the add_data_vector() - * functions, we need to keep track of a - * pointer to it, and allow data - * extraction from it when we generate - * patches. Unfortunately, we need to do - * this for a number of different vector - * types. Fortunately, they all have the - * same interface. So the way we go is to - * have a base class that provides the - * functions to access the vector's - * information, and to have a derived - * template class that can be - * instantiated for each vector - * type. Since the vectors all have the - * same interface, this is no big - * problem, as they can all use the same - * general templatized code. - * - * @author Wolfgang Bangerth, 2004 - */ - class DataEntryBase - { - public: - /** - * Constructor. Give a list of names - * for the individual components of - * the vector and their - * interpretation as scalar or vector - * data. This constructor assumes - * that no postprocessor is going to - * be used. - */ - DataEntryBase (const std::vector &names, - const std::vector &data_component_interpretation); - - /** - * Constructor when a data - * postprocessor is going to be - * used. In that case, the names and - * vector declarations are going to - * be aquired from the postprocessor. - */ - DataEntryBase (const DataPostprocessor *data_postprocessor); - - /** - * Destructor made virtual. - */ - virtual ~DataEntryBase (); - - /** - * Assuming that the stored vector is - * a cell vector, extract the given - * element from it. - */ - virtual - double - get_cell_data_value (const unsigned int cell_number) const = 0; - - /** - * Given a FEValuesBase object, - * extract the values on the present - * cell from the vector we actually - * store. - */ - virtual - void - get_function_values (const FEValuesBase &fe_patch_values, - std::vector &patch_values) const = 0; - - /** - * Given a FEValuesBase object, - * extract the values on the present - * cell from the vector we actually - * store. This function does the same - * as the one above but for - * vector-valued finite elements. - */ - virtual - void - get_function_values (const FEValuesBase &fe_patch_values, - std::vector > &patch_values_system) const = 0; - - /** - * Given a FEValuesBase object, - * extract the gradients on the present - * cell from the vector we actually - * store. - */ - virtual - void - get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > &patch_gradients) const = 0; - - /** - * Given a FEValuesBase object, - * extract the gradients on the present - * cell from the vector we actually - * store. This function does the same - * as the one above but for - * vector-valued finite elements. - */ - virtual - void - get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > > &patch_gradients_system) const = 0; - - /** - * Given a FEValuesBase object, extract - * the second derivatives on the - * present cell from the vector we - * actually store. - */ - virtual - void - get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const = 0; - - /** - * Given a FEValuesBase object, extract - * the second derivatives on the - * present cell from the vector we - * actually store. This function does - * the same as the one above but for - * vector-valued finite elements. - */ - virtual - void - get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const = 0; - - /** - * Clear all references to the - * vectors. - */ - virtual void clear () = 0; - - /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this object. - */ - virtual std::size_t memory_consumption () const = 0; - - /** - * Names of the components of this - * data vector. - */ - const std::vector names; - - /** - * A vector that for each of the - * n_output_variables variables of - * the current data set indicates - * whether they are scalar fields, - * parts of a vector-field, or any of - * the other supported kinds of data. - */ - const std::vector - data_component_interpretation; - - /** - * Pointer to a DataPostprocessing - * object which shall be applied to - * this data vector. - */ - SmartPointer,DataOut_DoFData > postprocessor; - - /** - * Number of output variables this - * dataset provides (either number of - * components in vector valued function - * / data vector or number of computed - * quantities, if DataPostprocessor is - * applied). This variable is - * determined via and thus equivalent - * to names.size(). - */ - unsigned int n_output_variables; - }; - - - /** - * Class that stores a pointer to a - * vector of type equal to the template - * argument, and provides the functions - * to extract data from it. - * - * @author Wolfgang Bangerth, 2004 - */ - template - class DataEntry : public DataEntryBase - { - public: - /** - * Constructor. Give a list of names - * for the individual components of - * the vector and their - * interpretation as scalar or vector - * data. This constructor assumes - * that no postprocessor is going to - * be used. - */ - DataEntry (const VectorType *data, - const std::vector &names, - const std::vector &data_component_interpretation); - - /** - * Constructor when a data - * postprocessor is going to be - * used. In that case, the names and - * vector declarations are going to - * be aquired from the postprocessor. - */ - DataEntry (const VectorType *data, - const DataPostprocessor *data_postprocessor); - - /** - * Assuming that the stored vector is - * a cell vector, extract the given - * element from it. - */ - virtual - double - get_cell_data_value (const unsigned int cell_number) const; - - /** - * Given a FEValuesBase object, - * extract the values on the present - * cell from the vector we actually - * store. - */ - virtual - void - get_function_values (const FEValuesBase &fe_patch_values, - std::vector &patch_values) const; - - /** - * Given a FEValuesBase object, - * extract the values on the present - * cell from the vector we actually - * store. This function does the same - * as the one above but for - * vector-valued finite elements. - */ - virtual - void - get_function_values (const FEValuesBase &fe_patch_values, - std::vector > &patch_values_system) const; - - /** - * Given a FEValuesBase object, - * extract the gradients on the present - * cell from the vector we actually - * store. - */ - virtual - void - get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > &patch_gradients) const; - - /** - * Given a FEValuesBase object, - * extract the gradients on the present - * cell from the vector we actually - * store. This function does the same - * as the one above but for - * vector-valued finite elements. - */ - virtual - void - get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > > &patch_gradients_system) const; - - /** - * Given a FEValuesBase object, extract - * the second derivatives on the - * present cell from the vector we - * actually store. - */ - virtual - void - get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const; - - /** - * Given a FEValuesBase object, extract - * the second derivatives on the - * present cell from the vector we - * actually store. This function does - * the same as the one above but for - * vector-valued finite elements. - */ - virtual - void - get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const; - - /** - * Clear all references to the - * vectors. - */ - virtual void clear (); - - /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this object. - */ - virtual std::size_t memory_consumption () const; - - private: - /** - * Pointer to the data - * vector. Note that - * ownership of the vector - * pointed to remains with - * the caller of this class. - */ - const VectorType *vector; - }; - - /** * Abbreviate the somewhat lengthy * name for the Patch class. @@ -1059,13 +919,13 @@ class DataOut_DoFData : public DataOutInterface * List of data elements with vectors of * values for each degree of freedom. */ - std::vector > dof_data; + std::vector > > dof_data; /** * List of data elements with vectors of * values for each cell. */ - std::vector > cell_data; + std::vector > > cell_data; /** * This is a list of patches that is @@ -1111,33 +971,6 @@ class DataOut_DoFData : public DataOutInterface */ template friend class DataOut_DoFData; - -#ifdef DEAL_II_NESTED_CLASS_FRIEND_BUG - /** - * Make DataEntry a friend. This should - * not be strictly necessary, since - * members are implicitly friends, but in - * this case it seems as if icc needs - * this. Otherwise, it complains that - * DataEntry can't derive from - * DataEntryBase since the latter is a - * private member of DataOut_DoFData. - * - * For whatever weird reason, it is also - * not enough to make just DataEntry a - * friend, but we have to fully qualify - * it for icc, while gcc 2.95 insists on - * the non-qualified version... - */ -# ifdef DEAL_II_NESTED_CLASS_TEMPL_FRIEND_BUG - template - friend class DataEntry; -# else - template class DH1, int N2, int N3> - template - friend class DataOut_DoFData::DataEntry; -# endif -#endif }; diff --git a/deal.II/source/numerics/data_out.cc b/deal.II/source/numerics/data_out.cc index 16c7ff58a9..961cc5b83c 100644 --- a/deal.II/source/numerics/data_out.cc +++ b/deal.II/source/numerics/data_out.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -92,216 +92,336 @@ namespace internal } -template -DataOut_DoFData:: -DataEntryBase::DataEntryBase (const std::vector &names_in, - const std::vector &data_component_interpretation) - : - names(names_in), - data_component_interpretation (data_component_interpretation), - postprocessor(0, typeid(*this).name()), - n_output_variables(names.size()) +namespace internal { - Assert (names.size() == data_component_interpretation.size(), - ExcDimensionMismatch(data_component_interpretation.size(), - names.size())); - - // check that the names use only allowed - // characters - // check names for invalid characters - for (unsigned int i=0; i()") == std::string::npos, - ExcInvalidCharacter (names[i], - names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789_<>()"))); -} + namespace DataOut + { + /** + * Class that stores a pointer to a + * vector of type equal to the template + * argument, and provides the functions + * to extract data from it. + * + * @author Wolfgang Bangerth, 2004 + */ + template + class DataEntry : public DataEntryBase + { + public: + /** + * Constructor. Give a list of names + * for the individual components of + * the vector and their + * interpretation as scalar or vector + * data. This constructor assumes + * that no postprocessor is going to + * be used. + */ + DataEntry (const VectorType *data, + const std::vector &names, + const std::vector &data_component_interpretation); + + /** + * Constructor when a data + * postprocessor is going to be + * used. In that case, the names and + * vector declarations are going to + * be aquired from the postprocessor. + */ + DataEntry (const VectorType *data, + const DataPostprocessor *data_postprocessor); + + /** + * Assuming that the stored vector is + * a cell vector, extract the given + * element from it. + */ + virtual + double + get_cell_data_value (const unsigned int cell_number) const; + + /** + * Given a FEValuesBase object, + * extract the values on the present + * cell from the vector we actually + * store. + */ + virtual + void + get_function_values (const FEValuesBase &fe_patch_values, + std::vector &patch_values) const; + + /** + * Given a FEValuesBase object, + * extract the values on the present + * cell from the vector we actually + * store. This function does the same + * as the one above but for + * vector-valued finite elements. + */ + virtual + void + get_function_values (const FEValuesBase &fe_patch_values, + std::vector > &patch_values_system) const; + + /** + * Given a FEValuesBase object, + * extract the gradients on the present + * cell from the vector we actually + * store. + */ + virtual + void + get_function_gradients (const FEValuesBase &fe_patch_values, + std::vector > &patch_gradients) const; + + /** + * Given a FEValuesBase object, + * extract the gradients on the present + * cell from the vector we actually + * store. This function does the same + * as the one above but for + * vector-valued finite elements. + */ + virtual + void + get_function_gradients (const FEValuesBase &fe_patch_values, + std::vector > > &patch_gradients_system) const; + + /** + * Given a FEValuesBase object, extract + * the second derivatives on the + * present cell from the vector we + * actually store. + */ + virtual + void + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const; + + /** + * Given a FEValuesBase object, extract + * the second derivatives on the + * present cell from the vector we + * actually store. This function does + * the same as the one above but for + * vector-valued finite elements. + */ + virtual + void + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const; + + /** + * Clear all references to the + * vectors. + */ + virtual void clear (); + + /** + * Determine an estimate for + * the memory consumption (in + * bytes) of this object. + */ + virtual std::size_t memory_consumption () const; + + private: + /** + * Pointer to the data + * vector. Note that + * ownership of the vector + * pointed to remains with + * the caller of this class. + */ + const VectorType *vector; + }; + + + + template + DataEntryBase::DataEntryBase (const std::vector &names_in, + const std::vector &data_component_interpretation) + : + names(names_in), + data_component_interpretation (data_component_interpretation), + postprocessor(0, typeid(*this).name()), + n_output_variables(names.size()) + { + Assert (names.size() == data_component_interpretation.size(), + ExcDimensionMismatch(data_component_interpretation.size(), + names.size())); + + // check that the names use only allowed + // characters + // check names for invalid characters + for (unsigned int i=0; i()") == std::string::npos, + typename dealii::DataOut:: + ExcInvalidCharacter (names[i], + names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789_<>()"))); + } -template -DataOut_DoFData:: -DataEntryBase::DataEntryBase (const DataPostprocessor *data_postprocessor) - : - names(data_postprocessor->get_names()), - data_component_interpretation (data_postprocessor->get_data_component_interpretation()), - postprocessor(data_postprocessor, typeid(*this).name()), - n_output_variables(names.size()) -{ - Assert (data_postprocessor->get_names().size() - == - data_postprocessor->get_data_component_interpretation().size(), - ExcDimensionMismatch (data_postprocessor->get_names().size(), - data_postprocessor->get_data_component_interpretation().size())); - - // check that the names use only allowed - // characters - for (unsigned int i=0; i()") == std::string::npos, - ExcInvalidCharacter (names[i], - names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789_<>()"))); -} + template + DataEntryBase::DataEntryBase (const DataPostprocessor *data_postprocessor) + : + names(data_postprocessor->get_names()), + data_component_interpretation (data_postprocessor->get_data_component_interpretation()), + postprocessor(data_postprocessor, typeid(*this).name()), + n_output_variables(names.size()) + { + Assert (data_postprocessor->get_names().size() + == + data_postprocessor->get_data_component_interpretation().size(), + ExcDimensionMismatch (data_postprocessor->get_names().size(), + data_postprocessor->get_data_component_interpretation().size())); + + // check that the names use only allowed + // characters + for (unsigned int i=0; i()") == std::string::npos, + typename dealii::DataOut:: + ExcInvalidCharacter (names[i], + names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789_<>()"))); + } -template -DataOut_DoFData:: -DataEntryBase::~DataEntryBase () -{} + template + DataEntryBase::~DataEntryBase () + {} -template -template -DataOut_DoFData:: -DataEntry:: -DataEntry (const VectorType *data, - const std::vector &names, - const std::vector &data_component_interpretation) - : - DataEntryBase (names, data_component_interpretation), - vector (data) -{} + template + DataEntry:: + DataEntry (const VectorType *data, + const std::vector &names, + const std::vector &data_component_interpretation) + : + DataEntryBase (names, data_component_interpretation), + vector (data) + {} -template -template -DataOut_DoFData:: -DataEntry:: -DataEntry (const VectorType *data, - const DataPostprocessor *data_postprocessor) - : - DataEntryBase (data_postprocessor), - vector (data) -{} + template + DataEntry:: + DataEntry (const VectorType *data, + const DataPostprocessor *data_postprocessor) + : + DataEntryBase (data_postprocessor), + vector (data) + {} -template -template -double -DataOut_DoFData:: -DataEntry:: -get_cell_data_value (const unsigned int cell_number) const -{ - return (*vector)(cell_number); -} + template + double + DataEntry:: + get_cell_data_value (const unsigned int cell_number) const + { + return (*vector)(cell_number); + } -template -template -void -DataOut_DoFData:: -DataEntry:: -get_function_values (const FEValuesBase &fe_patch_values, - std::vector > &patch_values_system) const -{ - fe_patch_values.get_function_values (*vector, patch_values_system); -} + template + void + DataEntry:: + get_function_values (const FEValuesBase &fe_patch_values, + std::vector > &patch_values_system) const + { + fe_patch_values.get_function_values (*vector, patch_values_system); + } -template -template -void -DataOut_DoFData:: -DataEntry:: -get_function_values (const FEValuesBase &fe_patch_values, - std::vector &patch_values) const -{ - fe_patch_values.get_function_values (*vector, patch_values); -} + template + void + DataEntry:: + get_function_values (const FEValuesBase &fe_patch_values, + std::vector &patch_values) const + { + fe_patch_values.get_function_values (*vector, patch_values); + } -template -template -void -DataOut_DoFData:: -DataEntry:: -get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > > &patch_gradients_system) const -{ - fe_patch_values.get_function_grads (*vector, patch_gradients_system); -} + template + void + DataEntry:: + get_function_gradients (const FEValuesBase &fe_patch_values, + std::vector > > &patch_gradients_system) const + { + fe_patch_values.get_function_grads (*vector, patch_gradients_system); + } -template -template -void -DataOut_DoFData:: -DataEntry:: -get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > &patch_gradients) const -{ - fe_patch_values.get_function_grads (*vector, patch_gradients); -} + template + void + DataEntry:: + get_function_gradients (const FEValuesBase &fe_patch_values, + std::vector > &patch_gradients) const + { + fe_patch_values.get_function_grads (*vector, patch_gradients); + } -template -template -void -DataOut_DoFData:: -DataEntry:: -get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const -{ - fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians_system); -} + template + void + DataEntry:: + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const + { + fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians_system); + } -template -template -void -DataOut_DoFData:: -DataEntry:: -get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const -{ - fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians); -} + template + void + DataEntry:: + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const + { + fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians); + } -template -template -std::size_t -DataOut_DoFData:: -DataEntry::memory_consumption () const -{ - return (sizeof (vector) + - MemoryConsumption::memory_consumption (this->names)); -} + template + std::size_t + DataEntry::memory_consumption () const + { + return (sizeof (vector) + + MemoryConsumption::memory_consumption (this->names)); + } -template -template -void -DataOut_DoFData:: -DataEntry::clear () -{ - vector = 0; + template + void + DataEntry::clear () + { + vector = 0; + } + } } - template DataOut_DoFData::DataOut_DoFData () @@ -431,12 +551,13 @@ add_data_vector (const VECTOR &vec, Assert (false, ExcInternalError()); } - DataEntryBase * new_entry = new DataEntry(&vec, names, - data_component_interpretation); + internal::DataOut::DataEntryBase * new_entry + = new internal::DataOut::DataEntry(&vec, names, + data_component_interpretation); if (actual_type == type_dof_data) - dof_data.push_back (std_cxx1x::shared_ptr(new_entry)); + dof_data.push_back (std_cxx1x::shared_ptr >(new_entry)); else - cell_data.push_back (std_cxx1x::shared_ptr(new_entry)); + cell_data.push_back (std_cxx1x::shared_ptr >(new_entry)); } @@ -464,8 +585,9 @@ add_data_vector (const VECTOR &vec, dofs->n_dofs(), dofs->get_tria().n_active_cells())); - DataEntryBase * new_entry = new DataEntry(&vec, &data_postprocessor); - dof_data.push_back (std_cxx1x::shared_ptr(new_entry)); + internal::DataOut::DataEntryBase * new_entry + = new internal::DataOut::DataEntry(&vec, &data_postprocessor); + dof_data.push_back (std_cxx1x::shared_ptr >(new_entry)); } @@ -530,7 +652,7 @@ get_dataset_names () const // collect the names of dof // and cell data typedef - typename std::vector >::const_iterator + typename std::vector > >::const_iterator data_iterator; for (data_iterator d=dof_data.begin(); @@ -559,7 +681,7 @@ DataOut_DoFData::get_vector_data_ranges () const // collect the ranges of dof // and cell data typedef - typename std::vector >::const_iterator + typename std::vector > >::const_iterator data_iterator; unsigned int output_component = 0;