File numerics/src/FrictionContact/GlobalFrictionContactProblem.h

Go to the source code of this file

Definition of a structure to handle with friction-contact (2D or 3D) problems.

Functions

void globalFrictionContact_balancing_M(GlobalFrictionContactProblem *problem, BalancingMatrices *B_for_M)
void globalFrictionContact_balancing_M_H(GlobalFrictionContactProblem *problem, BalancingMatrices *B_for_M, BalancingMatrices *B_for_H)
int globalFrictionContact_computeGlobalVelocity(GlobalFrictionContactProblem *problem, double *reaction, double *globalVelocity)

Compute the global velocity given the reaction.

Parameters
  • [in] problem: to be considered

  • [in] reaction: the reaction, if there is no contacts reaction can be NULL

  • [out] globalVelocity: the global velocity computed by inverting the system.

GlobalFrictionContactProblem *globalFrictionContact_copy(GlobalFrictionContactProblem *problem)
void globalFrictionContact_display(GlobalFrictionContactProblem *problem)

displays the problem onto screen

Parameters
  • [in] problem: to be displayed

void globalFrictionContact_free(GlobalFrictionContactProblem *problem)

Release memory for the problem structure.

Parameters
  • [inout] problem[inout] global-Friction: problem structure to be freed.

GlobalFrictionContactProblem *globalFrictionContact_new_from_filename(const char *filename)

read a GlobalFrictionContactProblem from a file (.dat or hdf5 if fclib is on) from its filename

Return

problem the problem to read

Parameters
  • filename: the name of the input file

GlobalFrictionContactProblem *globalFrictionContact_newFromFile(FILE *file)

read a GlobalFrictionContactProblem from a file descriptor

Return

problem the problem to read

Parameters
  • file: descriptor

int globalFrictionContact_printInFile(GlobalFrictionContactProblem *problem, FILE *file)

Saves problem struct into a file.

Return

file status (1 if everything has worked properly)

Parameters
  • [in] problem: structure

  • [in] file[in] file: descriptor

int globalFrictionContact_printInFileName(GlobalFrictionContactProblem *problem, const char *filename)

Saves problem struct into a file.

Return

file status (1 if everything has worked properly)

Parameters
  • [in] problem: structure

  • [in] filename[in] name: of the input file

void globalFrictionContact_rescaling(GlobalFrictionContactProblem *problem, double alpha, double beta, double gamma)
GlobalFrictionContactProblem *globalFrictionContactProblem_new(void)
struct GlobalFrictionContactProblem
#include <GlobalFrictionContactProblem.h>

The structure that defines a Friction-Contact (3D or 2D ) problem.

Details in global_fc_problem.

Public Members

double *b

\({b} \in {{\mathrm{I\!R}}}^{m} \)

int dimension

dimension \(d=2\) or \(d=3\) of the contact space (3D or 2D )

void *env

opaque environment, solver specific

NumericsMatrix *H

\({H} \in {{\mathrm{I\!R}}}^{n \times m} \), a matrix with \( m = d n_c\) stored in NumericsMatrix structure

NumericsMatrix *M

\({M} \in {{\mathrm{I\!R}}}^{n \times n} \), a matrix with \( n\) stored in NumericsMatrix structure

double *mu

mu \({\mu} \in {{\mathrm{I\!R}}}^{n_c} \), vector of friction coefficients ( \( n_c =\) numberOfContacts)

int numberOfContacts

the number of contacts \( n_c \)

double *q

\({q} \in {{\mathrm{I\!R}}}^{n} \)