GEOS
FieldSpecificationBase.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_FIELDSPECIFICATION_FIELDSPECIFICATIONBASE_HPP
21 #define GEOS_FIELDSPECIFICATION_FIELDSPECIFICATIONBASE_HPP
22 
23 #include "common/DataTypes.hpp"
24 #include "common/TypeDispatch.hpp"
25 #include "codingUtilities/traits.hpp"
26 #include "codingUtilities/Utilities.hpp"
27 #include "dataRepository/Group.hpp"
31 #include "mesh/MeshObjectPath.hpp"
33 #include "common/GEOS_RAJA_Interface.hpp"
34 
35 namespace geos
36 {
37 class Function;
38 
39 
45 {
46 public:
47 
57  string const &,
58  dataRepository::Group * const >;
63  enum class SetErrorMode : integer
64  {
65  silent,
66  error,
67  warning
68  };
69 
75 
80  static string catalogName() { return "FieldSpecification"; }
81 
86  virtual const string getCatalogName() const
87  {
89  }
90 
101  FieldSpecificationBase( string const & name, dataRepository::Group * parent );
102 
106  virtual ~FieldSpecificationBase() override;
107 
108 
111 
114 
117 
120 
131  template< typename OBJECT_TYPE,
132  typename BC_TYPE = FieldSpecificationBase,
133  typename LAMBDA >
134  void apply( MeshLevel & mesh,
135  LAMBDA && lambda ) const
136  {
137  MeshObjectPath const & meshObjectPaths = this->getMeshObjectPaths();
138  meshObjectPaths.forObjectsInPath< OBJECT_TYPE >( mesh,
139  [&] ( OBJECT_TYPE & object )
140  {
141  {
143  string_array setNames = this->getSetNames();
144  for( auto & setName : setNames )
145  {
146  if( setGroup.hasWrapper( setName ) )
147  {
148  SortedArrayView< localIndex const > const & targetSet = setGroup.getReference< SortedArray< localIndex > >( setName );
149  lambda( dynamic_cast< BC_TYPE const & >(*this), setName, targetSet, object, getFieldName() );
150  }
151  }
152  }
153  } );
154  }
155 
166  template< typename FIELD_OP, typename POLICY, typename T, int N, int USD >
167  void applyFieldValueKernel( ArrayView< T, N, USD > const & field,
168  SortedArrayView< localIndex const > const & targetSet,
169  real64 const time,
170  Group & dataGroup ) const;
171 
183  template< typename FIELD_OP, typename POLICY=parallelHostPolicy >
185  real64 const time,
186  dataRepository::Group & dataGroup,
187  string const & fieldname ) const;
188 
209  template< typename FIELD_OP, typename POLICY, typename T, int NDIM, int USD >
211  real64 const time,
212  dataRepository::Group const & dataGroup,
213  arrayView1d< globalIndex const > const & dofMap,
214  globalIndex const dofRankOffset,
216  arrayView1d< real64 > const & rhs,
217  ArrayView< T const, NDIM, USD > const & fieldView ) const;
218 
238  template< typename FIELD_OP, typename POLICY >
240  real64 const time,
241  dataRepository::Group const & dataGroup,
242  string const & fieldName,
243  string const & dofMapName,
244  globalIndex const dofRankOffset,
246  arrayView1d< real64 > const & rhs ) const;
247 
270  template< typename FIELD_OP, typename POLICY, typename LAMBDA >
271  void
273  real64 const time,
274  dataRepository::Group const & dataGroup,
275  arrayView1d< globalIndex const > const & dofMap,
276  globalIndex const dofRankOffset,
278  arrayView1d< real64 > const & rhs,
279  LAMBDA && lambda ) const;
280 
304  template< typename FIELD_OP, typename POLICY, typename LAMBDA >
305  void
307  real64 const time,
308  real64 const dt,
309  dataRepository::Group const & dataGroup,
310  arrayView1d< globalIndex const > const & dofMap,
311  globalIndex const dofRankOffset,
313  arrayView1d< real64 > const & rhs,
314  LAMBDA && lambda ) const;
315 
345  template< typename FIELD_OP, typename POLICY, typename LAMBDA >
346  void
348  real64 const time,
349  real64 const dt,
350  dataRepository::Group const & dataGroup,
351  arrayView1d< globalIndex const > const & dofMap,
352  globalIndex const dofRankOffset,
354  arrayView1d< globalIndex > const & dof,
355  arrayView1d< real64 > const & rhsContribution,
356  LAMBDA && lambda ) const;
357 
358 
369  template< typename POLICY >
371  arrayView1d< globalIndex const > const & dofMap,
372  CRSMatrixView< real64, globalIndex const > const & matrix ) const;
373 
378  {
380  constexpr static char const * setNamesString() { return "setNames"; }
382  constexpr static char const * constitutivePathString() { return "constitutivePath"; }
384  constexpr static char const * objectPathString() { return "objectPath"; }
386  constexpr static char const * fieldNameString() { return "fieldName"; }
388  constexpr static char const * dataTypeString() { return "dataType"; }
390  constexpr static char const * componentString() { return "component"; }
392  constexpr static char const * directionString() { return "direction"; }
394  constexpr static char const * bcApplicationTableNameString() { return "bcApplicationTableName"; }
396  constexpr static char const * scaleString() { return "scale"; }
398  constexpr static char const * functionNameString() { return "functionName"; }
400  constexpr static char const * initialConditionString() { return "initialCondition"; }
402  constexpr static char const * beginTimeString() { return "beginTime"; }
404  constexpr static char const * endTimeString() { return "endTime"; }
406  constexpr static char const * errorSetModeString() { return "errorSetMode"; }
407  };
408 
413  string const & getFunctionName() const
414  {
415  return m_functionName;
416  }
417 
422  virtual const string & getObjectPath() const
423  {
424  return m_objectPath;
425  }
426 
431  virtual const string & getFieldName() const
432  {
433  return m_fieldName;
434  }
435 
440  virtual int getComponent() const
441  {
442  return m_component;
443  }
444 
449  virtual R1Tensor const & getDirection() const
450  {
451  GEOS_UNUSED_VAR( time );
452  return m_direction;
453  }
454 
460  {
461  return m_beginTime;
462  }
463 
469  {
470  return m_endTime;
471  }
472 
477  string_array const & getSetNames() const
478  {
479  return m_setNames;
480  }
481 
486  int initialCondition() const
487  {
488  return m_initialCondition;
489  }
490 
495  real64 getScale() const
496  {
497  return m_scale;
498  }
499 
504  void setFieldName( string const & fieldName )
505  {
506  m_fieldName = fieldName;
507  }
508 
513  void setObjectPath( string const & objectPath )
514  {
515  m_objectPath = objectPath;
516  }
517 
522  void setScale( real64 const & scale )
523  {
524  m_scale = scale;
525  }
526 
531  void initialCondition( bool isInitialCondition )
532  {
533  m_initialCondition = isInitialCondition;
534  }
535 
540  void addSetName( string const & setName )
541  {
542  m_setNames.emplace_back( setName );
543  }
544 
550  void setMeshObjectPath( Group const & meshBodies );
551 
558  {
559  return *(m_meshObjectPaths.get());
560  }
561 
562 
563 protected:
564 
565 
566 private:
567 
568 
570  string_array m_setNames;
571 
573  string m_objectPath;
574 
575  std::unique_ptr< MeshObjectPath > m_meshObjectPaths;
576 
579  string m_fieldName;
580 
581 
583  int m_component;
584 
586  R1Tensor m_direction;
587 
589  int m_initialCondition;
590 
592  string m_functionName;
593 
595  real64 m_scale;
596 
598  real64 m_beginTime;
599 
601  real64 m_endTime;
602 
604  string m_bcApplicationFunctionName;
605 
607  SetErrorMode m_emptySetErrorMode;
608 };
609 
610 
611 template< typename FIELD_OP, typename POLICY, typename T, int N, int USD >
613  SortedArrayView< localIndex const > const & targetSet,
614  real64 const time,
615  Group & dataGroup ) const
616 {
617  integer const component = getComponent();
618  FunctionManager & functionManager = FunctionManager::getInstance();
619 
620  if( m_functionName.empty() )
621  {
622  real64 const value = m_scale;
623  forAll< POLICY >( targetSet.size(), [=] GEOS_HOST_DEVICE ( localIndex const i )
624  {
625  localIndex const a = targetSet[ i ];
626  FIELD_OP::SpecifyFieldValue( field, a, component, value );
627  } );
628  }
629  else
630  {
631  FunctionBase const & function = [&]() -> FunctionBase const &
632  {
633  try
634  {
635  return functionManager.getGroup< FunctionBase >( m_functionName );
636  }
637  catch( std::exception const & e )
638  {
639  throw InputError( e, GEOS_FMT( "Error while reading {}:\n",
641  }
642  }();
643 
644  if( function.isFunctionOfTime()==2 )
645  {
646  real64 const value = m_scale * function.evaluate( &time );
647  forAll< POLICY >( targetSet.size(), [=] GEOS_HOST_DEVICE ( localIndex const i )
648  {
649  localIndex const a = targetSet[ i ];
650  FIELD_OP::SpecifyFieldValue( field, a, component, value );
651  } );
652  }
653  else
654  {
655  real64_array result( static_cast< localIndex >( targetSet.size() ) );
656  function.evaluate( dataGroup, time, targetSet, result );
657  arrayView1d< real64 const > const & resultView = result.toViewConst();
658  real64 const scale = m_scale;
659  forAll< POLICY >( targetSet.size(), [=] GEOS_HOST_DEVICE ( localIndex const i )
660  {
661  localIndex const a = targetSet[ i ];
662  FIELD_OP::SpecifyFieldValue( field, a, component, scale * resultView[i] );
663  } );
664  }
665  }
666 }
667 
668 
669 template< typename FIELD_OP, typename POLICY >
671  real64 const time,
672  dataRepository::Group & dataGroup,
673  string const & fieldName ) const
674 {
675  dataRepository::WrapperBase & wrapper = dataGroup.getWrapperBase( fieldName );
676 
677  // // This function is used in setting boundary/initial conditions on simulation fields.
678  // // This is meaningful for 1/2/3D real arrays and sometimes 1D integer (indicator) arrays.
681 
682 
683  types::dispatch( FieldTypes{}, [&]( auto tupleOfTypes )
684  {
685  using ArrayType = camp::first< decltype( tupleOfTypes ) >;
686  auto & wrapperT = dataRepository::Wrapper< ArrayType >::cast( wrapper );
687  applyFieldValueKernel< FIELD_OP, POLICY >( wrapperT.reference().toView(), targetSet, time, dataGroup );
688  }, wrapper );
689 }
690 
691 template< typename FIELD_OP, typename POLICY, typename T, int NDIM, int USD >
693  real64 const time,
694  dataRepository::Group const & dataGroup,
695  arrayView1d< globalIndex const > const & dofMap,
696  globalIndex const dofRankOffset,
698  arrayView1d< real64 > const & rhs,
699  ArrayView< T const, NDIM, USD > const & fieldView ) const
700 {
701  integer const component = getComponent();
702  this->applyBoundaryConditionToSystem< FIELD_OP, POLICY >( targetSet, time, dataGroup, dofMap, dofRankOffset, matrix, rhs,
703  [fieldView, component] GEOS_HOST_DEVICE ( localIndex const a )
704  {
705  real64 value = 0.0;
706  FieldSpecificationEqual::readFieldValue( fieldView, a, component, value );
707  return value;
708  } );
709 }
710 
711 template< typename FIELD_OP, typename POLICY >
713  real64 const time,
714  dataRepository::Group const & dataGroup,
715  string const & fieldName,
716  string const & dofMapName,
717  globalIndex const dofRankOffset,
719  arrayView1d< real64 > const & rhs ) const
720 {
721  dataRepository::WrapperBase const & wrapper = dataGroup.getWrapperBase( fieldName );
722  arrayView1d< globalIndex const > const & dofMap = dataGroup.getReference< array1d< globalIndex > >( dofMapName );
723 
724  // We're reading values from a field, which is only well-defined for dims 1 and 2
726  types::dispatch( FieldTypes{}, [&]( auto tupleOfTypes )
727  {
728  using ArrayType = camp::first< decltype( tupleOfTypes ) >;
729  auto const & wrapperT = dataRepository::Wrapper< ArrayType >::cast( wrapper );
730  applyBoundaryConditionToSystemKernel< FIELD_OP, POLICY >( targetSet,
731  time,
732  dataGroup,
733  dofMap,
734  dofRankOffset,
735  matrix,
736  rhs,
737  wrapperT.reference() );
738  }, wrapper );
739 }
740 
741 template< typename FIELD_OP, typename POLICY, typename LAMBDA >
742 void
745  real64 const time,
746  dataRepository::Group const & dataGroup,
747  arrayView1d< globalIndex const > const & dofMap,
748  globalIndex const dofRankOffset,
750  arrayView1d< real64 > const & rhs,
751  LAMBDA && lambda ) const
752 {
753  return applyBoundaryConditionToSystem< FIELD_OP, POLICY >( targetSet,
754  time,
755  1.0,
756  dataGroup,
757  dofMap,
758  dofRankOffset,
759  matrix,
760  rhs,
761  std::forward< LAMBDA >( lambda ) );
762 }
763 
764 template< typename FIELD_OP, typename POLICY, typename LAMBDA >
765 void
768  real64 const time,
769  real64 const dt,
770  dataRepository::Group const & dataGroup,
771  arrayView1d< globalIndex const > const & dofMap,
772  globalIndex const dofRankOffset,
774  arrayView1d< real64 > const & rhs,
775  LAMBDA && lambda ) const
776 {
777  array1d< globalIndex > dofArray( targetSet.size() );
778  arrayView1d< globalIndex > const & dof = dofArray.toView();
779 
780  array1d< real64 > rhsContributionArray( targetSet.size() );
781  arrayView1d< real64 > const & rhsContribution = rhsContributionArray.toView();
782 
783  computeRhsContribution< FIELD_OP, POLICY, LAMBDA >( targetSet,
784  time,
785  dt,
786  dataGroup,
787  dofMap,
788  dofRankOffset,
789  matrix,
790  dof,
791  rhsContribution,
792  std::forward< LAMBDA >( lambda ) );
793 
794  FIELD_OP::template prescribeRhsValues< POLICY >( rhs, dof, dofRankOffset, rhsContribution );
795 }
796 
797 template< typename FIELD_OP, typename POLICY, typename LAMBDA >
798 void
801  real64 const time,
802  real64 const dt,
803  dataRepository::Group const & dataGroup,
804  arrayView1d< globalIndex const > const & dofMap,
805  globalIndex const dofRankOffset,
807  arrayView1d< globalIndex > const & dof,
808  arrayView1d< real64 > const & rhsContribution,
809  LAMBDA && lambda ) const
810 {
811  integer const component = ( getComponent() >=0 ) ? getComponent() : 0;
812  string const & functionName = getReference< string >( viewKeyStruct::functionNameString() );
813  FunctionManager & functionManager = FunctionManager::getInstance();
814 
815  // Compute the value of the rhs terms, and collect the dof numbers
816  // The rhs terms will be assembled in applyBoundaryConditionToSystem (or in the solver for CompositionalMultiphaseBase)
817 
818  if( functionName.empty() || functionManager.getGroup< FunctionBase >( functionName ).isFunctionOfTime() == 2 )
819  {
820  real64 value = m_scale * dt;
821  if( !functionName.empty() )
822  {
823  FunctionBase const & function = functionManager.getGroup< FunctionBase >( functionName );
824  value *= function.evaluate( &time );
825  }
826 
827  forAll< POLICY >( targetSet.size(),
828  [targetSet, dof, dofMap, dofRankOffset, component, matrix, rhsContribution, value, lambda] GEOS_HOST_DEVICE ( localIndex const i )
829  {
830  localIndex const a = targetSet[ i ];
831  dof[ i ] = dofMap[ a ] + component;
832  FIELD_OP::SpecifyFieldValue( dof[ i ],
833  dofRankOffset,
834  matrix,
835  rhsContribution[ i ],
836  value,
837  lambda( a ) );
838  } );
839  }
840  else
841  {
842  FunctionBase const & function = functionManager.getGroup< FunctionBase >( functionName );
843 
844  real64_array resultsArray( targetSet.size() );
845  function.evaluate( dataGroup, time, targetSet, resultsArray );
846  arrayView1d< real64 const > const & results = resultsArray.toViewConst();
847  real64 const value = m_scale * dt;
848 
849  forAll< POLICY >( targetSet.size(),
850  [targetSet, dof, dofMap, dofRankOffset, component, matrix, rhsContribution, results, value, lambda] GEOS_HOST_DEVICE (
851  localIndex const i )
852  {
853  localIndex const a = targetSet[ i ];
854  dof[ i ] = dofMap[ a ] + component;
855  FIELD_OP::SpecifyFieldValue( dof[ i ],
856  dofRankOffset,
857  matrix,
858  rhsContribution[ i ],
859  value * results[ i ],
860  lambda( a ) );
861  } );
862  }
863 }
864 
865 
866 template< typename POLICY >
868  arrayView1d< globalIndex const > const & dofMap,
869  CRSMatrixView< real64, globalIndex const > const & matrix ) const
870 
871 {
872  integer const component = ( getComponent() >=0 ) ? getComponent() : 0;
873  forAll< POLICY >( targetSet.size(), [targetSet, dofMap, matrix, component] GEOS_HOST_DEVICE ( localIndex const i )
874  {
875  localIndex const a = targetSet[ i ];
876  globalIndex const dof = dofMap[ a ] + component;
877 
878  arraySlice1d< real64 > const entries = matrix.getEntries( dof );
879  localIndex const numEntries = matrix.numNonZeros( dof );
880 
881  for( localIndex j = 0; j < numEntries; ++j )
882  {
883  entries[ j ] = 0;
884  }
885  } );
886 }
887 
888 
893  "silent",
894  "error",
895  "warning" );
896 
897 }
898 
899 #endif //GEOS_FIELDSPECIFICATION_FIELDSPECIFICATIONBASE_HPP
#define GEOS_HOST_DEVICE
Marks a host-device function.
Definition: GeosxMacros.hpp:49
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
Definition: GeosxMacros.hpp:84
void computeRhsContribution(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) const
Compute the contributions that will be added/enforced to the right-hand side, and collect the corresp...
void applyFieldValueKernel(ArrayView< T, N, USD > const &field, SortedArrayView< localIndex const > const &targetSet, real64 const time, Group &dataGroup) const
void zeroSystemRowsForBoundaryCondition(SortedArrayView< localIndex const > const &targetSet, arrayView1d< globalIndex const > const &dofMap, CRSMatrixView< real64, globalIndex const > const &matrix) const
Function to zero matrix rows to apply boundary conditions.
FieldSpecificationBase(FieldSpecificationBase &&)=default
Defaulted move constructor.
void addSetName(string const &setName)
virtual ~FieldSpecificationBase() override
virtual const string & getFieldName() const
void setMeshObjectPath(Group const &meshBodies)
Set the Mesh Object Path object.
string_array const & getSetNames() const
void applyBoundaryConditionToSystemKernel(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) const
Apply a boundary condition to a system of equations.
virtual R1Tensor const & getDirection() const
void initialCondition(bool isInitialCondition)
void setObjectPath(string const &objectPath)
FieldSpecificationBase(FieldSpecificationBase const &)=delete
Deleted copy constructor.
void setScale(real64 const &scale)
string const & getFunctionName() const
void applyFieldValue(SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group &dataGroup, string const &fieldname) const
void applyBoundaryConditionToSystem(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) const
Apply a boundary condition to a system of equations.
void setFieldName(string const &fieldName)
FieldSpecificationBase & operator=(FieldSpecificationBase const &)=delete
deleted copy assignment
void apply(MeshLevel &mesh, LAMBDA &&lambda) const
Apply this field specification to the discretization.
MeshObjectPath const & getMeshObjectPaths() const
Get the Mesh Object Paths object.
virtual const string & getObjectPath() const
FieldSpecificationBase & operator=(FieldSpecificationBase &&)=delete
deleted move assignement
FieldSpecificationBase(string const &name, dataRepository::Group *parent)
constructor
integer isFunctionOfTime() const
Test to see if the function is a 1D function of time.
virtual void evaluate(dataRepository::Group const &group, real64 const time, SortedArrayView< localIndex const > const &set, arrayView1d< real64 > const &result) const =0
Method to evaluate a function on a target object.
static FunctionManager & getInstance()
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:42
Class to hold the path to a collection of mesh objects.
void forObjectsInPath(dataRepository::Group &meshBodies, FUNC &&func) const
LLoop over objects in the path and execute a callback function.
This class provides the base class/interface for the catalog value objects.
std::unordered_map< std::string, std::unique_ptr< CatalogInterface< BASETYPE, ARGS... > > > CatalogType
This is the type that will be used for the catalog. The catalog is actually instantiated in the BASET...
bool hasWrapper(LOOKUP_TYPE const &lookup) const
Check if a wrapper exists.
Definition: Group.hpp:1204
GEOS_DECLTYPE_AUTO_RETURN getReference(LOOKUP_TYPE const &lookup) const
Look up a wrapper and get reference to wrapped object.
Definition: Group.hpp:1275
WrapperBase const & getWrapperBase(KEY const &key) const
Return a reference to a WrapperBase stored in this group.
Definition: Group.hpp:1123
T & getGroup(KEY const &key)
Return a reference to a sub-group of the current Group.
Definition: Group.hpp:318
DataContext const & getWrapperDataContext(KEY key) const
Definition: Group.hpp:1356
Base class for all wrappers containing common operations.
Definition: WrapperBase.hpp:56
static Wrapper & cast(WrapperBase &wrapper)
Downcast base to a typed wrapper.
Definition: Wrapper.hpp:221
static string catalogName()
Static Factory Catalog Functions.
virtual const string getCatalogName() const
return the catalog name
SetErrorMode
Indicate the error handling mode.
static CatalogInterface::CatalogType & getCatalog()
static function to return static catalog.
internal::Apply< internal::ArrayType, camp::cartesian_product< TYPES, internal::AddLayouts< NDIMS > > > ArrayTypes
Construct a list of GEOSX multidimensional array types (geos::Array), containing all value types in t...
DimsRange< N, N > DimsSingle
Generate a list of types representing array dimensionality exactly N.
bool dispatch(LIST const combinations, LAMBDA &&lambda, Ts &&... objects)
Dispatch a generic worker function lambda based on runtime type.
internal::Apply< camp::list, LIST > ListofTypeList
Construct a list of list type.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:179
stdVector< string > string_array
A 1-dimensional array of geos::string types.
Definition: DataTypes.hpp:361
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:87
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:84
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
Definition: DataTypes.hpp:183
LvArray::CRSMatrixView< T, COL_INDEX, INDEX_TYPE const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:309
array1d< real64 > real64_array
A 1-dimensional array of geos::real64 types.
Definition: DataTypes.hpp:357
LvArray::SortedArray< T, localIndex, LvArray::ChaiBuffer > SortedArray
A sorted array of local indices.
Definition: DataTypes.hpp:266
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
Definition: DataTypes.hpp:270
int integer
Signed integer type.
Definition: DataTypes.hpp:81
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:175
LvArray::ArrayView< T, NDIM, USD, localIndex, LvArray::ChaiBuffer > ArrayView
Multidimensional array view type. See LvArray:ArrayView for details.
Definition: DataTypes.hpp:147
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "richardson", "preconditioner")
Declare strings associated with enumeration values.
constexpr static char const * initialConditionString()
constexpr static char const * errorSetModeString()
constexpr static char const * constitutivePathString()
constexpr static char const * bcApplicationTableNameString()
constexpr static char const * functionNameString()
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.
Exception class used to report errors in user input.
Definition: Logger.hpp:464
static constexpr char const * setsString()