dune-grid 2.9.0
boundarywriter.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5
6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
8
9#include <memory>
10#include <string>
11
15
16namespace Dune {
19
20 namespace VTK {
21
22 template<typename GV>
25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
26 {
29
30 const GV& gv;
31
32 public:
34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
35 { }
36
38
39 template<typename Func>
40 void addCellData(const std::shared_ptr<Func>& p, const std::string& name) {
41 addCellData(std::shared_ptr<typename Base::FunctionWriter>
42 (new SkeletonFunctionWriter<Func>(p, name)));
43 }
44
45 template<typename Func>
46 void addCellData(Func* p, const std::string& name) {
47 addCellData(std::shared_ptr<Func>(p), name);
48 }
49
51
52 template<typename Func>
53 void addPointData(const std::shared_ptr<Func>& p, const std::string& name) {
54 addPointData(std::shared_ptr<typename Base::FunctionWriter>
55 (new SkeletonFunctionWriter<Func>(p, name)));
56 }
57
58 template<typename Func>
59 void addPointData(Func* p, const std::string& name) {
60 addPointData(std::shared_ptr<Func>(p), name);
61 }
62
63 };
64
65 } // namespace VTK
66
68
69} // namespace Dune
70
71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
Functions for VTK output on the skeleton.
Functions for VTK output on the skeleton.
Include standard header files.
Definition: agrid.hh:60
Definition: basicwriter.hh:35
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition: basicwriter.hh:76
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition: basicwriter.hh:80
Definition: boundaryiterators.hh:159
Definition: boundarywriter.hh:26
void addPointData(const std::shared_ptr< Func > &p, const std::string &name)
Definition: boundarywriter.hh:53
void addCellData(Func *p, const std::string &name)
Definition: boundarywriter.hh:46
void addPointData(Func *p, const std::string &name)
Definition: boundarywriter.hh:59
NonConformingBoundaryWriter(const GV &gv_)
Definition: boundarywriter.hh:33
void addCellData(const std::shared_ptr< Func > &p, const std::string &name)
Definition: boundarywriter.hh:40
function writer for skeleton functions
Definition: skeletonfunction.hh:83