@@ -10,6 +10,7 @@ On this page we provide a summary of the main API changes, new features and exam
- Add support of user setting any 2 of the 5 neo-Hookean model parameters: Poisson's ratio, Young's modulus, shear modulus, Lame's first parameter, and bulk modulus.
- Add flexible flux boundary conditions with time variance during a quasistatic or dynamic simulation.
- Add command line option `-view_models` to display list of all Ratel material models.
Please check your code for common issues by running
@@ -172,6 +175,7 @@ which uses the `clang-tidy` utility included in recent releases of Clang.
This tool is much slower than actual compilation (`make -j` parallelism helps).
All issues reported by `make tidy` should be fixed.
## Header Files
Header inclusion for source files should follow the principal of 'include what you use' rather than relying upon transitive `#include` to define all symbols.
@@ -193,11 +197,13 @@ Header files should be listed in alphabetical order, with installed headers prec
Header guard macros should be done using `#pragma once`. This must be the very first non-comment line of the file.
## `restrict` Semantics
QFunction arguments can be assumed to have `restrict` semantics.
That is, each input and output array must reside in distinct memory without overlap.
## Continuous Integration (CI) and Testing
Whenever a merge request is created, the Ratel test suite is run against a variety of hardware and software configurations.
@@ -206,6 +212,24 @@ The log will provide the command which failed and relevant details (such as `dif
You can also see the CGNS or CSV output of a failed run, if applicable, by selecting "Download" on the Job Artifacts (to the right of the log).
Artifacts from failed runs will be contained in the `test_failure_artifacts` folder inside the artifacts archive.
## Adding New Material Models
Each material model (`elasticity-neo-hookean-damage-current`, etc.) requires files in several places.
- Any new typedefs for structs required by the material model go in `include/ratel/models/`. For example, the struct typedefs for neo-Hookean models are located in `include/ratel/models/neo-hookean.h`.
- The functions for creating these parameter structs from command line options goes in `src/materials/[model group]/params`, where `[model group]` is a broad category, such as `elasticity` or `poromechanics`. For example, the functions for creating the parameter structs for neo-Hookean damage are located in `src/materials/elasticity/params/neo-hookean.c` and `src/materials/elasticity/params/damage.c`.
- The QFunction source for the material model goes in `include/ratel/qfunctions/models/...`. Select the correct folder and file name based upon the material model. For example, the QFunction source file for neo-Hookean elasticity in the current configuration with damage is `include/ratel/qfunctions/models/elasticity/neo-hookean/damage-current.h`. Additional files in the folders under `include/ratel/qfunctions/...` may contain common code, such as `include/ratel/qfunctions/models/elasticity/neo-hookean/damage-common.h` or `include/ratel/qfunctions/utils.h`.
- The associated model data structs, creation function, and registration function for the material model goes in `src/materials/[model group]`, where `[model group]` is a broad category, such as `elasticity` or `poromechanics`. This folder may be further subdivided. For example, the file for neo-Hookean elasticity in the current configuration with damage is `src/materials/elasticity/neo-hookean/damage-current.h`. All of the functions in this file should have a common, unique suffix, such as `_ElasticityNeoHookeanDamageCurrent`.
- Finally, the command line option string for the material model and its unique function suffix should be added to `src/materials/ratel-model-list.h`, wrapped in the `RATEL_MODEL` macro. This macro is used in `src/materials/ratel-model.c` to register the full list of material models available to users.
- If the material model requires special dependencies, such as Enzyme or ADOL-C, then do not list this material model in `src/materials/ratel-model-list.h`. Instead, place the command line option string and unique function suffix in a separate header, such as `src/materials/ratel-model-list-enzyme.h` and include this header in `src/materials/ratel-model-list.h`. Also create a corresponding file in `src/materials/weak`, such as `src/materials/weak/ratel-model-enzyme-weak.c`, to register a weak symbol for this material model if the required dependencies are not available at compile time. Corresponding logic will also need to be added to `Makefile`.
## Adding New Boundary Conditions
Each boundary condition (e.g. pressure, slip, traction, flux, etc.) gets its own folder `include/ratel/boundary/[bc-name]` containing:
@@ -287,6 +311,7 @@ PetscCall(RatelMaterialSetBoundaryJacobianMultigridInfo(material, op_jacobian, o
&RatelBoundarySetupMultigridLevel_CellToFace));
```
## Adding New Initial Conditions
Ratel supports non-zero initial condition for linear poromechanincs MMS and as a constant value for other cases. If user needs to add non-zero initial condition as function of coordinate, a function with the same structure as `RatelSetupInitialConditionMMS` needs to be added with its own QFunction expressing the initial condition of each active field.
@@ -180,7 +180,7 @@ The command line options just shown are the minimum requirements to run the appl
-
* - `-model`
- Material model to use (`elasticity-linear`, `elasticity-neo-hookean-current`, `elasticity-mooney-rivlin-initial`, etc.)
- Material model to use (`elasticity-linear`, `elasticity-neo-hookean-current`, `elasticity-mooney-rivlin-initial`, etc.). Note: The option `-view_models` will display all valid values for this option.
- `elasticity-linear`
* - `-forcing`
@@ -374,6 +374,10 @@ The command line options just shown are the minimum requirements to run the appl
* - `-help`
- View comprehensive information about run-time options
-
* - `-view_models`
- View full list of material model command line options
-
:::
To verify the convergence of the linear elasticity formulation on a given mesh with the method of manufactured solutions, run: