Commit 28a8ed70 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'feature/remove_forward' into 'master'

remove the central forward declaration

See merge request spraetor/dune-vtk!32
parents ff540bed 992576f8
......@@ -8,7 +8,6 @@ install(FILES
defaultvtkfunction.hh
filereader.hh
filewriter.hh
forward.hh
gridcreatorinterface.hh
legacyvtkfunction.hh
pvdwriter.hh
......
......@@ -3,6 +3,8 @@
#include <cstdint>
#include <vector>
#include <dune/grid/common/partitionset.hh>
namespace Dune
{
namespace Vtk
......@@ -13,7 +15,7 @@ namespace Dune
* \tparam Derived Implementation of a concrete DataCollector.
* \tparam Partition Dune::PartitionType [Partitions::InteriorBorder]
**/
template <class GridViewType, class Derived, class Partition>
template <class GridViewType, class Derived, class Partition = Partitions::InteriorBorder>
class DataCollectorInterface
{
public:
......
......@@ -4,9 +4,8 @@
#include <vector>
#include <dune/geometry/referenceelements.hh>
#include <dune/grid/common/partitionset.hh>
#include <dune/grid/utility/globalindexset.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/types.hh>
#include "unstructureddatacollector.hh"
......@@ -16,7 +15,7 @@ namespace Dune
namespace Vtk
{
/// Implementation of \ref DataCollector for linear cells, with continuous data.
template <class GridView, class Partition>
template <class GridView, class Partition = Partitions::InteriorBorder>
class ContinuousDataCollector
: public UnstructuredDataCollectorInterface<GridView, ContinuousDataCollector<GridView,Partition>, Partition>
{
......
......@@ -2,7 +2,7 @@
#include <vector>
#include <dune/vtk/forward.hh>
#include <dune/grid/common/partitionset.hh>
#include <dune/vtk/types.hh>
#include "unstructureddatacollector.hh"
......@@ -12,7 +12,7 @@ namespace Dune
namespace Vtk
{
/// Implementation of \ref DataCollector for linear cells, with discontinuous data.
template <class GridView, class Partition>
template <class GridView, class Partition = Partitions::InteriorBorder>
class DiscontinuousDataCollector
: public UnstructuredDataCollectorInterface<GridView, DiscontinuousDataCollector<GridView,Partition>, Partition>
{
......
......@@ -6,8 +6,7 @@
#include <dune/geometry/referenceelements.hh>
#include <dune/grid/common/partitionset.hh>
#include <dune/vtk/forward.hh>
#include <dune/grid/common/partitionset.hh>
#include <dune/vtk/types.hh>
#include <dune/vtk/utility/lagrangepoints.hh>
......@@ -31,7 +30,7 @@ namespace Dune
using Super::partition; // NOTE: lagrange data-collector currently implemented for the All partition only
public:
LagrangeDataCollector (GridView const& gridView, int order = (ORDER < 0 ? 2 : ORDER))
LagrangeDataCollector (GridView const& gridView, int order = ORDER)
: Super(gridView)
, order_(order)
{
......
......@@ -4,8 +4,6 @@
#include <dune/geometry/referenceelements.hh>
#include <dune/grid/common/partitionset.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/types.hh>
#include "unstructureddatacollector.hh"
......
......@@ -6,20 +6,15 @@
#include <dune/common/filledarray.hh>
#include <dune/common/fvector.hh>
#include "structureddatacollector.hh"
#if HAVE_DUNE_SPGRID
#include <dune/grid/spgrid.hh>
#endif
#include <dune/vtk/forward.hh>
#include "structureddatacollector.hh"
namespace Dune
{
namespace Vtk
{
#if HAVE_DUNE_SPGRID
// Specialization for SPGrid
template <class GridView>
class SPDataCollector
......@@ -99,7 +94,7 @@ namespace Dune
};
}
#endif // HAVE_DUNE_SPGRID
} // end namespace Vtk
} // end namespace Dune
} // end namespace
#endif // HAVE_DUNE_SPGRID
......@@ -4,8 +4,6 @@
#include <vector>
#include <dune/common/fvector.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/datacollectorinterface.hh>
#include "continuousdatacollector.hh"
......@@ -235,5 +233,16 @@ namespace Dune
#endif
};
namespace Impl
{
// Should be specialized for concrete structured grid
template <class GridView, class Grid>
struct StructuredDataCollectorImpl;
}
template <class GridView>
using StructuredDataCollector
= typename Impl::StructuredDataCollectorImpl<GridView, typename GridView::Grid>::type;
} // end namespace Vtk
} // end namespace Dune
......@@ -3,7 +3,7 @@
#include <cstdint>
#include <vector>
#include <dune/vtk/forward.hh>
#include <dune/grid/common/partitionset.hh>
#include <dune/vtk/datacollectorinterface.hh>
namespace Dune
......@@ -17,7 +17,7 @@ namespace Dune
std::vector<std::int64_t> connectivity;
};
template <class GridView, class Derived, class Partition>
template <class GridView, class Derived, class Partition = Partitions::InteriorBorder>
class UnstructuredDataCollectorInterface
: public DataCollectorInterface<GridView, Derived, Partition>
{
......
......@@ -7,12 +7,9 @@
#include <dune/common/filledarray.hh>
#include <dune/common/fvector.hh>
#include <dune/common/std/type_traits.hh>
#include <dune/grid/common/gridenums.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/vtk/forward.hh>
#include "structureddatacollector.hh"
namespace Dune
......
......@@ -6,7 +6,6 @@
#include <dune/common/exceptions.hh>
#include <dune/grid/common/gridfactory.hh>
#include <dune/vtk/forward.hh>
namespace Dune
{
......
......@@ -3,8 +3,6 @@
#include <optional>
#include <string>
#include <dune/vtk/forward.hh>
namespace Dune
{
namespace Vtk
......
#pragma once
#include <dune/grid/common/partitionset.hh>
namespace Dune
{
namespace Vtk
{
// forward declaration of all classes in dune-vtk
template <class GridView, class Derived, class Partition = Partitions::InteriorBorder>
class DataCollectorInterface;
// @{ datacollectors
template <class GridView, class Derived, class Partition = Partitions::InteriorBorder>
class UnstructuredDataCollectorInterface;
// @{ unstructured-datacollectors
template <class GridView, class Partition = Partitions::InteriorBorder>
class ContinuousDataCollector;
template <class GridView, class Partition = Partitions::InteriorBorder>
class DiscontinuousDataCollector;
template <class GridView>
class QuadraticDataCollector;
// @} unstructured-datacollectors
template <class GridView, class Derived>
class StructuredDataCollectorInterface;
namespace Impl
{
// Should be specialized for concrete structured grid
template <class GridView, class Grid>
struct StructuredDataCollectorImpl;
}
template <class GridView>
using StructuredDataCollector = typename Impl::StructuredDataCollectorImpl<GridView, typename GridView::Grid>::type;
// @{ structured-datacollectors
template <class GridView>
class SPDataCollector;
template <class GridView>
class YaspDataCollector;
// @} structured-datacollectors
// @} datacollectors
template <class Grid, class Derived>
class GridCreatorInterface;
template <class GridCreator, class Derived>
struct DerivedGridCreator;
// @{ gridcreators
template <class Grid>
struct ContinuousGridCreator;
template <class Grid>
struct DiscontinuousGridCreator;
template <class Grid>
struct ParallelGridCreator;
template <class Grid>
struct SerialGridCreator;
template <class Grid>
class LagrangeGridCreator;
// @} gridcreators
template <class Grid, class FilerReaderImp>
class FileReader;
class FileWriter;
} //end namespace Vtk
// @{ filewriters
template <class VtkWriter>
class PvdWriter;
template <class VtkWriter>
class VtkTimeseriesWriter;
template <class GridView, class DataCollector>
class VtkWriterInterface;
// @{ vtkwriters
template <class GridView, class DataCollector = Vtk::StructuredDataCollector<GridView>>
class VtkImageDataWriter;
template <class GridView, class DataCollector = Vtk::StructuredDataCollector<GridView>>
class VtkRectilinearGridWriter;
template <class GridView, class DataCollector = Vtk::StructuredDataCollector<GridView>>
class VtkStructuredGridWriter;
template <class GridView, class DataCollector = Vtk::ContinuousDataCollector<GridView>>
class VtkUnstructuredGridWriter;
// @} vtkwriters
// @} filewriters
template <class Grid, class GridCreator = Vtk::ContinuousGridCreator<Grid>>
class VtkReader;
} // end namespace Dune
......@@ -8,8 +8,6 @@
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/common/gridfactory.hh>
#include <dune/vtk/forward.hh>
namespace Dune
{
namespace Vtk
......
......@@ -6,7 +6,6 @@ namespace Dune
{
namespace Vtk
{
template <class Factory, class... Args>
using HasInsertVertex = decltype( std::declval<Factory>().insertVertex(std::declval<Args>()...) );
......
......@@ -5,7 +5,6 @@
#include <vector>
#include <dune/grid/common/gridfactory.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/gridcreatorinterface.hh>
#include <dune/vtk/gridcreators/common.hh>
#include <dune/vtk/gridcreators/continuousgridcreator.hh>
......
......@@ -11,6 +11,7 @@
#include <dune/vtk/types.hh>
#include <dune/vtk/gridcreatorinterface.hh>
namespace Dune
{
namespace Vtk
......
......@@ -13,7 +13,6 @@
#include <dune/localfunctions/lagrange.hh>
#include <dune/grid/common/gridfactory.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/types.hh>
#include <dune/vtk/gridcreatorinterface.hh>
#include <dune/vtk/utility/lagrangepoints.hh>
......
......@@ -5,7 +5,6 @@
#include <vector>
#include <dune/grid/common/gridfactory.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/gridcreatorinterface.hh>
#include <dune/vtk/gridcreators/common.hh>
#include <dune/vtk/gridcreators/derivedgridcreator.hh>
......
......@@ -5,7 +5,6 @@
#include <vector>
#include <dune/grid/common/gridfactory.hh>
#include <dune/vtk/forward.hh>
#include <dune/vtk/gridcreatorinterface.hh>
#include <dune/vtk/gridcreators/discontinuousgridcreator.hh>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment