GithubHelp home page GithubHelp logo

huiscliu / sxamg Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 4.0 785 KB

Algebraic Multigrid (AMG) Solver Library

License: GNU General Public License v3.0

Makefile 1.02% C 88.04% Shell 7.19% M4 3.76%
amg algebraic solver krylov algebraic-multi-grid multigrid multi-grid amg-solvers fasp solver-library

sxamg's Introduction

SXAMG

SXAMG is an Algebraic Multigrid Solver Library written by C. The initial code was from FASP (http://fasp.sourceforge.net/), a linear solver package that implemented Krylov solvers, preconditioners and AMG solvers. The SXAMG was extracted from FASP to serve as a standalone AMG solver.

How-to

Configuration

The simplest way to configure is to run command:

./configure

This command will detect system and set default options.

Options

Run command:

./configure --help

Compilation

After configuration, a simple make command can compile the package:

make

Installation

Run command:

make install

The package will be installed to a directory. The default is /usr/local/sxamg/. A different directory can be set by --prefix=DIR.

Demo

The following codes show how to use SXAMG as a solver.

{
    SX_AMG_PARS pars;
    SX_MAT A;
    SX_VEC b, x;
    int verb = 2;
    SX_RTN rtn;
    
    /* default pars */
    sx_amg_pars_init(&pars);

    /* redefine parameters */
    pars.maxit = 1000;
    pars.verb = 2;
    
    /* set A, b, initial x */
    ....
    
    /* solve the system */
    rtn = sx_solver_amg(&A, &x, &b, &pars);
    
    /* free memory */
    sx_mat_destroy(&A);
    sx_vec_destroy(&b);
    sx_vec_destroy(&x);
}

sxamg's People

Contributors

huiscliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sxamg's Issues

Meaning of the variable 'verb'

Hi,
When I was reading your code, I saw a variable verb. I'm sorry I didn't understand the function of the variable. Could you please tell me the details of the variable?
For example, in example/amg.c
pars.verb = 3;

Thanks!

Plugin as a preconditioner

Hi, Dr. Liu,
I like your refactorization software sxamg. I am trying to plugin it to solve a 3D Maxwell equation (complex in frequency domain which has been converted into a rea-valued linear system Ax=bl). Unfortunately, the code runs into AMG setup stage without exist for hours.
I do not know why, because I was able to run your examples of 3D Poisson equation successfully. Can you give me some help?

I think you have made a lot of optimization for sxamg in grid coarsening. But I was unable to figure out what has been implemented exactly. Typically, op-coarsen.c is the one I am looking at. Can you provide a reference or paper which you were following?

Any help would be highly appreciated!

Best regards,
Pengliang

install failed problem

Hi,
I want to learn and use the sxamg you developed, but after I type make install, there are some errors:

make[1]: Entering directory '/home/txt/Downloads/sxamg-master/src'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/home/txt/Downloads/sxamg-master/src'
cp: cannot stat 'lib/libsxamg.a': No such file or directory
Makefile:28: recipe for target 'install' failed
make: *** [install] Error 1

Whether I use ./configure, make, sudo make install or ./configure --prefix/xx/xx, make, make install will have this problem, the installation directory has only one empty folder lib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.