Mantid
Loading...
Searching...
No Matches
Surface.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#include <algorithm>
8#include <complex>
9#include <fstream>
10#include <iomanip>
11#include <list>
12#include <map>
13#include <sstream>
14#include <stack>
15#include <vector>
16
21#include "MantidKernel/Logger.h"
22#include "MantidKernel/Matrix.h"
24#include "MantidKernel/V3D.h"
25
26#ifdef ENABLE_OPENCASCADE
27// Opencascade defines _USE_MATH_DEFINES without checking whether it is already
28// used.
29// Undefine it here before we include the headers to avoid a warning
30#ifdef _MSC_VER
31#undef _USE_MATH_DEFINES
32#ifdef M_SQRT1_2
33#undef M_SQRT1_2
34#endif
35#endif
36
38GNU_DIAG_OFF("conversion")
39GNU_DIAG_OFF("cast-qual")
40#include <TopoDS_Shape.hxx>
41GNU_DIAG_ON("conversion")
42GNU_DIAG_ON("cast-qual")
43#endif
44
45namespace Mantid::Geometry {
46namespace {
47Kernel::Logger logger("Surface");
48}
49
51 : Name(-1)
55{}
56
57int Surface::side(const Kernel::V3D & /*unused*/) const
59{
60 throw Kernel::Exception::AbsObjMethod("Surface::side");
61}
62
63void Surface::print() const
67{
68 logger.debug() << "Surf == " << Name << '\n';
69}
70
71void Surface::writeHeader(std::ostream &OX) const
77{
78 OX << Name << " ";
79}
80
81void Surface::write(std::ostream &out) const
86{
87 (void)out; // Avoid compiler warning
88 throw Kernel::Exception::AbsObjMethod("Surface::write");
89}
90
91#ifdef ENABLE_OPENCASCADE
92TopoDS_Shape Surface::createShape() { return TopoDS_Shape(); }
93#endif
94} // namespace Mantid::Geometry
#define GNU_DIAG_ON(x)
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
Surface()
Constructor.
Definition: Surface.cpp:50
virtual int side(const Kernel::V3D &) const
Surface side : throw AbsObjMethod.
Definition: Surface.cpp:57
void writeHeader(std::ostream &) const
Writes out the start of an MCNPX surface description .
Definition: Surface.cpp:71
virtual void write(std::ostream &) const
The writes the data to the output stream.
Definition: Surface.cpp:81
int Name
Surface number (MCNPX identifier)
Definition: Surface.h:35
virtual void print() const
Simple print out function for surface header.
Definition: Surface.cpp:63
Exception for a call to an abstract class function.
Definition: Exception.h:202
Class for 3D vectors.
Definition: V3D.h:34