Peano
Loading...
Searching...
No Matches
CreateGridObserver.cpp
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
4
5#include "Constants.h"
6
8 const tarch::la::Vector<DIMENSIONS, double>& x,
9 const tarch::la::Vector<DIMENSIONS, double>& h
10) {}
11
13 const tarch::la::Vector<DIMENSIONS, double>& x,
14 const tarch::la::Vector<DIMENSIONS, double>& h
15) {}
16
17void tests::peano4::grid::CreateGridObserver::enterNode(const ::peano4::grid::GridTraversalEvent& event) {}
18
19void tests::peano4::grid::CreateGridObserver::leaveNode(const ::peano4::grid::GridTraversalEvent& event) {}
20
21::peano4::grid::GridTraversalObserver* tests::peano4::grid::CreateGridObserver::clone(int spacetreeId) {
22 return new CreateGridObserver();
23}
24
25std::vector<::peano4::grid::GridControlEvent> tests::peano4::grid::CreateGridObserver::getGridControlEvents() const {
26 std::vector<::peano4::grid::GridControlEvent> controlEvents;
27 ::peano4::grid::GridControlEvent newEvent;
28
29 newEvent.setRefinementControl(::peano4::grid::GridControlEvent::RefinementControl::Refine);
30
31#if DIMENSIONS == 2
32 newEvent.offset = {0.0, 0.0};
33 newEvent.width = {1.0, 1.0};
34 newEvent.targetH = {MinH, MinH};
35#else
36 newEvent.offset = {0.0, 0.0, 0.0};
37 newEvent.width = {1.0, 1.0, 1.0};
38 newEvent.targetH = {MinH, MinH, MinH};
39#endif
40
41 controlEvents.push_back(std::move(newEvent));
42 return controlEvents;
43}
void endTraversal(const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h) override
void leaveNode(const ::peano4::grid::GridTraversalEvent &event) override
void beginTraversal(const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h) override
GridTraversalObserver * clone(int spacetreeId) override
void enterNode(const ::peano4::grid::GridTraversalEvent &event) override
std::vector<::peano4::grid::GridControlEvent > getGridControlEvents() const override