Dune Core Modules (2.9.1)

boundarywriter.hh
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
12#include <dune/grid/io/file/vtk/basicwriter.hh>
15
16namespace Dune {
19
20 namespace VTK {
21
22 template<typename GV>
23 class NonConformingBoundaryWriter
24 : public NonConformingBoundaryIteratorFactory<GV>,
25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
26 {
27 typedef NonConformingBoundaryIteratorFactory<GV> Factory;
28 typedef BasicWriter<Factory> Base;
29
30 const GV& gv;
31
32 public:
33 NonConformingBoundaryWriter(const GV& gv_)
34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
35 { }
36
37 using Base::addCellData;
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
50 using Base::addPointData;
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.
Dune namespace.
Definition: alignedallocator.hh:13
Functions for VTK output on the skeleton.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)