Skip to content

Commit

Permalink
updating triangle utility docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vickysharma0812 committed Apr 20, 2024
1 parent 1048945 commit 4cd74bf
Show file tree
Hide file tree
Showing 88 changed files with 2,512 additions and 689 deletions.
26 changes: 13 additions & 13 deletions docs/about/easifemBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ title: easifemBase
sidebar_position: 5
---

<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->

`easifemBase` (henceforth read as Base) library is the lowest (or, base) level component of EASIFEM. All other components are built upon `easifemBase`.

It contains a lot of valuable routines and derived types.
It contains a lot of valuable routines and derived types.

## Programming paradigm

The programming paradigm of `easifemBase` is [Multiple dispatch approach](https://en.wikipedia.org/wiki/Multiple_dispatch) and Procedural programming.
The programming paradigm of `easifemBase` is [Multiple dispatch approach](https://en.wikipedia.org/wiki/Multiple_dispatch) and Procedural programming.

:::note
The base library do not use the object-oriented programming concepts. In the Base library `String_Class` is the only exception wherein Object-oriented paradigm has been used.
Expand All @@ -22,14 +24,14 @@ import TabItem from '@theme/TabItem';

## Key features

Currently, easifemBase has interface with
Currently, easifemBase has interface with

- `BLAS95`
- `Lapack95`
- `Sparsekit`
- `Metis`
- `PlPlot`
- `SuperLU`
- `BLAS95`
- `Lapack95`
- `Sparsekit`
- `Metis`
- `PlPlot`
- `SuperLU`
- `ARPACK`

- [ ] TODO Add key features in `easifemBase.md`.
Expand All @@ -53,11 +55,11 @@ The `easifemBase` library exposes three main modules.

1. `BaseType`, which contains the user-defined data-type
2. `BaseMethods`, contains the modules (each module defines the routines for data-types defined in `BaseType.F90`.)
3. `easifemBase`
3. `easifemBase`

The structure of source directory is shown in the following figure.

![](./figures/figure-2.svg)
![easifem-base-design](/img/svg/easifem-base-design.svg)

The source directory has two directories

Expand Down Expand Up @@ -244,5 +246,3 @@ import {basemethods_columns, basemethods_articles} from "./BaseMethods.table.js"
columns={basemethods_columns}
data={basemethods_articles}
/>

###
4 changes: 0 additions & 4 deletions docs/about/figures/figure-2.svg

This file was deleted.

8 changes: 3 additions & 5 deletions docs/about/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
id: "index"
aliases:
- "EASIFEM"
tags:
- "easifemBase"
- "easifemClasses"
Expand All @@ -10,6 +7,8 @@ sidebar_position: 1

# EASIFEM

<!-- markdownlint-disable MD041 MD013 MD033 -->

Expandable And Scalable Infrastructure for Finite Element Methods, EASIFEM, is [Modern FORTRAN](https://fortran-lang.org) framework for solving partial differential equations (PDEs) using finite element methods. EASIFEM “eases” the efforts to develop scientific programs in FORTRAN. It is meant for researchers, scientists, and engineers using FORTRAN to implement numerical methods for solving the initial-boundary-value problems (IBVPs). EASIFEM is equipped with both low- and high-level datatype and classes for implementing finite element methods.

Following are some features which may interest you.
Expand All @@ -26,7 +25,7 @@ Currently, EASIFEM focuses on finite element methods. Eventually, the library wi

## Structure of EASIFEM

![](/img/what-is-easifem.svg)
![easifem structure](/img/what-is-easifem.svg)

EASIFEM consists following three hierarchical components:

Expand Down Expand Up @@ -77,7 +76,6 @@ Currently, `easifemBase` has interface with `HDF5`, `Gmsh`, `PlPlot`, `GTK4`, `P
</div>
</div>


## Kernels

`easifemKernels` (henceforth, read as Kernels) contains physics simulators. For example, we have:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# BarycentricVertexBasis

<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->

Returns the vertex basis functions on reference Triangle.

## Interface

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="interface" label="܀ Interface" default>

```fortran
INTERFACE
MODULE PURE FUNCTION BarycentricVertexBasis_Triangle(lambda) &
Expand All @@ -22,17 +18,21 @@ INTERFACE
END INTERFACE
```

</TabItem>
:::info `lambda`
Barycentric coordinates. The vertex basis function will be evaluated here. The number of rows in lambda is 3 and the number of columns is the number of points. The three rows of lambda dentoe the $\lambda_{i=1,2,3}$.
:::

<TabItem value="example" label="️܀ See example">
:::info `ans`
The number of rows in `ans` is equal to the number of points of evaluation. The number of columns is 3. The three columns of `ans` denote the basis functions of vertex $v=1,2,3$ at all points.
:::

import EXAMPLE29 from "./_BarycentricVertexBasis_Triangle_test_1.md";
<details>
<summary>Example</summary>
<div>

<EXAMPLE29 />

</TabItem>
import EXAMPLE29 from "./examples/_BarycentricVertexBasis_Triangle_test_1.md";

<TabItem value="close" label="">
<EXAMPLE29 />

</TabItem>
</Tabs>
</div>
</details>
52 changes: 31 additions & 21 deletions docs/docs-api/TriangleInterpolationUtility/Dubiner_Triangle.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
# Dubiner
# Dubiner_Triangle

Forms Dubiner basis on reference triangle domain.
<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->

Reference triangle can be "biunit" or "unit".
Forms Dubiner basis on reference triangle domain. Reference triangle can be "biunit" or "unit".

The shape of `ans` is (M,N), where M=SIZE(xij,2) (number of points) N = 0.5*(order+1)*(order+2).
:::note It is alias to `OrothogonalBasis_Triangle` method.
:::

The shape of `ans` is (M,N), where `M=SIZE(xij,2)` (number of points) `N = 0.5*(order+1)*(order+2)`.

- `M` number of points of evaluations.
- `N` number of degrees of freedom for a given order of approximation.

In this way, `ans(j,:)` denotes the values of all polynomial at jth point.

Polynomials are returned in following way:

$$
P_{0,0}, P_{0,1}, \cdots , P_{0,order} \\
P_{1,0}, P_{1,1}, \cdots , P_{1,order-1} \\
P_{2,0}, P_{2,1}, \cdots , P_{2,order-2} \\
\cdots
P_{order,0}
P_{0,0}, P_{0,1}, \cdots , P_{0,order} \\
P_{1,0}, P_{1,1}, \cdots , P_{1,order-1} \\
P_{2,0}, P_{2,1}, \cdots , P_{2,order-2} \\
\cdots
P_{order,0}
$$

For example for order=3, the polynomials are arranged as:

$$
P_{0,0}, P_{0,1}, P_{0,2}, P_{0,3} \\
P_{1,0}, P_{1,1}, P_{1,2} \\
P_{2,0}, P_{2,1} \\
P_{3,0}
P_{0,0}, P_{0,1}, P_{0,2}, P_{0,3} \\
P_{1,0}, P_{1,1}, P_{1,2} \\
P_{2,0}, P_{2,1} \\
P_{3,0}
$$

## Interface 1

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="interface" label="܀ Interface" default>

Expand All @@ -44,8 +47,8 @@ INTERFACE
!! points in reference triangle, shape functions will be evaluated
!! at these points. SIZE(xij,1) = 2, and SIZE(xij, 2) = number of points
CHARACTER(*), INTENT(IN) :: refTriangle
!! "unit"
!! "biunit"
!! "UNIT"
!! "BIUNIT"
REAL(DFP) :: ans(SIZE(xij, 2), (order + 1)* (order + 2) / 2)
!! shape functions
!! ans(:, j), jth shape functions at all points
Expand All @@ -54,19 +57,23 @@ INTERFACE
END INTERFACE
```

:::info `xij`
Points in reference triangle, shape functions will be evaluated at these points. SIZE(xij,1) = 2, and SIZE(xij, 2) = number of points
:::

</TabItem>

<TabItem value="example" label="️܀ order=1">

import EXAMPLE61 from "./_Dubiner_Triangle_test_1.md";
import EXAMPLE61 from "./examples/_Dubiner_Triangle_test_1.md";

<EXAMPLE61 />

</TabItem>

<TabItem value="example2" label="️܀ order=2">

import EXAMPLE100 from "./_Dubiner_Triangle_test_2.md";
import EXAMPLE100 from "./examples/_Dubiner_Triangle_test_2.md";

<EXAMPLE100 />

Expand Down Expand Up @@ -100,7 +107,10 @@ INTERFACE
END INTERFACE
```

Forms Dubiner basis on reference triangle domain. Reference triangle can be biunit or unit. Here x and y are the coordinates on the line. xij is given by outerproduct of x and y.
- Forms Dubiner basis on the reference triangle domain.
- Reference triangle can be biunit or unit.
- Here x and y are the coordinates on the line. `xij` is given by outer-product of `x` and `y`.

</TabItem>

<TabItem value="close" label="">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# EquidistanceInPoint
# EquidistanceInPoint_Triangle

<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->

This function returns the equidistance points in triangle.

Expand All @@ -7,9 +9,6 @@ This function returns the equidistance points in triangle.

## Interface

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="interface" label="܀ Interface" default>

Expand All @@ -32,7 +31,7 @@ END INTERFACE

<TabItem value="example" label="️܀ See example">

import EXAMPLE35 from "./_EquidistancePoint_Triangle_test_1.md";
import EXAMPLE35 from "./examples/_EquidistanceInPoint_Triangle_test_1.md";

<EXAMPLE35 />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# EquidistancePoint
# EquidistancePoint_Triangle

This function returns the nodal coordinates of higher order triangle element
<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->

- the layout is always "VEFC"
This function returns the nodal coordinates of higher order triangle element.

- the layout is always "VEFC", that is, the node numbering is according to GMSH convention, VEFC.
- coordinates are distributed uniformly
- these coordinates can be used to construct lagrange polynomials
- these coordinates can be used to construct Lagrange polynomials
- the returned coordinates are in $x_{iJ}$ format.
- the node numbering is according to Gmsh convention, VEFC.

## Interface
:::info `VEFC` layout

`VEFC` layout is a way to store the nodal coordinates of a triangle element. The layout is as follows:

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
- First we store the coordinates of the vertices.
- Then we store the coordinates of the edge midpoints.
- Finally we store the coordinates of the face center.

:::

## Interface

<Tabs>
<TabItem value="interface" label="܀ Interface" default>
Expand All @@ -20,13 +28,13 @@ import TabItem from '@theme/TabItem';
INTERFACE
MODULE RECURSIVE PURE FUNCTION EquidistancePoint_Triangle(order, xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order
!! order
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! coordinates of point 1 and point 2 in $x_{iJ}$ format
!! number of rows = nsd
!! number of cols = 3
!! coordinates of point 1 and point 2 in $x_{iJ}$ format
!! number of rows = nsd
!! number of cols = 3
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! returned coordinates in $x_{iJ}$ format
!! returned coordinates in $x_{iJ}$ format
END FUNCTION EquidistancePoint_Triangle
END INTERFACE
```
Expand All @@ -35,7 +43,7 @@ END INTERFACE

<TabItem value="example" label="️܀ See example">

import EXAMPLE38 from "./_EquidistancePoint_Triangle_test_1.md";
import EXAMPLE38 from "./examples/_EquidistancePoint_Triangle_test_1.md";

<EXAMPLE38 />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# HeirarchicalBasis
# HeirarchicalBasis_Triangle

<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->

Evaluate all modal basis (heirarchical polynomial) on Triangle.

# Interface
## Interface

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand Down
Loading

0 comments on commit 4cd74bf

Please sign in to comment.