Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/hpc-maths/GenEO
21 May 2024, 17:50:58 UTC
  • Code
  • Branches (7)
  • Releases (0)
  • Visits
Revision c2d8c3407556e587b2981643ef5f8f87fa17d79c authored by gouarin on 29 May 2018, 11:33:09 UTC, committed by gouarin on 29 May 2018, 11:33:09 UTC
fix environment name
1 parent 9f83d7f
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/github-services/pull/1/head
    • refs/github-services/pull/2/head
    • refs/github-services/pull/3/head
    • refs/heads/PCAWG
    • refs/heads/elasticity-x
    • refs/heads/master
    • refs/heads/matis
    • c2d8c3407556e587b2981643ef5f8f87fa17d79c
    No releases to show
  • df940c5
  • /
  • readme.md
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
  • snapshot
origin badgerevision badge
swh:1:rev:c2d8c3407556e587b2981643ef5f8f87fa17d79c
origin badgedirectory badge
swh:1:dir:df940c53b7189388844ee507fafa9cbd3c3c5b77
origin badgecontent badge
swh:1:cnt:4f71f5b752b5e7d6c48c4c129f8fd234a337855e
origin badgesnapshot badge
swh:1:snp:5600c58bc442523ff2d2f69616f3f4483ec0d504

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: c2d8c3407556e587b2981643ef5f8f87fa17d79c authored by gouarin on 29 May 2018, 11:33:09 UTC
fix environment name
Tip revision: c2d8c34
readme.md
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/gouarin/GenEO/master)

This project solve the linear elasticity problem using PETSc in 2d and 3d for lamé coefficients which are constant or constant by cell on a cartesian grid.

# Installation

To install this package, you need first an installation of anaconda. If you don't have anaconda on your system, you can download miniconda for Python 3 (https://conda.io/miniconda.html).

Next, we will create an environment with all the needed packages using the following command.

    conda env create -f environment.yml

To activate your environment

    source activate petsc-elasticity

The final step is to install `petsc4py`. To do that, you have to specify the environment variable `PETSC_DIR`.

Run the following command in your terminal
    conda env list

    # conda environments:
    #
    ...
    petsc-elasticity      *  /home/loic/miniconda3/envs/petsc-elasticity
    ...

The path after the conda environment name `petsc-elasticity` is the path of `PETSC_DIR`.

    export PETSC_DIR=/home/loic/miniconda3/envs/petsc-elasticity

You can know install `petsc4py`

    pip install petsc4py

To install this project, you have to clone it

    git clone https://gitlab.centralesupelec.fr/gouarin/elasticity.git

Then

    cd elasticity
    python setup.py install

It's important to be in the conda environment created previously. If it is not the case

    source activate petsc-elasticity

# Execute demo file

In the directory of this project you have a `demos` directory with 2d and 3d examples.

This is an example of how to test one of them

    python elasticity_2d.py -ksp_monitor -pc_type gamg

- `ksp_monitor` indicates to PETSc to print the residual at each step.
- `pc_type gamg` indicates to PETSc to use an algebric multigrid as a preconditioner.

And in parallel

    mpiexec -n 4 python elasticity_2d.py -ksp_monitor -pc_type gamg

# Visualize the results

If the execution of `elasticity_2d.py` succeeded, you should have a file name `solution_2d.vts`. 

To visualize this file, you have to install paraview (https://www.paraview.org/download/).

- Start `paraview` and select file->load state. 
- Then select the file in the directory `paraview` of this project called `visu_2d.pvsm`.
- Then select the `vts` file.

You should see the results.
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API