Git Product home page Git Product logo

asimov-custom-assemblers's People

Contributors

igorbaratta avatar jorgensd avatar sarahro avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

asimov-custom-assemblers's Issues

Create class QuadratureRule

Wrapping the basix::make_quadrature in a nice format.

All kernels should then take in the quadrature rule, instead of the quadrature degree.
Avoids alot of recomputation and mixed inputs.

Compilation error for Python interface

I am getting a compilation error for the Python module with the latest DolfinX. This worked without problems last week so I think it is due to the refactoring of the pack coefficients that was introduced a few days ago:

FEniCS/dolfinx#1966

This is with gcc 9.3.0 on CentOS 8. The relevant error is below. Any suggestions would be greatly appreciated!

dolfinx_cuas/include/dolfinx_cuas/utils.hpp:212:71: error: no matching function for call to 'pack_coefficient_entity<double, std::tuple<int, int, int, int> >(tcb::span, int, __gnu_cxx::__alloc_traits<std::allocator<tcb::span >, tcb::span >::value_type&, tcb::span&, const dolfinx::fem::DofMap&, tcb::span<const std::tuple<int, int, int, int> >&, dolfinx_cuas::pack_coefficients(std::vector<std::shared_ptr<const dolfinx::fem::Function > >, std::variant<tcb::span<const int, -1>, tcb::span<const std::pair<int, int>, -1>, tcb::span<const std::tuple<int, int, int, int>, -1> >) [with T = double]::<lambda(auto:164&&)> [with auto:164 = tcb::span<const std::tuple<int, int, int, int> >&]::<lambda(const std::tuple<int, int, int, int>&)>&, __gnu_cxx::__alloc_traits<std::allocator, int>::value_type, int, const std::function<void(const tcb::span&, const tcb::span&, int, int)>&)'
211 | dolfinx::fem::impl::pack_coefficient_entity<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212 | T, std::tuple<std::int32_t, int, std::int32_t, int>>(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
213 | xtl::span(c), 2 * cstride, v[coeff], cell_info, *dofmaps[coeff], entities,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214 | fetch_cell1, coeffs_offsets[coeff] + coeffs_offsets[coeff + 1],
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215 | elements[coeff]->space_dimension(), transform);

Add Custom Assembler with Nodal Tensor Product Element

  • Scalar Mass Matrix on Quads
  • Scalar Mass Matrix on Hexes
  • Vector Mass Matrix on Hexes
  • Scalar Stiffness Matrix on Quads
  • Scalar Stiffness Matrix on Hexes
  • Vector Stiffness Matrix on Hexes

Tensor product Gauss-Legendre (GL) with q=p+2, p is the polynomial order of the element.
Use nodal basis with p+1 Gauss-Legendre-Lobatto (GLL) points in each spatial dimension.

Refine timing system

Currently we time the whole assembly, including creating the matrix (and sparistypattern).
This is not optimal, as the sparsity pattern might be alot smaller if assembling over set of sub entities (for instance exterior facets).

If we want to have accurate comparisons, we need to change the signature of the assembly function to have the matrix as input (dolfin-x already has this option).

Integral over set of sub-entities

To generalize the assembler, we should allow it to integrate over a set of sub entities (similar to having a ufl measure with meshtags in dolfinx). This is currently implemented for the surface assembler, and should be easy to generalize to the cell assemblers.

Add new custom kernels for benchmark

  • Mass Matrix - Lagrange - a = inner(u, v)*dx
  • Mass Matrix - Vector Lagrange - a = inner(u, v)*dx
  • Mass Matrix - Nédélec - a = inner(u, v)*dx
  • Stiffness Matrix - Lagrange - a = inner(grad(u), grad(v))*dx
  • Stiffness Matrix - Vector Lagrange
  • Stiffness Matrix - Nédélec - a = inner(curl(u), curl(v))*dx
  • Surface Integration - Vector Lagrange - a = inner(u, v*n)*dx

Enable complex mode (PETSc)

Currently we can use dolfinx with complex petsc, as the python installation of the header only library fails to detect that the build is complex (Similar problem in the dolfin-x CI): https://github.com/FEniCS/dolfinx/runs/3929272622
In Build Python interface:

...
     -- Looking for PETSC_USE_COMPLEX
    -- Looking for PETSC_USE_COMPLEX - not found

while
Configure C++ yields

-- Looking for PETSC_USE_COMPLEX
-- Looking for PETSC_USE_COMPLEX - found

Create facet integral assembler using basix and numba

Challenging task that requires a few steps.

  • Find local facet index
  • Get quadrature points on reference facet
  • Push quadrature points from reference facet to reference cell
  • Pull back data from physical element to these quadrature points

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.