Skip to content

Commit

Permalink
Merge pull request #53 from aurora-multiphysics/cmacmackin/bc_coeffic…
Browse files Browse the repository at this point in the history
…ients

Remove references to coefficients from boundary conditions
  • Loading branch information
alexanderianblair authored Dec 17, 2024
2 parents 4e619d3 + 12b9445 commit fc0dbd5
Show file tree
Hide file tree
Showing 75 changed files with 947 additions and 709 deletions.
16 changes: 0 additions & 16 deletions doc/content/source/actions/AddCoefficientAction.md

This file was deleted.

17 changes: 0 additions & 17 deletions doc/content/source/actions/AddVectorCoefficientAction.md

This file was deleted.

2 changes: 1 addition & 1 deletion doc/content/source/bcs/MFEMScalarDirichletBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Overview

Boundary condition for enforcing an essential (Dirichlet) condition on a scalar variable on the
boundary, fixing its values to the input scalar coefficient on the boundary.
boundary, fixing its values to the input on the boundary.

## Example Input File Syntax

Expand Down
19 changes: 19 additions & 0 deletions doc/content/source/bcs/MFEMScalarFunctionDirichletBC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# MFEMScalarFunctionDirichletBC

## Summary

!syntax description /BCs/MFEMScalarFunctionDirichletBC

## Overview

Boundary condition for enforcing an essential (Dirichlet) condition on
a scalar variable on the boundary, fixing its values to the input
scalar function on the boundary.

## Example Input File Syntax

!syntax parameters /BCs/MFEMScalarFunctionDirichletBC

!syntax inputs /BCs/MFEMScalarFunctionDirichletBC

!syntax children /BCs/MFEMScalarFunctionDirichletBC
2 changes: 1 addition & 1 deletion doc/content/source/bcs/MFEMVectorBoundaryIntegratedBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Adds the boundary integrator for integrating the linear form
!equation
(\vec f, \vec v)_{\partial\Omega} \,\,\, \forall \vec v \in V

where $v \in \vec H^1$ and $\vec f$ is a vector coefficient of the same dimension.
where $\vec v \in \vec H^1$ and $\vec f$ is a constant vector of the same dimension.

## Example Input File Syntax

Expand Down
2 changes: 1 addition & 1 deletion doc/content/source/bcs/MFEMVectorDirichletBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Overview

Boundary condition for enforcing an essential (Dirichlet) boundary condition on all components of a
vector $H^1$ conforming variable on the boundary.
vector $H^1$ conforming variable on the boundary. The boundary value is constant in space and time.

## Example Input File Syntax

Expand Down
3 changes: 2 additions & 1 deletion doc/content/source/bcs/MFEMVectorDirichletBCBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ Base class for objects applying essential boundary conditions on vector variable

Classes deriving from `MFEMVectorDirichletBCBase` are used for the application of Dirichlet-like BCs that
remove degrees of freedom from vector variables in the problem on the specified boundary. These are commonly used when
strongly constraining the values a solution may take on boundaries.
strongly constraining the values a solution may take on boundaries. The imposed values are uniform in space and constant
in time.
22 changes: 22 additions & 0 deletions doc/content/source/bcs/MFEMVectorFunctionBoundaryIntegratedBC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MFEMVectorFunctionBoundaryIntegratedBC

## Summary

!syntax description /BCs/MFEMVectorFunctionBoundaryIntegratedBC

## Overview

Adds the boundary integrator for integrating the linear form

!equation
(\vec f, \vec v)_{\partial\Omega} \,\,\, \forall \vec v \in V

where $v \in \vec H^1$ and $\vec f$ is a vector function of the same dimension.

## Example Input File Syntax

!syntax parameters /BCs/MFEMVectorFunctionBoundaryIntegratedBC

!syntax inputs /BCs/MFEMVectorFunctionBoundaryIntegratedBC

!syntax children /BCs/MFEMVectorFunctionBoundaryIntegratedBC
20 changes: 20 additions & 0 deletions doc/content/source/bcs/MFEMVectorFunctionDirichletBC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# MFEMVectorFunctionDirichletBC

## Summary

!syntax description /BCs/MFEMVectorFunctionDirichletBC

## Overview

Boundary condition for enforcing an essential (Dirichlet) boundary condition on all components of a
vector $H^1$ conforming variable on the boundary. The boundary value is a function of space and/or time.

## Example Input File Syntax

!listing test/tests/kernels/linearelasticity.i block=BCs

!syntax parameters /BCs/MFEMVectorFunctionDirichletBC

!syntax inputs /BCs/MFEMVectorFunctionDirichletBC

!syntax children /BCs/MFEMVectorFunctionDirichletBC
11 changes: 11 additions & 0 deletions doc/content/source/bcs/MFEMVectorFunctionDirichletBCBase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# MFEMVectorFunctionDirichletBCBase

