Code Monkey home page Code Monkey logo

Comments (4)

drew-parsons avatar drew-parsons commented on August 23, 2024 1
def compile_form(form: ufl.Form, comm: MPI.Intracomm) -> GeneralForm:

In most other other functions (mesh, fem, nls modules) the mpi_comm is first argument. Good to keep a consistent API.

from dolfinx.

jhale avatar jhale commented on August 23, 2024 1

This may be useful for implementing multigrid methods where we also have the same forms defined on different meshes.

from dolfinx.

michalhabera avatar michalhabera commented on August 23, 2024

I agree it would be nice to internally split form compilation and form creation, such that is it possible to create forms with different data as you propose.
With that, form creation (Python way) using coefficient and constant indices could be removed, as you can then rewrite the default dolfinx.fem.form() to use the low level compile_form and create_form and deduce maps from provided UFL form if not provided explicitly.

from dolfinx.

jorgensd avatar jorgensd commented on August 23, 2024

This may be useful for implementing multigrid methods where we also have the same forms defined on different meshes.

That is one of the motivations, another motivation is to make it possible to make "libraries" of specific forms.
Say you develop some specific scheme for solving a PDE, and would like to publish the code. This makes it possible to publish a single code compatible with both Python and C++.

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.