184 lines
9.3 KiB
C
184 lines
9.3 KiB
C
#ifndef FEMLITE_C_API_H
|
|
#define FEMLITE_C_API_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define FEMLITE_LS_EXT_BACKEND_NONE 0
|
|
#define FEMLITE_LS_EXT_BACKEND_SUPERLU 1
|
|
#define FEMLITE_LS_EXT_BACKEND_MUMPS 2
|
|
#define FEMLITE_LS_EXT_BACKEND_MKL_PARDISO 3
|
|
#define FEMLITE_LS_EXT_BACKEND_REF_DIRECT 4
|
|
#define FEMLITE_LS_EXT_BACKEND_FILE 5
|
|
|
|
#define FEMLITE_LS_EXT_CAP_DIRECT 1
|
|
#define FEMLITE_LS_EXT_CAP_GENERAL 2
|
|
#define FEMLITE_LS_EXT_CAP_SPD 4
|
|
#define FEMLITE_LS_EXT_CAP_INDEFINITE 8
|
|
|
|
#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_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_set_linear_solver_external_backend(int backend);
|
|
int femlite_configure_linear_solver_external_file(const char *prefix,
|
|
const char *command,
|
|
int auto_run,
|
|
int keep_files,
|
|
int index_base,
|
|
int storage);
|
|
int femlite_get_linear_solver_external_info(int *backend,
|
|
int *available,
|
|
int *capabilities);
|
|
int femlite_get_linear_solver_external_diag(int *valid,
|
|
int *nrow,
|
|
int *ncol,
|
|
int *nnz,
|
|
int *class_id,
|
|
int *symmetric_pattern,
|
|
int *symmetric_values,
|
|
int *backend_status,
|
|
double *matrix_norm,
|
|
double *rhs_norm,
|
|
double *initial_residual,
|
|
double *initial_relative);
|
|
int femlite_get_linear_solver_external_file_diag(int *prepared,
|
|
int *command_ran,
|
|
int *command_exit,
|
|
int *finish_status,
|
|
double *residual,
|
|
double *relative,
|
|
double *backward);
|
|
int femlite_get_linear_solver_external_file_paths(char *matrix_file,
|
|
int matrix_capacity,
|
|
char *rhs_file,
|
|
int rhs_capacity,
|
|
char *initial_file,
|
|
int initial_capacity,
|
|
char *solution_file,
|
|
int solution_capacity,
|
|
char *csr_file,
|
|
int csr_capacity,
|
|
char *manifest_file,
|
|
int manifest_capacity);
|
|
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
|