Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
MoReFEM
CoreLibrary
MoReFEM
Commits
b0931cb1
Commit
b0931cb1
authored
Jun 25, 2020
by
GILLES Sebastien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1536
Remove MatrixOperations that were half baked and not used (to my knowledge).
parent
e69bf7cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
180 deletions
+2
-180
Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp
...ces/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp
+1
-101
Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx
...ces/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx
+1
-79
No files found.
Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp
View file @
b0931cb1
...
...
@@ -475,107 +475,7 @@ namespace MoReFEM
DoReuseMatrix
do_reuse_matrix
=
DoReuseMatrix
::
no
);
/*!
* \brief Wrapper over MatGetOrdering, gets a reordering for a matrix to reduce fill or to improve numerical stability of LU factorization.
*
* \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/MatOrderings/MatGetOrdering.html#MatGetOrdering
* for more details.
*
* \param[in] A Matrix to get the ordering.
* \param[in] type Type of the ordering.
* \param[in] rperm Row permutation for the ordering.
* \param[in] cperm Column permutation for the ordering.
* \copydetails doxygen_hide_invoking_file_and_line
*
*/
template
<
class
MatrixT
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
,
void
>
GetOrdering
(
MatrixT
&
A
,
MatOrderingType
type
,
IS
*
rperm
,
IS
*
cperm
,
const
char
*
invoking_file
,
int
invoking_line
);
/*!
* \brief Wrapper over MatLUFactor, that performs in-place LU factorization of matrix.
*
* \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatLUFactor.html#MatLUFactor
* for more details.
*
* \param[in] A Matrix to factor.
* \param[in] row Result of the GetOrdering.
* \param[in] col Result of the GetOrdering.
* \param[in] info Info of LUFactor.
* \copydetails doxygen_hide_invoking_file_and_line
*
*/
template
<
class
MatrixT
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
,
void
>
LUFactor
(
MatrixT
&
A
,
IS
row
,
IS
col
,
const
MatFactorInfo
*
info
,
const
char
*
invoking_file
,
int
invoking_line
);
/*!
* \brief Wrapper over MatMatSolve, solves A X = B, given a factored matrix.
*
* \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMatSolve.html
* for more details.
*
* \param[in] A See formula above.
* \param[in] B See formula above.
* \param[in] X See formula above.
* \copydetails doxygen_hide_invoking_file_and_line
*
*/
template
<
class
MatrixT
,
class
MatrixU
,
class
MatrixV
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
&&
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixU
>::
value
&&
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixV
>::
value
,
void
>
MatMatSolve
(
const
MatrixT
&
A
,
const
MatrixU
&
B
,
MatrixV
&
X
,
const
char
*
invoking_file
,
int
invoking_line
);
/*!
* \brief Wrapper over MatCholeskyFactor, that performs in-place Cholesky factorization of a symmetric matrix.
*
* \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCholeskyFactor.html
* for more details.
*
* \attention Not used yet, but might be useful in midterm developments. If finally too unwieldy for our
* purposes it will be removed.
*
* \param[in] mat Matrix to factor.
* \param[in] perm Result of the GetOrdering, row and column permutations.
* \param[in] info Info of CholeskyFactor.
* \copydetails doxygen_hide_invoking_file_and_line
*
*/
template
<
class
MatrixT
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
,
void
>
CholeskyFactor
(
MatrixT
&
mat
,
IS
perm
,
const
MatFactorInfo
*
info
,
const
char
*
invoking_file
,
int
invoking_line
);
}
//namespace Petsc
}
// namespace Petsc
}
// namespace Wrappers
...
...
Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx
View file @
b0931cb1
...
...
@@ -528,85 +528,7 @@ namespace MoReFEM
}
template
<
class
MatrixT
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
,
void
>
GetOrdering
(
MatrixT
&
A
,
MatOrderingType
type
,
IS
*
rperm
,
IS
*
cperm
,
const
char
*
invoking_file
,
int
invoking_line
)
{
int
error_code
=
::
MatGetOrdering
(
A
.
InternalForReadOnly
(),
type
,
rperm
,
cperm
);
if
(
error_code
)
throw
ExceptionNS
::
Exception
(
error_code
,
"MatGetOrdering"
,
invoking_file
,
invoking_line
);
}
template
<
class
MatrixT
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
,
void
>
LUFactor
(
MatrixT
&
A
,
IS
row
,
IS
col
,
const
MatFactorInfo
*
info
,
const
char
*
invoking_file
,
int
invoking_line
)
{
int
error_code
=
::
MatLUFactor
(
A
.
Internal
(),
row
,
col
,
info
);
if
(
error_code
)
throw
ExceptionNS
::
Exception
(
error_code
,
"MatLUFactor"
,
invoking_file
,
invoking_line
);
}
template
<
class
MatrixT
,
class
MatrixU
,
class
MatrixV
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
&&
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixU
>::
value
&&
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixV
>::
value
,
void
>
MatMatSolve
(
const
MatrixT
&
A
,
const
MatrixU
&
B
,
MatrixV
&
X
,
const
char
*
invoking_file
,
int
invoking_line
)
{
int
error_code
=
::
MatMatSolve
(
A
.
InternalForReadOnly
(),
B
.
InternalForReadOnly
(),
X
.
Internal
());
if
(
error_code
)
throw
ExceptionNS
::
Exception
(
error_code
,
"MatMatSolve"
,
invoking_file
,
invoking_line
);
}
template
<
class
MatrixT
>
std
::
enable_if_t
<
std
::
is_base_of
<
Internal
::
Wrappers
::
Petsc
::
BaseMatrix
,
MatrixT
>::
value
,
void
>
CholeskyFactor
(
MatrixT
&
mat
,
IS
perm
,
const
MatFactorInfo
*
info
,
const
char
*
invoking_file
,
int
invoking_line
)
{
int
error_code
=
::
MatCholeskyFactor
(
mat
.
Internal
(),
perm
,
info
);
if
(
error_code
)
throw
ExceptionNS
::
Exception
(
error_code
,
"MatCholeskyFactor"
,
invoking_file
,
invoking_line
);
}
}
//namespace Petsc
}
// namespace Petsc
}
// namespace Wrappers
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment