Giter Club home page Giter Club logo

angiotk's Introduction

Feel++: Finite Element Embedded Library in C++

feelpp DOI

feelpp?color=009688&logo=Riseup&style=flat square feelpp?color=009688&logo=Moleculer&logoColor=white&style=flat square feelpp?color=009688&logo=Bilibili&logoColor=white&style=flat square feelpp?logo=Draugiem feelpp?color=009688&style=flat square&logo=Hack The Box&logoColor=white

Feel++ is a C++ library for continuous or discontinuous Galerkin methods including finite element method(FEM), spectral element methods(SEM), reduced basis methods, discontinuous galerkin methods (DG and HDG) in 1D 2D and 3D and in parallel. Checkout What is Feel++?, Feel++ Features and some Examples.

Releases

The latest release of Feel++ is here feelpp

Feel++ has a DOI provided by Zenodo. Please use this to cite Feel++ if you use it in a publication DOI

Feel++ is split into three components:

feelpp

library and tools

feelpp-toolboxes

mono and multiphysics toolboxes (cfd, csm, heat transfer, fsi, heat and fluid, hdg(poisson and elasticity), thermo-electric and maxwell)

feelpp-mor

model order reduction applications and tools

These components are built and delivered in two distribution channels: stable and latest. The channels are currently available via Docker containers, Debian and Ubuntu packages.

stable

Once a year, sometimes more, we make a release of Feel++ and it becomes the basis of the stable channel. The channel is updated infrequently, only for a new release or a major bug.

latest

Feel++ has a very active development and changes are made everyday with the research done by Cemosis and its collaborators. Each commit in the main development branch triggers a new full build with more than 800 tests from unit test to full pde solves.

Instructions are available here to install Feel++ : https://docs.feelpp.org/user/latest/install/index.html.

Feel++ Documentation

Slack Discussion Forum

We encourage you to ask questions and discuss any aspects of the project on Slack. New contributors are always welcome!

Continuous Integration

Feel++ maintains various branches. At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime: master and develop

master

Main branch where the source code of HEAD always reflects a production-ready state.

develop

Main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. This is where any automatic nightly builds are built from.

feature/*

Feature branches (or sometimes called topic branches) are used to develop new features for the upcoming or a distant future release. When starting development of a feature, the target release in which this feature will be incorporated may well be unknown at that point. The essence of a feature branch is that it exists as long as the feature is in development, but will eventually be merged back into develop (to definitely add the new feature to the upcoming release) or discarded (in case of a disappointing experiment).

What is Feel++?

Feel++ is a C++ library for continuous or discontinuous Galerkin methods including finite element method(FEM), spectral element methods(SEM), reduced basis methods, discontinuous Galerkin methods (DG and HDG) in 1D 2D and 3D and in parallel. The objectives of this framework are quite ambitious; ambitions which could be expressed in various ways such as :

  • the creation of a versatile mathematical kernel solving easily problems using different techniques thus allowing testing and comparing methods, e.g. cG versus dG,

  • the creation of a small and manageable library which shall nevertheless encompass a wide range of numerical methods and techniques,

  • build mathematical software that follows closely the mathematical abstractions associated with partial differential equations (PDE),

  • the creation of a library entirely in C++ allowing to create complex and typically multi-physics applications such as fluid-structure interaction or mass transport in haemodynamic.

Features

  • 1D 2D and 3D (including high order) geometries and also lower topological dimension 1D(curve) in 2D and 3D or 2D(surface) in 3D

  • continuous and discontinuous (dG and hdG) arbitrary order Galerkin Methods in 1D, 2D and 3D including finite and spectral element methods

  • domain specific embedded language in C++ for variational formulations

  • interfaced with PETSc for linear and non-linear solvers

  • seamless parallel computations using PETSc

  • interfaced with SLEPc for large-scale sparse standard and generalized eigenvalue solvers

  • supports Gmsh for mesh generation

  • supports Gmsh for post-processing (including on high order geometries)

  • supports Paraview and CEI/Ensight for post-processing and the following file formats: ensight gold, gmsh, xdmf.

Contributing

In the spirit of free software, everyone is encouraged to help improve this project. If you discover errors or omissions in the source code, documentation, or website content, please don’t hesitate to submit an issue or open a pull request with a fix. New contributors are always welcome!

Here are some ways you can contribute:

  • by using develop versions

  • by reporting bugs

  • by suggesting new features

  • by writing or editing documentation

  • by writing specifications

  • by writing code — No patch is too small.

    • fix typos

    • add comments

    • write examples!

    • write tests!

  • by refactoring code

  • by fixing issues

  • by reviewing Pull Requests

The Contributing guide provides information on how to create, style, and submit issues, feature requests, code, and documentation to the Feel++ Project.

Getting Help

The Feel++ project is developed to help you easily do (i) modelisation simulation and optimisation and (ii) high performance computing. But we can’t do it without your feedback! We encourage you to ask questions and discuss any aspects of the project on the discussion list, on Twitter or in the chat room.

Twitter

#feelpp hashtag or @feelpp mention

Chat (Slack)

Slack

Further information and documentation about Feel++ can be found on the project’s website.

Home | News | Docs

The Feel++ organization on GitHub hosts the project’s source code, issue tracker, and sub-projects.

Source repository (git)

https://github.com/feelpp/feelpp

Issue tracker

https://github.com/feelpp/feelpp/issues

Feel++ organization on GitHub

https://github.com/feelpp

Copyright © 2011-2023 Feel++ Consortium. Free use of this software is granted under the terms of the GPL License.

See the LICENSE file for details.

Authors

Feel++ is led by Christophe Prud’homme and has received contributions from many other individuals.

Examples

Laplacian in 2D using P3 Lagrange basis functions

Here is a full example to solve

-\Delta u = f \mbox{ in } \Omega,\quad u=g \mbox{ on } \partial \Omega

#include <feel/feel.hpp>

int main(int argc, char**argv )
{
    using namespace Feel;
    Environment env( _argc=argc, _argv=argv,
                     _desc=feel_options(),
                     _about=about(_name="qs_laplacian",
                                  _author="Feel++ Consortium",
                                  _email="[email protected]"));

    auto mesh = unitSquare();
    auto Vh = Pch<1>( mesh );
    auto u = Vh->element();
    auto v = Vh->element();

    auto l = form1( _test=Vh );
    l = integrate(_range=elements(mesh),
                  _expr=id(v));

    auto a = form2( _trial=Vh, _test=Vh );
    a = integrate(_range=elements(mesh),
                  _expr=gradt(u)*trans(grad(v)) );
    a+=on(_range=boundaryfaces(mesh), _rhs=l, _element=u,
          _expr=constant(0.) );
    a.solve(_rhs=l,_solution=u);

    auto e = exporter( _mesh=mesh, _name="qs_laplacian" );
    e->add( "u", u );
    e->save();
    return 0;
}

Bratu equation in 2D

Here is a full non-linear example - the Bratu equation - to solve

\[-\Delta u + e^u = 0 \mbox{ in } \Omega,\quad u=0 \mbox{ on } \partial \Omega$$.\]
#include <feel/feel.hpp>

inline
Feel::po::options_description
makeOptions()
{
    Feel::po::options_description bratuoptions( "Bratu problem options" );
    bratuoptions.add_options()
    ( "lambda", Feel::po::value<double>()->default_value( 1 ),
                "exp() coefficient value for the Bratu problem" )
    ( "penalbc", Feel::po::value<double>()->default_value( 30 ),
                 "penalisation parameter for the weak boundary conditions" )
    ( "hsize", Feel::po::value<double>()->default_value( 0.1 ),
               "first h value to start convergence" )
    ( "export-matlab", "export matrix and vectors in matlab" )
    ;
    return bratuoptions.add( Feel::feel_options() );
}

/**
 * Bratu Problem
 *
 * solve \f$ -\Delta u + \lambda \exp(u) = 0, \quad u_\Gamma = 0\f$ on \f$\Omega\f$
 */
int
main( int argc, char** argv )
{

    using namespace Feel;
    Environment env( _argc=argc, _argv=argv,
                     _desc=makeOptions(),
                     _about=about(_name="bratu",
                                  _author="Christophe Prud'homme",
                                  _email="[email protected]"));
    auto mesh = unitSquare();
    auto Vh = Pch<3>( mesh );
    auto u = Vh->element();
    auto v = Vh->element();
    double penalbc = option(_name="penalbc").as<double>();
    double lambda = option(_name="lambda").as<double>();

    auto Jacobian = [=](const vector_ptrtype& X, sparse_matrix_ptrtype& J)
        {
            auto a = form2( _test=Vh, _trial=Vh, _matrix=J );
            a = integrate( elements( mesh ), gradt( u )*trans( grad( v ) ) );
            a += integrate( elements( mesh ), lambda*( exp( idv( u ) ) )*idt( u )*id( v ) );
            a += integrate( boundaryfaces( mesh ),
               ( - trans( id( v ) )*( gradt( u )*N() ) - trans( idt( u ) )*( grad( v )*N()  + penalbc*trans( idt( u ) )*id( v )/hFace() ) );
        };
    auto Residual = [=](const vector_ptrtype& X, vector_ptrtype& R)
        {
            auto u = Vh->element();
            u = *X;
            auto r = form1( _test=Vh, _vector=R );
            r = integrate( elements( mesh ), gradv( u )*trans( grad( v ) ) );
            r +=  integrate( elements( mesh ),  lambda*exp( idv( u ) )*id( v ) );
            r +=  integrate( boundaryfaces( mesh ),
               ( - trans( id( v ) )*( gradv( u )*N() ) - trans( idv( u ) )*( grad( v )*N() ) + penalbc*trans( idv( u ) )*id( v )/hFace() ) );
        };
    u.zero();
    backend()->nlSolver()->residual = Residual;
    backend()->nlSolver()->jacobian = Jacobian;
    backend()->nlSolve( _solution=u );

    auto e = exporter( _mesh=mesh );
    e->add( "u", u );
    e->save();
}

angiotk's People

Contributors

aancel avatar francoisdh avatar gitter-badger avatar hugues-talbot avatar omerveille avatar prudhomm avatar vincentchabannes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

angiotk's Issues

Write permission issue with RORPO

Bonjour à tous,
J'ai une stagiaire pendant un mois à qui j'essaye de faire utiliser AngioTK...
Elle a un joli PC sous Linux-Ubuntu 16.4 (je crois).
Aujourd'hui nous avons réussi à installer Docker puis à copier l'image "master" d'angio-tk
(pas la "stable"...ça marchait pas, peut-être pour cela faut-il être dans le github privé...).

Ensuite, tout a presque bien fonctionné si ce n'est que RORPO n'a pas pu écrire le fichier de sortie pour de sombres histoires de droit ...J'ai essayé d'aller sur la page que François m'avait
envoyée pour utiliser "docker sans sudo" mais là non plus, cela ne marche pas...qu'est-ce que je rate ? Je pense ne pas savoir mon $USER quand on est dans docker ... est-ce un truc spécifique ?
j'avais un problème du même genre sur mon mac ...

Merci de votre aide, il faudrait vraiment que cela marche pour elle, elle
ne sera là que pendant un mois !

Amicalement

Stéphanie

Documentation generation: antora + site.yml > error: "only book doctypes can contain level 0 sections"

When trying to generate the documentation using antora and the site.yml file, we get an error.

$ antora site.yml 
asciidoctor: ERROR: module-4-centerlines.adoc: line 22: only book doctypes can contain level 0 sections
asciidoctor: ERROR: module-4-centerlines.adoc: line 22: only book doctypes can contain level 0 sections

This should easily be fixed by splitting the file module-4-centerlines.adoc in two.

VMTK tools fail in Docker image

Using the feelpp/angiotk:stable Docker image, VMTK tools fail:

user@feelpp:~$ vmtkimagewriter
Unexpected error: <type 'exceptions.ImportError'>
Traceback (most recent call last):
  File "/usr/local/bin/vmtkimagewriter", line 20, in <module>
    from vmtk import pypeserver
ImportError: No module named vmtk

The problem can be fixed by appending the following path to the PYTHONPATH environment
variable:

export PYTHONPATH = $PYTHONPATH:/usr/local/lib/python3.5/site-packages

I guess this could be added to the docker image ?

Meshing/VolumeFromSTL : Code refactoring

I propose to refactor the code in VolumeFromSTL in order to improve code readability and allow @francoisdh to have a look at the code.
In the src directory:

  • Move all the applications *_main.cpp in an src/applications directory;
  • Split the volumefromstl.hpp in the include directory into as many files as there are classes.
  • Split the volumefromstl.cpp file which contains all the classes implementation into as many files as there are classes in it.
  • Create a src/libraries directory where we put all the source files that are part of the angiotk_meshing_volumefromstl library.
  • Ensure that everything builds correctly with CMake

What do you think about it ? @prudhomm @vincentchabannes @francoisdh

Visualisation in-situ

  • use feelpp/applications/models/fluid/main_fm.cpp to simulate the fluid flow
  • + test fluid structure interaction

we have to generate the json file for the fluid/fsi solvers from the marker file defined #6
/cc @vincentchabannes

transform marker data file into json format

the application VolumeFromSTLAndCenterline generates automatically a data file that provides marker named meshcreateinletoutlet.desc , this file is then used to generates markers for boundary conditions

Redesign AngioTK documentation

The current state of documentation is not very good. We should evaluate the current documentation and propose a proper design

Add all summer school files & a user guide

  • add all the scripts and configuration files used during the workshop.
  • add a user guide to help users to run the pipeline and to reproduce the various steps presented during the summer school workshop.

AngioTK Documentation

Documentation for AngioTK:

  • Build instructions
  • General description of AngioTK
  • Description of the different modules
    • Input and output of the modules
    • Document the different options available
  • Document the graphical tool for editing centerlines
  • Document how output files are stored for the Pipeline and how files are stored for the result matrix
  • Creation of Angiotk Book

image from center line: incorrect radius

The center line radius can vary significantly in the image generated by imagefromcenterline, resulting in an incorrect surface in the next pipeline steps. For example, in the zebra fish, the dorsal aorta's radius is nearly halved.

Move docs into Antora framework

Antora provides a framework to generate a static website for technical documentation.
We have already used this for Feel++. Check this out here http://docs.feelpp.org.

Initially, Angiotk will be integrated into Feel++ Docs then it will have its own website.

The move requires that we modify the structure of the repository.

/cc @feelpp/angiotk

Meshing modules documentation problems

The meshing modules documentation has some visual problems, especially the command line arguments sections, where two or more arguments are presented in the same line/paragraph instead of being spread with bullet points.

Add details to asciidoc/html files

  • Include configuration and environment details (user, date, versions,...) used for the whole run.
    Information
    • version of angiotk if it exists or commit ids
    • author of the batch run
    • date/time
    • time for global execution
    • machine
    • dataset name (we have to define the notion of dataset) eg Vivabrain
      • number of dataset inside the dataset
    • statistics about the data set
      • number of successful reconstruction
      • number of incomplete reconstruction
      • number of total failures

Add some details about each pipeline step:

  • Use boolean 'success' variable to assign a background color to the relevant cell.
  • Include the complete command used in each cell (this could later be changed to a 'rebuild' button in the web page)
  • Round all execution times.

Fix format of angiotk documentation

AngioTK is now in Antora system, see #28, which uses asciidoc as a format for documentation.
However various adoc files are using markdown instead of asciidoc, please fix this

source code should use

[source,<lang>]
----
----

Sectioning should use = instead of #

/cc @feelpp/angiotk

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.