Dune Core Modules (2.6.0)

boundarywriter.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
5#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
6
7#include <memory>
8#include <string>
9
10#include <dune/grid/io/file/vtk/basicwriter.hh>
13
14namespace Dune {
17
18 namespace VTK {
19
20 template<typename GV>
21 class NonConformingBoundaryWriter
22 : public NonConformingBoundaryIteratorFactory<GV>,
23 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
24 {
25 typedef NonConformingBoundaryIteratorFactory<GV> Factory;
26 typedef BasicWriter<Factory> Base;
27
28 const GV& gv;
29
30 public:
31 NonConformingBoundaryWriter(const GV& gv_)
32 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
33 { }
34
35 using Base::addCellData;
36
37 template<typename Func>
38 void addCellData(const std::shared_ptr<Func>& p, const std::string& name) {
39 addCellData(std::shared_ptr<typename Base::FunctionWriter>
40 (new SkeletonFunctionWriter<Func>(p, name)));
41 }
42
43 template<typename Func>
44 void addCellData(Func* p, const std::string& name) {
45 addCellData(std::shared_ptr<Func>(p), name);
46 }
47
48 using Base::addPointData;
49
50 template<typename Func>
51 void addPointData(const std::shared_ptr<Func>& p, const std::string& name) {
52 addPointData(std::shared_ptr<typename Base::FunctionWriter>
53 (new SkeletonFunctionWriter<Func>(p, name)));
54 }
55
56 template<typename Func>
57 void addPointData(Func* p, const std::string& name) {
58 addPointData(std::shared_ptr<Func>(p), name);
59 }
60
61 };
62
63 } // namespace VTK
64
66
67} // namespace Dune
68
69#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
Functions for VTK output on the skeleton.
Dune namespace.
Definition: alignedallocator.hh:10
Functions for VTK output on the skeleton.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)