Loading src/TNL/Functions/TestFunction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -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-" ) ); } Loading src/TNL/Operators/Analytic/SmoothHeaviside.h +11 −1 Original line number Diff line number Diff line Loading @@ -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 ) Loading Loading
src/TNL/Functions/TestFunction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -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-" ) ); } Loading
src/TNL/Operators/Analytic/SmoothHeaviside.h +11 −1 Original line number Diff line number Diff line Loading @@ -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 ) Loading