Skip to content

Commit

Permalink
Merge pull request #96 from PrincetonUniversity/composite-boundaries
Browse files Browse the repository at this point in the history
Composite boundaries
  • Loading branch information
Rohit-Kakodkar authored Jan 2, 2024
2 parents 164d0ae + 2fec38f commit 202a53e
Show file tree
Hide file tree
Showing 58 changed files with 2,039 additions and 400 deletions.
55 changes: 55 additions & 0 deletions docs/api/boundary_conditions/composite_boundaries.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.. _composite_boundaries:

Composite Boundaries
====================

Composite boundaries are a special type of boundary that is used to enforce a combination of multiple boundary conditions. For example, a composite boundary can be used to enforce a Dirichlet boundary condition on the top boundary of an element and a stacey ABC on the right/left boundaries of the element.

Definition
----------

.. doxygenclass:: specfem::enums::boundary_conditions::composite_boundary

Interface
---------

.. codeblock::

template <typename... BC>
class composite_boundary;

Parameters
----------

.. _stacey: stacey.html

.. |stacey| replace:: stacey()

.. _dirichlet: dirichlet.html

.. |dirichlet| replace:: dirichlet()

.. _none: none.html

.. |none| replace:: none()

* ``BC...``: A variadic list of 2 or more boundary conditions. The boundary conditions must be one of the following:

- |stacey|_ : Stacey absorbing boundary condition
- |dirichlet|_ : Dirichlet boundary condition
- |none|_ : No boundary condition

.. note::

Template specializations are provided for the combination of boundary conditions listed below.

Template Specializations
------------------------

.. _stacey_dirichlet: stacey_dirichlet_implementation.html

.. |stacey_dirichlet| replace:: composite_boundary< |stacey|_ , |dirichlet|_ >

* Composite boundary condition enforcing a stacey ABC on one edge and a Dirichlet boundary condition on another edge.

- |stacey_dirichlet|_
83 changes: 83 additions & 0 deletions docs/api/boundary_conditions/dirichlet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.. _dirichlet_bc:

Dirichlet boundary conditions
==============================

Definition
----------

.. doxygenclass:: specfem::enums::boundary_conditions::dirichlet

Interface
---------

.. codeblock::

template <class dimension, class medium, class property, class quadrature_points_type>
class dirichlet

Parameters
----------

.. _dim2: ../enumerations/element/dim2.html

.. |dim2| replace:: dim2()

.. _dim3: ../enumerations/element/dim3.html

.. |dim3| replace:: dim3()

.. _elastic: ../enumerations/element/elastic.html

.. |elastic| replace:: elastic()

.. _acoustic: ../enumerations/element/acoustic.html

.. |acoustic| replace:: acoustic()

.. _static_quadrature_points: ../enumerations/element/static_quadrature_points.html

.. |static_quadrature_points| replace:: static_quadrature_points< NGLL >()

.. _isotropic: ../enumerations/element/isotropic.html

.. |isotropic| replace:: isotropic()

* ``dimension``:

The dimension of the element.

- |dim2|_: A two dimensional element.
- |dim3|_: A three dimensional element.

* ``medium``:

The medium of the element.

- |elastic|_: An elastic element.
- |acoustic|_: An acoustic element.

* ``quadrature_points_type``:

The quadrature points of the element.

- |static_quadrature_points|_: A static quadrature point set.

* ``properties``:

The properties of the element. The properties describe any specializations made the implementation.

- Type of element:

- |isotropic|_: An isotropic element.

Template Implementation
-----------------------

.. _dirichlet_implementation: dirichlet_implementation.html

.. |dirichlet_implementation| replace:: dirichlet< typename dimension , typename medium , typename property , typename quadrature_points >()

* Dirichlet implementation of various elements

- |dirichlet_implementation|_
4 changes: 4 additions & 0 deletions docs/api/boundary_conditions/dirichlet_implementation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.. doxygenclass:: specfem::enums::boundary_conditions::dirichlet
:members:
:private-members:
29 changes: 29 additions & 0 deletions docs/api/boundary_conditions/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _boundary_conditions:

Boundary conditions
-------------------

Boundary conditions class is used as a template parameter of :doxygenclass:`specfem::domain::impl::elements::element` class. The approach for applying boundary conditions is defined more in detail in the :ref:`boundary_conditions` section.

Interface
~~~~~~~~~

Interface for various types of boundary conditions

.. codeblock::

template <class dimension, class medium, class property, class quadrature_points_type>
class (boundary_condition_type)

Types of boundary conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following boundary conditions are implemented:

.. toctree::
:maxdepth: 1

stacey
dirichlet
none
composite_boundaries
83 changes: 83 additions & 0 deletions docs/api/boundary_conditions/none.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.. _none_bc:

None boundary conditions
========================

Definition
----------

.. doxygenclass:: specfem::enums::boundary_conditions::stacey

Interface
---------

.. codeblock::

template <class dimension, class medium, class property, class quadrature_points_type>
class none

Parameters
----------

.. _dim2: ../enumerations/element/dim2.html

.. |dim2| replace:: dim2()

.. _dim3: ../enumerations/element/dim3.html

.. |dim3| replace:: dim3()

.. _elastic: ../enumerations/element/elastic.html

.. |elastic| replace:: elastic()

.. _acoustic: ../enumerations/element/acoustic.html

.. |acoustic| replace:: acoustic()

.. _static_quadrature_points: ../enumerations/element/static_quadrature_points.html

.. |static_quadrature_points| replace:: static_quadrature_points< NGLL >()

.. _isotropic: ../enumerations/element/isotropic.html

.. |isotropic| replace:: isotropic()

* ``dimension``:

The dimension of the element.

- |dim2|_: A two dimensional element.
- |dim3|_: A three dimensional element.

* ``medium``:

The medium of the element.

- |elastic|_: An elastic element.
- |acoustic|_: An acoustic element.

* ``quadrature_points_type``:

The quadrature points of the element.

- |static_quadrature_points|_: A static quadrature point set.

* ``properties``:

The properties of the element. The properties describe any specializations made the implementation.

- Type of element:

- |isotropic|_: An isotropic element.

Template Implementation
-----------------------

.. _dirichlet_implementation: none_implementation.html

.. |dirichlet_implementation| replace:: none< typename dimension , typename medium , typename property , typename quadrature_points >()

* None implementation of various elements.

- |dirichlet_implementation|_
4 changes: 4 additions & 0 deletions docs/api/boundary_conditions/none_implementation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.. doxygenclass:: specfem::enums::boundary_conditions::none
:members:
:private-members:
95 changes: 95 additions & 0 deletions docs/api/boundary_conditions/stacey.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
.. _stacey_ABCs::

Stacey ABCs
============

Definition
----------

.. doxygenclass:: specfem::enums::boundary_conditions::stacey

Interface
---------

.. codeblock::

template <class dimension, class medium, class property, class quadrature_points_type>
class stacey

Parameters
----------

.. _dim2: ../enumerations/element/dim2.html

.. |dim2| replace:: dim2()

.. _dim3: ../enumerations/element/dim3.html

.. |dim3| replace:: dim3()

.. _elastic: ../enumerations/element/elastic.html

.. |elastic| replace:: elastic()

.. _acoustic: ../enumerations/element/acoustic.html

.. |acoustic| replace:: acoustic()

.. _static_quadrature_points: ../enumerations/element/static_quadrature_points.html

.. |static_quadrature_points| replace:: static_quadrature_points< NGLL >()

.. _isotropic: ../enumerations/element/isotropic.html

.. |isotropic| replace:: isotropic()

* ``dimension``:

The dimension of the element.

- |dim2|_: A two dimensional element.
- |dim3|_: A three dimensional element.

* ``medium``:

The medium of the element.

- |elastic|_: An elastic element.
- |acoustic|_: An acoustic element.

* ``quadrature_points_type``:

The quadrature points of the element.

- |static_quadrature_points|_: A static quadrature point set.

* ``properties``:

The properties of the element. The properties describe any specializations made the implementation.

- Type of element:

- |isotropic|_: An isotropic element.

.. warning::

The Stacey ABCs are only implemented for the combination of parameters listed below.

Template Specializations
------------------------

.. _stacey_dim2_elastic: stacey_dim2_elastic_implementation.html

.. |stacey_dim2_elastic| replace:: stacey< |dim2|_, |elastic|_, typename property , typename quadrature_points >()

.. _stacey_dim2_acoustic: stacey_dim2_acoustic_implementation.html

.. |stacey_dim2_acoustic| replace:: stacey< |dim2|_, |acoustic|_, typename property , typename quadrature_points >()

* Stacey ABCs for a two dimensional elements.

- |stacey_dim2_elastic|_

* Stacey ABCs for a two dimensional isotropic acoustic element with a static quadrature point set.

- |stacey_dim2_acoustic|_
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.. doxygenclass:: specfem::enums::boundary_conditions::stacey< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, property, qp_type >
:members:
:private-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.. doxygenclass:: specfem::enums::boundary_conditions::stacey< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, property, qp_type >
:members:
:private-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.. doxygenclass:: specfem::enums::boundary_conditions::composite_boundary< specfem::enums::boundary_conditions::stacey< properties... >, specfem::enums::boundary_conditions::dirichlet< properties... > >
:members:
:private-members:
Loading

0 comments on commit 202a53e

Please sign in to comment.