Class ae108::solve::GeneralizedNonlinearSolver
template <class Assembler>
ClassList > ae108 > solve > GeneralizedNonlinearSolver
Public Types
| Type | Name |
|---|---|
| typedef std::vector< cpppetsc::GeneralizedConstrainedDOFs > | BoundaryConditionContainer |
| typedef std::function< void(const cpppetsc::distributed< cpppetsc::Vector > &, double, cpppetsc::distributed< cpppetsc::Vector > *)> | DistributedForceVectorAssembler |
| typedef std::function< void(const cpppetsc::distributed< cpppetsc::Vector > &, double, cpppetsc::Matrix *)> | DistributedStiffnessMatrixAssembler |
| typedef std::function< void(const cpppetsc::local< cpppetsc::Vector > &, double, cpppetsc::local< cpppetsc::Vector > *)> | LocalForceVectorAssembler |
| typedef std::function< void(const cpppetsc::local< cpppetsc::Vector > &, double, cpppetsc::Matrix *)> | LocalStiffnessMatrixAssembler |
| typedef cpppetsc::Mesh::size_type | size_type |
| typedef cpppetsc::Mesh::value_type | value_type |
Public Functions
| Type | Name |
|---|---|
| GeneralizedNonlinearSolver (const cpppetsc::Mesh * mesh) |
|
| cpppetsc::distributed< cpppetsc::Vector > | computeSolution (const BoundaryConditionContainer & boundaryConditions, cpppetsc::distributed< cpppetsc::Vector > initialGuess, const double time, const Assembler *const assembler) const Calls computeSolution with the default assembler calls (ie. calls assembleForceVector or assembleStiffnessMatrix). Passes on the rest of the arguments. |
| cpppetsc::distributed< cpppetsc::Vector > | computeSolution (const BoundaryConditionContainer & boundaryConditions, cpppetsc::distributed< cpppetsc::Vector > initialGuess, const double time, LocalForceVectorAssembler assembleForceVector, LocalStiffnessMatrixAssembler assembleStiffnessMatrix) const Calls computeSolution wrapping up the local assembler calls into distributed assembler calls. Passes on the rest of the arguments. |
| cpppetsc::distributed< cpppetsc::Vector > | computeSolution (const BoundaryConditionContainer & boundaryConditions, cpppetsc::distributed< cpppetsc::Vector > initialGuess, const double time, const DistributedForceVectorAssembler & assembleForceVector, const DistributedStiffnessMatrixAssembler & assembleStiffnessMatrix) const The goal of this function is to find the minimizer x of E(x) -> min, where x satisfies boundary conditions specified by linear equations. |
Public Types Documentation
typedef BoundaryConditionContainer
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::BoundaryConditionContainer = std::vector<cpppetsc::GeneralizedConstrainedDOFs>;
typedef DistributedForceVectorAssembler
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::DistributedForceVectorAssembler = std::function<void(const cpppetsc::distributed<cpppetsc::Vector> &, double, cpppetsc::distributed<cpppetsc::Vector> *)>;
typedef DistributedStiffnessMatrixAssembler
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::DistributedStiffnessMatrixAssembler = std::function<void(const cpppetsc::distributed<cpppetsc::Vector> &, double, cpppetsc::Matrix *)>;
typedef LocalForceVectorAssembler
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::LocalForceVectorAssembler = std::function<void(const cpppetsc::local<cpppetsc::Vector> &, double, cpppetsc::local<cpppetsc::Vector> *)>;
typedef LocalStiffnessMatrixAssembler
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::LocalStiffnessMatrixAssembler = std::function<void( const cpppetsc::local<cpppetsc::Vector> &, double, cpppetsc::Matrix *)>;
typedef size_type
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::size_type = cpppetsc::Mesh::size_type;
typedef value_type
using ae108::solve::GeneralizedNonlinearSolver< Assembler >::value_type = cpppetsc::Mesh::value_type;
Public Functions Documentation
function GeneralizedNonlinearSolver
explicit ae108::solve::GeneralizedNonlinearSolver::GeneralizedNonlinearSolver (
const cpppetsc::Mesh * mesh
)
Parameters:
meshA valid nonzero pointer to a cpppetsc::Mesh instance.
function computeSolution [1/3]
Calls computeSolution with the default assembler calls (ie. calls assembleForceVector or assembleStiffnessMatrix). Passes on the rest of the arguments.
cpppetsc::distributed < cpppetsc::Vector > ae108::solve::GeneralizedNonlinearSolver::computeSolution (
const BoundaryConditionContainer & boundaryConditions,
cpppetsc::distributed < cpppetsc::Vector > initialGuess,
const double time,
const Assembler *const assembler
) const
Parameters:
boundaryConditionsThe generalized boundary conditions.initialGuessThe global vector to start iterating at.timeThis will be used to configure the assembler. @para assembler Valid nonzero pointer.
function computeSolution [2/3]
Calls computeSolution wrapping up the local assembler calls into distributed assembler calls. Passes on the rest of the arguments.
cpppetsc::distributed < cpppetsc::Vector > ae108::solve::GeneralizedNonlinearSolver::computeSolution (
const BoundaryConditionContainer & boundaryConditions,
cpppetsc::distributed < cpppetsc::Vector > initialGuess,
const double time,
LocalForceVectorAssembler assembleForceVector,
LocalStiffnessMatrixAssembler assembleStiffnessMatrix
) const
Parameters:
boundaryConditionsThe generalized boundary conditions.initialGuessThe global vector to start iterating at.timeThis will be used to configure the assembler.assembleForceVectorA valid callable. It will be called to assemble the local force vector.assembleStiffnessMatrixA valid callable. It will be called to assemble the stiffness matrix.
function computeSolution [3/3]
The goal of this function is to find the minimizer x of E(x) -> min, where x satisfies boundary conditions specified by linear equations.
cpppetsc::distributed < cpppetsc::Vector > ae108::solve::GeneralizedNonlinearSolver::computeSolution (
const BoundaryConditionContainer & boundaryConditions,
cpppetsc::distributed < cpppetsc::Vector > initialGuess,
const double time,
const DistributedForceVectorAssembler & assembleForceVector,
const DistributedStiffnessMatrixAssembler & assembleStiffnessMatrix
) const
More precisely, this function uses an "infeasible start Newton method"-based approach; See S. Boyd, L. Vandenberghe, "Convex Optimization", Cambridge University Press, 2019, pp. 531-534. PETSc's nonlinear solver is used to solve the adapted system.
This method is also widely known as Lagrange Multiplier Method; see Cook, R. D., Malkus, D. S., Plesha, M. E. & Witt, R. J. Concepts and Applications of Finite Element Analysis, 4th Edition. (Wiley, 2001).
Parameters:
boundaryConditionsThe generalized boundary conditions.initialGuessThe global vector to start iterating at.timeThis will be used to configure the assembler.assembleForceVectorA valid callable. It will be called to assemble the distributed force vector.assembleStiffnessMatrixA valid callable. It will be called to assemble the stiffness matrix.
The documentation for this class was generated from the following file solve/src/include/ae108/solve/GeneralizedNonlinearSolver.h