Commit 1d83eea0 authored by BLANCHARD Pierre's avatar BLANCHARD Pierre

Fixed default behaviour for Unif kernel and m2lhandler ctors.

parent 87ef2404
......@@ -73,13 +73,13 @@ public:
const FReal inBoxWidth,
const FPoint<FReal>& inBoxCenter,
const MatrixKernelClass *const inMatrixKernel,
const int inLeafLevelSeparationCriterion)
const int inLeafLevelSeparationCriterion = 1)
: FAbstractUnifKernel< FReal, CellClass, ContainerClass, MatrixKernelClass, ORDER, NVALS>(inTreeHeight,inBoxWidth,inBoxCenter),
MatrixKernel(inMatrixKernel),
M2LHandler(MatrixKernel,
inTreeHeight,
inBoxWidth,
inLeafLevelSeparationCriterion) ,
inLeafLevelSeparationCriterion),
LeafLevelSeparationCriterion(inLeafLevelSeparationCriterion)
{ }
......
......@@ -197,7 +197,7 @@ class FUnifM2LHandler<FReal, ORDER,HOMOGENEOUS>
public:
template <typename MatrixKernelClass>
FUnifM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int, const FReal, const int inLeafLevelSeparationCriterion)
FUnifM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int, const FReal, const int inLeafLevelSeparationCriterion = 1)
: FC(nullptr), Dft(), opt_rc(rc/2+1), LeafLevelSeparationCriterion(inLeafLevelSeparationCriterion)
{
// init DFT
......@@ -216,7 +216,7 @@ public:
* Copy constructor
*/
FUnifM2LHandler(const FUnifM2LHandler& other)
: FC(other.FC), Dft(), opt_rc(other.opt_rc)
: FC(other.FC), Dft(), opt_rc(other.opt_rc), LeafLevelSeparationCriterion(other.LeafLevelSeparationCriterion)
{
// init DFT
const int steps[dimfft] = {rc};
......@@ -361,7 +361,7 @@ class FUnifM2LHandler<FReal,ORDER,NON_HOMOGENEOUS>
public:
template <typename MatrixKernelClass>
FUnifM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int inTreeHeight, const FReal inRootCellWidth, const int inLeafLevelSeparationCriterion)
FUnifM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int inTreeHeight, const FReal inRootCellWidth, const int inLeafLevelSeparationCriterion = 1)
: TreeHeight(inTreeHeight),
RootCellWidth(inRootCellWidth),
Dft(), opt_rc(rc/2+1), LeafLevelSeparationCriterion(inLeafLevelSeparationCriterion)
......@@ -390,7 +390,7 @@ public:
: FC(other.FC),
TreeHeight(other.TreeHeight),
RootCellWidth(other.RootCellWidth),
Dft(), opt_rc(other.opt_rc)
Dft(), opt_rc(other.opt_rc), LeafLevelSeparationCriterion(other.LeafLevelSeparationCriterion)
{
// init DFT
const int steps[dimfft] = {rc};
......
......@@ -84,6 +84,9 @@ protected://PB: for OptiDis
/// Needed for M2L operator
const M2LHandlerClass M2LHandler;
/// Leaf level separation criterion
const int LeafLevelSeparationCriterion;
public:
/**
* The constructor initializes all constant attributes and it reads the
......@@ -94,13 +97,16 @@ public:
const FReal inBoxWidth,
const FPoint<FReal>& inBoxCenter,
const MatrixKernelClass *const inMatrixKernel,
const FReal inBoxWidthExtension)
const FReal inBoxWidthExtension,
const int inLeafLevelSeparationCriterion = 1)
: FAbstractUnifKernel< FReal, CellClass, ContainerClass, MatrixKernelClass, ORDER, NVALS>(inTreeHeight,inBoxWidth,inBoxCenter,inBoxWidthExtension),
MatrixKernel(inMatrixKernel),
M2LHandler(MatrixKernel,
inTreeHeight,
inBoxWidth,
inBoxWidthExtension)
inBoxWidthExtension,
inLeafLevelSeparationCriterion),
LeafLevelSeparationCriterion(inLeafLevelSeparationCriterion)
{ }
......
......@@ -226,7 +226,7 @@ class FUnifTensorialM2LHandler<FReal, ORDER,MatrixKernelClass,HOMOGENEOUS>
public:
FUnifTensorialM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int, const FReal, const FReal inCellWidthExtension, const int inLeafLevelSeparationCriterion)
FUnifTensorialM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int, const FReal, const FReal inCellWidthExtension, const int inLeafLevelSeparationCriterion = 1)
: CellWidthExtension(inCellWidthExtension),
Dft(), opt_rc(rc/2+1), LeafLevelSeparationCriterion(inLeafLevelSeparationCriterion)
{
......@@ -421,7 +421,7 @@ class FUnifTensorialM2LHandler<FReal,ORDER,MatrixKernelClass,NON_HOMOGENEOUS>
public:
FUnifTensorialM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int inTreeHeight, const FReal inRootCellWidth, const FReal inCellWidthExtension, const int inLeafLevelSeparationCriterion)
FUnifTensorialM2LHandler(const MatrixKernelClass *const MatrixKernel, const unsigned int inTreeHeight, const FReal inRootCellWidth, const FReal inCellWidthExtension, const int inLeafLevelSeparationCriterion = 1)
: TreeHeight(inTreeHeight),
RootCellWidth(inRootCellWidth),
CellWidthExtension(inCellWidthExtension),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment