Skip to content

Class ae108::solve::GeneralizedTAOSolver

template <class Assembler>

ClassList > ae108 > solve > GeneralizedTAOSolver

Classes

Type Name
struct BoundaryConditionContainer

Public Types

Type Name
typedef std::function< void(const cpppetsc::distributed< cpppetsc::Vector > &, double, real_type *)> DistributedEnergyAssembler
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, real_type *)> LocalEnergyAssembler
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 typename cpppetsc::Mesh::real_type real_type
typedef typename cpppetsc::Mesh::size_type size_type
typedef typename cpppetsc::Mesh::value_type value_type

Public Functions

Type Name
GeneralizedTAOSolver (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 assembleEnergy, 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, LocalEnergyAssembler assembleEnergy, 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, DistributedEnergyAssembler assembleEnergy, DistributedForceVectorAssembler assembleForceVector, DistributedStiffnessMatrixAssembler assembleStiffnessMatrix) const
The goal of this function is to solve E(x) = min under the condition that the residual is equal to zero.

Public Types Documentation

typedef DistributedEnergyAssembler

using ae108::solve::GeneralizedTAOSolver< Assembler >::DistributedEnergyAssembler =  std::function<void( const cpppetsc::distributed<cpppetsc::Vector> &, double, real_type *)>;

typedef DistributedForceVectorAssembler

using ae108::solve::GeneralizedTAOSolver< Assembler >::DistributedForceVectorAssembler =  std::function<void(const cpppetsc::distributed<cpppetsc::Vector> &, double, cpppetsc::distributed<cpppetsc::Vector> *)>;

typedef DistributedStiffnessMatrixAssembler

using ae108::solve::GeneralizedTAOSolver< Assembler >::DistributedStiffnessMatrixAssembler =  std::function<void(const cpppetsc::distributed<cpppetsc::Vector> &, double, cpppetsc::Matrix *)>;

typedef LocalEnergyAssembler

using ae108::solve::GeneralizedTAOSolver< Assembler >::LocalEnergyAssembler =  std::function<void( const cpppetsc::local<cpppetsc::Vector> &, double, real_type *)>;

typedef LocalForceVectorAssembler

using ae108::solve::GeneralizedTAOSolver< Assembler >::LocalForceVectorAssembler =  std::function<void(const cpppetsc::local<cpppetsc::Vector> &, double, cpppetsc::local<cpppetsc::Vector> *)>;

typedef LocalStiffnessMatrixAssembler

using ae108::solve::GeneralizedTAOSolver< Assembler >::LocalStiffnessMatrixAssembler =  std::function<void( const cpppetsc::local<cpppetsc::Vector> &, double, cpppetsc::Matrix *)>;

typedef real_type

using ae108::solve::GeneralizedTAOSolver< Assembler >::real_type =  typename cpppetsc::Mesh::real_type;

typedef size_type

using ae108::solve::GeneralizedTAOSolver< Assembler >::size_type =  typename cpppetsc::Mesh::size_type;

typedef value_type

using ae108::solve::GeneralizedTAOSolver< Assembler >::value_type =  typename cpppetsc::Mesh::value_type;

Public Functions Documentation

function GeneralizedTAOSolver

explicit ae108::solve::GeneralizedTAOSolver::GeneralizedTAOSolver (
    const cpppetsc::Mesh * mesh
) 

Parameters:


function computeSolution [1/3]

Calls computeSolution with the default assembler calls (ie. calls assembleEnergy, assembleForceVector or assembleStiffnessMatrix). Passes on the rest of the arguments.

cpppetsc::distributed < cpppetsc::Vector > ae108::solve::GeneralizedTAOSolver::computeSolution (
    const BoundaryConditionContainer & boundaryConditions,
    cpppetsc::distributed < cpppetsc::Vector > initialGuess,
    const double time,
    const Assembler *const assembler
) const

Parameters:

  • boundaryConditions The nonlinear boundary conditions to apply.
  • initialGuess The global vector to start iterating at.
  • time This will be used to configure the assembler.
  • 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::GeneralizedTAOSolver::computeSolution (
    const BoundaryConditionContainer & boundaryConditions,
    cpppetsc::distributed < cpppetsc::Vector > initialGuess,
    const double time,
    LocalEnergyAssembler assembleEnergy,
    LocalForceVectorAssembler assembleForceVector,
    LocalStiffnessMatrixAssembler assembleStiffnessMatrix
) const

Parameters:

  • boundaryConditions The nonlinear boundary conditions to apply. Note that empty functions (residual, jacobian) are interpreted as functions that do not change the output.
  • initialGuess The global vector to start iterating at.
  • time This will be used to configure the assembler.
  • assembleEnergy A valid callable. It will be called to assemble the local energy.
  • assembleForceVector A valid callable. It will be called to assemble the local force vector.
  • assembleStiffnessMatrix A valid callable. It will be called to assemble the stiffness matrix.

function computeSolution [3/3]

The goal of this function is to solve E(x) = min under the condition that the residual is equal to zero.

cpppetsc::distributed < cpppetsc::Vector > ae108::solve::GeneralizedTAOSolver::computeSolution (
    const BoundaryConditionContainer & boundaryConditions,
    cpppetsc::distributed < cpppetsc::Vector > initialGuess,
    const double time,
    DistributedEnergyAssembler assembleEnergy,
    DistributedForceVectorAssembler assembleForceVector,
    DistributedStiffnessMatrixAssembler assembleStiffnessMatrix
) const

Remark:

Does not update internal variables.

Parameters:

  • boundaryConditions The nonlinear boundary conditions to apply.
  • initialGuess The global vector to start iterating at.
  • time This will be used to configure the assembler.
  • assembleEnergy A valid callable. It will be called to assemble the distributed energy.
  • assembleForceVector A valid callable. It will be called to assemble the distributed force vector.
  • assembleStiffnessMatrix A 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/GeneralizedTAOSolver.h