diff --git a/src/TNL/Functions/TestFunction_impl.h b/src/TNL/Functions/TestFunction_impl.h index 545129c1358edae3cc64ec2afa023e3251b00706..8df8f71919c29fe3871cc51939836d2fa1d9d289 100644 --- a/src/TNL/Functions/TestFunction_impl.h +++ b/src/TNL/Functions/TestFunction_impl.h @@ -336,9 +336,9 @@ setup( const Config::ParameterContainer& parameters, if( testFunction == "smooth-heaviside-of-vector-norm" ) { typedef VectorNorm< Dimension, Real > FunctionType; - typedef SmoothHeaviside< Dimension, Real > OperatorType; + typedef SmoothHeaviside< FunctionType > OperatorType; functionType = vectorNorm; - operatorType = SmoothHeaviside; + operatorType = smoothHeaviside; return ( setupFunction< FunctionType >( parameters, prefix + "vector-norm-" ) && setupOperator< OperatorType >( parameters, prefix + "smooth-heaviside-" ) ); } diff --git a/src/TNL/Operators/Analytic/SmoothHeaviside.h b/src/TNL/Operators/Analytic/SmoothHeaviside.h index 060057bff7b6c9de1920239649baf48812dd55e6..489d7852ae4795f2fedbbc5d1a33f1f2e69e062a 100644 --- a/src/TNL/Operators/Analytic/SmoothHeaviside.h +++ b/src/TNL/Operators/Analytic/SmoothHeaviside.h @@ -32,8 +32,18 @@ class SmoothHeaviside : public Functions::Domain< Function::getDomainDimenions() SmoothHeaviside() : sharpness( 1.0 ){} + static void configSetup( Config::ConfigDescription& config, + const String& prefix = "" ) + { + config.addEntry< double >( prefix + "sharpness", "Outer multiplicator of the Heaviside operator - -1.0 turns the function graph upside/down.", 1.0 ); + } + bool setup( const Config::ParameterContainer& parameters, - const String& prefix = "" ){}; + const String& prefix = "" ) + { + this->sharpness = parameters.getParameter< double >( prefix + "sharpness" ); + return true; + } void setSharpness( const RealType& sharpness )