Dune Core Modules (2.4.2)

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 <string>
8
10
11#include <dune/grid/io/file/vtk/basicwriter.hh>
14
15namespace Dune {
18
19 namespace VTK {
20
21 template<typename GV>
22 class NonConformingBoundaryWriter
23 : public NonConformingBoundaryIteratorFactory<GV>,
24 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
25 {
26 typedef NonConformingBoundaryIteratorFactory<GV> Factory;
27 typedef BasicWriter<Factory> Base;
28
29 const GV& gv;
30
31 public:
32 NonConformingBoundaryWriter(const GV& gv_)
33 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
34 { }
35
36 using Base::addCellData;
37
38 template<typename Func>
39 void addCellData(const shared_ptr<Func>& p, const std::string& name) {
40 addCellData(shared_ptr<typename Base::FunctionWriter>
41 (new SkeletonFunctionWriter<Func>(p, name)));
42 }
43
44 template<typename Func>
45 void addCellData(Func* p, const std::string& name) {
46 addCellData(shared_ptr<Func>(p), name);
47 }
48
49 using Base::addPointData;
50
51 template<typename Func>
52 void addPointData(const shared_ptr<Func>& p, const std::string& name) {
53 addPointData(shared_ptr<typename Base::FunctionWriter>
54 (new SkeletonFunctionWriter<Func>(p, name)));
55 }
56
57 template<typename Func>
58 void addPointData(Func* p, const std::string& name) {
59 addPointData(shared_ptr<Func>(p), name);
60 }
61
62 };
63
64 } // namespace VTK
65
67
68} // namespace Dune
69
70#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
Functions for VTK output on the skeleton.
Dune namespace.
Definition: alignment.hh:10
This file implements the class shared_ptr (a reference counting pointer), for those systems that don'...
Functions for VTK output on the skeleton.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)