Skip to content
Snippets Groups Projects
Commit 3d6cd925 authored by Jan Schäfer's avatar Jan Schäfer
Browse files

pokracovani v smoothheaviside

parent 5356affc
No related branches found
No related tags found
No related merge requests found
......@@ -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-" ) );
}
......
......@@ -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 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment