Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Public Member Functions | List of all members
smith::Constraint Class Referenceabstract

Abstract constraint class. More...

#include <constraint.hpp>

Public Member Functions

 Constraint (const std::string &name="constraint")
 base constructor takes the name of the physics
 
virtual ~Constraint ()
 destructor
 
virtual mfem::Vector evaluate (double time, double dt, const std::vector< ConstFieldPtr > &fields, bool update_fields=true) const =0
 Virtual interface for computing the constraint, given a vector of smith::FiniteElementState*. More...
 
virtual std::unique_ptr< mfem::HypreParMatrix > jacobian (double time, double dt, const std::vector< ConstFieldPtr > &fields, int direction, bool update_fields=true, bool fresh_derivative=true) const =0
 Virtual interface for computing constraint Jacobian from a vector of smith::FiniteElementState*. More...
 
virtual std::unique_ptr< mfem::HypreParMatrix > jacobian_tilde (double time, double dt, const std::vector< ConstFieldPtr > &fields, int direction, bool update_fields=true, bool fresh_derivative=true) const
 Virtual interface for computing constraint Jacobian_tilde from a vector of smith::FiniteElementState* Jacobian_tilde is an optional approximation of the true Jacobian. More...
 
virtual mfem::Vector residual_contribution (double time, double dt, const std::vector< ConstFieldPtr > &fields, const mfem::Vector &multipliers, int direction, bool update_fields=true, bool fresh_derivative=true) const
 Virtual interface for computing residual contribution Jacobian_tilde^(Transpose) * (Lagrange multiplier) smith::FiniteElementState*. More...
 
virtual std::unique_ptr< mfem::HypreParMatrix > residual_contribution_jacobian ([[maybe_unused]] double time, [[maybe_unused]] double dt, [[maybe_unused]] const std::vector< ConstFieldPtr > &fields, [[maybe_unused]] const mfem::Vector &multipliers, [[maybe_unused]] int direction, [[maybe_unused]] bool update_fields=true, [[maybe_unused]] bool fresh_derivative=true) const
 Virtual interface for computing residual contribution Jacobian_tilde^(Transpose) * (Lagrange multiplier) from a vector of smith::FiniteElementState*. More...
 
std::string name () const
 name
 

Detailed Description

Abstract constraint class.

Definition at line 30 of file constraint.hpp.

Member Function Documentation

◆ evaluate()

virtual mfem::Vector smith::Constraint::evaluate ( double  time,
double  dt,
const std::vector< ConstFieldPtr > &  fields,
bool  update_fields = true 
) const
pure virtual

Virtual interface for computing the constraint, given a vector of smith::FiniteElementState*.

Parameters
timetime
dttime step
fieldsvector of smith::FiniteElementState*
update_fieldsboolean indicating if we re-evaluate or use previously cached evaluation
Returns
mfem::Vector which is the constraint evaluation

◆ jacobian()

virtual std::unique_ptr<mfem::HypreParMatrix> smith::Constraint::jacobian ( double  time,
double  dt,
const std::vector< ConstFieldPtr > &  fields,
int  direction,
bool  update_fields = true,
bool  fresh_derivative = true 
) const
pure virtual

Virtual interface for computing constraint Jacobian from a vector of smith::FiniteElementState*.

Parameters
timetime
dttime step
fieldsvector of smith::FiniteElementState*
directionindex for which field to take the gradient with respect to
update_fieldsboolean indicating if we re-evaluate or use previously cached evaluation
fresh_derivativeboolean indicating with update_fields if we re-evaluate or use previously cached evaluation
Returns
std::unique_ptr<mfem::HypreParMatrix>

◆ jacobian_tilde()

virtual std::unique_ptr<mfem::HypreParMatrix> smith::Constraint::jacobian_tilde ( double  time,
double  dt,
const std::vector< ConstFieldPtr > &  fields,
int  direction,
bool  update_fields = true,
bool  fresh_derivative = true 
) const
inlinevirtual

Virtual interface for computing constraint Jacobian_tilde from a vector of smith::FiniteElementState* Jacobian_tilde is an optional approximation of the true Jacobian.

Parameters
timetime
dttime step
fieldsvector of smith::FiniteElementState*
directionindex for which field to take the gradient with respect to
update_fieldsboolean indicating if we re-evaluate or use previously cached evaluation
fresh_derivativeboolean indicating with update_fields if we re-evaluate or use previously cached evaluation
Returns
std::unique_ptr<mfem::HypreParMatrix>

Definition at line 78 of file constraint.hpp.

◆ residual_contribution()

virtual mfem::Vector smith::Constraint::residual_contribution ( double  time,
double  dt,
const std::vector< ConstFieldPtr > &  fields,
const mfem::Vector &  multipliers,
int  direction,
bool  update_fields = true,
bool  fresh_derivative = true 
) const
inlinevirtual

Virtual interface for computing residual contribution Jacobian_tilde^(Transpose) * (Lagrange multiplier) smith::FiniteElementState*.

Parameters
timetime
dttime step
fieldsvector of smith::FiniteElementState*
multipliersmfem::Vector of Lagrange multipliers
directionindex for which field to take the gradient with respect to
update_fieldsboolean indicating if we re-evaluate or use previously cached evaluation
fresh_derivativeboolean indicating with update_fields if we re-evaluate or use previously cached evaluation
Returns
std::Vector

Definition at line 99 of file constraint.hpp.

◆ residual_contribution_jacobian()

virtual std::unique_ptr<mfem::HypreParMatrix> smith::Constraint::residual_contribution_jacobian ( [[maybe_unused] ] double  time,
[[maybe_unused] ] double  dt,
[[maybe_unused] ] const std::vector< ConstFieldPtr > &  fields,
[[maybe_unused] ] const mfem::Vector &  multipliers,
[[maybe_unused] ] int  direction,
[[maybe_unused] ] bool  update_fields = true,
[[maybe_unused] ] bool  fresh_derivative = true 
) const
inlinevirtual

Virtual interface for computing residual contribution Jacobian_tilde^(Transpose) * (Lagrange multiplier) from a vector of smith::FiniteElementState*.

Parameters
timetime
dttime step
fieldsvector of smith::FiniteElementState*
multipliersmfem::Vector of Lagrange multipliers
directionindex for which field to take the gradient with respect to
update_fieldsboolean indicating if we re-evaluate or use previously cached evaluation
fresh_derivativeboolean indicating with update_fields if we re-evaluate or use previously cached evaluation
Returns
std::unique_ptr<mfem::HypreParMatrix>

Definition at line 125 of file constraint.hpp.


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