My Project
|
A class for representing a general multi-point constraint equation. More...
#include <mpc.hh>
Classes | |
struct | DOF |
A struct for representing one term (DOF number and associated coefficient) in a MPC equation. More... | |
class | Less |
Comparison predicate for MPCs. More... | |
Public Member Functions | |
MPC (int n, int d, double c=double(0)) | |
Constructor creating a constraint for a specified slave DOF with no master DOFs. | |
void | addMaster (int n, int d, double c=double(1), double tol=double(1.0e-8)) |
Adds a master DOF to the constraint equation. | |
void | updateMaster (size_t pos, double c) |
Updates the coefficient of the pos'th master DOF. | |
void | removeMaster (size_t pos) |
Removes the pos'th master DOF from the constraint equation. | |
void | addOffset (double offset) |
Increments the c0 coefficient by a given offset. | |
void | setSlaveCoeff (double c0) |
Assigns a new c0 coefficient to the constraint equation. | |
const DOF & | getSlave () const |
Returns a reference to the slave DOF. | |
const DOF & | getMaster (size_t i) const |
Returns a reference to the i'th master DOF. | |
size_t | getNoMaster () const |
Returns the number of master DOFs. | |
Public Attributes | |
int | iceq |
Global constraint equation identifier. | |
Friends | |
std::ostream & | operator<< (std::ostream &s, const MPC &mpc) |
Global stream operator printing a constraint equation. | |
A class for representing a general multi-point constraint equation.
A multi-point constraint (MPC) equation is used to introduce additional coupling between the degrees of freedom (DOF) in a FE grid.
An MPC equation is in general a linear coupling of one (slave) dof to a set of master dofs, and may be expressed as
where
When n = 0, the above equation represents a fixed (
One or more of the master dofs may also be a slave in another constraint equation (chained constrains). In this case the two equations are combined to eliminate the master dof that is constrained. This is done while preprocessing the model by the resolveMPCchains function.
|
inline |
Constructor creating a constraint for a specified slave DOF with no master DOFs.
|
inline |
Adds a master DOF to the constraint equation.