Skip to content
Snippets Groups Projects
Commit 6e7ffd69 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Change NeighborDebugWriter to class

parent 52169643
No related branches found
No related tags found
1 merge request!307[GPU] Add a cylinder geometry
......@@ -19,7 +19,7 @@
#include "Output/AnalysisData.hpp"
#include "Output/InterfaceDebugWriter.hpp"
#include "Output/EdgeNodeDebugWriter.hpp"
#include "Output/NeighborDebugWriter.hpp"
#include "Output/NeighborDebugWriter.h"
#include "Output/VeloASCIIWriter.hpp"
//////////////////////////////////////////////////////////////////////////
#include "Utilities/Buffer2D.hpp"
......
#ifndef NEIGHBORDEBUG_HPP
#define NEIGHBORDEBUG_HPP
#include "NeighborDebugWriter.h"
#include "LBM/LB.h"
#include "Logger.h"
......@@ -12,10 +11,7 @@
#include "StringUtilities/StringUtil.h"
#include "Utilities/FindNeighbors.h"
namespace NeighborDebugWriter
{
inline void writeNeighborLinkLines(LBMSimulationParameter *parH, int direction, const std::string &name,
void NeighborDebugWriter::writeNeighborLinkLines(LBMSimulationParameter *parH, int direction, const std::string &name,
WbWriter *writer)
{
VF_LOG_INFO("Write node links in direction {}.", direction);
......@@ -48,7 +44,7 @@ inline void writeNeighborLinkLines(LBMSimulationParameter *parH, int direction,
writer->writeLines(name, nodes, cells);
}
inline void writeNeighborLinkLinesDebug(Parameter *para)
void NeighborDebugWriter::writeNeighborLinkLinesDebug(Parameter *para)
{
for (int level = 0; level <= para->getMaxLevel(); level++) {
for (size_t direction = vf::lbm::dir::STARTDIR; direction <= vf::lbm::dir::ENDDIR; direction++) {
......@@ -57,8 +53,4 @@ inline void writeNeighborLinkLinesDebug(Parameter *para)
writeNeighborLinkLines(para->getParH(level).get(), (int)direction, fileName, WbWriterVtkXmlBinary::getInstance());
}
}
}
} // namespace NeighborDebugWriter
#endif
}
\ No newline at end of file
#ifndef NEIGHBORDEBUG_HPP
#define NEIGHBORDEBUG_HPP
#include <string>
class Parameter;
struct LBMSimulationParameter;
class WbWriter;
class NeighborDebugWriter
{
public:
static void writeNeighborLinkLinesDebug(Parameter *para);
protected:
static void writeNeighborLinkLines(LBMSimulationParameter *parH, int direction, const std::string &name,
WbWriter *writer);
};
#endif
#include <gmock/gmock.h>
#include "NeighborDebugWriter.hpp"
#include "NeighborDebugWriter.h"
#include "gpu/VirtualFluids_GPU/Utilities/testUtilitiesGPU.h"
#include <basics/writer/WbWriterVtkXmlBinary.h>
class WbWriterSpy : public WbWriter
{
......@@ -18,8 +19,11 @@ public:
std::string getFileExtension() override { return ""; }
};
class NeighborDebugWriterTest : public testing::Test
class NeighborDebugWriterTest : public testing::Test, public NeighborDebugWriter
{
public:
using NeighborDebugWriter::writeNeighborLinkLines;
protected:
void SetUp() override
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment