Code Monkey home page Code Monkey logo

Comments (10)

nate-sime avatar nate-sime commented on August 23, 2024

If others agree this is a good idea to include as a demo, I can help you with the matrix assembly.

from dolfinx.

bleyerj avatar bleyerj commented on August 23, 2024

I think this would be a good idea if we can come up with an efficient linear solve (using PETSc Schur complement fieldsplit ?)

from dolfinx.

WjjSteve avatar WjjSteve commented on August 23, 2024

I think this would be a good idea if we can come up with an efficient linear solve (using PETSc Schur complement fieldsplit ?)
Yes, I think the solver is the main concern that need consideration. I have tried to define the operator as nested matrix and then solve it with PC-Type : "fieldsplit" and some KSP solvers like "gmres" and "cg", but the performance is not as good as "LU".

from dolfinx.

jhale avatar jhale commented on August 23, 2024

@WjjSteve I wouldn't necessarily expect the performance (runtime) to be as good as LU, particularly small problems. Instead the key questions are:

  1. Does it solve in a reasonable number of inner and outer iterations -ksp_view? Reasonable would be e.g. 50, not many 100s or 1000s.
  2. Does the number of iterations stay roughly bounded on mesh refinement?

from dolfinx.

jhale avatar jhale commented on August 23, 2024

Also, does your example work when running using MPI?

from dolfinx.

WjjSteve avatar WjjSteve commented on August 23, 2024

@WjjSteve I wouldn't necessarily expect the performance (runtime) to be as good as LU, particularly small problems. Instead the key questions are:

  1. Does it solve in a reasonable number of inner and outer iterations -ksp_view? Reasonable would be e.g. 50, not many 100s or 1000s.
  2. Does the number of iterations stay roughly bounded on mesh refinement?

I'm not sure I fully understand your question or not. I tried it with "gmres" and "hypre" and the mesh size is 100 by 100, I used the function KSP.getIterationNumber(), and the result is just 1. Maybe I didn't check it in the correct way, please let me know if you want me to test anyting else.

Also, does your example work when running using MPI?

Unfortunately no, this is just a serier code.

from dolfinx.

jhale avatar jhale commented on August 23, 2024

You'll need to post your example in full for the preconditioners - could you open a pull request with your example as a demo_*.py file?

We can't accept features/demos that do not work using MPI. Perhaps there are ways to get this approach working, it would need some thought.

from dolfinx.

jhale avatar jhale commented on August 23, 2024

We're going to take a look at the MPI aspect of this this for you @WjjSteve.

from dolfinx.

WjjSteve avatar WjjSteve commented on August 23, 2024

We're going to take a look at the MPI aspect of this this for you @WjjSteve.

Sure I understand.
Maybe it is easier to use MPI when nested operators are applied, I will make a demo for that and open a pull.

from dolfinx.

WjjSteve avatar WjjSteve commented on August 23, 2024

We're going to take a look at the MPI aspect of this this for you @WjjSteve.
Hello, I have made a demo using nested matrix and vector for the above algorithm, should I make a pull request as a new branch? There are a lot of branchs and tags, and I don't want to mess anything.

from dolfinx.

Related Issues (20)

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.