Skip to content

Commit

Permalink
refs #5388. Move implicitfunctions to geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed May 23, 2012
1 parent 1b7af15 commit 340ba19
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 292 deletions.
10 changes: 8 additions & 2 deletions Code/Mantid/Framework/Geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ set ( SRC_FILES
src/Instrument/RectangularDetectorPixel.cpp
src/Instrument/ReferenceFrame.cpp
src/Instrument/XMLlogfile.cpp
src/MDGeometry/CompositeImplicitFunction.cpp
src/MDGeometry/IMDDimension.cpp
src/MDGeometry/IMDDimensionFactory.cpp
src/MDGeometry/MDBoxImplicitFunction.cpp
Expand All @@ -38,7 +39,8 @@ set ( SRC_FILES
src/MDGeometry/MDHistoDimensionBuilder.cpp
src/MDGeometry/MDImplicitFunction.cpp
src/MDGeometry/MDPlane.cpp
src/MDGeometry/MDPlaneImplicitFunction.cpp
src/MDGeometry/MDPlaneImplicitFunction.cpp
src/MDGeometry/NullImplicitFunction.cpp
src/Math/Acomp.cpp
src/Math/Algebra.cpp
src/Math/BnId.cpp
Expand Down Expand Up @@ -133,6 +135,7 @@ set ( INC_FILES
inc/MantidGeometry/Instrument/RectangularDetectorPixel.h
inc/MantidGeometry/Instrument/ReferenceFrame.h
inc/MantidGeometry/Instrument/XMLlogfile.h
inc/MantidGeometry/MDGeometry/CompositeImplicitFunction.h
inc/MantidGeometry/MDGeometry/IMDDimension.h
inc/MantidGeometry/MDGeometry/IMDDimensionFactory.h
inc/MantidGeometry/MDGeometry/MDBoxImplicitFunction.h
Expand All @@ -143,9 +146,10 @@ set ( INC_FILES
inc/MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h
inc/MantidGeometry/MDGeometry/MDImplicitFunction.h
inc/MantidGeometry/MDGeometry/MDPlane.h
inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h
inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h
inc/MantidGeometry/MDGeometry/MDTypes.h
inc/MantidGeometry/MDGeometry/MDWorkspaceConstants.h
inc/MantidGeometry/MDGeometry/NullImplicitFunction.h
inc/MantidGeometry/Math/Acomp.h
inc/MantidGeometry/Math/Algebra.h
inc/MantidGeometry/Math/BnId.h
Expand Down Expand Up @@ -192,6 +196,7 @@ set ( TEST_FILES
test/CompAssemblyTest.h
test/ComponentParserTest.h
test/ComponentTest.h
test/CompositeImplicitFunctionTest.h
test/ConeTest.h
test/ConventionalCellTest.h
test/ConvexPolygonTest.h
Expand Down Expand Up @@ -222,6 +227,7 @@ set ( TEST_FILES
test/MathSupportTest.h
test/NearestNeighboursFactoryTest.h
test/NearestNeighboursTest.h
test/NullImplicitFunctionTest.h
test/ObjCompAssemblyTest.h
test/ObjComponentTest.h
test/ObjectTest.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Mantid
{
namespace MDAlgorithms
namespace Geometry
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Mantid
{
namespace MDAlgorithms
namespace Geometry
{
/**
This class represents a Null Implicit function. This type prevents the requirement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MantidMDAlgorithms/CompositeImplicitFunction.h"
#include "MantidGeometry/MDGeometry/CompositeImplicitFunction.h"
#include <boost/algorithm/string.hpp>
#include <boost/format.hpp>
#include <Poco/DOM/Document.h>
Expand All @@ -10,7 +10,7 @@

namespace Mantid
{
namespace MDAlgorithms
namespace Geometry
{

CompositeImplicitFunction::CompositeImplicitFunction()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "MantidMDAlgorithms/NullImplicitFunction.h"
#include "MantidGeometry/MDGeometry/NullImplicitFunction.h"

namespace Mantid
{
namespace MDAlgorithms
namespace Geometry
{

NullImplicitFunction::NullImplicitFunction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <cmath>
#include <typeinfo>

#include "MantidMDAlgorithms/CompositeImplicitFunction.h"
#include "MantidGeometry/MDGeometry/CompositeImplicitFunction.h"

using namespace Mantid::Geometry;

class CompositeImplicitFunctionTest : public CxxTest::TestSuite
{
Expand All @@ -33,7 +35,6 @@ class CompositeImplicitFunctionTest : public CxxTest::TestSuite

void testFunctionAddition()
{
using namespace Mantid::MDAlgorithms;
CompositeImplicitFunction composite;
composite.addFunction(Mantid::Geometry::MDImplicitFunction_sptr(new MockImplicitFunction()));
composite.addFunction(Mantid::Geometry::MDImplicitFunction_sptr(new MockImplicitFunction()));
Expand All @@ -43,7 +44,6 @@ class CompositeImplicitFunctionTest : public CxxTest::TestSuite

void testEvaluateNestedFunctionsViaCoordinates()
{
using namespace Mantid::MDAlgorithms;
using namespace testing;

CompositeImplicitFunction composite;
Expand All @@ -64,8 +64,6 @@ class CompositeImplicitFunctionTest : public CxxTest::TestSuite

void testRecursiveToXML()
{
using namespace Mantid::MDAlgorithms;

MockImplicitFunction* mockFunctionA = new MockImplicitFunction;
MockImplicitFunction* mockFunctionB = new MockImplicitFunction;

Expand All @@ -81,7 +79,6 @@ class CompositeImplicitFunctionTest : public CxxTest::TestSuite

void testCannotAddNullDimension()
{
using namespace Mantid::MDAlgorithms;
CompositeImplicitFunction function;

MockImplicitFunction* nullFunction = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#include <cxxtest/TestSuite.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "MantidMDAlgorithms/NullImplicitFunction.h"
#include "MantidGeometry/MDGeometry/NullImplicitFunction.h"

using namespace Mantid::Geometry;

class NullImplicitFunctionTest: public CxxTest::TestSuite
{
Expand All @@ -13,23 +15,20 @@ class NullImplicitFunctionTest: public CxxTest::TestSuite

void testGetName()
{
using namespace Mantid::MDAlgorithms;
NullImplicitFunction function;

TSM_ASSERT_EQUALS("The static and dynamic names do not align", NullImplicitFunction::functionName(), function.getName());
}

void testEvaluateReturnsTrue()
{
using namespace Mantid::MDAlgorithms;
NullImplicitFunction function;
Mantid::coord_t coord[3] = {0, 0, 0};
TS_ASSERT(function.isPointContained(coord));
}

void testToXMLEmpty()
{
using namespace Mantid::MDAlgorithms;
NullImplicitFunction function;

TSM_ASSERT_EQUALS("The xml string should be empty for any instance of this type", std::string() , function.toXMLString());
Expand Down
19 changes: 4 additions & 15 deletions Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ set ( SRC_FILES
src/BooleanBinaryOperationMD.cpp
src/CobaltSpinWaveDSHO.cpp
src/CompareMDWorkspaces.cpp
src/CompositeFunctionBuilder.cpp
src/CompositeImplicitFunction.cpp
src/CompositeImplicitFunctionParser.cpp
src/ConvertToDetectorFaceMD.cpp
src/ConvertToMDEvents.cpp
src/ConvertToMDEventsParams.cpp
src/ConvertToMDEventsSubalgFactory.cpp
src/IConvertToMDEventsWS.cpp
src/ConvToMDPreprocDetectors.cpp
src/DampedHisenbergFMSW.cpp
src/DampedHisenbergFMSW.cpp
src/DivideMD.cpp
src/EqualToMD.cpp
src/ExponentialMD.cpp
Expand All @@ -32,7 +29,6 @@ set ( SRC_FILES
src/MinusMD.cpp
src/MultiplyMD.cpp
src/NotMD.cpp
src/NullImplicitFunction.cpp
src/OrMD.cpp
src/PlusMD.cpp
src/PowerMD.cpp
Expand All @@ -59,9 +55,6 @@ set ( INC_FILES
inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h
inc/MantidMDAlgorithms/CobaltSpinWaveDSHO.h
inc/MantidMDAlgorithms/CompareMDWorkspaces.h
inc/MantidMDAlgorithms/CompositeFunctionBuilder.h
inc/MantidMDAlgorithms/CompositeImplicitFunction.h
inc/MantidMDAlgorithms/CompositeImplicitFunctionParser.h
inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h
inc/MantidMDAlgorithms/ConvertToMDEvents.h
inc/MantidMDAlgorithms/ConvertToMDEventsWSInterface.h
Expand All @@ -76,7 +69,7 @@ set ( INC_FILES
inc/MantidMDAlgorithms/ConvToMDPreprocDetectors.h
inc/MantidMDAlgorithms/ConvertToMDEventsUnitsConv.h
inc/MantidMDAlgorithms/IConvertToMDEventsWS.h
inc/MantidMDAlgorithms/DampedHisenbergFMSW.h
inc/MantidMDAlgorithms/DampedHisenbergFMSW.h
inc/MantidMDAlgorithms/DivideMD.h
inc/MantidMDAlgorithms/EqualToMD.h
inc/MantidMDAlgorithms/ExponentialMD.h
Expand All @@ -93,7 +86,6 @@ set ( INC_FILES
inc/MantidMDAlgorithms/MinusMD.h
inc/MantidMDAlgorithms/MultiplyMD.h
inc/MantidMDAlgorithms/NotMD.h
inc/MantidMDAlgorithms/NullImplicitFunction.h
inc/MantidMDAlgorithms/OrMD.h
inc/MantidMDAlgorithms/PlusMD.h
inc/MantidMDAlgorithms/PowerMD.h
Expand Down Expand Up @@ -124,12 +116,12 @@ set ( TEST_FILES
test/ConvertToMDEventsCoordTransfTest.h
test/ConvertToMDEventsWSTest.h
test/ConvertToMDEventsParamsTest.h
test/ConvertToMDEventsSubalgFactoryTest.h
test/ConvertToMDEventsSubalgFactoryTest.h
test/ConvertToMDEventsTest.h
test/ConvertToMDEventsUnitsConvTest.h
test/ConvertToQ3DdETest.h
test/ConvertToMDEventsTestPerformance.h
test/DampedHisenbergFMSWTest.h
test/DampedHisenbergFMSWTest.h
test/DivideMDTest.h
test/EqualToMDTest.h
test/ExponentialMDTest.h
Expand Down Expand Up @@ -161,9 +153,6 @@ set ( TEST_FILES
)

set ( GMOCK_TEST_FILES
test/CompositeBuilderTest.h
test/CompositeImplicitFunctionTest.h
test/NullImplicitFunctionTest.h
test/BinaryOperationMDTest.h
)

Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 340ba19

Please sign in to comment.