Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 74d314af authored by FELŠÖCI Marek's avatar FELŠÖCI Marek
Browse files

Simplify HMAT initialization

parent f3b45fb6
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,6 @@ double* createCylinder(void) ;
int printHelp() ;
void prepare_hmat(int, int, int, int, int*, int*, int*, int*, void*, hmat_block_info_t *);
void advanced_compute_hmat(struct hmat_block_compute_context_t*);
int init_hmat_interface() ;
void update_progress(hmat_progress_t * ctx);
struct HMAT_desc_s;
......
#include "main.h"
int init_hmat_interface() {
interface = calloc(1, sizeof(hmat_interface_t)); CHKPTRQ(interface);
hmat_init_default_interface(interface, HMAT_DOUBLE_PRECISION);
if (!interface->init)
SETERRQ(1, "No valid HMatrix interface. Incorrect parameters ?");
interface->init();
return 0;
}
/**
This structure is a glue between hmat library and application.
*/
......
......@@ -23,7 +23,11 @@ int main(int argc, char **argv) {
printf("[minisolver] hmat version = %s\n", HMAT_VERSION);
printf("[minisolver] hmat initialization ... ");
ierr = init_hmat_interface(); CHKERRQ(ierr);
interface = calloc(1, sizeof(hmat_interface_t)); CHKPTRQ(interface);
hmat_init_default_interface(interface, HMAT_DOUBLE_PRECISION);
if (!interface->init)
SETERRQ(1, "No valid HMatrix interface. Incorrect parameters ?");
interface->init();
progress.update = update_progress;
printf("done\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment