ROL
FEM< Real > Class Template Reference

#include <example_02.hpp>

Public Member Functions

 FEM (int nx=128, Real kl=0.1, Real kr=10.0)
int nu (void)
int nz (void)
void build_mesh (std::vector< Real > &x, const std::vector< Real > &param)
void build_mesh (std::vector< Real > &x)
void build_force (std::vector< Real > &F, const std::vector< Real > &param)
void build_jacobian_1 (std::vector< Real > &dl, std::vector< Real > &d, std::vector< Real > &du, const std::vector< Real > &param)
void apply_jacobian_1 (std::vector< Real > &jv, const std::vector< Real > &v, const std::vector< Real > &param)
void apply_jacobian_2 (std::vector< Real > &jv, const std::vector< Real > &v, const std::vector< Real > &param)
void apply_adjoint_jacobian_2 (std::vector< Real > &jv, const std::vector< Real > &v, const std::vector< Real > &param)
void apply_mass_state (std::vector< Real > &Mv, const std::vector< Real > &v, const std::vector< Real > &param)
void apply_mass_control (std::vector< Real > &Mv, const std::vector< Real > &v)
void apply_inverse_mass_control (std::vector< Real > &Mv, const std::vector< Real > &v)
void linear_solve (std::vector< Real > &u, std::vector< Real > &dl, std::vector< Real > &d, std::vector< Real > &du, const std::vector< Real > &r, const bool transpose=false)
Real evaluate_target (int i, const std::vector< Real > &param)

Private Attributes

int nx_
Real kl_
Real kr_
std::vector< Real > pts_
std::vector< Real > wts_

Detailed Description

template<class Real>
class FEM< Real >

Definition at line 24 of file poisson-control/example_02.hpp.

Constructor & Destructor Documentation

◆ FEM()

template<class Real>
FEM< Real >::FEM ( int nx = 128,
Real kl = 0.1,
Real kr = 10.0 )
inline

Definition at line 34 of file poisson-control/example_02.hpp.

References kl_, kr_, nx_, pts_, and wts_.

Member Function Documentation

◆ nu()

template<class Real>
int FEM< Real >::nu ( void )
inline

◆ nz()

template<class Real>
int FEM< Real >::nz ( void )
inline

◆ build_mesh() [1/2]

template<class Real>
void FEM< Real >::build_mesh ( std::vector< Real > & x,
const std::vector< Real > & param )
inline

◆ build_mesh() [2/2]

template<class Real>
void FEM< Real >::build_mesh ( std::vector< Real > & x)
inline

Definition at line 95 of file poisson-control/example_02.hpp.

References nz().

◆ build_force()

template<class Real>
void FEM< Real >::build_force ( std::vector< Real > & F,
const std::vector< Real > & param )
inline

Definition at line 134 of file poisson-control/example_02.hpp.

References build_mesh(), nu(), pts_, and wts_.

◆ build_jacobian_1()

template<class Real>
void FEM< Real >::build_jacobian_1 ( std::vector< Real > & dl,
std::vector< Real > & d,
std::vector< Real > & du,
const std::vector< Real > & param )
inline

Definition at line 156 of file poisson-control/example_02.hpp.

References build_mesh(), kl_, kr_, and nu().

Referenced by apply_jacobian_1().

◆ apply_jacobian_1()

template<class Real>
void FEM< Real >::apply_jacobian_1 ( std::vector< Real > & jv,
const std::vector< Real > & v,
const std::vector< Real > & param )
inline

Definition at line 194 of file poisson-control/example_02.hpp.

References build_jacobian_1(), and nu().

◆ apply_jacobian_2()

template<class Real>
void FEM< Real >::apply_jacobian_2 ( std::vector< Real > & jv,
const std::vector< Real > & v,
const std::vector< Real > & param )
inline

Definition at line 211 of file poisson-control/example_02.hpp.

References build_mesh(), nu(), and nz().

◆ apply_adjoint_jacobian_2()

template<class Real>
void FEM< Real >::apply_adjoint_jacobian_2 ( std::vector< Real > & jv,
const std::vector< Real > & v,
const std::vector< Real > & param )
inline

Definition at line 254 of file poisson-control/example_02.hpp.

References build_mesh(), nu(), and nz().

◆ apply_mass_state()

template<class Real>
void FEM< Real >::apply_mass_state ( std::vector< Real > & Mv,
const std::vector< Real > & v,
const std::vector< Real > & param )
inline

Definition at line 311 of file poisson-control/example_02.hpp.

References build_mesh().

◆ apply_mass_control()

template<class Real>
void FEM< Real >::apply_mass_control ( std::vector< Real > & Mv,
const std::vector< Real > & v )
inline

Definition at line 330 of file poisson-control/example_02.hpp.

References build_mesh(), and nz().

◆ apply_inverse_mass_control()

template<class Real>
void FEM< Real >::apply_inverse_mass_control ( std::vector< Real > & Mv,
const std::vector< Real > & v )
inline

Definition at line 348 of file poisson-control/example_02.hpp.

References build_mesh(), linear_solve(), and nz().

◆ linear_solve()

template<class Real>
void FEM< Real >::linear_solve ( std::vector< Real > & u,
std::vector< Real > & dl,
std::vector< Real > & d,
std::vector< Real > & du,
const std::vector< Real > & r,
const bool transpose = false )
inline

Definition at line 374 of file poisson-control/example_02.hpp.

Referenced by apply_inverse_mass_control().

◆ evaluate_target()

template<class Real>
Real FEM< Real >::evaluate_target ( int i,
const std::vector< Real > & param )
inline

Definition at line 396 of file poisson-control/example_02.hpp.

References build_mesh().

Member Data Documentation

◆ nx_

template<class Real>
int FEM< Real >::nx_
private

Definition at line 26 of file poisson-control/example_02.hpp.

Referenced by build_mesh(), FEM(), nu(), and nz().

◆ kl_

template<class Real>
Real FEM< Real >::kl_
private

Definition at line 27 of file poisson-control/example_02.hpp.

Referenced by build_jacobian_1(), and FEM().

◆ kr_

template<class Real>
Real FEM< Real >::kr_
private

Definition at line 28 of file poisson-control/example_02.hpp.

Referenced by build_jacobian_1(), and FEM().

◆ pts_

template<class Real>
std::vector<Real> FEM< Real >::pts_
private

Definition at line 30 of file poisson-control/example_02.hpp.

Referenced by build_force(), and FEM().

◆ wts_

template<class Real>
std::vector<Real> FEM< Real >::wts_
private

Definition at line 31 of file poisson-control/example_02.hpp.

Referenced by build_force(), and FEM().


The documentation for this class was generated from the following file: