Skip to content

Commit

Permalink
Some more simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Jul 24, 2024
1 parent 233f29c commit d1d171b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion python/src/definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ template < typename Component, typename X, typename Y, typename PythonClass >
void addStandardFunctionDefinitions( PythonClass& component ) {

using ToleranceConvergence = njoy::scion::linearisation::ToleranceConvergence< X, Y >;
using DomainVariant = typename njoy::scion::math::FunctionBase< X, Y >::DomainVariant;
using DomainVariant = typename Component::DomainVariant;

// note: for is_same_domain to bind properly, all possible variant members
// must have a default constructor
Expand Down
13 changes: 10 additions & 3 deletions src/scion/math/FunctionBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ namespace math {

/**
* @class
* @brief Base class for function objects
* @brief Base class for function objects modelling y = f(x)
*
* This base class provides the common interface for all function objects.
* This includes domain testing and function evaluation.
*/
template < typename Derived, typename X, typename Y = X >
template < typename Derived, typename X, typename Y >
class FunctionBase {

public:
Expand All @@ -37,7 +37,14 @@ namespace math {
protected:

/* constructor */
#include "scion/math/FunctionBase/src/ctor.hpp"

/**
* @brief Constructor
*
* @param domain the domain of the function
*/
FunctionBase( DomainVariant domain ) :
domain_( std::move( domain ) ) {}

public:

Expand Down
7 changes: 0 additions & 7 deletions src/scion/math/FunctionBase/src/ctor.hpp

This file was deleted.

0 comments on commit d1d171b

Please sign in to comment.