Skip to content

Commit

Permalink
Refs #8631 elastic part: moved constraint initialization
Browse files Browse the repository at this point in the history
modified: DiffRotDiscreteCircle.h
modified: DiffRotDiscreteCircle.cpp
  • Loading branch information
jmborr committed Dec 17, 2013
1 parent 7359eb2 commit 4a0c9e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -54,7 +54,7 @@ class DLLExport ElasticDiffRotDiscreteCircle : public DeltaFunction
virtual std::string name()const{ return "ElasticDiffRotDiscreteCircle"; }

/// overwrite IFunction base class method, which declare function parameters
// virtual void init();
virtual void init();

/// A rescaling of the peak intensity
double HeightPrefactor() const;
Expand Down
Expand Up @@ -83,7 +83,10 @@ ElasticDiffRotDiscreteCircle::ElasticDiffRotDiscreteCircle(){
declareParameter( "Radius", 1.0, "Circle radius [Angstroms] " );
declareAttribute( "Q", API::IFunction::Attribute(0.5) );
declareAttribute( "N", API::IFunction::Attribute(3) );
}

void ElasticDiffRotDiscreteCircle::init()
{
// Ensure positive values for Height and Radius
BoundaryConstraint* HeightConstraint = new BoundaryConstraint( this, "Height", std::numeric_limits<double>::epsilon(), true );
addConstraint( HeightConstraint );
Expand Down

0 comments on commit 4a0c9e6

Please sign in to comment.