gel

Introduction

Welcome to gel, the library for inverse finite-element analysis of compressible heterogeneous hydrogel nonlinear materials!

Command Usage

The first way to use this code is through the command-line. Upon installation, numerous scripts are added to PATH for easy usage anywhere on your computer.

Usage information is available through --help arguments. Documentation for each program is also available here in gel.scripts, including API for alternative library usage.

Command names and corresponding source files:

Library Usage

The second way to use this code is as a Python library. This is especially useful for post-processing in Jupyter notebooks, of which you may find an example in the repository.

As with other FEniCS-based libraries, start with a star-import:

from gel import *

Then, you will be provided with all of the imports from FEniCS, overloaded with FEniCS-adjoint under most circumstances, as well as, principally, the contents of the following submodules:

Typically, library usage is for exploration and post-processing. In this case, geometry, kinematics, and mechanics are defined in that order. In the case of post-procesing, this looks like:

geo = Geometry(cell_data_dir)
kin = kinematics_from_file(geo, u_file)
beta = load_shape(geo.V0, beta_file, "mod_repr")
mech = Mechanics(kin, mod_repr=beta)
 1"""# Introduction
 2
 3Welcome to `gel`, the library for inverse finite-element analysis of
 4compressible heterogeneous hydrogel nonlinear materials!
 5
 6# Command Usage
 7
 8The first way to use this code is through the command-line. Upon
 9installation, numerous scripts are added to PATH for easy usage
10anywhere on your computer.
11
12Usage information is available through `--help` arguments. Documentation
13for each program is also available here in `gel.scripts`, including API
14for alternative library usage.
15
16Command names and corresponding source files:
17* forward: `gel.scripts.forward`
18* inverse: `gel.scripts.inverse`
19* downsample_mesh: `gel.scripts.downsample_mesh`
20* get_u: `gel.scripts.get_u_from_gel_mesh`
21* get_kinematics_mesh: `gel.scripts.full_shape_to_nodal`
22* get_veh: `gel.scripts.get_veh`
23
24# Library Usage
25
26The second way to use this code is as a Python library. This is
27especially useful for post-processing in Jupyter notebooks, of which
28you may find an
29[example in the repository](https://github.com/WCCMS-UTAustin/3DTFM/blob/main/reproduction/fenics_environment_analysis.ipynb).
30
31As with other FEniCS-based libraries, start with a star-import:
32
33```
34from gel import *
35```
36
37Then, you will be provided with all of the imports from FEniCS,
38overloaded with FEniCS-adjoint under most circumstances, as well as,
39principally, the contents of the following submodules:
40* `gel.gel`
41* `gel.geometry`
42* `gel.kinematics`
43* `gel.mechanics`
44* `gel.objective`
45* `gel.helper`
46
47Typically, library usage is for exploration and post-processing. In this
48case, geometry, kinematics, and mechanics are defined in that order.
49In the case of post-procesing, this looks like:
50```
51geo = Geometry(cell_data_dir)
52kin = kinematics_from_file(geo, u_file)
53beta = load_shape(geo.V0, beta_file, "mod_repr")
54mech = Mechanics(kin, mod_repr=beta)
55```
56"""
57from .gel import *