private static HeightFieldGenerator ConvEnumToInstance(ConvolutionImplementation implementation)
    {
        HeightFieldGenerator heightFieldGenerator;

        switch (implementation)
        {
        case CONV_GPU_1D:
        {
            throw new NotImplementedException();
        }

        case CONV_GPU_2D:
        {
            heightFieldGenerator = new Convolution2DFastHeightFieldGenerator();
        }
        break;

        case CONV_CPU_1D:
        {
            throw new NotImplementedException();
        }

        case CONV_CPU_2D:
        {
            heightFieldGenerator = new GPUConvolution2DFastHeightFieldGenerator();
        }
        break;

        default:
        {
            throw new NotImplementedException();
        }
        }
        return(heightFieldGenerator);
    }
    public static HeightFieldGenerator CreateAndInitialise(Choice hfge, ExtendedHeightField.HeightFieldInfo heightFieldInfo, ParticleContainer waveParticles)
    {
        HeightFieldGenerator heightFieldGenerator;

        switch (hfge)
        {
        case Choice.GPU_CONVOLUTION_2D:
        {
            heightFieldGenerator = new GPUConvolution2DFastHeightFieldGenerator();
        }
        break;

        case Choice.CPU_CONVOLUTION_2D:
        {
            heightFieldGenerator = new Convolution2DFastHeightFieldGenerator();
        }
        break;

        case Choice.PRECISE:
        {
            heightFieldGenerator = new PreciseHeightFieldGenerator();
        }
        break;

        case Choice.NONE:
        {
            heightFieldGenerator = new EmptyHeightFieldGenerator();
        }
        break;

        default:
        {
            // TODO: throw an appropriate exception!
            throw new System.Exception();
        }
        }
        heightFieldGenerator.Initialise(heightFieldInfo, waveParticles);
        return(heightFieldGenerator);
    }