Serac
0.1
Serac is an implicit thermal strucural mechanics simulation code.
|
This class stores all ContactInteractions for a problem, calls Tribol functions that act on all contact interactions, and agglomerates fields that exist over different ContactInteractions. More...
#include <contact_data.hpp>
Public Member Functions | |
ContactData (const mfem::ParMesh &mesh) | |
The constructor. More... | |
~ContactData () | |
Destructor to finalize Tribol. | |
void | addContactInteraction (int interaction_id, const std::set< int > &bdry_attr_surf1, const std::set< int > &bdry_attr_surf2, ContactOptions contact_opts) |
Add another contact interaction. More... | |
void | update (int cycle, double time, double &dt) |
Updates the positions, forces, and Jacobian contributions associated with contact. More... | |
FiniteElementDual | forces () const |
Get the contact constraint residual (i.e. nodal forces) from all contact interactions. More... | |
mfem::HypreParVector | mergedPressures () const |
Returns pressures from all contact interactions on the contact surface true degrees of freedom. More... | |
mfem::HypreParVector | mergedGaps (bool zero_inactive=false) const |
Returns nodal gaps from all contact interactions on the contact surface true degrees of freedom. More... | |
std::unique_ptr< mfem::BlockOperator > | mergedJacobian () const |
Returns a 2x2 block Jacobian on displacement/pressure true degrees of freedom from contact constraints. More... | |
void | residualFunction (const mfem::Vector &u, mfem::Vector &r) |
Computes the residual including contact terms. More... | |
std::unique_ptr< mfem::BlockOperator > | jacobianFunction (const mfem::Vector &u, mfem::HypreParMatrix *orig_J) const |
Computes the Jacobian including contact terms, given the non-contact Jacobian terms. More... | |
void | setPressures (const mfem::Vector &merged_pressures) const |
Set the pressure field. More... | |
void | setDisplacements (const mfem::Vector &u) |
Update the current coordinates based on the new displacement field. More... | |
bool | haveContactInteractions () const |
Have there been contact interactions added? More... | |
bool | haveLagrangeMultipliers () const |
Are any contact interactions enforced using Lagrange multipliers? More... | |
int | numPressureDofs () const |
Get the number of Lagrange multiplier true degrees of freedom. More... | |
This class stores all ContactInteractions for a problem, calls Tribol functions that act on all contact interactions, and agglomerates fields that exist over different ContactInteractions.
Definition at line 43 of file contact_data.hpp.
serac::ContactData::ContactData | ( | const mfem::ParMesh & | mesh | ) |
The constructor.
mesh | The volume mesh for the problem |
Definition at line 342 of file contact_data.cpp.
void serac::ContactData::addContactInteraction | ( | int | interaction_id, |
const std::set< int > & | bdry_attr_surf1, | ||
const std::set< int > & | bdry_attr_surf2, | ||
ContactOptions | contact_opts | ||
) |
Add another contact interaction.
interaction_id | Unique identifier for the ContactInteraction (used in Tribol) |
bdry_attr_surf1 | MFEM boundary attributes for the first (mortar) surface |
bdry_attr_surf2 | MFEM boundary attributes for the second (nonmortar) surface |
contact_opts | Defines contact method, enforcement, type, and penalty |
Definition at line 349 of file contact_data.cpp.
FiniteElementDual serac::ContactData::forces | ( | ) | const |
Get the contact constraint residual (i.e. nodal forces) from all contact interactions.
Definition at line 359 of file contact_data.cpp.
|
inline |
Have there been contact interactions added?
Definition at line 165 of file contact_data.hpp.
|
inline |
Are any contact interactions enforced using Lagrange multipliers?
Definition at line 180 of file contact_data.hpp.
std::unique_ptr< mfem::BlockOperator > serac::ContactData::jacobianFunction | ( | const mfem::Vector & | u, |
mfem::HypreParMatrix * | orig_J | ||
) | const |
Computes the Jacobian including contact terms, given the non-contact Jacobian terms.
u | Solution vector ([displacement; pressure] block vector) |
orig_J | The non-contact terms of the Jacobian, not including essential boundary conditions |
Definition at line 382 of file contact_data.cpp.
mfem::HypreParVector serac::ContactData::mergedGaps | ( | bool | zero_inactive = false | ) | const |
Returns nodal gaps from all contact interactions on the contact surface true degrees of freedom.
The type of gap (normal or vector-valued) is set by the ContactType in the ContactOptions struct for the contact interaction. TiedNormal and Frictionless (the two type supported in Tribol) correspond to scalar gap normal. Only linear (order = 1) gap fields are supported.
[in] | zero_inactive | Sets inactive t-dofs to zero gap |
Definition at line 368 of file contact_data.cpp.
std::unique_ptr< mfem::BlockOperator > serac::ContactData::mergedJacobian | ( | ) | const |
Returns a 2x2 block Jacobian on displacement/pressure true degrees of freedom from contact constraints.
The element Jacobian contributions are computed upon calling update(). This method does MPI communication to move Jacobian contributions to the correct rank, then assembles the contributions. The pressure degrees of freedom for all contact interactions are merged into a single block.
Definition at line 373 of file contact_data.cpp.
mfem::HypreParVector serac::ContactData::mergedPressures | ( | ) | const |
Returns pressures from all contact interactions on the contact surface true degrees of freedom.
The type of pressure (normal or vector-valued) is set by the ContactType in the ContactOptions struct for the contact interaction. TiedNormal and Frictionless (the two type supported in Tribol) correspond to scalar normal pressure. Only linear (order = 1) pressure fields are supported.
Definition at line 366 of file contact_data.cpp.
|
inline |
Get the number of Lagrange multiplier true degrees of freedom.
Definition at line 187 of file contact_data.hpp.
void serac::ContactData::residualFunction | ( | const mfem::Vector & | u, |
mfem::Vector & | r | ||
) |
Computes the residual including contact terms.
[in] | u | Solution vector ([displacement; pressure] block vector) |
[in,out] | r | Residual vector ([force; gap] block vector); takes in initialized residual force vector and adds contact contributions |
Definition at line 380 of file contact_data.cpp.
void serac::ContactData::setDisplacements | ( | const mfem::Vector & | u | ) |
Update the current coordinates based on the new displacement field.
u | Current displacement dof values |
Definition at line 403 of file contact_data.cpp.
void serac::ContactData::setPressures | ( | const mfem::Vector & | merged_pressures | ) | const |
Set the pressure field.
This sets Tribol's pressure degrees of freedom based on 1) the values in merged_pressure for Lagrange multiplier enforcement 2) the nodal gaps and penalty for penalty enforcement
merged_pressures | Current pressure true dof values in a merged mfem::Vector |
Definition at line 401 of file contact_data.cpp.
void serac::ContactData::update | ( | int | cycle, |
double | time, | ||
double & | dt | ||
) |
Updates the positions, forces, and Jacobian contributions associated with contact.
cycle | The current simulation cycle |
time | The current time |
dt | The timestep size to attempt |
Definition at line 357 of file contact_data.cpp.