GEOS
Public Types | Static Public Member Functions | List of all members
geos::FieldSpecificationEqual Struct Reference

#include <FieldSpecificationOps.hpp>

Inheritance diagram for geos::FieldSpecificationEqual:
Inheritance graph
[legend]

Public Types

using base_type = FieldSpecificationOp< OpEqual >
 Alias for FieldSpecificationOp< OpEqual >
 
- Public Types inherited from geos::FieldSpecificationOp< OpEqual >
using OpType = OpEqual
 Alias for OP, the operator.
 

Static Public Member Functions

static GEOS_HOST_DEVICE void SpecifyFieldValue (globalIndex const dof, globalIndex const dofRankOffset, CRSMatrixView< real64, globalIndex const > const &matrix, real64 &rhs, real64 const bcValue, real64 const fieldValue)
 Function to apply a Dirichlet like boundary condition to a single dof in a system of equations. More...
 
template<typename POLICY >
static void prescribeRhsValues (arrayView1d< real64 > const &rhs, arrayView1d< globalIndex const > const &dof, globalIndex const dofRankOffset, arrayView1d< real64 const > const &values)
 Function to add some values of a vector. More...
 
- Static Public Member Functions inherited from geos::FieldSpecificationOp< OpEqual >
static GEOS_HOST_DEVICE std::enable_if< !traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView1d< T > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field. More...
 
static GEOS_HOST_DEVICE std::enable_if< traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView1d< T > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< !traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView2d< T, USD > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView2d< T, USD > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< !traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView3d< T, USD > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView3d< T, USD > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< !traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView4d< T, USD > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< traits::is_tensorT< T >, void >::type SpecifyFieldValue (arrayView4d< T, USD > const &field, localIndex const index, integer const component, real64 const value)
 Pointwise application of a value to a field variable. More...
 
static GEOS_HOST_DEVICE std::enable_if< !traits::is_tensorT< T >, void >::type readFieldValue (arrayView1d< T const > const &field, localIndex const index, integer const component, real64 &value)
 Read a field value. More...
 
static GEOS_HOST_DEVICE std::enable_if< traits::is_tensorT< T >, void >::type readFieldValue (arrayView1d< T const > const &field, localIndex const index, integer const component, real64 &value)
 Read a field value. More...
 
static GEOS_HOST_DEVICE std::enable_if< !traits::is_tensorT< T >, void >::type readFieldValue (arrayView2d< T const, USD > const &field, localIndex const index, integer const component, real64 &value)
 Read value from a 2d field. More...
 
static GEOS_HOST_DEVICE std::enable_if< traits::is_tensorT< T >, void >::type readFieldValue (arrayView2d< T const, USD > const &field, localIndex const index, integer const component, real64 &value)
 This function is not meaningful. It exists for generic purposes, but will result in an error if called. More...
 
static GEOS_HOST_DEVICE void readFieldValue (arrayView3d< T const, USD > const &field, localIndex const index, integer const component, real64 &value)
 This function is not meaningful. It exists for generic purposes, but will result in an error if called. More...
 
static GEOS_HOST_DEVICE void readFieldValue (arrayView4d< T const, USD > const &field, localIndex const index, integer const component, real64 &value)
 This function is not meaningful. It exists for generic purposes, but will result in an error if called. More...
 

Detailed Description

this struct a collection of static functions which adhere to an assumed interface for overwriting a value for a field.

Definition at line 529 of file FieldSpecificationOps.hpp.

Member Function Documentation

◆ prescribeRhsValues()

template<typename POLICY >
static void geos::FieldSpecificationEqual::prescribeRhsValues ( arrayView1d< real64 > const &  rhs,
arrayView1d< globalIndex const > const &  dof,
globalIndex const  dofRankOffset,
arrayView1d< real64 const > const &  values 
)
inlinestatic

Function to add some values of a vector.

Template Parameters
POLICYthe execution policy to use when setting values
Parameters
rhsthe target right-hand side vector
dofa list of global DOF indices to be set
dofRankOffsetoffset of dof indices on current rank
valuesa list of values corresponding to dof that will be added to rhs.

Definition at line 607 of file FieldSpecificationOps.hpp.

◆ SpecifyFieldValue()

static GEOS_HOST_DEVICE void geos::FieldSpecificationEqual::SpecifyFieldValue ( globalIndex const  dof,
globalIndex const  dofRankOffset,
CRSMatrixView< real64, globalIndex const > const &  matrix,
real64 rhs,
real64 const  bcValue,
real64 const  fieldValue 
)
inlinestatic

Function to apply a Dirichlet like boundary condition to a single dof in a system of equations.

Parameters
[in]dofThe degree of freedom that is to be set.
[in]dofRankOffsetoffset of dof indices on current rank
[in,out]matrixthe local part of the system matrix
[out]rhsThe rhs contribution resulting from the application of the BC.
[in]bcValueThe target value of the Boundary Condition
[in]fieldValueThe current value of the variable to be set.

This function clears the matrix row for the specified dof, sets the diagonal to some appropriately scaled value, and sets rhs to the negative product of the scaled value of the diagonal and the difference between bcValue and fieldValue.

Note
This function assumes the user is doing a Newton-type nonlinear solve and will negate the rhs vector upon assembly. Thus, it sets the value to negative of the desired update for the field. For a linear problem, this may lead to unexpected results.

Definition at line 555 of file FieldSpecificationOps.hpp.


The documentation for this struct was generated from the following file: