Skip to content

Commit 6b68f4c

Browse files
committed
Add Tpetra-based Trilinos interface. Refactor LAI vector unit tests.
1 parent 3abe550 commit 6b68f4c

File tree

66 files changed

+4304
-1267
lines changed

Some content is hidden

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

66 files changed

+4304
-1267
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: minimal
22

33
env:
44
global:
5-
- GEOSX_TPL_TAG=121-439
5+
- GEOSX_TPL_TAG=120-447
66

77
# The integrated test repository contains large data (using git lfs) and we do not use them here.
88
# To save time (and money) we do not let travis automatically clone all our (lfs) subrepositories and do it by hand.

integratedTests

src/cmake/GeosxOptions.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,22 @@ option( ENABLE_PETSC "Enables PETSC" OFF )
5050

5151
### LAI SETUP ###
5252

53-
set( supported_LAI Trilinos Hypre Petsc )
53+
set( supported_LAI Trilinos TrilinosTpetra Hypre Petsc )
5454
set( GEOSX_LA_INTERFACE "Trilinos" CACHE STRING "Linear algebra interface to use in solvers" )
55-
message( STATUS "GEOSX_LA_INTERFACE = ${GEOSX_LA_INTERFACE}" )
55+
message( "GEOSX_LA_INTERFACE = ${GEOSX_LA_INTERFACE}" )
5656

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

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

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

6971
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
@@ -72,6 +72,8 @@
7272
#cmakedefine GEOSX_LA_INTERFACE @GEOSX_LA_INTERFACE@
7373
/// Macro defined when Trilinos interface is selected
7474
#cmakedefine GEOSX_LA_INTERFACE_TRILINOS
75+
/// Macro defined when Trilinos interface is selected
76+
#cmakedefine GEOSX_LA_INTERFACE_TRILINOSTPETRA
7577
/// Macro defined when Hypre interface is selected
7678
#cmakedefine GEOSX_LA_INTERFACE_HYPRE
7779
/// Macro defined when PETSc interface is selected

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

Lines changed: 66 additions & 40 deletions
Large diffs are not rendered by default.

src/coreComponents/fileIO/schema/schema.xsd

Lines changed: 34 additions & 8 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
<!--iluFill => ILU(K) fill factor-->
@@ -609,13 +633,15 @@ the relative residual norm satisfies:
609633
* jacobi
610634
* gs
611635
* sgs
636+
* chebyshev
612637
* iluk
613638
* ilut
614639
* icc
615640
* ict
616641
* amg
617642
* mgr
618-
* block-->
643+
* block
644+
* direct-->
619645
<xsd:attribute name="preconditionerType" type="geosx_LinearSolverParameters_PreconditionerType" default="iluk" />
620646
<!--solverType => Linear solver type. Available options are:
621647
* direct
@@ -628,7 +654,7 @@ the relative residual norm satisfies:
628654
</xsd:complexType>
629655
<xsd:simpleType name="geosx_LinearSolverParameters_PreconditionerType">
630656
<xsd:restriction base="xsd:string">
631-
<xsd:pattern value=".*[\[\]`$].*|none|jacobi|gs|sgs|iluk|ilut|icc|ict|amg|mgr|block" />
657+
<xsd:pattern value=".*[\[\]`$].*|none|jacobi|gs|sgs|chebyshev|iluk|ilut|icc|ict|amg|mgr|block|direct" />
632658
</xsd:restriction>
633659
</xsd:simpleType>
634660
<xsd:simpleType name="geosx_LinearSolverParameters_SolverType">

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)