Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Özgür Ozan Sen
ogs
Commits
34c3926b
Commit
34c3926b
authored
8 years ago
by
Norihiro Watanabe
Browse files
Options
Downloads
Patches
Plain Diff
GlobalMatrix, GlobalVector, and GlobalLinearSolver
parent
9d56a83b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MathLib/LinAlg/GlobalMatrixVectorTypes.h
+20
-41
20 additions, 41 deletions
MathLib/LinAlg/GlobalMatrixVectorTypes.h
NumLib/NumericsConfig.h
+3
-3
3 additions, 3 deletions
NumLib/NumericsConfig.h
with
23 additions
and
44 deletions
MathLib/LinAlg/GlobalMatrixVectorTypes.h
+
20
−
41
View file @
34c3926b
...
...
@@ -21,66 +21,45 @@
#include
"MathLib/LinAlg/Eigen/EigenVector.h"
#include
"MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h"
namespace
detail
{
using
GlobalVectorType
=
MathLib
::
EigenVector
;
using
GlobalMatrixType
=
MathLib
::
EigenMatrix
;
using
GlobalVector
=
MathLib
::
EigenVector
;
using
GlobalMatrix
=
MathLib
::
EigenMatrix
;
using
LinearSolverType
=
MathLib
::
EigenLisLinearSolver
;
}
using
GlobalLinearSolver
=
MathLib
::
EigenLisLinearSolver
;
#elif defined(USE_PETSC)
#include
"MathLib/LinAlg/PETSc/PETScVector.h"
#include
"MathLib/LinAlg/PETSc/PETScMatrix.h"
#include
"MathLib/LinAlg/PETSc/PETScLinearSolver.h"
namespace
detail
{
using
GlobalVectorType
=
MathLib
::
PETScVector
;
using
GlobalMatrixType
=
MathLib
::
PETScMatrix
;
using
LinearSolverType
=
MathLib
::
PETSc
LinearSolve
r
;
}
using
GlobalVector
=
MathLib
::
PETSc
Vecto
r
;
using
GlobalMatrix
=
MathLib
::
PETScMatrix
;
#else
#ifdef OGS_USE_EIGEN
using
GlobalLinearSolver
=
MathLib
::
PETScLinearSolver
;
#elif defined(OGS_USE_EIGEN)
#include
"MathLib/LinAlg/Eigen/EigenVector.h"
#include
"MathLib/LinAlg/Eigen/EigenMatrix.h"
#include
"MathLib/LinAlg/Eigen/EigenLinearSolver.h"
namespace
detail
{
using
GlobalVectorType
=
MathLib
::
EigenVector
;
using
GlobalMatrixType
=
MathLib
::
EigenMatrix
;
using
LinearSolverType
=
MathLib
::
EigenLinearSolver
;
}
#else // OGS_USE_EIGEN
#include
"MathLib/LinAlg/Dense/DenseVector.h"
#include
"MathLib/LinAlg/Dense/GlobalDenseMatrix.h"
#include
"MathLib/LinAlg/Solvers/GaussAlgorithm.h"
namespace
detail
{
using
GlobalVectorType
=
MathLib
::
DenseVector
<
double
>
;
using
GlobalMatrixType
=
MathLib
::
GlobalDenseMatrix
<
double
>
;
using
LinearSolverType
=
MathLib
::
GaussAlgorithm
<
GlobalMatrixType
,
GlobalVectorType
>
;
}
#endif // USE_LIS
using
GlobalVector
=
MathLib
::
EigenVector
;
using
GlobalMatrix
=
MathLib
::
EigenMatrix
;
using
GlobalLinearSolver
=
MathLib
::
EigenLinearSolver
;
#endif // OGS_USE_EIGEN
/// A type used for indexing of global vectors and matrices. It is equal to the
/// GlobalMatrix
Type
::IndexType and the GlobalVector
Type
::IndexType.
static_assert
(
std
::
is_integral
<
detail
::
GlobalMatrix
Type
::
IndexType
>::
value
,
/// GlobalMatrix::IndexType and the GlobalVector::IndexType.
static_assert
(
std
::
is_integral
<
GlobalMatrix
::
IndexType
>::
value
,
"The index type for global matrices is not an integral type."
);
static_assert
(
std
::
is_integral
<
detail
::
GlobalVector
Type
::
IndexType
>::
value
,
static_assert
(
std
::
is_integral
<
GlobalVector
::
IndexType
>::
value
,
"The index type for global vectors is not an integral type."
);
static_assert
(
std
::
is_same
<
detail
::
GlobalMatrix
Type
::
IndexType
,
detail
::
GlobalVector
Type
::
IndexType
>::
value
,
static_assert
(
std
::
is_same
<
GlobalMatrix
::
IndexType
,
GlobalVector
::
IndexType
>::
value
,
"The global matrix and vector index types do not match."
);
// Both types are integral types and equal, define a single GlobalIndexType.
using
GlobalIndexType
=
detail
::
GlobalMatrix
Type
::
IndexType
;
using
GlobalIndexType
=
GlobalMatrix
::
IndexType
;
using
GlobalSparsityPattern
=
MathLib
::
SparsityPattern
<
GlobalIndexType
>
;
...
...
This diff is collapsed.
Click to expand it.
NumLib/NumericsConfig.h
+
3
−
3
View file @
34c3926b
...
...
@@ -30,8 +30,8 @@ namespace detail
{
using
GlobalVectorMatrixBuilderType
=
NumLib
::
VectorMatrixBuilder
<
GlobalMatrix
Type
,
GlobalVector
Type
>
;
GlobalMatrix
,
GlobalVector
>
;
}
//
...
...
@@ -51,7 +51,7 @@ using GlobalSetupType =
NumLib
::
GlobalSetup
<
detail
::
GlobalVectorMatrixBuilderType
,
detail
::
GlobalExecutorType
,
detail
::
LinearSolver
Type
>
;
Global
LinearSolver
>
;
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment