MFEM v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::OptContactProblem Class Reference

Contact optimization problem with mortar and non-mortar interfaces. More...

#include <optcontactproblem.hpp>

Public Member Functions

 OptContactProblem (ElasticityOperator *problem_, const std::set< int > &mortar_attrs_, const std::set< int > &nonmortar_attrs_, real_t tribol_ratio_, bool bound_constraints_)
 
void FormContactSystem (ParGridFunction *coords_, const Vector &xref)
 Build contact system, assemble gap Jacobian and mass matrices.
 
int GetDimU ()
 Return displacement space dimension.
 
int GetDimM ()
 Return slack variable dimension.
 
int GetDimC ()
 Return constraint space dimension.
 
MPI_Comm GetComm ()
 Get MPI communicator.
 
HYPRE_BigIntGetConstraintsStarts ()
 Get distributed constraint partition offsets.
 
HYPRE_BigInt GetGlobalNumConstraints ()
 Return global number of constraints.
 
HYPRE_BigIntGetDofStarts ()
 Get distributed DOF partition offsets.
 
HYPRE_BigInt GetGlobalNumDofs ()
 Return global number of DOFs (from Jacobian).
 
ElasticityOperatorGetElasticityOperator ()
 Return underlying elasticity operator.
 
HypreParMatrixDuuf (const BlockVector &x)
 Hessian of the objective wrt displacement.
 
HypreParMatrixDmmf (const BlockVector &)
 Hessian of the objective wrt the slack variables.
 
HypreParMatrixDuc (const BlockVector &)
 Jacobian of the constraints wrt displacement.
 
HypreParMatrixDmc (const BlockVector &)
 Jacobian of the constraints wrt slack variables.
 
HypreParMatrixGetContactSubspaceTransferOperator ()
 Return transfer operator from contact to displacement subspace.
 
void g (const Vector &, Vector &)
 Evaluate gap function.
 
void c (const BlockVector &, Vector &)
 Evaluate contact constraints.
 
real_t CalcObjective (const BlockVector &, int &)
 Compute objective functional value.
 
void CalcObjectiveGrad (const BlockVector &, BlockVector &)
 Compute gradient of objective functional.
 
real_t E (const Vector &d, int &eval_err)
 Evaluate elastic energy functional.
 
void DdE (const Vector &d, Vector &gradE)
 Evaluate gradient of energy functional.
 
HypreParMatrixDddE (const Vector &d)
 Return Hessian of energy functional.
 
void SetDisplacement (const Vector &dx, bool active_constraints)
 Update displacement and eps for bound constraints.
 
void ActivateBoundConstraints ()
 Activate bound constraints (if enabled).
 
HypreParMatrixSetupTribol (ParMesh *pmesh, ParGridFunction *coords, const Array< int > &ess_tdofs, const std::set< int > &mortar_attrs, const std::set< int > &non_mortar_attrs, Vector &gap, real_t tribol_ratio)
 Get Gap and its Jacobian from Tribol.
 
void GetLumpedMassWeights (Vector &Mcslump_, Vector &Mvlump_)
 Get lumped mass weights for contact and volume spaces.
 
 ~OptContactProblem ()
 

Detailed Description

Contact optimization problem with mortar and non-mortar interfaces.

This class formulates and manages a parallel finite element contact problem built on top of an ElasticityOperator. It sets up the contact system using Tribol and provides operators for objective evaluation, gradients, Hessians, and constraints.

Features include:

  • Construction of gap constraints and Jacobians through Tribol.
  • Optional bound constraints.
  • Objective and gradient evaluation for optimization solvers.

Definition at line 36 of file optcontactproblem.hpp.

Constructor & Destructor Documentation

◆ OptContactProblem()

mfem::OptContactProblem::OptContactProblem ( ElasticityOperator * problem_,
const std::set< int > & mortar_attrs_,
const std::set< int > & nonmortar_attrs_,
real_t tribol_ratio_,
bool bound_constraints_ )

Definition at line 58 of file optcontactproblem.cpp.

◆ ~OptContactProblem()

mfem::OptContactProblem::~OptContactProblem ( )
inline

Definition at line 249 of file optcontactproblem.hpp.

Member Function Documentation

◆ ActivateBoundConstraints()

void mfem::OptContactProblem::ActivateBoundConstraints ( )

Activate bound constraints (if enabled).

Definition at line 377 of file optcontactproblem.cpp.

◆ c()

void mfem::OptContactProblem::c ( const BlockVector & x,
Vector & y )

Evaluate contact constraints.

Definition at line 260 of file optcontactproblem.cpp.

◆ CalcObjective()

real_t mfem::OptContactProblem::CalcObjective ( const BlockVector & x,
int & eval_err )

Compute objective functional value.

Definition at line 285 of file optcontactproblem.cpp.

◆ CalcObjectiveGrad()

void mfem::OptContactProblem::CalcObjectiveGrad ( const BlockVector & x,
BlockVector & y )

Compute gradient of objective functional.

