diff --git a/include/util.h b/include/util.h index 8b4742bb2752070d360f4ff079ba0dc0843ce2e8..c558f55549354f9dc4138189364ce002a73a8c8a 100644 --- a/include/util.h +++ b/include/util.h @@ -53,7 +53,6 @@ struct mpf_hmat_create_compression_args_t { const void * output; }; int hmat_get_sync_exec(void) ; -void mpf_hmat_compression(struct mpf_hmat_create_compression_args_t *); #if !(defined (_WIN32)) /* It's a UNIX system, I know this ! */ /* Try to detect a debugger. This relies on the fact that GDB and IDB diff --git a/src/help.c b/src/help.c index 3f54764ffa3a9cfef9804e5f1b2559dc45520d7a..7da458cb1b1db32a03f83e7c23a6995012ce81ee 100644 --- a/src/help.c +++ b/src/help.c @@ -7,15 +7,7 @@ int printHelp() { printf("\ntest_FEMBEM usage:\n-----------------\n\n" " -nbpts: Number of unknowns of the global linear system. Default: 16000 (can be in floating point notation, like 1.2e4).\n" - " -nbrhs: Number of right-hand sides of the global linear system. Default: 1.\n" - "\n" - " BEM tests use a surfacic cylinder with an optionnal cylinder detail, defined with:\n" - " -radius: Radius of the cylinder. Default is 2.\n" - " -height: Height of the cylinder. Default is 4.\n" - "\n" - " Options for HMAT tests\n" - " --hmat-eps-assemb: Compression epsilon. Default: 1e-4.\n" - " --hmat-eps-recompr: Recompression epsilon. Default: 1e-4.\n" + " -epsilon: Compression epsilon. Default: 1e-3.\n" "\n" " -h/--help: Display this help\n\n"); diff --git a/src/hmat.c b/src/hmat.c index fc639122fb9e48704da39de554ed46c8b0512b03..05016cd4067131c9eaee1112b89fe18a6a21886b 100644 --- a/src/hmat.c +++ b/src/hmat.c @@ -272,7 +272,7 @@ HMAT_desc_t *HMAT_generate_matrix( hmat_interface_t *hi ) { struct mpf_hmat_create_compression_args_t compression_ctx; compression_ctx.method = mpf_hmat_settings.compressionMethod; compression_ctx.threshold = mpf_hmat_settings.acaEpsilon; - mpf_hmat_compression(&compression_ctx); + compression_ctx.output = hmat_create_compression_aca_plus(compression_ctx.threshold); hmat_assemble_context_t ctx; hmat_assemble_context_init(&ctx); diff --git a/src/main.c b/src/main.c index 836b3fdd36868eeb5466953bf70e1e0dc1f38816..452ce14b9fcfc87b7aadf604e95b331fd8461353 100644 --- a/src/main.c +++ b/src/main.c @@ -24,12 +24,6 @@ int main(int argc, char **argv) { int ierr ; double step, max_error = DBL_MAX; - MpfArgGetDouble(&argc, argv, 1, "--max-error", &max_error); - if (MpfArgHasName(&argc, argv, 1, "-h") || MpfArgHasName(&argc, argv, 1, "--help") ) { - ierr=printHelp() ; - return ierr; - } - /* ------------------------------------------------------------------------- */ /* ---------------------- INITIATION DE MPF (PARALLELE) -------------------*/ /* ------------------------------------------------------------------------- */ @@ -50,11 +44,6 @@ int main(int argc, char **argv) { ierr=initCylinder(&argc, &argv) ; CHKERRQ(ierr) ; - - if (MpfArgGetInt(&argc, argv, 1, "-nbrhs", &nbRHS)) { - printf("Reading nbRHS = %d\n", nbRHS) ; - } - /* Wavelength */ ierr = getMeshStep(&step) ; lambda = 10.*step ; diff --git a/src/util.c b/src/util.c index ce1dec436ae9218463fe3fb4cca18a199df19441..12d52488cc808201650962ef541a9869ac0b0171 100644 --- a/src/util.c +++ b/src/util.c @@ -471,28 +471,6 @@ static void update_progress(hmat_progress_t * ctx) { Mpf_progressBar(ctx->current, ctx->max); } /* ================================================================================== */ -void mpf_hmat_compression(struct mpf_hmat_create_compression_args_t *args) { - // Compression algorithm - switch (args->method) { - case hmat_compress_svd: - args->output = hmat_create_compression_svd(args->threshold); - break; - case hmat_compress_aca_full: - args->output = hmat_create_compression_aca_full(args->threshold); - break; - case hmat_compress_aca_partial: - args->output = hmat_create_compression_aca_partial(args->threshold); - break; - case hmat_compress_aca_plus: - args->output = hmat_create_compression_aca_plus(args->threshold); - break; - case hmat_compress_aca_random: - args->output = hmat_create_compression_aca_random(args->threshold); - break; - default: SETWARN(1, "unknown compression method"); - } -} -/* ================================================================================== */ int SCAB_Init(int* argc, char*** argv) { int ierr; @@ -513,11 +491,9 @@ int SCAB_Init(int* argc, char*** argv) { hmat_get_build_date(&d, &t); printf("*** Built on %s at %s\n***\n", d, t); - if (MpfArgGetDouble( argc, *argv, 1, "--hmat-eps-assemb" , &mpf_hmat_settings.acaEpsilon )) { - printf("[HMat] Compression epsilon: %e\n", mpf_hmat_settings.acaEpsilon ); - } - if (MpfArgGetDouble( argc, *argv, 1, "--hmat-eps-recompr" , &mpf_hmat_settings.epsilon )) { - printf("[HMat] Recompression epsilon: %e\n", mpf_hmat_settings.epsilon ); + if (MpfArgGetDouble( argc, *argv, 1, "-epsilon" , &mpf_hmat_settings.epsilon )) { + mpf_hmat_settings.acaEpsilon = mpf_hmat_settings.epsilon; + printf("[HMat] Compression/Recompression epsilon: %e\n", mpf_hmat_settings.epsilon ); } mpf_hmat_settings.progress.update = update_progress;