File numerics/src/FrictionContact/GlobalFrictionContactProblem.h

Go to the source code of this file

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

Functions

GlobalFrictionContactProblem *globalFrictionContactProblem_new(void)

creates an empty GlobalFrictionContactProblem

Returns

a pointer to a GlobalFrictionContactProblem

void globalFrictionContact_display(GlobalFrictionContactProblem *problem)

displays the problem onto screen

Parameters

problem[in] to be displayed

int globalFrictionContact_printInFile(GlobalFrictionContactProblem *problem, FILE *file)

Saves problem struct into a file.

Parameters
  • problem[in] structure

  • file[in] file descriptor

Returns

file status (1 if everything has worked properly)

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

Saves problem struct into a file.

Parameters
  • problem[in] structure

  • filename[in] name of the input file

Returns

file status (1 if everything has worked properly)

GlobalFrictionContactProblem *globalFrictionContact_newFromFile(FILE *file)

read a GlobalFrictionContactProblem from a file descriptor

Parameters

file – descriptor

Returns

problem the problem to read

GlobalFrictionContactProblem *globalFrictionContact_new_from_filename(const char *filename)

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

Parameters

filename – the name of the input file

Returns

problem the problem to read

void globalFrictionContact_free(GlobalFrictionContactProblem *problem)

Release memory for the problem structure.

Parameters

problem[inout] global-Friction problem structure to be freed

GlobalFrictionContactProblem *globalFrictionContact_copy(GlobalFrictionContactProblem *problem)
int globalFrictionContact_computeGlobalVelocity(GlobalFrictionContactProblem *problem, double *reaction, double *globalVelocity)

Compute the global velocity given the reaction.

Parameters
  • problem[in] to be considered

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

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

FrictionContactProblem *globalFrictionContact_reformulation_FrictionContact(GlobalFrictionContactProblem *problem)

Refomulation into local problem.

struct GlobalFrictionContactProblem
#include <>

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

Public Members

int dimension

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

int numberOfContacts

the number of contacts \( n_c \)

NumericsMatrix *M

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

NumericsMatrix *H

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

double *q

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

double norm_q

norm-2 of q

double *b

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

double norm_b

norm-2 of b

double *mu

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

NumericsMatrix *M_inverse

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

void *env

opaque environment, solver specific