Definition at line 290 of file optcontactproblem.cpp.

◆ DddE()

HypreParMatrix * mfem::OptContactProblem::DddE ( const Vector & d)

Return Hessian of energy functional.

Definition at line 352 of file optcontactproblem.cpp.

◆ DdE()

void mfem::OptContactProblem::DdE ( const Vector & d,
Vector & gradE )

Evaluate gradient of energy functional.

Definition at line 335 of file optcontactproblem.cpp.

◆ Dmc()

HypreParMatrix * mfem::OptContactProblem::Dmc ( const BlockVector & )

Jacobian of the constraints wrt slack variables.

Definition at line 166 of file optcontactproblem.cpp.

◆ Dmmf()

HypreParMatrix * mfem::OptContactProblem::Dmmf ( const BlockVector & )
inline

Hessian of the objective wrt the slack variables.

Definition at line 196 of file optcontactproblem.hpp.

◆ Duc()

HypreParMatrix * mfem::OptContactProblem::Duc ( const BlockVector & x)

Jacobian of the constraints wrt displacement.

Definition at line 148 of file optcontactproblem.cpp.

◆ Duuf()

HypreParMatrix * mfem::OptContactProblem::Duuf ( const BlockVector & x)
inline

Hessian of the objective wrt displacement.

Definition at line 193 of file optcontactproblem.hpp.

◆ E()

real_t mfem::OptContactProblem::E ( const Vector & d,
int & eval_err )

Evaluate elastic energy functional.

Definition at line 297 of file optcontactproblem.cpp.

◆ FormContactSystem()

void mfem::OptContactProblem::FormContactSystem ( ParGridFunction * coords_,
const Vector & xref )

Build contact system, assemble gap Jacobian and mass matrices.

Definition at line 73 of file optcontactproblem.cpp.

◆ g()

void mfem::OptContactProblem::g ( const Vector & d,
Vector & gd )

Evaluate gap function.

Definition at line 248 of file optcontactproblem.cpp.

◆ GetComm()

MPI_Comm mfem::OptContactProblem::GetComm ( )
inline

Get MPI communicator.

Definition at line 175 of file optcontactproblem.hpp.

◆ GetConstraintsStarts()

HYPRE_BigInt * mfem::OptContactProblem::GetConstraintsStarts ( )
inline

Get distributed constraint partition offsets.

Definition at line 178 of file optcontactproblem.hpp.

◆ GetContactSubspaceTransferOperator()

HypreParMatrix * mfem::OptContactProblem::GetContactSubspaceTransferOperator ( )

Return transfer operator from contact to displacement subspace.

Definition at line 179 of file optcontactproblem.cpp.

◆ GetDimC()

int mfem::OptContactProblem::GetDimC ( )
inline

Return constraint space dimension.

Definition at line 172 of file optcontactproblem.hpp.

◆ GetDimM()

int mfem::OptContactProblem::GetDimM ( )
inline

Return slack variable dimension.

Definition at line 169 of file optcontactproblem.hpp.

◆ GetDimU()

int mfem::OptContactProblem::GetDimU ( )
inline

Return displacement space dimension.

Definition at line 166 of file optcontactproblem.hpp.

◆ GetDofStarts()

HYPRE_BigInt * mfem::OptContactProblem::GetDofStarts ( )
inline

Get distributed DOF partition offsets.

Definition at line 184 of file optcontactproblem.hpp.

◆ GetElasticityOperator()

ElasticityOperator * mfem::OptContactProblem::GetElasticityOperator ( )
inline

Return underlying elasticity operator.

Definition at line 190 of file optcontactproblem.hpp.

◆ GetGlobalNumConstraints()

HYPRE_BigInt mfem::OptContactProblem::GetGlobalNumConstraints ( )
inline

Return global number of constraints.

Definition at line 181 of file optcontactproblem.hpp.

◆ GetGlobalNumDofs()

HYPRE_BigInt mfem::OptContactProblem::GetGlobalNumDofs ( )
inline

Return global number of DOFs (from Jacobian).

Definition at line 187 of file optcontactproblem.hpp.

◆ GetLumpedMassWeights()

void mfem::OptContactProblem::GetLumpedMassWeights ( Vector & Mcslump_,
Vector & Mvlump_ )
inline

Get lumped mass weights for contact and volume spaces.

Definition at line 242 of file optcontactproblem.hpp.

◆ SetDisplacement()

void mfem::OptContactProblem::SetDisplacement ( const Vector & dx,
bool active_constraints )

Update displacement and eps for bound constraints.

Definition at line 357 of file optcontactproblem.cpp.

◆ SetupTribol()

HypreParMatrix * mfem::OptContactProblem::SetupTribol ( ParMesh * pmesh,
ParGridFunction * coords,
const Array< int > & ess_tdofs,
const std::set< int > & mortar_attrs,
const std::set< int > & non_mortar_attrs,
Vector & gap,
real_t tribol_ratio )

Get Gap and its Jacobian from Tribol.

Definition at line 388 of file optcontactproblem.cpp.


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