Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Mantid::Geometry::General Class Reference

Holds a general quadratic surface. More...

#include <General.h>

Inheritance diagram for Mantid::Geometry::General:
Mantid::Geometry::Quadratic Mantid::Geometry::Surface

Public Member Functions

std::unique_ptr< Generalclone () const
 Makes a clone (implicit virtual copy constructor) More...
 
 General ()
 Standard Constructor. More...
 
void getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) override
 bounding box for the surface More...
 
void setBaseEqn () override
 Set baseEqn (nothing to do) as it is already a baseEqn driven system. More...
 
int setSurface (const std::string &) override
 Processes a standard MCNPX general string (GQ/SQ types) Despite type, moves both to the general equation. More...
 
- Public Member Functions inherited from Mantid::Geometry::Quadratic
void acceptVisitor (BaseVisit &A) const override
 Accept visitor for line calculation. More...
 
std::string className () const override
 Effective typeid. More...
 
std::unique_ptr< Quadraticclone () const
 
const std::vector< double > & copyBaseEqn () const
 access BaseEquation vector More...
 
void displace (const Kernel::V3D &) override
 Apply a general displacement to the surface. More...
 
double distance (const Kernel::V3D &) const override
 distance between point and surface (approx) More...
 
double eqnValue (const Kernel::V3D &) const
 Helper function to calcuate the value of the equation at a fixed point. More...
 
bool onSurface (const Kernel::V3D &) const override
 is point valid on surface More...
 
void print () const override
 Print out the genreal equation for debugging. More...
 
 Quadratic ()
 Constructor. More...
 
void rotate (const Kernel::Matrix< double > &) override
 Rotate the surface by matrix MX. More...
 
virtual void setBaseEqn ()=0
 Abstract set baseEqn. More...
 
int side (const Kernel::V3D &) const override
 Determine if the the Point is true to the surface or on the other side. More...
 
Kernel::V3D surfaceNormal (const Kernel::V3D &) const override
 Normal at surface. More...
 
void write (std::ostream &) const override
 Writes out an MCNPX surface description Note : Swap since base equation is swapped in gq output (mcnp 4c manual pg. More...
 
- Public Member Functions inherited from Mantid::Geometry::Surface
virtual void acceptVisitor (BaseVisit &A) const
 Accept visitor for line calculation. More...
 
virtual std::string className () const
 Effective typeid. More...
 
std::unique_ptr< Surfaceclone () const
 
virtual void displace (const Kernel::V3D &)=0
 translates the surface More...
 
virtual double distance (const Kernel::V3D &) const =0
 returns the minimum distance to the surface More...
 
virtual void getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin)=0
 bounding box for the surface More...
 
int getName () const
 Get Name. More...
 
virtual bool onSurface (const Kernel::V3D &R) const =0
 is point valid on surface More...
 
Surfaceoperator= (const Surface &)=delete
 
virtual void print () const
 Simple print out function for surface header. More...
 
virtual void rotate (const Kernel::Matrix< double > &)=0
 rotates the surface More...
 
void setName (int const N)
 Set Name. More...
 
virtual int setSurface (const std::string &R)=0
 Sets the surface based on a string input in MCNPX format. More...
 
virtual int side (const Kernel::V3D &) const
 Surface side : throw AbsObjMethod. More...
 
 Surface ()
 Constructor. More...
 
virtual Kernel::V3D surfaceNormal (const Kernel::V3D &) const =0
 returns the normal to the closest point on the surface More...
 
virtual void write (std::ostream &) const
 The writes the data to the output stream. More...
 
void writeHeader (std::ostream &) const
 Writes out the start of an MCNPX surface description . More...
 
virtual ~Surface ()=default
 

Protected Member Functions

 General (const General &)=default
 
Generaloperator= (const General &)=delete
 
- Protected Member Functions inherited from Mantid::Geometry::Quadratic
Quadraticoperator= (const Quadratic &)=delete
 
 Quadratic (const Quadratic &)=default
 
