PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
pbat::sim::algorithm::newton::Config Struct Reference

Newton integrator configuration. More...

#include <Config.h>

Public Member Functions

ConfigWithSubsteps (int substeps)
 Set the number of substeps for the Newton integrator.
 
ConfigWithConvergence (int maxAugmentedLagrangianIterations, int maxNewtonIterations, Scalar gtol, int maxLinearSolverIterations, Scalar rtol)
 Set the convergence parameters for the Newton integrator.
 
ConfigWithLineSearch (int maxLineSearchIterations, Scalar tauArmijo, Scalar cArmijo)
 Set the line search parameters for the Newton integrator.
 
ConfigWithContactParameters (Scalar muC)
 Set the contact parameters for the Newton integrator.
 
ConfigConstruct ()
 Finalize construction of the configuration.
 
void Serialize (io::Archive &archive) const
 Serialize to HDF5 group.
 
void Deserialize (io::Archive const &archive)
 Deserialize from HDF5 group.
 

Public Attributes

int nSubsteps {1}
 Number of substeps for the Newton integrator.
 
int nMaxAugmentedLagrangianIterations
 Number of dual iterations for the augmented Lagrangian method.
 
int nMaxNewtonIterations {10}
 Maximum number of iterations for the Newton integrator.
 
Scalar gtol {1e-4}
 Gradient norm threshold for convergence.
 
int nMaxLinearSolverIterations {150}
 Maximum number of iterations for the linear solver.
 
Scalar rtol {1e-6}
 Relative tolerance for the linear solver.
 
int nMaxLineSearchIterations {20}
 Maximum number of iterations for the line search.
 
Scalar tauArmijo {0.5}
 Armijo step size decrease factor.
 
Scalar cArmijo {1e-4}
 Armijo slope scale.
 
Scalar muC {1e6}
 Uniform collision penalty.
 

Detailed Description

Newton integrator configuration.

Member Function Documentation

◆ Construct()

Config & pbat::sim::algorithm::newton::Config::Construct ( )

Finalize construction of the configuration.

Returns
Config object
Exceptions
std::invalid_argumentif any parameter is invalid

◆ Deserialize()

void pbat::sim::algorithm::newton::Config::Deserialize ( io::Archive const & archive)

Deserialize from HDF5 group.

Parameters
archiveArchive to deserialize from

◆ Serialize()

void pbat::sim::algorithm::newton::Config::Serialize ( io::Archive & archive) const

Serialize to HDF5 group.

Parameters
archiveArchive to serialize to

◆ WithContactParameters()

Config & pbat::sim::algorithm::newton::Config::WithContactParameters ( Scalar muC)

Set the contact parameters for the Newton integrator.

Parameters
muCUniform collision penalty
Returns
Reference to this configuration

◆ WithConvergence()

Config & pbat::sim::algorithm::newton::Config::WithConvergence ( int maxAugmentedLagrangianIterations,
int maxNewtonIterations,
Scalar gtol,
int maxLinearSolverIterations,
Scalar rtol )

Set the convergence parameters for the Newton integrator.

Parameters
maxAugmentedLagrangianIterationsMaximum number of dual iterations for the augmented
maxNewtonIterationsMaximum number of iterations for the Newton integrator
gtolGradient norm threshold for convergence
maxLinearSolverIterationsMaximum number of iterations for the linear solver
rtolRelative tolerance for the linear solver
Returns
Reference to this configuration

◆ WithLineSearch()

Config & pbat::sim::algorithm::newton::Config::WithLineSearch ( int maxLineSearchIterations,
Scalar tauArmijo,
Scalar cArmijo )

Set the line search parameters for the Newton integrator.

Parameters
maxLineSearchIterationsMaximum number of iterations for the line search
tauArmijoArmijo step size decrease factor
cArmijoArmijo slope scale
Returns
Reference to this configuration

◆ WithSubsteps()

Config & pbat::sim::algorithm::newton::Config::WithSubsteps ( int substeps)

Set the number of substeps for the Newton integrator.

Parameters
substepsNumber of substeps
Returns
Reference to this configuration

Member Data Documentation

◆ nMaxAugmentedLagrangianIterations

int pbat::sim::algorithm::newton::Config::nMaxAugmentedLagrangianIterations
Initial value:
{
1}

Number of dual iterations for the augmented Lagrangian method.


The documentation for this struct was generated from the following files: