Skip to content

Commit 58a47e3

Browse files
committed
Add Tpetra-based Trilinos interface. Refactor LAI vector unit tests.
1 parent 2d6771d commit 58a47e3

68 files changed

Lines changed: 4373 additions & 1285 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: minimal
22

33
env:
44
global:
5-
- GEOSX_TPL_TAG=123-507
5+
- GEOSX_TPL_TAG=120-511
66
- secure: CGs2uH6efq1Me6xJWRr0BnwtwxoujzlowC4FHXHdWbNOkPsXf7nCgdaW5vthfD3bhnOeEUQSrfxdhTRtyU/NfcKLmKgGBnZOdUG4/JJK4gDSJ2Wp8LZ/mB0QEoODKVxbh+YtoAiHe3y4M9PGCs+wkNDw/3eEU00cK12DZ6gad0RbLjI3xkhEr/ZEZDZkcYg9yHAhl5bmpqoh/6QGnIg8mxIqdAtGDw+6tT0EgUqjeqc5bG5WwsamKzJItHSXD5zx8IJAlgDk4EzEGjZe0m56YnNfb9iwqqUsmL3Cuwgs7ByVDYw78JC5Kv42YqoxA5BxMT2mFsEe37TpYNXlzofU7ma2Duw9DGXWQd4IkTCcBxlyR0I0bfo0TmgO+y7PYG9lIyHPUkENemdozsZcWamqqkqegiEdRhDVYlSRo3mu7iCwTS6ZTALliVyEYjYxYb7oAnR3cNywXjblTCI8oKfgLSY+8WijM9SRl57JruIHLkLMCjmRI+cZBfv5tS2tYQTBPkygGrigrrN77ZiC7/TGyfggSN0+y0oYtOAgqEnBcKcreiibMW7tKcV2Z1RFD9ZvIkSc1EXLUPDP8FX1oyhmqBMqVo8LksrYLDJHQ05+F3YNgl2taSt7uMjQ4e8iZ3/IjFeMnbylDw+cj/RbS520HXsFPbWFm2Pb9pceA9n6GnY=
77

88
# The integrated test repository contains large data (using git lfs) and we do not use them here.
@@ -17,7 +17,7 @@ geosx_before_script: &geosx_before_script
1717
- git submodule update --init src/externalComponents/PAMELA
1818
- git submodule update --init --recursive src/coreComponents/fileIO/coupling/hdf5_interface
1919
- git submodule update --init --recursive src/coreComponents/physicsSolvers/GEOSX_PTP
20-
20+
2121

2222
geosx_linux_build: &geosx_linux_build
2323
services: docker

integratedTests

src/cmake/GeosxOptions.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,22 @@ option( ENABLE_SUITESPARSE "Enables SUITESPARSE" ON )
5151

5252
### LAI SETUP ###
5353

54-
set( supported_LAI Trilinos Hypre Petsc )
54+
set( supported_LAI Trilinos TrilinosTpetra Hypre Petsc )
5555
set( GEOSX_LA_INTERFACE "Trilinos" CACHE STRING "Linear algebra interface to use in solvers" )
56-
message( STATUS "GEOSX_LA_INTERFACE = ${GEOSX_LA_INTERFACE}" )
56+
message( "GEOSX_LA_INTERFACE = ${GEOSX_LA_INTERFACE}" )
5757

5858
if( NOT ( GEOSX_LA_INTERFACE IN_LIST supported_LAI ) )
5959
message( FATAL_ERROR "GEOSX_LA_INTERFACE must be one of: ${supported_LAI}" )
6060
endif()
6161

6262
string( TOUPPER "${GEOSX_LA_INTERFACE}" upper_LAI )
63-
if( NOT ENABLE_${upper_LAI} )
64-
message( FATAL_ERROR "${GEOSX_LA_INTERFACE} LA interface is selected, but ENABLE_${upper_LAI} is OFF" )
65-
endif()
6663
option( GEOSX_LA_INTERFACE_${upper_LAI} "${upper_LAI} LA interface is selected" ON )
6764

65+
string( REPLACE "TPETRA" "" dep_LAI "${upper_LAI}" )
66+
if( NOT ENABLE_${dep_LAI} )
67+
message( FATAL_ERROR "${GEOSX_LA_INTERFACE} LA interface is selected, but ENABLE_${dep_LAI} is OFF" )
68+
endif()
69+
6870
### MPI/OMP/CUDA SETUP ###
6971

7072
option( ENABLE_MPI "" ON )

src/coreComponents/LvArray

src/coreComponents/common/GeosxConfig.hpp.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
#cmakedefine GEOSX_LA_INTERFACE @GEOSX_LA_INTERFACE@
7676
/// Macro defined when Trilinos interface is selected
7777
#cmakedefine GEOSX_LA_INTERFACE_TRILINOS
78+
/// Macro defined when Trilinos interface is selected
79+
#cmakedefine GEOSX_LA_INTERFACE_TRILINOSTPETRA
7880
/// Macro defined when Hypre interface is selected
7981
#cmakedefine GEOSX_LA_INTERFACE_HYPRE
8082
/// Macro defined when PETSc interface is selected

src/coreComponents/fileIO/schema/docs/LinearSolverParameters.rst

Lines changed: 82 additions & 56 deletions
Large diffs are not rendered by default.

src/coreComponents/fileIO/schema/schema.xsd

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -575,14 +575,38 @@
575575
<xsd:attribute name="name" type="string" use="required" />
576576
</xsd:complexType>
577577
<xsd:complexType name="LinearSolverParametersType">
578-
<!--amgCoarseSolver => AMG coarsest level solver/smoother type
579-
Available options are: jacobi, gaussSeidel, blockGaussSeidel, chebyshev, direct-->
580-
<xsd:attribute name="amgCoarseSolver" type="string" default="direct" />
578+
<!--amgCoarseSolver => AMG coarsest level solver/smoother type. Valid options (not all may be supported by linear algebra package):
579+
* none
580+
* jacobi
581+
* gs
582+
* sgs
583+
* chebyshev
584+
* iluk
585+
* ilut
586+
* icc
587+
* ict
588+
* amg
589+
* mgr
590+
* block
591+
* direct-->
592+
<xsd:attribute name="amgCoarseSolver" type="geosx_LinearSolverParameters_PreconditionerType" default="direct" />
581593
<!--amgNumSweeps => AMG smoother sweeps-->
582594
<xsd:attribute name="amgNumSweeps" type="integer" default="2" />
583-
<!--amgSmootherType => AMG smoother type
584-
Available options are: jacobi, blockJacobi, gaussSeidel, blockGaussSeidel, chebyshev, icc, ilu, ilut-->
585-
<xsd:attribute name="amgSmootherType" type="string" default="gaussSeidel" />
595+
<!--amgSmootherType => AMG smoother type. Valid options (not all may be supported by linear algebra package):
596+
* none
597+
* jacobi
598+
* gs
599+
* sgs
600+
* chebyshev
601+
* iluk
602+
* ilut
603+
* icc
604+
* ict
605+
* amg
606+
* mgr
607+
* block
608+
* direct-->
609+
<xsd:attribute name="amgSmootherType" type="geosx_LinearSolverParameters_PreconditionerType" default="gs" />
586610
<!--amgThreshold => AMG strength-of-connection threshold-->
587611
<xsd:attribute name="amgThreshold" type="real64" default="0" />
588612
<!--directCheckResTol => Tolerance used to check a direct solver solution-->
@@ -631,13 +655,15 @@ the relative residual norm satisfies:
631655
* jacobi
632656
* gs
633657
* sgs
658+
* chebyshev
634659
* iluk
635660
* ilut
636661
* icc
637662
* ict
638663
* amg
639664
* mgr
640-
* block-->
665+
* block
666+
* direct-->
641667
<xsd:attribute name="preconditionerType" type="geosx_LinearSolverParameters_PreconditionerType" default="iluk" />
642668
<!--solverType => Linear solver type. Available options are:
643669
* direct
@@ -650,6 +676,11 @@ the relative residual norm satisfies:
650676
<!--stopIfError => Whether to stop the simulation if the linear solver reports an error-->
651677
<xsd:attribute name="stopIfError" type="integer" default="1" />
652678
</xsd:complexType>
679+
<xsd:simpleType name="geosx_LinearSolverParameters_PreconditionerType">
680+
<xsd:restriction base="xsd:string">
681+
<xsd:pattern value=".*[\[\]`$].*|none|jacobi|gs|sgs|chebyshev|iluk|ilut|icc|ict|amg|mgr|block|direct" />
682+
</xsd:restriction>
683+
</xsd:simpleType>
653684
<xsd:simpleType name="geosx_LinearSolverParameters_Direct_ColPerm">
654685
<xsd:restriction base="xsd:string">
655686
<xsd:pattern value=".*[\[\]`$].*|none|MMD_AtplusA|MMD_AtA|colAMD|metis|parmetis" />
@@ -660,11 +691,6 @@ the relative residual norm satisfies:
660691
<xsd:pattern value=".*[\[\]`$].*|none|mc64" />
661692
</xsd:restriction>
662693
</xsd:simpleType>
663-
<xsd:simpleType name="geosx_LinearSolverParameters_PreconditionerType">
664-
<xsd:restriction base="xsd:string">
665-
<xsd:pattern value=".*[\[\]`$].*|none|jacobi|gs|sgs|iluk|ilut|icc|ict|amg|mgr|block" />
666-
</xsd:restriction>
667-
</xsd:simpleType>
668694
<xsd:simpleType name="geosx_LinearSolverParameters_SolverType">
669695
<xsd:restriction base="xsd:string">
670696
<xsd:pattern value=".*[\[\]`$].*|direct|cg|gmres|fgmres|bicgstab|preconditioner" />

src/coreComponents/finiteVolume/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ set( finiteVolume_sources
2626
)
2727

2828
if ( BUILD_OBJ_LIBS )
29-
set( dependencyList dataRepository codingUtilities managers)
29+
set( dependencyList dataRepository codingUtilities managers )
3030
else()
31-
set( dependencyList common)
31+
set( dependencyList common managers )
3232
endif()
3333

3434
if ( ENABLE_OPENMP )

src/coreComponents/linearAlgebra/CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,27 @@ if( ENABLE_TRILINOS )
6363
interfaces/trilinos/EpetraMatrix.hpp
6464
interfaces/trilinos/EpetraVector.hpp
6565
interfaces/trilinos/EpetraUtils.hpp
66+
interfaces/trilinos/TpetraMatrix.hpp
67+
interfaces/trilinos/TpetraVector.hpp
68+
interfaces/trilinos/TpetraUtils.hpp
6669
interfaces/trilinos/TrilinosPreconditioner.hpp
70+
interfaces/trilinos/TrilinosTpetraPreconditioner.hpp
6771
interfaces/trilinos/TrilinosSolver.hpp
68-
interfaces/trilinos/TrilinosInterface.hpp )
72+
interfaces/trilinos/TrilinosTpetraSolver.hpp
73+
interfaces/trilinos/TrilinosInterface.hpp
74+
interfaces/trilinos/TrilinosTpetraInterface.hpp )
6975

7076
list( APPEND linearAlgebra_sources
7177
interfaces/trilinos/EpetraMatrix.cpp
7278
interfaces/trilinos/EpetraVector.cpp
79+
interfaces/trilinos/TpetraMatrix.cpp
80+
interfaces/trilinos/TpetraVector.cpp
7381
interfaces/trilinos/TrilinosPreconditioner.cpp
82+
interfaces/trilinos/TrilinosTpetraPreconditioner.cpp
7483
interfaces/trilinos/TrilinosSolver.cpp
75-
interfaces/trilinos/TrilinosInterface.cpp )
84+
interfaces/trilinos/TrilinosTpetraSolver.cpp
85+
interfaces/trilinos/TrilinosInterface.cpp
86+
interfaces/trilinos/TrilinosTpetraInterface.cpp )
7687

7788
list( APPEND dependencyList trilinos )
7889

src/coreComponents/linearAlgebra/DofManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,7 @@ void DofManager::printFieldInfo( std::ostream & os ) const
19831983

19841984
#ifdef GEOSX_USE_TRILINOS
19851985
MAKE_DOFMANAGER_METHOD_INST( TrilinosInterface )
1986+
MAKE_DOFMANAGER_METHOD_INST( TrilinosTpetraInterface )
19861987
#endif
19871988

19881989
#ifdef GEOSX_USE_HYPRE

0 commit comments

Comments
 (0)