## Summary

Base class for objects applying essential boundary conditions on vector variables in an MFEM FE problem.

## Overview

Classes deriving from `MFEMVectorFunctionDirichletBCBase` are used for the application of Dirichlet-like BCs that
remove degrees of freedom from vector variables in the problem on the specified boundary. These are commonly used when
strongly constraining the values a solution may take on boundaries. The imposed values may vary in space and/or time.
21 changes: 21 additions & 0 deletions doc/content/source/bcs/MFEMVectorFunctionNormalDirichletBC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MFEMVectorFunctionNormalDirichletBC

## Summary

!syntax description /BCs/MFEMVectorFunctionNormalDirichletBC

## Overview

Boundary condition for enforcing an essential (Dirichlet) boundary condition on the normal
components of a $H(\mathrm{div})$ conforming vector FE at a boundary. The imposed value is
a function of space and/or time.

## Example Input File Syntax

!listing test/tests/kernels/graddiv.i block=BCs

!syntax parameters /BCs/MFEMVectorFunctionNormalDirichletBC

!syntax inputs /BCs/MFEMVectorFunctionNormalDirichletBC

!syntax children /BCs/MFEMVectorFunctionNormalDirichletBC
21 changes: 21 additions & 0 deletions doc/content/source/bcs/MFEMVectorFunctionNormalIntegratedBC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MFEMVectorFunctionNormalIntegratedBC

## Summary

!syntax description /BCs/MFEMVectorFunctionNormalIntegratedBC

## Overview

Adds the boundary integrator for integrating the linear form

!equation
(\vec f \cdot \hat n, v)_{\partial\Omega} \,\,\, \forall v \in V

where $v \in H^1$, $\vec f$ is a vector function, and $\hat n$ is the outward facing unit normal
vector on the boundary.

!syntax parameters /BCs/MFEMVectorFunctionNormalIntegratedBC

!syntax inputs /BCs/MFEMVectorFunctionNormalIntegratedBC

!syntax children /BCs/MFEMVectorFunctionNormalIntegratedBC
21 changes: 21 additions & 0 deletions doc/content/source/bcs/MFEMVectorFunctionTangentialDirichletBC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MFEMVectorFunctionTangentialDirichletBC

## Summary

!syntax description /BCs/MFEMVectorFunctionTangentialDirichletBC

## Overview

Boundary condition for enforcing an essential (Dirichlet) boundary condition on the tangential
components of a $H(\mathrm{curl})$ conforming vector FE at a boundary. The boundary value is
a function of space and/or time.

## Example Input File Syntax

!listing test/tests/kernels/curlcurl.i block=BCs

!syntax parameters /BCs/MFEMVectorFunctionTangentialDirichletBC

!syntax inputs /BCs/MFEMVectorFunctionTangentialDirichletBC

!syntax children /BCs/MFEMVectorFunctionTangentialDirichletBC
5 changes: 2 additions & 3 deletions doc/content/source/bcs/MFEMVectorNormalDirichletBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
## Overview

Boundary condition for enforcing an essential (Dirichlet) boundary condition on the normal
components of a $H(\mathrm{div})$ conforming vector FE at a boundary.
components of a $H(\mathrm{div})$ conforming vector FE at a boundary. The imposed value is
constant in space and time.

## Example Input File Syntax

!listing test/tests/kernels/graddiv.i block=BCs

!syntax parameters /BCs/MFEMVectorNormalDirichletBC

!syntax inputs /BCs/MFEMVectorNormalDirichletBC
Expand Down
2 changes: 1 addition & 1 deletion doc/content/source/bcs/MFEMVectorNormalIntegratedBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Adds the boundary integrator for integrating the linear form
!equation
(\vec f \cdot \hat n, v)_{\partial\Omega} \,\,\, \forall v \in V

where $v \in H^1$, $\vec f$ is a vector coefficient, and $\hat n$ is the outward facing unit normal
where $v \in H^1$, $\vec f$ is a vector value, and $\hat n$ is the outward facing unit normal
vector on the boundary.

!syntax parameters /BCs/MFEMVectorNormalIntegratedBC
Expand Down
5 changes: 2 additions & 3 deletions doc/content/source/bcs/MFEMVectorTangentialDirichletBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
## Overview

Boundary condition for enforcing an essential (Dirichlet) boundary condition on the tangential
components of a $H(\mathrm{curl})$ conforming vector FE at a boundary.
components of a $H(\mathrm{curl})$ conforming vector FE at a boundary. The boundary value is
constant in space and time.

## Example Input File Syntax

!listing test/tests/kernels/curlcurl.i block=BCs

!syntax parameters /BCs/MFEMVectorTangentialDirichletBC

!syntax inputs /BCs/MFEMVectorTangentialDirichletBC
Expand Down
20 changes: 0 additions & 20 deletions include/actions/AddCoefficientAction.h

This file was deleted.

20 changes: 0 additions & 20 deletions include/actions/AddVectorCoefficientAction.h

This file was deleted.

9 changes: 3 additions & 6 deletions include/bcs/MFEMConvectiveHeatFluxBC.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#include "MFEMIntegratedBC.h"
#include "MFEMCoefficient.h"

/*
(h (T-T_inf), T')
Expand All @@ -20,9 +19,7 @@ class MFEMConvectiveHeatFluxBC : public MFEMIntegratedBC
virtual mfem::BilinearFormIntegrator * createBilinearFormIntegrator();

protected:
std::string _heat_transfer_coef_name;
std::string _T_inf_coef_name;
mfem::Coefficient & _heat_transfer_coef;
mfem::Coefficient & _T_inf_coef;
mfem::ProductCoefficient _external_heat_flux_coef;
std::shared_ptr<mfem::FunctionCoefficient> _heat_transfer_coef;
std::shared_ptr<mfem::Coefficient> _T_inf_coef;
std::shared_ptr<mfem::ProductCoefficient> _external_heat_flux_coef;
};
3 changes: 1 addition & 2 deletions include/bcs/MFEMScalarDirichletBC.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#include "MFEMEssentialBC.h"
#include "MFEMFunctionCoefficient.h"

class MFEMScalarDirichletBC : public MFEMEssentialBC
{
Expand All @@ -12,5 +11,5 @@ class MFEMScalarDirichletBC : public MFEMEssentialBC
void ApplyBC(mfem::GridFunction & gridfunc, mfem::Mesh * mesh_) override;

protected:
MFEMCoefficient * _coef{nullptr};
std::shared_ptr<mfem::ConstantCoefficient> _coef{nullptr};
};
15 changes: 15 additions & 0 deletions include/bcs/MFEMScalarFunctionDirichletBC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once
#include "MFEMEssentialBC.h"

class MFEMScalarFunctionDirichletBC : public MFEMEssentialBC
{
public:
static InputParameters validParams();

MFEMScalarFunctionDirichletBC(const InputParameters & parameters);

void ApplyBC(mfem::GridFunction & gridfunc, mfem::Mesh * mesh_) override;

protected:
std::shared_ptr<mfem::FunctionCoefficient> _coef{nullptr};
};
5 changes: 2 additions & 3 deletions include/bcs/MFEMVectorBoundaryIntegratedBC.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#include "MFEMIntegratedBC.h"
#include "MFEMVectorFunctionCoefficient.h"

class MFEMVectorBoundaryIntegratedBC : public MFEMIntegratedBC
{
Expand All @@ -17,6 +16,6 @@ class MFEMVectorBoundaryIntegratedBC : public MFEMIntegratedBC
virtual mfem::BilinearFormIntegrator * createBilinearFormIntegrator();

protected:
std::string _vec_coef_name;
MFEMVectorCoefficient * _vec_coef;
std::vector<Real> _vec_value;
std::shared_ptr<mfem::VectorCoefficient> _vec_coef;
};
4 changes: 2 additions & 2 deletions include/bcs/MFEMVectorDirichletBCBase.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "MFEMEssentialBC.h"
#include "MFEMVectorFunctionCoefficient.h"
#include "boundary_conditions.h"

class MFEMVectorDirichletBCBase : public MFEMEssentialBC
Expand All @@ -13,5 +12,6 @@ class MFEMVectorDirichletBCBase : public MFEMEssentialBC

protected:
MFEMVectorDirichletBCBase(const InputParameters & parameters);
MFEMVectorCoefficient * _vec_coef{nullptr};
std::vector<Real> _vec_value;
std::shared_ptr<mfem::VectorCoefficient> _vec_coef{nullptr};
};
20 changes: 20 additions & 0 deletions include/bcs/MFEMVectorFunctionBoundaryIntegratedBC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once
#include "MFEMIntegratedBC.h"

class MFEMVectorFunctionBoundaryIntegratedBC : public MFEMIntegratedBC
{
public:
static InputParameters validParams();

MFEMVectorFunctionBoundaryIntegratedBC(const InputParameters & parameters);

// Create a new MFEM integrator to apply to the RHS of the weak form. Ownership managed by the
// caller.
virtual mfem::LinearFormIntegrator * createLinearFormIntegrator();

// Create a new MFEM integrator to apply to LHS of the weak form. Ownership managed by the caller.
virtual mfem::BilinearFormIntegrator * createBilinearFormIntegrator();

protected:
std::shared_ptr<mfem::VectorCoefficient> _vec_coef{nullptr};
};
Loading

0 comments on commit fc0dbd5

Please sign in to comment.