178 lines
8.7 KiB
C
178 lines
8.7 KiB
C
#ifndef FEMLITE_C_API_H
|
|
#define FEMLITE_C_API_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define FEMLITE_CSR_CLASS_GENERAL 1
|
|
#define FEMLITE_CSR_CLASS_STRUCT_SYM 2
|
|
#define FEMLITE_CSR_CLASS_SYMMETRIC 3
|
|
#define FEMLITE_CSR_CLASS_SPD_CAND 4
|
|
|
|
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_element_count(int *num_elems);
|
|
int femlite_get_element_metadata(int elem_id,
|
|
char *type_name,
|
|
int type_capacity,
|
|
int *node_count);
|
|
int femlite_get_element_nodes(int elem_id,
|
|
int max_nodes,
|
|
int *node_ids,
|
|
int *node_count);
|
|
int femlite_get_element_reference_coords(int elem_id,
|
|
int max_nodes,
|
|
double *coords,
|
|
int *node_count);
|
|
int femlite_get_element_current_coords(int elem_id,
|
|
int max_nodes,
|
|
double *coords,
|
|
int *node_count);
|
|
int femlite_get_element_integration_count(int elem_id, int *ip_count);
|
|
int femlite_get_element_integration_point(int elem_id,
|
|
int ip_index,
|
|
double *natural,
|
|
double *weight);
|
|
int femlite_get_element_shape(int elem_id,
|
|
int ip_index,
|
|
int max_nodes,
|
|
double *nshape,
|
|
double *dndr,
|
|
int *node_count);
|
|
int femlite_get_element_jacobian(int elem_id,
|
|
int ip_index,
|
|
double *jacobian,
|
|
double *detj);
|
|
int femlite_get_element_b_matrix_size(int elem_id,
|
|
int *row_count,
|
|
int *col_count);
|
|
int femlite_get_element_b_matrix(int elem_id,
|
|
int ip_index,
|
|
int max_rows,
|
|
int max_cols,
|
|
double *bmat,
|
|
int *row_count,
|
|
int *col_count);
|
|
int femlite_get_convergence_status(int *increment,
|
|
int *iteration,
|
|
double *residual_norm,
|
|
double *correction_norm,
|
|
int *converged);
|
|
int femlite_get_convergence_metrics(double *relative_residual_norm,
|
|
double *contact_gap_norm,
|
|
double *combined_norm);
|
|
int femlite_get_convergence_diagnostics(int *cutback_count,
|
|
double *last_dt,
|
|
double *last_accepted_time,
|
|
int *status_code,
|
|
int *failure_code);
|
|
int femlite_set_linear_solver(int method, int preconditioner);
|
|
int femlite_get_linear_solver_settings(int *method, int *preconditioner);
|
|
int femlite_get_linear_solver_stats(int *method,
|
|
int *preconditioner,
|
|
int *iteration,
|
|
double *residual_norm,
|
|
int *status_code);
|
|
int femlite_get_linear_solver_diagnostics(int *matrix_class,
|
|
double *initial_residual_norm,
|
|
double *final_residual_norm,
|
|
double *relative_residual_norm,
|
|
int *status_code);
|
|
int femlite_set_shell_stabilization(double drilling_factor,
|
|
double s3_shear_factor,
|
|
double s3_shear_min_scale);
|
|
int femlite_get_shell_stabilization(double *drilling_factor,
|
|
double *s3_shear_factor,
|
|
double *s3_shear_min_scale);
|
|
int femlite_get_shell_stability_stats(int *sample_count,
|
|
int *last_element,
|
|
double *last_drilling_stiffness,
|
|
double *last_shear_scale,
|
|
double *min_shear_scale,
|
|
double *max_drilling_stiffness);
|
|
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_multiplier_stats(int *slot_count,
|
|
int *active_count,
|
|
double *max_lambda,
|
|
double *max_gap);
|
|
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_sph_force_summary(double *total_force);
|
|
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_apply_sph_facet_nodal_loads(int num_facets,
|
|
int max_face_nodes,
|
|
const int *facet_id,
|
|
const int *facet_nnode,
|
|
const double *node_forces);
|
|
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
|