- Protected Member Functions inherited from Mantid::Geometry::Surface
 Surface (const Surface &)=default
 

Private Member Functions

GeneraldoClone () const override
 Makes a clone (implicit virtual copy constructor) More...
 

Additional Inherited Members

- Static Public Attributes inherited from Mantid::Geometry::Quadratic
static const int Nprecision = 10
 Precision of the output. More...
 
- Static Public Attributes inherited from Mantid::Geometry::Surface
static const int Nprecision = 10
 Precision of the output. More...
 
- Protected Attributes inherited from Mantid::Geometry::Quadratic
std::vector< double > BaseEqn
 Base equation (as a 10 point vector) More...
 

Detailed Description

Holds a general quadratic surface.

Author
S. Ansell
Date
April 2004
Version
1.0

Holds a general surface with equation form

\[ Ax^2+By^2+Cz^2+Dxy+Exz+Fyz+Gx+Hy+Jz+K=0 \]

which has been defined as a gq surface in MCNPX. It is a realisation of the Surface object.

Definition at line 28 of file General.h.

Constructor & Destructor Documentation

◆ General() [1/2]

Mantid::Geometry::General::General ( const General )
protecteddefault

◆ General() [2/2]

Mantid::Geometry::General::General ( )

Standard Constructor.

Definition at line 12 of file General.cpp.

Referenced by doClone().

Member Function Documentation

◆ clone()

std::unique_ptr< General > Mantid::Geometry::General::clone ( ) const

Makes a clone (implicit virtual copy constructor)

Returns
General(this)

Definition at line 28 of file General.cpp.

References doClone().

◆ doClone()

General * Mantid::Geometry::General::doClone ( ) const
overrideprivatevirtual

Makes a clone (implicit virtual copy constructor)

Returns
General(this)

Implements Mantid::Geometry::Quadratic.

Definition at line 19 of file General.cpp.

References General().

Referenced by clone().

◆ getBoundingBox()

void Mantid::Geometry::General::getBoundingBox ( double &  xmax,
double &  ymax,
double &  zmax,
double &  xmin,
double &  ymin,
double &  zmin 
)
overridevirtual

bounding box for the surface

 General bounding box
 Intended to improve bounding box for a general quadratic surface
 Using the surface calculate improved limits on the bounding box, if
 possible.
 @param xmax :: On input, existing Xmax bound, on exit possibly improved
 Xmax bound
 @param xmin :: On input, existing Xmin bound, on exit possibly improved
 Xmin bound
 @param ymax :: as for xmax
 @param ymin :: as for xmin
 @param zmax :: as for xmax
 @param zmin :: as for xmin

TODO: Implement bounding box for General

Implements Mantid::Geometry::Surface.

Definition at line 92 of file General.cpp.

References UNUSED_ARG.

◆ operator=()

General & Mantid::Geometry::General::operator= ( const General )
protecteddelete

◆ setBaseEqn()

void Mantid::Geometry::General::setBaseEqn ( )
overridevirtual

Set baseEqn (nothing to do) as it is already a baseEqn driven system.

Implements Mantid::Geometry::Quadratic.

Definition at line 85 of file General.cpp.

◆ setSurface()

int Mantid::Geometry::General::setSurface ( const std::string &  Pstr)
overridevirtual

Processes a standard MCNPX general string (GQ/SQ types) Despite type, moves both to the general equation.

NOTE: Check the gq version with the MCNPX source code since there are multiple version of xy xz yz parameter read-in which swap xz and yz. [This code uses the first]

Parameters
Pstr:: String to process (with name and transform)
Returns
0 on success, neg of failure

Implements Mantid::Geometry::Surface.

Definition at line 37 of file General.cpp.

References Mantid::Geometry::Quadratic::BaseEqn, index, and Mantid::Kernel::Strings::section().


The documentation for this class was generated from the following files: