Files
FemLite/include/femlite_c_api.h
T
shenw 255c7caf4f
FemLite CI / build-test (push) Has been cancelled
Advance V4 contact search and parallelism
2026-06-25 08:59:14 +08:00

84 lines
3.7 KiB
C

#ifndef FEMLITE_C_API_H
#define FEMLITE_C_API_H
#ifdef __cplusplus
extern "C" {
#endif
int femlite_initialize(void);
int femlite_finalize(void);
int femlite_get_version(int *major, int *minor, int *patch);
int femlite_get_last_error(int *code, char *message, int message_capacity);
int femlite_read_inp(const char *filename);
int femlite_build_model(void);
int femlite_compute_lumped_mass(void);
int femlite_estimate_stable_dt(double *dtcrit);
int femlite_advance_explicit(double dt);
int femlite_get_current_time(double *time, int *step);
int femlite_get_model_size(int *num_nodes, int *num_elems, int *num_dof);
int femlite_get_contact_summary(int *active_count,
double *work_step,
double *work_total,
double *max_penetration,
double *force_norm);
int femlite_get_contact_diagnostics(int *active_pair_count,
int *activated_pair_count,
int *maintained_pair_count,
int *released_pair_count,
double *max_gap_residual,
double *max_aug_lambda);
int femlite_get_contact_friction_summary(double *work_step,
double *work_total,
double *max_accumulated_slip);
int femlite_get_contact_history_stats(int *slot_count,
double *max_slot_slip,
double *max_slot_work,
double *max_tangent_force);
int femlite_get_contact_search_stats(int *facet_count,
int *master_count,
int *broad_count,
int *active_count,
int *bvh_node_count);
int femlite_get_contact_perf_stats(double *search_time,
double *force_time,
double *tangent_time);
int femlite_get_contact_cache_stats(int *used_count, int *overflow_count);
int femlite_clear_sph_forces(void);
int femlite_apply_sph_nodal_forces(int num_force_nodes,
const int *node_ids,
const double *forces);
int femlite_get_boundary_facet_count(int *num_facets, int *max_face_nodes);
int femlite_get_boundary_facets(int num_facets,
int max_face_nodes,
int *facet_id,
int *elem_id,
int *face_id,
int *facet_nnode,
int *facet_conn,
double *x,
double *vnod,
double *normal,
double *area);
int femlite_apply_sph_facet_pressure(int num_facets,
const int *facet_id,
const double *pressure);
int femlite_apply_sph_facet_tractions(int num_facets,
const int *facet_id,
const double *pressure,
const double *shear);
int femlite_get_node_kinematics(int node_id,
double *displacement,
double *velocity,
double *acceleration);
int femlite_write_restart(const char *filename);
int femlite_read_restart(const char *filename);
#ifdef __cplusplus
}
#endif
#endif