OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::CompositeShape Class Reference

#include <CompositeShape.hpp>

Inheritance diagram for OpenMD::CompositeShape:
OpenMD::Shape

Public Member Functions

 CompositeShape ()
 
virtual ~CompositeShape ()
 
virtual bool isInterior (Vector3d pos)
 
virtual std::pair< Vector3d, Vector3dgetBoundingBox ()
 
virtual bool hasAnalyticalSolution ()
 
virtual HydroPropgetHydroProp (RealType viscosity, RealType temperature)
 
void addShape (Shape *s)
 
- Public Member Functions inherited from OpenMD::Shape
virtual ~Shape ()
 

Private Attributes

std::vector< Shape * > shapes_
 

Detailed Description

Combine composite pattern and visitor pattern

Definition at line 52 of file CompositeShape.hpp.

Constructor & Destructor Documentation

◆ CompositeShape()

OpenMD::CompositeShape::CompositeShape ( )
inline

Definition at line 55 of file CompositeShape.hpp.

References getBoundingBox(), isInterior(), and ~CompositeShape().

◆ ~CompositeShape()

OpenMD::CompositeShape::~CompositeShape ( )
virtual

Definition at line 48 of file CompositeShape.cpp.

References OpenMD::MemoryUtils::deletePointers(), and shapes_.

Referenced by CompositeShape().

Member Function Documentation

◆ addShape()

void OpenMD::CompositeShape::addShape ( Shape s)
inline

Definition at line 61 of file CompositeShape.hpp.

References shapes_.

Referenced by OpenMD::ShapeBuilder::internalCreateShape().

◆ getBoundingBox()

std::pair< Vector3d, Vector3d > OpenMD::CompositeShape::getBoundingBox ( )
virtual

Implements OpenMD::Shape.

Definition at line 75 of file CompositeShape.cpp.

References shapes_, and OpenMD::swap_if().

Referenced by CompositeShape().

◆ getHydroProp()

HydroProp * OpenMD::CompositeShape::getHydroProp ( RealType  viscosity,
RealType  temperature 
)
virtual

◆ hasAnalyticalSolution()

virtual bool OpenMD::CompositeShape::hasAnalyticalSolution ( )
inlinevirtual

Implements OpenMD::Shape.

Definition at line 59 of file CompositeShape.hpp.

References getHydroProp().

◆ isInterior()

bool OpenMD::CompositeShape::isInterior ( Vector3d  pos)
virtual

Implements OpenMD::Shape.

Definition at line 51 of file CompositeShape.cpp.

References shapes_.

Referenced by CompositeShape().

Member Data Documentation

◆ shapes_

std::vector<Shape*> OpenMD::CompositeShape::shapes_
private

Definition at line 65 of file CompositeShape.hpp.

Referenced by addShape(), getBoundingBox(), isInterior(), and ~CompositeShape().


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