Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F84396643
parabolic_structs.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Sep 22, 14:59
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Sep 24, 14:59 (2 d)
Engine
blob
Format
Raw Data
Handle
21007710
Attached To
rSPECMICP SpecMiCP / ReactMiCP
parabolic_structs.hpp
View Options
#ifndef SPECMICP_DFPMSOLVER_PARABOLICSTRUCTS_HPP
#define SPECMICP_DFPMSOLVER_PARABOLICSTRUCTS_HPP
#include "driver_structs.hpp"
namespace specmicp {
namespace dfpmsolver {
enum class ParabolicLinesearch
{
Bactracking, // Bactracking linesearch
Strang // Strang Linesearch
};
enum class ParabolicLinesearchReturnCode
{
NotSupposedToHappen,
MaximumIterations,
LambdaTooSmall,
Divergence,
Success
};
//! \brief Options of a parabolic driver
//!
struct ParabolicDriverOptions: public DriverOptions
{
scalar_t alpha; //!< Implicit/Cranck-Nicholson parameter
ParabolicLinesearch linesearch; //!< The linesearch to use
int quasi_newton; //!< Number of iterations without reforming the jacobian
ParabolicDriverOptions():
DriverOptions(),
alpha(1.0),
linesearch(ParabolicLinesearch::Bactracking),
quasi_newton(1)
{}
};
//! \brief Return codes
enum class ParabolicDriverReturnCode
{
LinesearchFailed = -5, //!< Linesearch has failed (usually indicates a bad system)
MaxIterations = -4, //!< Maximum number of iterations reached
MaxStepTakenTooManyTimes = -3, //!< Maximum step taken too many times (divergence)
ErrorLinearSystem = -2, //!< Error when solving the linear system
StationaryPoint = -1, //!< Stationnary points are detected
NotConvergedYet = 0, //!< Problem is not converged
ResidualMinimized = 1, //!< The residual is minimized (Success)
ErrorMinimized = 2 //!< Error is minimized (may be good)
};
//! \brief Performance of the parabolic driver
struct ParabolicDriverPerformance: public DriverPerformance
{
ParabolicDriverReturnCode return_code;
ParabolicDriverPerformance():
DriverPerformance(),
return_code(ParabolicDriverReturnCode::NotConvergedYet)
{}
};
} // end namespace dfpmsolver
} // end namespace specmicp
#endif // SPECMICP_DFPMSOLVER_PARABOLICSTRUCTS_HPP
Event Timeline
Log In to Comment