|
| template<typename OBJECT_TYPE , typename BC_TYPE = FieldSpecification, typename LAMBDA > |
| static void | apply (BC_TYPE const &fs, MeshLevel &mesh, LAMBDA &&lambda) |
| | Apply this field specification to the discretization. More...
|
| |
| template<typename OBJECT_TYPE , typename BC_TYPE = FieldSpecification, typename LAMBDA > |
| static void | apply (BC_TYPE const &fs, MeshLevel &mesh, LAMBDA &&lambda, real64 const &time, string const &fieldName) |
| | If applicable in the current time and field, apply this field specification to the discretization. More...
|
| |
| template<typename FIELD_OP , typename POLICY , typename T , int N, int USD> |
| static void | applyFieldValueKernel (FieldSpecification const &fs, ArrayView< T, N, USD > const &field, SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group &dataGroup) |
| |
| template<typename FIELD_OP , typename POLICY = parallelHostPolicy> |
| static void | applyFieldValue (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group &dataGroup, string const &fieldName) |
| |
| template<typename FIELD_OP , typename POLICY , typename T , int NDIM, int USD> |
| static void | applyBoundaryConditionToSystemKernel (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group const &dataGroup, arrayView1d< globalIndex const > const &dofMap, globalIndex const dofRankOffset, CRSMatrixView< real64, globalIndex const > const &matrix, arrayView1d< real64 > const &rhs, ArrayView< T const, NDIM, USD > const &fieldView) |
| | Apply a boundary condition to a system of equations. More...
|
| |
| template<typename FIELD_OP , typename POLICY > |
| static void | applyBoundaryConditionToSystem (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group const &dataGroup, string const &fieldName, string const &dofMapName, globalIndex const dofRankOffset, CRSMatrixView< real64, globalIndex const > const &matrix, arrayView1d< real64 > const &rhs) |
| | Apply a boundary condition to a system of equations. More...
|
| |
| template<typename FIELD_OP , typename POLICY , typename LAMBDA > |
| static void | applyBoundaryConditionToSystem (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group const &dataGroup, arrayView1d< globalIndex const > const &dofMap, globalIndex const dofRankOffset, CRSMatrixView< real64, globalIndex const > const &matrix, arrayView1d< real64 > const &rhs, LAMBDA &&lambda) |
| | Apply a boundary condition to a system of equations. More...
|
| |
| template<typename FIELD_OP , typename POLICY , typename LAMBDA > |
| static void | applyBoundaryConditionToSystem (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, real64 const time, real64 const dt, dataRepository::Group const &dataGroup, arrayView1d< globalIndex const > const &dofMap, globalIndex const dofRankOffset, CRSMatrixView< real64, globalIndex const > const &matrix, arrayView1d< real64 > const &rhs, LAMBDA &&lambda) |
| | Apply a boundary condition to a system of equations. More...
|
| |
| template<typename FIELD_OP , typename POLICY , typename LAMBDA > |
| static void | computeRhsContribution (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, real64 const time, real64 const dt, dataRepository::Group const &dataGroup, arrayView1d< globalIndex const > const &dofMap, globalIndex const dofRankOffset, CRSMatrixView< real64, globalIndex const > const &matrix, arrayView1d< globalIndex > const &dof, arrayView1d< real64 > const &rhsContribution, LAMBDA &&lambda) |
| | Compute the contributions that will be added/enforced to the right-hand side, and collect the corresponding dof numbers. More...
|
| |
| template<typename POLICY > |
| static void | zeroSystemRowsForBoundaryCondition (FieldSpecification const &fs, SortedArrayView< localIndex const > const &targetSet, arrayView1d< globalIndex const > const &dofMap, CRSMatrixView< real64, globalIndex const > const &matrix) |
| | Function to zero matrix rows to apply boundary conditions. More...
|
| |
Methods to apply field specifications.
Definition at line 43 of file FieldSpecificationImpl.hpp.
template<typename OBJECT_TYPE , typename BC_TYPE , typename LAMBDA >
| void geos::FieldSpecificationImpl::apply |
( |
BC_TYPE const & |
fs, |
|
|
MeshLevel & |
mesh, |
|
|
LAMBDA && |
lambda, |
|
|
real64 const & |
time, |
|
|
string const & |
fieldName |
|
) |
| |
|
static |
If applicable in the current time and field, apply this field specification to the discretization.
- Template Parameters
-
| OBJECT_TYPE | The type of discretization/mesh object that the specification is being applied to. |
| BC_TYPE | The type of BC being applied |
| LAMBDA | |
- Parameters
-
| fs | The field specification data object |
| mesh | The MeshLevel that the specification is applied to |
| lambda | The being executed |
| time | The time at which the field will be evaluated. For instance if the field is a time dependent function, this is the evaluation time. |
| fieldName | The name of the field/variable that the value will be applied to. It may not be necessary that this name is in the data repository, as the user supplied lambda may apply whatever it condition it would like. However, this name is used for comparing against the value given in the specification. |
This function checks if the field should be applied, and applies it. More specifically, this function simply checks the values of fieldName against its FieldSpecification object and decides on whether or not to call the user defined lambda.
Definition at line 362 of file FieldSpecificationImpl.hpp.
template<typename FIELD_OP , typename POLICY , typename LAMBDA >
| void geos::FieldSpecificationImpl::computeRhsContribution |
( |
FieldSpecification const & |
fs, |
|
|
SortedArrayView< localIndex const > const & |
targetSet, |
|
|
real64 const |
time, |
|
|
real64 const |
dt, |
|
|
dataRepository::Group const & |
dataGroup, |
|
|
arrayView1d< globalIndex const > const & |
dofMap, |
|
|
globalIndex const |
dofRankOffset, |
|
|
CRSMatrixView< real64, globalIndex const > const & |
matrix, |
|
|
arrayView1d< globalIndex > const & |
dof, |
|
|
arrayView1d< real64 > const & |
rhsContribution, |
|
|
LAMBDA && |
lambda |
|
) |
| |
|
static |
Compute the contributions that will be added/enforced to the right-hand side, and collect the corresponding dof numbers.
- Template Parameters
-
| FIELD_OP | A wrapper struct to define how the boundary condition operates on the variables. Either OpEqual or OpAdd. |
| POLICY | Execution policy to use when iterating over target set. |
| LAMBDA | The type of lambda function passed into the parameter list. |
- Parameters
-
| [in] | fs | The field specification data object. |
| [in] | targetSet | The set of indices which the boundary condition will be applied. |
| [in] | time | The time at which any time dependent functions are to be evaluated as part of the application of the boundary condition. |
| [in] | dt | time step size which is applied as a factor to bc values |
| [in] | dataGroup | The Group that contains the field to apply the boundary condition to. |
| [in] | dofMap | The map from the local index of the primary field to the global degree of freedom number. |
| [in] | dofRankOffset | Offset of dof indices on current rank. |
| [in,out] | matrix | Local part of the system matrix. |
| [in,out] | dof | array storing the degrees of freedom of the rhsContribution, to know where in the rhs they will be added/enforced |
| [in,out] | rhsContribution | array storing the values that will be added/enforced to the right-hand side |
| [in] | lambda | A lambda function which defines how the value that is passed into the functions provided by the FIELD_OP templated type. |
Note that this function only computes the rhs contributions, but does not apply them to the right-hand side. The application of these rhs contributions is done in applyBoundaryConditionToSystem.
Why did we have to extract the computation of the rhs contributions from applyBoundaryConditionToSystem? Because applyBoundaryConditionToSystem is not very well suited to apply the rhsContributions to the equation layout used in the compositional solvers. Therefore, the compositional solvers do not call applyBoundaryConditionToSystem, but instead call computeRhsContribution directly, and apply these rhs contributions "manually" according to the equation layout used in the solver
Definition at line 602 of file FieldSpecificationImpl.hpp.