This repository was archived by the owner on Sep 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Convert FunctionBCs to FunctorBCs accepting Coefficient inputs formed from Functions or Materials #69
Merged
Merged
Convert FunctionBCs to FunctorBCs accepting Coefficient inputs formed from Functions or Materials #69
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
9b80799
Store FunctionCoefficients in the PropertyManager
alexanderianblair db2c0c1
Expect std::string rather than FunctionName for coefficient names in …
alexanderianblair a926258
Rename FunctionBCs to FunctorBCs
cmacmackin 8b1b64b
Define type aliases for MFEM coefficient names for readability in inputs
alexanderianblair 8fb1f58
Add helper methods to MFEMGeneralUserObject for fetching properties
alexanderianblair 72bdbc5
Add _vec_coef_name reference to BCs and Kernels using vector coeffici…
alexanderianblair 2de0f03
Rename MFEMScalarBoundaryIntegratedBC to MFEMScalarFunctorBoundaryInt…
cmacmackin df9902b
Fix old MFEMScalarBoundaryIntegratedBC references in MFEMIntegratedBC…
alexanderianblair ceac33f
Rename MFEMScalarBoundaryIntegratedBC source documentation to match c…
alexanderianblair 11a4d38
Adopting new nomenclature for coefficients versus properties
cmacmackin ed56fb3
Further clarified distinction between coefficients and properties
cmacmackin f520954
Updated names in documentation
cmacmackin f2de76d
Fixed assertion error when building functions
cmacmackin 59efcd2
Refactored so only need to return references to coefficients
cmacmackin 15ff1e1
Adopted the functor name in more places
cmacmackin 087b19c
Changed references to functions in documentation
cmacmackin 0979c80
Updated documentation for renamed materials
cmacmackin fefaefa
Got regression tests running properly
cmacmackin dc5013c
Ensure coefficients all made with same factory
cmacmackin 9c795f8
Add methods to check if FESpace is for scalars or vectors
cmacmackin 7639b41
Add support for using postprocessors and (aux)variables as functors
cmacmackin 6f5ec88
Wrote test for adding alias coefficients
cmacmackin 62467c3
Changed references "properties" to "coefficients"
cmacmackin a4c061d
Simplified interface for creating coefficients
cmacmackin 3938479
getProperties() -> GetCoefficients()
cmacmackin fa3cc01
Removed separate factory class for creating coefficients
cmacmackin edf7150
Consistently use "coefficient" as parameter name
cmacmackin c7c3421
Switch from using location in memory to MOOSE unique name
cmacmackin fcae0b6
Fixed typo
cmacmackin 51cbaab
Replace references to "functor" with "coefficient" in documentation
cmacmackin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
doc/content/source/bcs/MFEMScalarFunctorBoundaryIntegratedBC.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # MFEMScalarFunctorBoundaryIntegratedBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMScalarFunctorBoundaryIntegratedBC | ||
|
|
||
| ## Overview | ||
|
|
||
| Adds the boundary integrator for integrating the linear form | ||
|
|
||
| !equation | ||
| (f, v)_{\partial\Omega} \,\,\, \forall v \in V | ||
|
|
||
| where the test variable $v \in H^1$ and $f$ is a scalar coefficient. Often used for representing | ||
| Neumann-type boundary conditions. | ||
|
|
||
| !syntax parameters /BCs/MFEMScalarFunctorBoundaryIntegratedBC | ||
|
|
||
| !syntax inputs /BCs/MFEMScalarFunctorBoundaryIntegratedBC | ||
|
|
||
| !syntax children /BCs/MFEMScalarFunctorBoundaryIntegratedBC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # MFEMScalarFunctorDirichletBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMScalarFunctorDirichletBC | ||
|
|
||
| ## Overview | ||
|
|
||
| Boundary condition for enforcing an essential (Dirichlet) condition on | ||
| a scalar variable on the boundary, fixing its values to the input | ||
| scalar functor on the boundary. | ||
|
|
||
| ## Example Input File Syntax | ||
|
|
||
| !syntax parameters /BCs/MFEMScalarFunctorDirichletBC | ||
|
|
||
| !syntax inputs /BCs/MFEMScalarFunctorDirichletBC | ||
|
|
||
| !syntax children /BCs/MFEMScalarFunctorDirichletBC |
22 changes: 0 additions & 22 deletions
22
doc/content/source/bcs/MFEMVectorFunctionBoundaryIntegratedBC.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
doc/content/source/bcs/MFEMVectorFunctionNormalDirichletBC.md
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
doc/content/source/bcs/MFEMVectorFunctionNormalIntegratedBC.md
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
doc/content/source/bcs/MFEMVectorFunctionTangentialDirichletBC.md
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
doc/content/source/bcs/MFEMVectorFunctorBoundaryIntegratedBC.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # MFEMVectorFunctorBoundaryIntegratedBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMVectorFunctorBoundaryIntegratedBC | ||
|
|
||
| ## 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 functor of the same dimension. | ||
|
|
||
| ## Example Input File Syntax | ||
|
|
||
| !syntax parameters /BCs/MFEMVectorFunctorBoundaryIntegratedBC | ||
|
|
||
| !syntax inputs /BCs/MFEMVectorFunctorBoundaryIntegratedBC | ||
|
|
||
| !syntax children /BCs/MFEMVectorFunctorBoundaryIntegratedBC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # MFEMVectorFunctorDirichletBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMVectorFunctorDirichletBC | ||
|
|
||
| ## 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 functor of space and/or time. | ||
|
|
||
| ## Example Input File Syntax | ||
|
|
||
| !listing test/tests/kernels/linearelasticity.i block=BCs | ||
|
|
||
| !syntax parameters /BCs/MFEMVectorFunctorDirichletBC | ||
|
|
||
| !syntax inputs /BCs/MFEMVectorFunctorDirichletBC | ||
|
|
||
| !syntax children /BCs/MFEMVectorFunctorDirichletBC |
4 changes: 2 additions & 2 deletions
4
.../bcs/MFEMVectorFunctionDirichletBCBase.md → ...e/bcs/MFEMVectorFunctorDirichletBCBase.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| # MFEMVectorFunctionDirichletBCBase | ||
| # MFEMVectorFunctorDirichletBCBase | ||
|
|
||
| ## 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 | ||
| Classes deriving from `MFEMVectorFunctorDirichletBCBase` 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
21
doc/content/source/bcs/MFEMVectorFunctorNormalDirichletBC.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # MFEMVectorFunctorNormalDirichletBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMVectorFunctorNormalDirichletBC | ||
|
|
||
| ## 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 functor of space and/or time. | ||
|
|
||
| ## Example Input File Syntax | ||
|
|
||
| !listing test/tests/kernels/graddiv.i block=BCs | ||
|
|
||
| !syntax parameters /BCs/MFEMVectorFunctorNormalDirichletBC | ||
|
|
||
| !syntax inputs /BCs/MFEMVectorFunctorNormalDirichletBC | ||
|
|
||
| !syntax children /BCs/MFEMVectorFunctorNormalDirichletBC |
21 changes: 21 additions & 0 deletions
21
doc/content/source/bcs/MFEMVectorFunctorNormalIntegratedBC.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # MFEMVectorFunctorNormalIntegratedBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMVectorFunctorNormalIntegratedBC | ||
|
|
||
| ## 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 functor, and $\hat n$ is the outward facing unit normal | ||
| vector on the boundary. | ||
|
|
||
| !syntax parameters /BCs/MFEMVectorFunctorNormalIntegratedBC | ||
|
|
||
| !syntax inputs /BCs/MFEMVectorFunctorNormalIntegratedBC | ||
|
|
||
| !syntax children /BCs/MFEMVectorFunctorNormalIntegratedBC |
21 changes: 21 additions & 0 deletions
21
doc/content/source/bcs/MFEMVectorFunctorTangentialDirichletBC.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # MFEMVectorFunctorTangentialDirichletBC | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /BCs/MFEMVectorFunctorTangentialDirichletBC | ||
|
|
||
| ## 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 functor of space and/or time. | ||
|
|
||
| ## Example Input File Syntax | ||
|
|
||
| !listing test/tests/kernels/curlcurl.i block=BCs | ||
|
|
||
| !syntax parameters /BCs/MFEMVectorFunctorTangentialDirichletBC | ||
|
|
||
| !syntax inputs /BCs/MFEMVectorFunctorTangentialDirichletBC | ||
|
|
||
| !syntax children /BCs/MFEMVectorFunctorTangentialDirichletBC |
18 changes: 0 additions & 18 deletions
18
doc/content/source/materials/MFEMGenericFunctionMaterial.md
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
doc/content/source/materials/MFEMGenericFunctionVectorMaterial.md
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
doc/content/source/materials/MFEMGenericFunctorMaterial.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # MFEMGenericFunctorMaterial | ||
|
|
||
| ## Summary | ||
|
|
||
| !syntax description /Materials/MFEMGenericFunctorMaterial | ||
|
|
||
| ## Overview | ||
|
|
||
| `MFEMGenericFunctorMaterial` defines one or more scalar material properties with values obtained from a functor on | ||
| one or more subdomains of the mesh, given by the `blocks` parameter if provided, or applied to the | ||
| entire mesh if missing. The scalar material properties are named according to members in the | ||
| `prop_names` parameter, with respective functors used to get property values given by the members of `prop_values`. | ||
|
|
||
| !syntax parameters /Materials/MFEMGenericFunctorMaterial | ||
|
|
||
| !syntax inputs /Materials/MFEMGenericFunctorMaterial | ||
|
|
||
| !syntax children /Materials/MFEMGenericFunctorMaterial |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.