Commit 3d6cd925 authored by Jan Schäfer's avatar Jan Schäfer
Browse files

pokracovani v smoothheaviside

parent 5356affc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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-" ) );
   }
+11 −1
Original line number Diff line number Diff line
@@ -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 )