53ContactBoundaryCondition :: initForNewIteration(
TimeStep *tStep,
int iter)
67 if ( type != TangentStiffnessMatrix ) {
76 for(
auto const &cp : contactPairs) {
91 if ( type != InternalForcesVector ) {
100 for(
auto const &cp : contactPairs) {
101 if(cp->inContact()) {
127 for(
auto const &cp : contactPairs) {
128 if(cp->inContact()) {
133 cp->computeVectorOf(VM_Total, tStep, delta_u);
160void ContactBoundaryCondition :: postInitialize()
168void ContactBoundaryCondition :: updateYourself(
TimeStep *tStep)
172 for(
auto &cp : contactPairs) {
173 cp->updateYourself(tStep);
181ContactBoundaryCondition :: giveExportData(std::vector< ExportRegion > &vtkPieces,
FloatArray shift,
TimeStep *tStep )
187 int numCells = contactPairs.size();
188 const int numCellNodes = 2;
189 int nNodes = numCells * numCellNodes;
191 vtkPieces.at(0).setNumberOfCells(numCells);
192 vtkPieces.at(0).setNumberOfNodes(nNodes);
201 for(
auto const &cp : contactPairs) {
202 if(cp->inContact()) {
203 nodeCoords = cp->giveMasterContactPoint()->giveGlobalCoordinates();
205 nodeCoords.
add(shift);
207 vtkPieces.
at(0).setNodeCoords(nodeNum, nodeCoords);
208 connectivity.
at(1) = val++;
210 nodeCoords = cp->giveSlaveContactPoint()->giveGlobalCoordinates();
212 nodeCoords.
add(-1.*shift);
214 vtkPieces.
at(0).setNodeCoords(nodeNum, nodeCoords);
215 connectivity.
at(2) = val++;
218 vtkPieces.at(0).setConnectivity(iElement, connectivity);
220 vtkPieces.at(0).setOffset(iElement, offset);
221 vtkPieces.at(0).setCellType(iElement, 3);
226 vtkPieces.at(0).setNumberOfCells(numCells);
227 vtkPieces.at(0).setNumberOfNodes(nNodes);
void assemble(const FloatArray &fe, const IntArray &loc)
Index giveSize() const
Returns the size of receiver.
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void subtract(const FloatArray &src)
int giveNumberOfColumns() const
Returns number of columns of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
virtual void scale(double s)
IntArray dofs
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
TimeStep * givePreviousStep()
Returns pointer to previous solution step.