File numerics/src/FrictionContact/FrictionContactProblem.h

Go to the source code of this file

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

Functions

void createSplittedFrictionContactProblem(FrictionContactProblem *problem, SplittedFrictionContactProblem *splitted_problem)
FrictionContactProblem *frictionContact_copy(FrictionContactProblem *problem)

Creates a new FrictionContact problem and initialize its content by copying an existing problem.

Return

a pointer to a new FrictionContactProblem

Parameters
  • problem: the source problem to be copied

void frictionContact_display(FrictionContactProblem *problem)

display a FrictionContactProblem

Parameters
  • problem: the problem to display

FrictionContactProblem *frictionContact_new_from_filename(const char *filename)

read a FrictionContactProblem 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

FrictionContactProblem *frictionContact_newFromFile(FILE *file)

read a FrictionContactProblem from a file descriptor

Return

problem the problem to read

Parameters
  • file: descriptor

int frictionContact_printInFile(FrictionContactProblem *problem, FILE *file)

print a FrictionContactProblem in a file (numerics .dat format)

Return

0 if successfull

Parameters
  • problem: the problem to print out

  • file: the dest file

int frictionContact_printInFilename(FrictionContactProblem *problem, char *filename)

print a FrictionContactProblem in a file (numerics .dat format) from its filename

Return

0 if successfull

Parameters
  • problem: the problem to print out

  • filename: the dest file

void frictionContact_rescaling(FrictionContactProblem *problem, double alpha, double gamma)

Rescales M matrix and q vector of a given FrictionContactProblem.

\(M = \alpha\gamma^2 M, q=\alpha\gamma q\)

Parameters
  • problem: to be rescaled

  • alpha: rescaling factor

  • gamma: rescaling factor

void frictionContactProblem_compute_statistics(FrictionContactProblem *problem, double *reaction, double *velocity, double tol, int do_print)
void frictionContactProblem_free(FrictionContactProblem *problem)

free a FrictionContactProblem

Parameters
  • problem: the problem to free

FrictionContactProblem *frictionContactProblem_new(void)
FrictionContactProblem *frictionContactProblem_new_with_data(int dim, int nc, NumericsMatrix *M, double *q, double *mu)

new FrictionContactProblem from minimal set of data

Return

a pointer to a FrictionContactProblem structure

Parameters
  • [in] dim: the problem dimension

  • [in] nc: the number of contact

  • [in] M: the NumericsMatrix

  • [in] q: the q vector

  • [in] mu: the mu vector

struct FrictionContactProblem
#include <FrictionContactProblem.h>

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

Public Members

int dimension

dimension of the contact space (3D or 2D )

RawNumericsMatrix *M

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

double *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} \)

struct SplittedFrictionContactProblem

Public Members

FrictionContactProblem *fc3d
NumericsMatrix *M_nn
NumericsMatrix *M_nt
NumericsMatrix *M_tn
NumericsMatrix *M_tt
double *q_n
double *q_t