SolutionBuilder Struct Reference

Kynema API: kynema::interfaces::components::SolutionBuilder Struct Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
kynema::interfaces::components::SolutionBuilder Struct Reference

A factory class for building a solution input, which is used by interfaces to control the time stepping proceedure. More...

#include <solution_builder.hpp>

Public Member Functions

SolutionBuilderEnableStaticSolve ()
 solves this problem with the static solver
 
SolutionBuilderEnableDynamicSolve ()
 Solves this problem with the dynamic solver.
 
SolutionBuilderSetGravity (const std::array< double, 3 > &gravity)
 Sets the gravity vector for the problem.
 
SolutionBuilderSetRelativeErrorTolerance (double rtol)
 Sets the relative error used to determine if nonlinear iterations have converged.
 
SolutionBuilderSetAbsoluteErrorTolerance (double atol)
 Sets the absolute error used to determine if nonlinear iterations have converged.
 
SolutionBuilderSetMaximumNonlinearIterations (size_t max_iter)
 Sets the maximum number of nonlinear iterations to take at each time step.
 
SolutionBuilderSetTimeStep (double time_step)
 Sets the timestep size.
 
SolutionBuilderSetDampingFactor (double rho_inf)
 Sets the numerical damping factor for the generalized alpha solver.
 
SolutionBuilderSetOutputFile (const std::string &output_file_path)
 Sets the output file name where output will be written each time step.
 
const SolutionInputInput () const
 Creates a SolutionInput object based on the previously set parameters.
 

Detailed Description

A factory class for building a solution input, which is used by interfaces to control the time stepping proceedure.

Each of the methods returns a reference to this SolutionBuilder object, which allows chaining multiple calls together in a single statement.

Member Function Documentation

◆ EnableDynamicSolve()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::EnableDynamicSolve ( )

Solves this problem with the dynamic solver.

Returns
A reference to this solution builder object to allow chaining

◆ EnableStaticSolve()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::EnableStaticSolve ( )

solves this problem with the static solver

Returns
A reference to this solution builder object to allow chaining

◆ Input()

const SolutionInput & kynema::interfaces::components::SolutionBuilder::Input ( ) const

Creates a SolutionInput object based on the previously set parameters.

Returns
The completed SolutionInput object

◆ SetAbsoluteErrorTolerance()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetAbsoluteErrorTolerance ( double  atol)

Sets the absolute error used to determine if nonlinear iterations have converged.

Parameters
atolThe absolute error tolerance
Returns
A reference to this solution builder object to allow chaining

◆ SetDampingFactor()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetDampingFactor ( double  rho_inf)

Sets the numerical damping factor for the generalized alpha solver.

Ranged from 0 to 1

Parameters
rho_infThe damping factor
Returns
A reference to this solution builder object to allow chaining

◆ SetGravity()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetGravity ( const std::array< double, 3 > &  gravity)

Sets the gravity vector for the problem.

Parameters
gravityThe gravity vector
Returns
A reference to this solution builder object to allow chaining

◆ SetMaximumNonlinearIterations()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetMaximumNonlinearIterations ( size_t  max_iter)

Sets the maximum number of nonlinear iterations to take at each time step.

Parameters
max_iterThe maximum number of nonlinear iterations
Returns
A reference to this solution builder object to allow chaining

◆ SetOutputFile()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetOutputFile ( const std::string &  output_file_path)

Sets the output file name where output will be written each time step.

If this is left unset, no IO will be automatically performed

Parameters
output_file_pathThe name of the output file
Returns
A reference to this solution builder object to allow chaining

◆ SetRelativeErrorTolerance()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetRelativeErrorTolerance ( double  rtol)

Sets the relative error used to determine if nonlinear iterations have converged.

Parameters
rtolthe relative error tolerance
Returns
A reference to this solution builder object to allow chaining

◆ SetTimeStep()

SolutionBuilder & kynema::interfaces::components::SolutionBuilder::SetTimeStep ( double  time_step)

Sets the timestep size.

Parameters
time_stepThe time step size
Returns
A reference to this solution builder object to allow chaining

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