Commit a72229fb authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

cleanup whitspaces and naming of writer classes

parent 1334467e
...@@ -16,15 +16,15 @@ install(FILES ...@@ -16,15 +16,15 @@ install(FILES
function.hh function.hh
localfunction.hh localfunction.hh
localfunctioninterface.hh localfunctioninterface.hh
reader.hh vtkreader.hh
reader.impl.hh vtkreader.impl.hh
timeserieswriter.hh vtktimeserieswriter.hh
timeserieswriter.impl.hh vtktimeserieswriter.impl.hh
types.hh types.hh
writer.hh vtkwriter.hh
writerinterface.hh vtkwriterinterface.hh
writerinterface.impl.hh vtkwriterinterface.impl.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/vtkwriter) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/vtk)
add_subdirectory(datacollectors) add_subdirectory(datacollectors)
add_subdirectory(gridcreators) add_subdirectory(gridcreators)
......
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Base class for data collectors in a CRTP style. /// Base class for data collectors in a CRTP style.
/** /**
* \tparam GridViewType Model of Dune::GridView * \tparam GridViewType Model of Dune::GridView
......
...@@ -2,30 +2,26 @@ ...@@ -2,30 +2,26 @@
#include <dune/geometry/referenceelements.hh> #include <dune/geometry/referenceelements.hh>
namespace Dune namespace Dune {
{ namespace Vtk {
namespace Vtk
{
template <class GV, class D, class P> template <class GV, class D, class P>
template <class T, class VtkFunction> template <class T, class VtkFunction>
std::vector<T> DataCollectorInterface<GV,D,P> std::vector<T> DataCollectorInterface<GV,D,P>
::cellDataImpl (VtkFunction const& fct) const ::cellDataImpl (VtkFunction const& fct) const
{ {
std::vector<T> data; std::vector<T> data;
data.reserve(this->numCells() * fct.ncomps()); data.reserve(this->numCells() * fct.ncomps());
auto localFct = localFunction(fct); auto localFct = localFunction(fct);
for (auto const& e : elements(gridView_, partition)) { for (auto const& e : elements(gridView_, partition)) {
localFct.bind(e); localFct.bind(e);
auto refElem = referenceElement<T,dim>(e.type()); auto refElem = referenceElement<T,dim>(e.type());
for (int comp = 0; comp < fct.ncomps(); ++comp) for (int comp = 0; comp < fct.ncomps(); ++comp)
data.emplace_back(localFct.evaluate(comp, refElem.position(0,0))); data.emplace_back(localFct.evaluate(comp, refElem.position(0,0)));
localFct.unbind(); localFct.unbind();
} }
return data; return data;
} }
} // end namespace Vtk } } // end namespace Dune::Vtk
} // end namespace Dune
...@@ -7,6 +7,6 @@ install(FILES ...@@ -7,6 +7,6 @@ install(FILES
structureddatacollector.hh structureddatacollector.hh
unstructureddatacollector.hh unstructureddatacollector.hh
yaspdatacollector.hh yaspdatacollector.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/vtkwriter/datacollectors) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/vtk/datacollectors)
add_subdirectory(test) add_subdirectory(test)
\ No newline at end of file
...@@ -13,10 +13,8 @@ ...@@ -13,10 +13,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Implementation of \ref DataCollector for linear cells, with continuous data. /// Implementation of \ref DataCollector for linear cells, with continuous data.
template <class GridView, class Partition> template <class GridView, class Partition>
class ContinuousDataCollector class ContinuousDataCollector
......
...@@ -9,10 +9,8 @@ ...@@ -9,10 +9,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Implementation of \ref DataCollector for linear cells, with discontinuous data. /// Implementation of \ref DataCollector for linear cells, with discontinuous data.
template <class GridView, class Partition> template <class GridView, class Partition>
class DiscontinuousDataCollector class DiscontinuousDataCollector
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Implementation of \ref DataCollector for lagrange cells /// Implementation of \ref DataCollector for lagrange cells
template <class GridView, int ORDER = -1> template <class GridView, int ORDER = -1>
class LagrangeDataCollector class LagrangeDataCollector
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Implementation of \ref DataCollector for quadratic cells, with continuous data. /// Implementation of \ref DataCollector for quadratic cells, with continuous data.
template <class GridView> template <class GridView>
class QuadraticDataCollector class QuadraticDataCollector
......
...@@ -16,10 +16,8 @@ ...@@ -16,10 +16,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
#if HAVE_DUNE_SPGRID #if HAVE_DUNE_SPGRID
// Specialization for SPGrid // Specialization for SPGrid
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// The Interface for structured data-collectors /// The Interface for structured data-collectors
template <class GridView, class Derived> template <class GridView, class Derived>
class StructuredDataCollectorInterface class StructuredDataCollectorInterface
......
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
struct Cells struct Cells
{ {
std::vector<std::uint8_t> types; std::vector<std::uint8_t> types;
......
...@@ -17,10 +17,8 @@ ...@@ -17,10 +17,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
// Specialization for YaspGrid // Specialization for YaspGrid
template <class GridView> template <class GridView>
class YaspDataCollector class YaspDataCollector
......
...@@ -9,10 +9,8 @@ ...@@ -9,10 +9,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Type erasure for dune-functions LocalFunction interface /// Type erasure for dune-functions LocalFunction interface
template <class GridView, class LocalFunction> template <class GridView, class LocalFunction>
class LocalFunctionWrapper final class LocalFunctionWrapper final
......
...@@ -10,10 +10,8 @@ ...@@ -10,10 +10,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
template <class Grid, class FilerReaderImp> template <class Grid, class FilerReaderImp>
class FileReader class FileReader
{ {
......
...@@ -7,10 +7,8 @@ ...@@ -7,10 +7,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
class FileWriter class FileWriter
{ {
public: public:
......
...@@ -6,7 +6,6 @@ namespace Dune ...@@ -6,7 +6,6 @@ namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
// forward declaration of all classes in dune-vtk // forward declaration of all classes in dune-vtk
template <class GridView, class Derived, class Partition = Partitions::InteriorBorder> template <class GridView, class Derived, class Partition = Partitions::InteriorBorder>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
namespace Dune namespace Dune
{ {
// forward declarations
template <class T, int N> template <class T, int N>
class FieldVector; class FieldVector;
...@@ -19,7 +19,6 @@ namespace Dune ...@@ -19,7 +19,6 @@ namespace Dune
namespace Vtk namespace Vtk
{ {
/// Wrapper class for functions allowing local evaluations. /// Wrapper class for functions allowing local evaluations.
template <class GridView> template <class GridView>
class Function class Function
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
/// Base class for grid creators in a CRTP style. /// Base class for grid creators in a CRTP style.
/** /**
* Construct a grid from data read from VTK files. * Construct a grid from data read from VTK files.
......
...@@ -7,4 +7,4 @@ install(FILES ...@@ -7,4 +7,4 @@ install(FILES
lagrangegridcreator.hh lagrangegridcreator.hh
parallelgridcreator.hh parallelgridcreator.hh
serialgridcreator.hh serialgridcreator.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/vtkwriter/gridcreators) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/vtk/gridcreators)
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
namespace Dune namespace Dune
{ {
namespace Vtk namespace Vtk
{ {
// Create a grid where the input points and connectivity is already // Create a grid where the input points and connectivity is already
// connected correctly. // connected correctly.
template <class Grid> template <class Grid>
......
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