make single-parameter constructors as explicit
to avoid unexpected implicit casts
This commit is contained in:
parent
3722992673
commit
f2080cdf54
14
3rdparty/expreval/except.h
vendored
14
3rdparty/expreval/except.h
vendored
@ -69,7 +69,7 @@ namespace ExprEval
|
|||||||
class NotFoundException : public Exception
|
class NotFoundException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NotFoundException(const ::std::string &name);
|
explicit NotFoundException(const ::std::string &name);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Already exists exception (function or value already exists)
|
// Already exists exception (function or value already exists)
|
||||||
@ -77,7 +77,7 @@ namespace ExprEval
|
|||||||
class AlreadyExistsException : public Exception
|
class AlreadyExistsException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AlreadyExistsException(const ::std::string &name);
|
explicit AlreadyExistsException(const ::std::string &name);
|
||||||
};
|
};
|
||||||
|
|
||||||
// A null pointer was passed
|
// A null pointer was passed
|
||||||
@ -85,7 +85,7 @@ namespace ExprEval
|
|||||||
class NullPointerException : public Exception
|
class NullPointerException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NullPointerException(const ::std::string &method);
|
explicit NullPointerException(const ::std::string &method);
|
||||||
};
|
};
|
||||||
|
|
||||||
// A bad math error occured
|
// A bad math error occured
|
||||||
@ -93,7 +93,7 @@ namespace ExprEval
|
|||||||
class MathException : public Exception
|
class MathException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MathException(const ::std::string &function);
|
explicit MathException(const ::std::string &function);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Divide by zero exception
|
// Divide by zero exception
|
||||||
@ -150,7 +150,7 @@ namespace ExprEval
|
|||||||
class InvalidArgumentCountException : public Exception
|
class InvalidArgumentCountException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InvalidArgumentCountException(const ::std::string &function);
|
explicit InvalidArgumentCountException(const ::std::string &function);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Assign to a constant
|
// Assign to a constant
|
||||||
@ -158,7 +158,7 @@ namespace ExprEval
|
|||||||
class ConstantAssignException : public Exception
|
class ConstantAssignException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConstantAssignException(const ::std::string &value);
|
explicit ConstantAssignException(const ::std::string &value);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Pass constant by reference
|
// Pass constant by reference
|
||||||
@ -166,7 +166,7 @@ namespace ExprEval
|
|||||||
class ConstantReferenceException : public Exception
|
class ConstantReferenceException : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConstantReferenceException(const ::std::string &value);
|
explicit ConstantReferenceException(const ::std::string &value);
|
||||||
};
|
};
|
||||||
|
|
||||||
// A general syntax exception
|
// A general syntax exception
|
||||||
|
24
3rdparty/expreval/node.h
vendored
24
3rdparty/expreval/node.h
vendored
@ -25,7 +25,7 @@ namespace ExprEval
|
|||||||
class Node
|
class Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Node(Expression *expr);
|
explicit Node(Expression *expr);
|
||||||
virtual ~Node();
|
virtual ~Node();
|
||||||
|
|
||||||
virtual double DoEvaluate() = 0;
|
virtual double DoEvaluate() = 0;
|
||||||
@ -43,7 +43,7 @@ namespace ExprEval
|
|||||||
class FunctionNode : public Node
|
class FunctionNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FunctionNode(Expression *expr);
|
explicit FunctionNode(Expression *expr);
|
||||||
~FunctionNode();
|
~FunctionNode();
|
||||||
|
|
||||||
// Parse nodes and references
|
// Parse nodes and references
|
||||||
@ -81,7 +81,7 @@ namespace ExprEval
|
|||||||
class MultiNode : public Node
|
class MultiNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MultiNode(Expression *expr);
|
explicit MultiNode(Expression *expr);
|
||||||
~MultiNode();
|
~MultiNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -97,7 +97,7 @@ namespace ExprEval
|
|||||||
class AssignNode : public Node
|
class AssignNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AssignNode(Expression *expr);
|
explicit AssignNode(Expression *expr);
|
||||||
~AssignNode();
|
~AssignNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -114,7 +114,7 @@ namespace ExprEval
|
|||||||
class AddNode : public Node
|
class AddNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AddNode(Expression *expr);
|
explicit AddNode(Expression *expr);
|
||||||
~AddNode();
|
~AddNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -131,7 +131,7 @@ namespace ExprEval
|
|||||||
class SubtractNode : public Node
|
class SubtractNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SubtractNode(Expression *expr);
|
explicit SubtractNode(Expression *expr);
|
||||||
~SubtractNode();
|
~SubtractNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -148,7 +148,7 @@ namespace ExprEval
|
|||||||
class MultiplyNode : public Node
|
class MultiplyNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MultiplyNode(Expression *expr);
|
explicit MultiplyNode(Expression *expr);
|
||||||
~MultiplyNode();
|
~MultiplyNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -165,7 +165,7 @@ namespace ExprEval
|
|||||||
class DivideNode : public Node
|
class DivideNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DivideNode(Expression *expr);
|
explicit DivideNode(Expression *expr);
|
||||||
~DivideNode();
|
~DivideNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -182,7 +182,7 @@ namespace ExprEval
|
|||||||
class NegateNode : public Node
|
class NegateNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NegateNode(Expression *expr);
|
explicit NegateNode(Expression *expr);
|
||||||
~NegateNode();
|
~NegateNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -198,7 +198,7 @@ namespace ExprEval
|
|||||||
class ExponentNode : public Node
|
class ExponentNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ExponentNode(Expression *expr);
|
explicit ExponentNode(Expression *expr);
|
||||||
~ExponentNode();
|
~ExponentNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -215,7 +215,7 @@ namespace ExprEval
|
|||||||
class VariableNode : public Node
|
class VariableNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VariableNode(Expression *expr);
|
explicit VariableNode(Expression *expr);
|
||||||
~VariableNode();
|
~VariableNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
@ -231,7 +231,7 @@ namespace ExprEval
|
|||||||
class ValueNode : public Node
|
class ValueNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ValueNode(Expression *expr);
|
explicit ValueNode(Expression *expr);
|
||||||
~ValueNode();
|
~ValueNode();
|
||||||
|
|
||||||
double DoEvaluate();
|
double DoEvaluate();
|
||||||
|
2
3rdparty/expreval/parser.h
vendored
2
3rdparty/expreval/parser.h
vendored
@ -75,7 +75,7 @@ namespace ExprEval
|
|||||||
public:
|
public:
|
||||||
typedef ::std::vector<Token*>::size_type size_type;
|
typedef ::std::vector<Token*>::size_type size_type;
|
||||||
|
|
||||||
Parser(Expression *expr);
|
explicit Parser(Expression *expr);
|
||||||
~Parser();
|
~Parser();
|
||||||
|
|
||||||
Node *Parse(const ::std::string &exstr);
|
Node *Parse(const ::std::string &exstr);
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
char RY; //!< Boundary condition code for Y-rotation
|
char RY; //!< Boundary condition code for Y-rotation
|
||||||
char RZ; //!< Boundary condition code for Z-rotation
|
char RZ; //!< Boundary condition code for Z-rotation
|
||||||
//! \brief Constructor initializing a BC instance.
|
//! \brief Constructor initializing a BC instance.
|
||||||
BC(int n) : node(n), CX(1), CY(1), CZ(1), RX(1), RY(1), RZ(1) {}
|
explicit BC(int n) : node(n), CX(1), CY(1), CZ(1), RX(1), RY(1), RZ(1) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<BC> BCVec; //!< Nodal boundary condition container
|
typedef std::vector<BC> BCVec; //!< Nodal boundary condition container
|
||||||
|
@ -32,7 +32,7 @@ class ASMmxBase
|
|||||||
protected:
|
protected:
|
||||||
//! \brief The constructor sets the number of field variables.
|
//! \brief The constructor sets the number of field variables.
|
||||||
//! \param[in] n_f Number of nodal variables in each field
|
//! \param[in] n_f Number of nodal variables in each field
|
||||||
ASMmxBase(const std::vector<unsigned char>& n_f);
|
explicit ASMmxBase(const std::vector<unsigned char>& n_f);
|
||||||
|
|
||||||
//! \brief Initializes the patch level MADOF array.
|
//! \brief Initializes the patch level MADOF array.
|
||||||
//! \param[in] MLGN Matrix of local-to-global node numbers
|
//! \param[in] MLGN Matrix of local-to-global node numbers
|
||||||
|
@ -91,7 +91,7 @@ protected:
|
|||||||
const ASMs2D& myPatch; //!< Reference to the patch being integrated
|
const ASMs2D& myPatch; //!< Reference to the patch being integrated
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initialises the reference to current patch.
|
//! \brief The constructor initialises the reference to current patch.
|
||||||
InterfaceChecker(const ASMs2D& pch) : myPatch(pch) {}
|
explicit InterfaceChecker(const ASMs2D& pch) : myPatch(pch) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~InterfaceChecker() {}
|
virtual ~InterfaceChecker() {}
|
||||||
//! \brief Returns non-zero if the specified element have contributions.
|
//! \brief Returns non-zero if the specified element have contributions.
|
||||||
|
@ -110,7 +110,7 @@ protected:
|
|||||||
const ASMs3D& myPatch; //!< Reference to the patch being integrated
|
const ASMs3D& myPatch; //!< Reference to the patch being integrated
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initialises the reference to current patch.
|
//! \brief The constructor initialises the reference to current patch.
|
||||||
InterfaceChecker(const ASMs3D& pch) : myPatch(pch) {}
|
explicit InterfaceChecker(const ASMs3D& pch) : myPatch(pch) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~InterfaceChecker() {}
|
virtual ~InterfaceChecker() {}
|
||||||
//! \brief Returns non-zero if the specified element have contributions.
|
//! \brief Returns non-zero if the specified element have contributions.
|
||||||
@ -122,7 +122,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
ASMs3D(unsigned char n_f = 3);
|
explicit ASMs3D(unsigned char n_f = 3);
|
||||||
//! \brief Special copy constructor for sharing of FE data.
|
//! \brief Special copy constructor for sharing of FE data.
|
||||||
ASMs3D(const ASMs3D& patch, unsigned char n_f);
|
ASMs3D(const ASMs3D& patch, unsigned char n_f);
|
||||||
//! \brief Default copy constructor copying everything.
|
//! \brief Default copy constructor copying everything.
|
||||||
|
@ -27,7 +27,7 @@ class ASMs3DLag : public ASMs3D
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
ASMs3DLag(unsigned char n_f = 3);
|
explicit ASMs3DLag(unsigned char n_f = 3);
|
||||||
//! \brief Special copy constructor for sharing of FE data.
|
//! \brief Special copy constructor for sharing of FE data.
|
||||||
ASMs3DLag(const ASMs3DLag& patch, unsigned char n_f);
|
ASMs3DLag(const ASMs3DLag& patch, unsigned char n_f);
|
||||||
//! \brief Default copy constructor copying everything.
|
//! \brief Default copy constructor copying everything.
|
||||||
|
@ -26,7 +26,7 @@ class ASMs3DSpec : public ASMs3DLag
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
ASMs3DSpec(unsigned char n_f = 3) : ASMs3DLag(n_f) {}
|
explicit ASMs3DSpec(unsigned char n_f = 3) : ASMs3DLag(n_f) {}
|
||||||
//! \brief Copy constructor.
|
//! \brief Copy constructor.
|
||||||
ASMs3DSpec(const ASMs3DSpec& patch, unsigned char n_f = 0)
|
ASMs3DSpec(const ASMs3DSpec& patch, unsigned char n_f = 0)
|
||||||
: ASMs3DLag(patch,n_f) {}
|
: ASMs3DLag(patch,n_f) {}
|
||||||
|
@ -33,7 +33,7 @@ class ASMs3Dmx : public ASMs3D, private ASMmxBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes the dimension of each basis.
|
//! \brief The constructor initializes the dimension of each basis.
|
||||||
ASMs3Dmx(const CharVec& n_f);
|
explicit ASMs3Dmx(const CharVec& n_f);
|
||||||
//! \brief Copy constructor.
|
//! \brief Copy constructor.
|
||||||
ASMs3Dmx(const ASMs3Dmx& patch, const CharVec& n_f = CharVec(2,0));
|
ASMs3Dmx(const ASMs3Dmx& patch, const CharVec& n_f = CharVec(2,0));
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -30,7 +30,7 @@ class ASMs3DmxLag : public ASMs3DLag, private ASMmxBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes the dimension of each basis.
|
//! \brief The constructor initializes the dimension of each basis.
|
||||||
ASMs3DmxLag(const CharVec& n_f);
|
explicit ASMs3DmxLag(const CharVec& n_f);
|
||||||
//! \brief Copy constructor.
|
//! \brief Copy constructor.
|
||||||
ASMs3DmxLag(const ASMs3DmxLag& patch, const CharVec& n_f = CharVec(2,0));
|
ASMs3DmxLag(const ASMs3DmxLag& patch, const CharVec& n_f = CharVec(2,0));
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -47,7 +47,7 @@ namespace LR //! Utilities for LR-splines.
|
|||||||
RealArray errors; //!< List of error indicators for the elements
|
RealArray errors; //!< List of error indicators for the elements
|
||||||
|
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
RefineData(bool rs = false) : refShare(rs) {}
|
explicit RefineData(bool rs = false) : refShare(rs) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Expands the basis coefficients of an LR-spline object.
|
//! \brief Expands the basis coefficients of an LR-spline object.
|
||||||
|
@ -28,7 +28,7 @@ class BDFMats : public NewmarkMats
|
|||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes the time integration parameters.
|
//! \brief The constructor initializes the time integration parameters.
|
||||||
//! param[in] bdfscheme BDF time discretization scheme
|
//! param[in] bdfscheme BDF time discretization scheme
|
||||||
BDFMats(const TimeIntegration::BDFD2& bdfscheme) : bdf(bdfscheme) {}
|
explicit BDFMats(const TimeIntegration::BDFD2& bdfscheme) : bdf(bdfscheme) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~BDFMats() {}
|
virtual ~BDFMats() {}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
class SlaveOrder {
|
class SlaveOrder {
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes the DomainDecomposition reference.
|
//! \brief The constructor initializes the DomainDecomposition reference.
|
||||||
SlaveOrder(const DomainDecomposition& dd_) : dd(dd_) {}
|
explicit SlaveOrder(const DomainDecomposition& dd_) : dd(dd_) {}
|
||||||
//! \brief Hide ill-formed default assignment operator.
|
//! \brief Hide ill-formed default assignment operator.
|
||||||
SlaveOrder& operator=(const SlaveOrder&) { return *this; }
|
SlaveOrder& operator=(const SlaveOrder&) { return *this; }
|
||||||
//! \brief Compare interfaces.
|
//! \brief Compare interfaces.
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
//! by the application, but are only used to assembly the global norms.
|
//! by the application, but are only used to assembly the global norms.
|
||||||
//! To avoid the need for a global array of element norms in that case,
|
//! To avoid the need for a global array of element norms in that case,
|
||||||
//! an internal array is then used instead.
|
//! an internal array is then used instead.
|
||||||
ElmNorm(size_t n) : buf(n,0.0), nnv(n) { ptr = &buf.front(); }
|
explicit ElmNorm(size_t n) : buf(n,0.0), nnv(n) { ptr = &buf.front(); }
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~ElmNorm() {}
|
virtual ~ElmNorm() {}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class Field
|
|||||||
protected:
|
protected:
|
||||||
//! \brief The constructor sets the field name.
|
//! \brief The constructor sets the field name.
|
||||||
//! \param[in] name Optional name of field
|
//! \param[in] name Optional name of field
|
||||||
Field(const char* name = nullptr) { if (name) fname = name; }
|
explicit Field(const char* name = nullptr) { if (name) fname = name; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -31,7 +31,7 @@ class FieldBase : public Field
|
|||||||
protected:
|
protected:
|
||||||
//! \brief The constructor sets the field name.
|
//! \brief The constructor sets the field name.
|
||||||
//! \param[in] name Optional name of field
|
//! \param[in] name Optional name of field
|
||||||
FieldBase(const char* name = nullptr) : Field(name) { nelm = nno = 0; }
|
explicit FieldBase(const char* name = nullptr) : Field(name) { nelm = nno = 0; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -36,7 +36,7 @@ class Fields
|
|||||||
protected:
|
protected:
|
||||||
//! \brief The constructor sets the field name.
|
//! \brief The constructor sets the field name.
|
||||||
//! \param[in] name Name of field
|
//! \param[in] name Name of field
|
||||||
Fields(const char* name = 0) : nf(0), nelm(0), nno(0)
|
explicit Fields(const char* name = 0) : nf(0), nelm(0), nno(0)
|
||||||
{ if (name) fname = name; }
|
{ if (name) fname = name; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -31,7 +31,7 @@ class GlbForceVec : public GlobalIntegral
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor only sets its reference to the SAM object.
|
//! \brief The constructor only sets its reference to the SAM object.
|
||||||
GlbForceVec(const SAM& _sam) : sam(_sam) {}
|
explicit GlbForceVec(const SAM& _sam) : sam(_sam) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~GlbForceVec() {}
|
virtual ~GlbForceVec() {}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
PerforatedPlate2D() {}
|
PerforatedPlate2D() {}
|
||||||
//! \brief Constructor creating a single hole.
|
//! \brief Constructor creating a single hole.
|
||||||
PerforatedPlate2D(Hole2D* hole) { holes.resize(1,hole); }
|
explicit PerforatedPlate2D(Hole2D* hole) { holes.resize(1,hole); }
|
||||||
//! \brief The destructor deletes the holes.
|
//! \brief The destructor deletes the holes.
|
||||||
virtual ~PerforatedPlate2D();
|
virtual ~PerforatedPlate2D();
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ struct cell
|
|||||||
vertex CellVerts[4]; //!< Global coordinates of the cell vertices
|
vertex CellVerts[4]; //!< Global coordinates of the cell vertices
|
||||||
|
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
cell(int level = 0) : depth(level), xi(0.0), eta(0.0) {}
|
explicit cell(int level = 0) : depth(level), xi(0.0), eta(0.0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class IntegrandBase : public Integrand
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The default constructor is protected to allow sub-classes only.
|
//! \brief The default constructor is protected to allow sub-classes only.
|
||||||
IntegrandBase(unsigned short int n = 0) : nsd(n), npv(1), m_mode(SIM::INIT) {}
|
explicit IntegrandBase(unsigned short int n = 0) : nsd(n), npv(1), m_mode(SIM::INIT) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
@ -285,8 +285,8 @@ class NormBase : public Integrand
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The default constructor is protected to allow sub-classes only.
|
//! \brief The default constructor is protected to allow sub-classes only.
|
||||||
NormBase(IntegrandBase& p) : myProblem(p), projBou(false), nrcmp(0),
|
explicit NormBase(IntegrandBase& p) : myProblem(p), projBou(false), nrcmp(0),
|
||||||
lints(nullptr), finalOp(ASM::SQRT) {}
|
lints(nullptr), finalOp(ASM::SQRT) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
@ -392,7 +392,7 @@ class ForceBase : public Integrand
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The constructor is protected to allow sub-classes only.
|
//! \brief The constructor is protected to allow sub-classes only.
|
||||||
ForceBase(IntegrandBase& p) : myProblem(p), eBuffer(nullptr) {}
|
explicit ForceBase(IntegrandBase& p) : myProblem(p), eBuffer(nullptr) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief The destructor frees the internally allocated objects.
|
//! \brief The destructor frees the internally allocated objects.
|
||||||
|
@ -39,7 +39,7 @@ class ASMu3D : public ASMunstruct, public ASM3D
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
ASMu3D(unsigned char n_f = 3);
|
explicit ASMu3D(unsigned char n_f = 3);
|
||||||
//! \brief Copy constructor.
|
//! \brief Copy constructor.
|
||||||
ASMu3D(const ASMu3D& patch, unsigned char n_f = 0);
|
ASMu3D(const ASMu3D& patch, unsigned char n_f = 0);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -26,7 +26,7 @@ class Lagrange
|
|||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the reference to natural coordinates.
|
//! \brief Constructor initializing the reference to natural coordinates.
|
||||||
//! \param[in] p Natural interpolation point coordinates in range [-1,1]
|
//! \param[in] p Natural interpolation point coordinates in range [-1,1]
|
||||||
Lagrange(const RealArray& p) : points(p) {}
|
explicit Lagrange(const RealArray& p) : points(p) {}
|
||||||
|
|
||||||
//! \brief Evaluates a 1D Lagrange polynomial.
|
//! \brief Evaluates a 1D Lagrange polynomial.
|
||||||
//! \param[in] polnum Which polynomial of the basis to evaluate
|
//! \param[in] polnum Which polynomial of the basis to evaluate
|
||||||
|
@ -33,7 +33,7 @@ class ISTLVector : public StdVector
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor creating an empty vector.
|
//! \brief Constructor creating an empty vector.
|
||||||
ISTLVector(const ProcessAdm& padm);
|
explicit ISTLVector(const ProcessAdm& padm);
|
||||||
//! \brief Constructor creating a vector of length \a n.
|
//! \brief Constructor creating a vector of length \a n.
|
||||||
ISTLVector(const ProcessAdm& padm, size_t n);
|
ISTLVector(const ProcessAdm& padm, size_t n);
|
||||||
//! \brief Constructor creating a vector from an array.
|
//! \brief Constructor creating a vector from an array.
|
||||||
|
@ -43,7 +43,7 @@ namespace ISTL
|
|||||||
class IOp2Pre : public Dune::InverseOperator2Preconditioner<Pre<ISTL::Mat>, Dune::SolverCategory::sequential> {
|
class IOp2Pre : public Dune::InverseOperator2Preconditioner<Pre<ISTL::Mat>, Dune::SolverCategory::sequential> {
|
||||||
typedef Dune::InverseOperator2Preconditioner<Pre<ISTL::Mat>, Dune::SolverCategory::sequential> SolverType;
|
typedef Dune::InverseOperator2Preconditioner<Pre<ISTL::Mat>, Dune::SolverCategory::sequential> SolverType;
|
||||||
public:
|
public:
|
||||||
IOp2Pre(Pre<ISTL::Mat>* iop) : SolverType(*iop)
|
explicit IOp2Pre(Pre<ISTL::Mat>* iop) : SolverType(*iop)
|
||||||
{
|
{
|
||||||
m_op.reset(iop);
|
m_op.reset(iop);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ class PETScVector : public StdVector
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor creating an empty vector.
|
//! \brief Constructor creating an empty vector.
|
||||||
PETScVector(const ProcessAdm& padm);
|
explicit PETScVector(const ProcessAdm& padm);
|
||||||
//! \brief Constructor creating a vector of length \a n.
|
//! \brief Constructor creating a vector of length \a n.
|
||||||
PETScVector(const ProcessAdm& padm, size_t n);
|
PETScVector(const ProcessAdm& padm, size_t n);
|
||||||
//! \brief Constructor creating a vector from an array.
|
//! \brief Constructor creating a vector from an array.
|
||||||
|
@ -48,13 +48,13 @@ public:
|
|||||||
ProcessAdm();
|
ProcessAdm();
|
||||||
#if defined(HAS_PETSC) || defined(HAVE_MPI)
|
#if defined(HAS_PETSC) || defined(HAVE_MPI)
|
||||||
//! \brief Construct a parallel process administrator.
|
//! \brief Construct a parallel process administrator.
|
||||||
ProcessAdm(MPI_Comm& mpi_comm);
|
explicit ProcessAdm(MPI_Comm& mpi_comm);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MPI
|
#ifdef HAVE_MPI
|
||||||
//! \brief Construct a parallel process administrator.
|
//! \brief Construct a parallel process administrator.
|
||||||
//! \details This overload is necessary due to MPI_COMM_WORLD being .. ickily.
|
//! \details This overload is necessary due to MPI_COMM_WORLD being .. ickily.
|
||||||
ProcessAdm(bool hack);
|
explicit ProcessAdm(bool hack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! \brief The destructor releases the process administrator.
|
//! \brief The destructor releases the process administrator.
|
||||||
|
@ -59,7 +59,7 @@ struct SuperLUdata
|
|||||||
Real rpg; //!< Reciprocal pivot growth
|
Real rpg; //!< Reciprocal pivot growth
|
||||||
|
|
||||||
//! \brief The constructor initializes the default input options.
|
//! \brief The constructor initializes the default input options.
|
||||||
SuperLUdata(int numThreads = 0)
|
explicit SuperLUdata(int numThreads = 0)
|
||||||
{
|
{
|
||||||
R = C = 0;
|
R = C = 0;
|
||||||
perm_r = perm_c = etree = 0;
|
perm_r = perm_c = etree = 0;
|
||||||
|
@ -126,11 +126,11 @@ public:
|
|||||||
//! \brief Constructor creating an empty vector.
|
//! \brief Constructor creating an empty vector.
|
||||||
StdVector() {}
|
StdVector() {}
|
||||||
//! \brief Constructor creating a vector of length \a n.
|
//! \brief Constructor creating a vector of length \a n.
|
||||||
StdVector(size_t n) : utl::vector<Real>(n) {}
|
explicit StdVector(size_t n) : utl::vector<Real>(n) {}
|
||||||
//! \brief Constructor creating a vector from an array.
|
//! \brief Constructor creating a vector from an array.
|
||||||
StdVector(const Real* values, size_t n) : utl::vector<Real>(values,n) {}
|
StdVector(const Real* values, size_t n) : utl::vector<Real>(values,n) {}
|
||||||
//! \brief Overloaded copy constructor.
|
//! \brief Overloaded copy constructor.
|
||||||
StdVector(const std::vector<Real>& vec)
|
explicit StdVector(const std::vector<Real>& vec)
|
||||||
{ this->insert(this->end(),vec.begin(),vec.end()); }
|
{ this->insert(this->end(),vec.begin(),vec.end()); }
|
||||||
|
|
||||||
//! \brief Returns the vector type.
|
//! \brief Returns the vector type.
|
||||||
|
@ -61,7 +61,7 @@ namespace utl //! General utility classes and functions.
|
|||||||
//! \brief Constructor creating an empty vector.
|
//! \brief Constructor creating an empty vector.
|
||||||
vector<T>() {}
|
vector<T>() {}
|
||||||
//! \brief Constructor creating a vector of length \a n.
|
//! \brief Constructor creating a vector of length \a n.
|
||||||
vector<T>(size_t n) { this->resize(n); }
|
explicit vector<T>(size_t n) { this->resize(n); }
|
||||||
//! \brief Constructor creating a vector from an array.
|
//! \brief Constructor creating a vector from an array.
|
||||||
vector<T>(const T* values, size_t n) { this->fill(values,n); }
|
vector<T>(const T* values, size_t n) { this->fill(values,n); }
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class EigenModeSIM : public MultiStepSIM
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes the FE model reference.
|
//! \brief The constructor initializes the FE model reference.
|
||||||
EigenModeSIM(SIMbase& sim);
|
explicit EigenModeSIM(SIMbase& sim);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~EigenModeSIM() {}
|
virtual ~EigenModeSIM() {}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class GenAlphaSIM : public NewmarkSIM
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes default solution parameters.
|
//! \brief The constructor initializes default solution parameters.
|
||||||
GenAlphaSIM(SIMbase& s);
|
explicit GenAlphaSIM(SIMbase& s);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~GenAlphaSIM() {}
|
virtual ~GenAlphaSIM() {}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ class HHTSIM : public NewmarkSIM
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes default solution parameters.
|
//! \brief The constructor initializes default solution parameters.
|
||||||
HHTSIM(SIMbase& sim);
|
explicit HHTSIM(SIMbase& sim);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~HHTSIM() {}
|
virtual ~HHTSIM() {}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class ModelGenerator
|
|||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes the common members.
|
//! \brief The constructor initializes the common members.
|
||||||
//!\ param elem XML element to parse
|
//!\ param elem XML element to parse
|
||||||
ModelGenerator(const TiXmlElement* elem) : geo(elem) {}
|
explicit ModelGenerator(const TiXmlElement* elem) : geo(elem) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~ModelGenerator() {}
|
virtual ~ModelGenerator() {}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ class DefaultGeometry1D : public ModelGenerator
|
|||||||
public:
|
public:
|
||||||
//! \brief The constructor forwards to the base class.
|
//! \brief The constructor forwards to the base class.
|
||||||
//! \param[in] geo XML element containing geometry definition
|
//! \param[in] geo XML element containing geometry definition
|
||||||
DefaultGeometry1D(const TiXmlElement* geo) : ModelGenerator(geo) {}
|
explicit DefaultGeometry1D(const TiXmlElement* geo) : ModelGenerator(geo) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~DefaultGeometry1D() {}
|
virtual ~DefaultGeometry1D() {}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ class DefaultGeometry2D : public ModelGenerator
|
|||||||
public:
|
public:
|
||||||
//! \brief The constructor forwards to the base class.
|
//! \brief The constructor forwards to the base class.
|
||||||
//! \param[in] geo XML element containing geometry definition
|
//! \param[in] geo XML element containing geometry definition
|
||||||
DefaultGeometry2D(const TiXmlElement* geo) : ModelGenerator(geo) {}
|
explicit DefaultGeometry2D(const TiXmlElement* geo) : ModelGenerator(geo) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~DefaultGeometry2D() {}
|
virtual ~DefaultGeometry2D() {}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ class DefaultGeometry3D : public ModelGenerator
|
|||||||
public:
|
public:
|
||||||
//! \brief The constructor forwards to the base class.
|
//! \brief The constructor forwards to the base class.
|
||||||
//! \param[in] geo XML element containing geometry definition
|
//! \param[in] geo XML element containing geometry definition
|
||||||
DefaultGeometry3D(const TiXmlElement* geo) : ModelGenerator(geo) {}
|
explicit DefaultGeometry3D(const TiXmlElement* geo) : ModelGenerator(geo) {}
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~DefaultGeometry3D() {}
|
virtual ~DefaultGeometry3D() {}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ protected:
|
|||||||
|
|
||||||
//! \brief The constructor initializes the FE model reference.
|
//! \brief The constructor initializes the FE model reference.
|
||||||
//! \param sim The FE model
|
//! \param sim The FE model
|
||||||
MultiStepSIM(SIMbase& sim);
|
explicit MultiStepSIM(SIMbase& sim);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -175,7 +175,7 @@ class NewmarkNLSIM : public NewmarkSIM
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes default solution parameters.
|
//! \brief The constructor initializes default solution parameters.
|
||||||
NewmarkNLSIM(SIMbase& sim);
|
explicit NewmarkNLSIM(SIMbase& sim);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~NewmarkNLSIM() {}
|
virtual ~NewmarkNLSIM() {}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class NewmarkSIM : public MultiStepSIM
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor initializes default solution parameters.
|
//! \brief The constructor initializes default solution parameters.
|
||||||
NewmarkSIM(SIMbase& sim);
|
explicit NewmarkSIM(SIMbase& sim);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~NewmarkSIM() {}
|
virtual ~NewmarkSIM() {}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class SIMadmin : public XMLInputBase
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The default constructor initializes the process administrator.
|
//! \brief The default constructor initializes the process administrator.
|
||||||
SIMadmin(const char* heading = nullptr);
|
explicit SIMadmin(const char* heading = nullptr);
|
||||||
//! \brief Copy constructor.
|
//! \brief Copy constructor.
|
||||||
SIMadmin(SIMadmin& anotherSIM);
|
SIMadmin(SIMadmin& anotherSIM);
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class SIMbase : public SIMadmin, public SIMdependency
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The constructor initializes the pointers to dynamic data members.
|
//! \brief The constructor initializes the pointers to dynamic data members.
|
||||||
SIMbase(IntegrandBase* itg = nullptr);
|
explicit SIMbase(IntegrandBase* itg = nullptr);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief The destructor frees the dynamically allocated objects.
|
//! \brief The destructor frees the dynamically allocated objects.
|
||||||
|
@ -28,7 +28,7 @@ class SIMgeneric : public SIMoutput
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
SIMgeneric(IntegrandBase* itg = nullptr) : SIMoutput(itg) {}
|
explicit SIMgeneric(IntegrandBase* itg = nullptr) : SIMoutput(itg) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -47,16 +47,16 @@ public:
|
|||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
ICInfo() : file_level(-1), geo_level(0), basis(1), component(0) {}
|
ICInfo() : file_level(-1), geo_level(0), basis(1), component(0) {}
|
||||||
//! \brief Constructor providing the field name.
|
//! \brief Constructor providing the field name.
|
||||||
ICInfo(const std::string& f) : file_level(-1), geo_level(0),
|
explicit ICInfo(const std::string& f) : file_level(-1), geo_level(0),
|
||||||
basis(1), component(0),
|
basis(1), component(0),
|
||||||
sim_field(f), file_field(f) {}
|
sim_field(f), file_field(f) {}
|
||||||
};
|
};
|
||||||
typedef std::vector<ICInfo> InitialCondVec; //!< Convenience declaration
|
typedef std::vector<ICInfo> InitialCondVec; //!< Convenience declaration
|
||||||
typedef std::vector<unsigned char> CharVec; //!< Convenience declaration
|
typedef std::vector<unsigned char> CharVec; //!< Convenience declaration
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! \brief The constructor just forwards to the base class constructor.
|
//! \brief The constructor just forwards to the base class constructor.
|
||||||
SIMinput(IntegrandBase* itg = nullptr) : SIMbase(itg), myGen(nullptr) {}
|
explicit SIMinput(IntegrandBase* itg = nullptr) : SIMbase(itg), myGen(nullptr) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
|
@ -34,7 +34,7 @@ class SIMoutput : public SIMinput
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The constructor just forwards to the base class constructor.
|
//! \brief The constructor just forwards to the base class constructor.
|
||||||
SIMoutput(IntegrandBase* itg);
|
explicit SIMoutput(IntegrandBase* itg);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief The destructor frees the dynamically allocated VTF object.
|
//! \brief The destructor frees the dynamically allocated VTF object.
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
//! \brief Constructor initializing the symmetric stress tensor field only.
|
//! \brief Constructor initializing the symmetric stress tensor field only.
|
||||||
//! \param[in] sigma Symmetric stress tensor field
|
//! \param[in] sigma Symmetric stress tensor field
|
||||||
AnaSol(STensorFunc* sigma)
|
explicit AnaSol(STensorFunc* sigma)
|
||||||
: vecSol(nullptr), vecSecSol(nullptr), stressSol(sigma) {}
|
: vecSol(nullptr), vecSecSol(nullptr), stressSol(sigma) {}
|
||||||
|
|
||||||
//! \brief Constructor initializing expression functions by parsing a stream.
|
//! \brief Constructor initializing expression functions by parsing a stream.
|
||||||
|
@ -29,7 +29,7 @@ namespace TimeIntegration //! Utilities for time integration.
|
|||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
//! \param[in] order The order of the BDF scheme
|
//! \param[in] order The order of the BDF scheme
|
||||||
BDF(int order = 0) : step(0), coefs1(1,1.0) { this->setOrder(order); }
|
explicit BDF(int order = 0) : step(0), coefs1(1,1.0) { this->setOrder(order); }
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~BDF() {}
|
virtual ~BDF() {}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class ElementBlock
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! The constructor defines the number of nodes per element \a nenod.
|
//! The constructor defines the number of nodes per element \a nenod.
|
||||||
ElementBlock(size_t nenod = 8);
|
explicit ElementBlock(size_t nenod = 8);
|
||||||
|
|
||||||
//! \brief Reallocates the internal arrays to fit a structured grid.
|
//! \brief Reallocates the internal arrays to fit a structured grid.
|
||||||
//! \param[in] nI Number of element in I-direction
|
//! \param[in] nI Number of element in I-direction
|
||||||
|
@ -32,7 +32,7 @@ class FieldFunction : public RealFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
FieldFunction(Field* f = nullptr) : field(f), pch(nullptr) {}
|
explicit FieldFunction(Field* f = nullptr) : field(f), pch(nullptr) {}
|
||||||
//! \brief Constructor creating a field from a provided HDF5 file.
|
//! \brief Constructor creating a field from a provided HDF5 file.
|
||||||
//! \param[in] fileName Name of the HDF5-file
|
//! \param[in] fileName Name of the HDF5-file
|
||||||
//! \param[in] basisName Name of the basis which the field values refer to
|
//! \param[in] basisName Name of the basis which the field values refer to
|
||||||
|
@ -100,7 +100,7 @@ namespace utl
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The constructor is protected to allow sub-class instances only.
|
//! \brief The constructor is protected to allow sub-class instances only.
|
||||||
SpatialFunction(const Result& val) : zero(val) {}
|
explicit SpatialFunction(const Result& val) : zero(val) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
@ -246,9 +246,9 @@ class TractionField : public TractionFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the symmetric tensor function pointer.
|
//! \brief Constructor initializing the symmetric tensor function pointer.
|
||||||
TractionField(const STensorFunc& field);
|
explicit TractionField(const STensorFunc& field);
|
||||||
//! \brief Constructor initializing the tensor function pointer.
|
//! \brief Constructor initializing the tensor function pointer.
|
||||||
TractionField(const TensorFunc& field);
|
explicit TractionField(const TensorFunc& field);
|
||||||
//! \brief Empty destructor.
|
//! \brief Empty destructor.
|
||||||
virtual ~TractionField() {}
|
virtual ~TractionField() {}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class ConstantFunc : public ScalarFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the function value.
|
//! \brief Constructor initializing the function value.
|
||||||
ConstantFunc(Real v) : fval(v) {}
|
explicit ConstantFunc(Real v) : fval(v) {}
|
||||||
|
|
||||||
//! \brief Returns whether the function is identically zero or not.
|
//! \brief Returns whether the function is identically zero or not.
|
||||||
virtual bool isZero() const { return fval == Real(0); }
|
virtual bool isZero() const { return fval == Real(0); }
|
||||||
@ -48,7 +48,7 @@ class LinearFunc : public ScalarFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the function parameter.
|
//! \brief Constructor initializing the function parameter.
|
||||||
LinearFunc(Real s = Real(1)) : scale(s) {}
|
explicit LinearFunc(Real s = Real(1)) : scale(s) {}
|
||||||
|
|
||||||
//! \brief Returns whether the function is identically zero or not.
|
//! \brief Returns whether the function is identically zero or not.
|
||||||
virtual bool isZero() const { return scale == Real(0); }
|
virtual bool isZero() const { return scale == Real(0); }
|
||||||
@ -159,7 +159,7 @@ class ConstFunc : public RealFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the function value.
|
//! \brief Constructor initializing the function value.
|
||||||
ConstFunc(Real v) : fval(v) {}
|
explicit ConstFunc(Real v) : fval(v) {}
|
||||||
|
|
||||||
//! \brief Returns whether the function is identically zero or not.
|
//! \brief Returns whether the function is identically zero or not.
|
||||||
virtual bool isZero() const { return fval == Real(0); }
|
virtual bool isZero() const { return fval == Real(0); }
|
||||||
@ -180,7 +180,7 @@ class ConstTimeFunc : public RealFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the function value.
|
//! \brief Constructor initializing the function value.
|
||||||
ConstTimeFunc(const ScalarFunc* f) : tfunc(f) {}
|
explicit ConstTimeFunc(const ScalarFunc* f) : tfunc(f) {}
|
||||||
//! \brief The destructor frees the time function.
|
//! \brief The destructor frees the time function.
|
||||||
virtual ~ConstTimeFunc() { delete tfunc; }
|
virtual ~ConstTimeFunc() { delete tfunc; }
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ class ConstVecFunc : public VecFunc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Constructor initializing the function value.
|
//! \brief Constructor initializing the function value.
|
||||||
ConstVecFunc(const Vec3& v) : fval(v) {}
|
explicit ConstVecFunc(const Vec3& v) : fval(v) {}
|
||||||
|
|
||||||
//! \brief Returns whether the function is identically zero or not.
|
//! \brief Returns whether the function is identically zero or not.
|
||||||
virtual bool isZero() const { return fval.isZero(0.0); }
|
virtual bool isZero() const { return fval.isZero(0.0); }
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class LagrangeInterpolator {
|
class LagrangeInterpolator {
|
||||||
public:
|
public:
|
||||||
LagrangeInterpolator(const std::vector<double>& grid_) :
|
explicit LagrangeInterpolator(const std::vector<double>& grid_) :
|
||||||
grid(grid_)
|
grid(grid_)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class LogStream
|
|||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
//! \param out The output stream to wrap
|
//! \param out The output stream to wrap
|
||||||
LogStream(std::ostream* out = nullptr) : m_out(out) { m_ppid = m_pid = 0; }
|
explicit LogStream(std::ostream* out) : m_out(out) { m_ppid = m_pid = 0; }
|
||||||
//! \brief Constructor initializing the output stream from a reference.
|
//! \brief Constructor initializing the output stream from a reference.
|
||||||
//! \param out The output stream to wrap
|
//! \param out The output stream to wrap
|
||||||
//! \param ppid The PID to print on
|
//! \param ppid The PID to print on
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
//! \details The constructor also updates the global static pointer
|
//! \details The constructor also updates the global static pointer
|
||||||
//! utl::profiler to point to \a *this, deleting any already pointed-to
|
//! utl::profiler to point to \a *this, deleting any already pointed-to
|
||||||
//! object first. This means, only one Profiler object can exist at any time.
|
//! object first. This means, only one Profiler object can exist at any time.
|
||||||
Profiler(const std::string& name);
|
explicit Profiler(const std::string& name);
|
||||||
//! \brief The destructor prints the profiling report to the console.
|
//! \brief The destructor prints the profiling report to the console.
|
||||||
~Profiler();
|
~Profiler();
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ namespace utl
|
|||||||
const char* name; //!< Name tag on the local scope to profile
|
const char* name; //!< Name tag on the local scope to profile
|
||||||
public:
|
public:
|
||||||
//! \brief The constructor starts the profiling of the named task.
|
//! \brief The constructor starts the profiling of the named task.
|
||||||
prof(const char* tag) : name(tag) { if (profiler) profiler->start(name); }
|
explicit prof(const char* tag) : name(tag) { if (profiler) profiler->start(name); }
|
||||||
//! \brief The destructor stops the profiling.
|
//! \brief The destructor stops the profiling.
|
||||||
~prof() { if (profiler) profiler->stop(name); }
|
~prof() { if (profiler) profiler->stop(name); }
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,7 @@ class TensorFunc : public utl::SpatialFunction<Tensor>, public FunctionBase
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! \brief The constructor is protected to allow sub-class instances only.
|
//! \brief The constructor is protected to allow sub-class instances only.
|
||||||
TensorFunc(size_t n = 0) : utl::SpatialFunction<Tensor>(Tensor(n))
|
explicit TensorFunc(size_t n = 0) : utl::SpatialFunction<Tensor>(Tensor(n))
|
||||||
{
|
{
|
||||||
ncmp = zero.size();
|
ncmp = zero.size();
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ namespace utl
|
|||||||
int myValue; //!< The integer value to search for
|
int myValue; //!< The integer value to search for
|
||||||
public:
|
public:
|
||||||
//! The constructor initializes the value to search for.
|
//! The constructor initializes the value to search for.
|
||||||
cmpInt(int value) : myValue(value) {}
|
explicit cmpInt(int value) : myValue(value) {}
|
||||||
//! \brief Returns \e true if \a value.second equals \a myValue.
|
//! \brief Returns \e true if \a value.second equals \a myValue.
|
||||||
bool operator()(const std::pair<int,int>& value) const
|
bool operator()(const std::pair<int,int>& value) const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user