Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MoReFEM
CoreLibrary
MoReFEM
Commits
6f93b23f
Commit
6f93b23f
authored
Nov 02, 2015
by
GILLES Sebastien
Browse files
#729
ThirdParty/Snes: introduce Umfpack solver.
parent
efcb4578
Changes
6
Hide whitespace changes
Inline
Side-by-side
HappyHeart.xcodeproj/project.pbxproj
View file @
6f93b23f
...
...
@@ -346,6 +346,9 @@
BE4F2D9D1BE7FA5700FFF373 /* Gmres.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4F2D9A1BE7FA5700FFF373 /* Gmres.cpp */; };
BE4F2D9E1BE7FA5700FFF373 /* Gmres.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4F2D9B1BE7FA5700FFF373 /* Gmres.hpp */; };
BE4F2D9F1BE7FA5700FFF373 /* Gmres.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE4F2D9C1BE7FA5700FFF373 /* Gmres.hxx */; };
BE4F2DA31BE7FFDE00FFF373 /* Umfpack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4F2DA01BE7FFDD00FFF373 /* Umfpack.cpp */; };
BE4F2DA41BE7FFDE00FFF373 /* Umfpack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4F2DA11BE7FFDE00FFF373 /* Umfpack.hpp */; };
BE4F2DA51BE7FFDE00FFF373 /* Umfpack.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE4F2DA21BE7FFDE00FFF373 /* Umfpack.hxx */; };
BE501D041A2DC03900B92486 /* MatrixOrVector.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE501D031A2DC03900B92486 /* MatrixOrVector.hpp */; };
BE51121D1BDFB56600CB5D1E /* main_aitken.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE51121C1BDFB56600CB5D1E /* main_aitken.cpp */; };
BE55781C1BE250670097FB58 /* Solver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5578191BE250670097FB58 /* Solver.cpp */; };
...
...
@@ -3771,6 +3774,9 @@
BE4F2D9A1BE7FA5700FFF373 /* Gmres.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Gmres.cpp; path = Solver/Instantiations/Gmres.cpp; sourceTree = "<group>"; };
BE4F2D9B1BE7FA5700FFF373 /* Gmres.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Gmres.hpp; path = Solver/Instantiations/Gmres.hpp; sourceTree = "<group>"; };
BE4F2D9C1BE7FA5700FFF373 /* Gmres.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Gmres.hxx; path = Solver/Instantiations/Gmres.hxx; sourceTree = "<group>"; };
BE4F2DA01BE7FFDD00FFF373 /* Umfpack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Umfpack.cpp; path = Solver/Instantiations/Umfpack.cpp; sourceTree = "<group>"; };
BE4F2DA11BE7FFDE00FFF373 /* Umfpack.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Umfpack.hpp; path = Solver/Instantiations/Umfpack.hpp; sourceTree = "<group>"; };
BE4F2DA21BE7FFDE00FFF373 /* Umfpack.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Umfpack.hxx; path = Solver/Instantiations/Umfpack.hxx; sourceTree = "<group>"; };
BE4FC35A18F2AE87007B6DED /* QuadratureRuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QuadratureRuleList.cpp; sourceTree = "<group>"; };
BE4FC35B18F2AE87007B6DED /* QuadratureRuleList.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = QuadratureRuleList.hpp; sourceTree = "<group>"; };
BE501D031A2DC03900B92486 /* MatrixOrVector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MatrixOrVector.hpp; sourceTree = "<group>"; };
...
...
@@ -5688,6 +5694,9 @@
BE4F2D9A1BE7FA5700FFF373 /* Gmres.cpp */,
BE4F2D9B1BE7FA5700FFF373 /* Gmres.hpp */,
BE4F2D9C1BE7FA5700FFF373 /* Gmres.hxx */,
BE4F2DA01BE7FFDD00FFF373 /* Umfpack.cpp */,
BE4F2DA11BE7FFDE00FFF373 /* Umfpack.hpp */,
BE4F2DA21BE7FFDE00FFF373 /* Umfpack.hxx */,
);
name = Instantiations;
sourceTree = "<group>";
...
...
@@ -8661,6 +8670,7 @@
BE90E18C1A24929A00CCAFDE /* CSRPattern.hpp in Headers */,
BE90E17D1A24929A00CCAFDE /* Base.hxx in Headers */,
BE90E1931A24929A00CCAFDE /* UniqueId.hxx in Headers */,
BE4F2DA41BE7FFDE00FFF373 /* Umfpack.hpp in Headers */,
BE90E1C41A2492AA00CCAFDE /* SubVector.hxx in Headers */,
BE41A8C61A24AA30004E4312 /* Parmetis.hpp in Headers */,
BE90E17B1A24926E00CCAFDE /* Singleton.hpp in Headers */,
...
...
@@ -8784,6 +8794,7 @@
BE768EAC1B833366009B24CB /* TupleItem.hpp in Headers */,
BE90E1D81A2492AA00CCAFDE /* Directory.hpp in Headers */,
BE90E1921A24929A00CCAFDE /* UniqueId.hpp in Headers */,
BE4F2DA51BE7FFDE00FFF373 /* Umfpack.hxx in Headers */,
BE90E1D31A2492AA00CCAFDE /* Logs.hpp in Headers */,
BE90E1B81A24929A00CCAFDE /* Petsc.hpp in Headers */,
BE4335D41BE7C47300802A82 /* Mumps.hpp in Headers */,
...
...
@@ -10434,6 +10445,7 @@
BE90E1AC1A24929A00CCAFDE /* MatrixPattern.cpp in Sources */,
BE4B17D51AA5B20D0073516A /* Print.cpp in Sources */,
BE5697AF1BE396E100B2EC67 /* ShellMatrix.cpp in Sources */,
BE4F2DA31BE7FFDE00FFF373 /* Umfpack.cpp in Sources */,
BE90E16D1A24926E00CCAFDE /* BoolArray.cpp in Sources */,
BE41E96D1AC3F92A0072C8E6 /* EmptyString.cpp in Sources */,
BE90E1A91A24929A00CCAFDE /* Matrix.cpp in Sources */,
...
...
Sources/ThirdParty/Wrappers/Petsc/Solver/Instantiations/Umfpack.cpp
0 → 100644
View file @
6f93b23f
//
// Umfpack.cpp
// HappyHeart
//
// Created by Sebastien Gilles on 02/11/15.
// Copyright © 2015 Inria. All rights reserved.
//
#include
"ThirdParty/Wrappers/Petsc/Solver/Instantiations/Umfpack.hpp"
#include
"ThirdParty/Wrappers/Petsc/Solver/Snes.hpp"
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
namespace
Instantiations
{
Umfpack
::
Umfpack
()
:
parent
(
solver_type
::
direct
)
{
}
void
Umfpack
::
SetSolveLinearOptions
(
Snes
&
snes
,
const
char
*
invoking_file
,
int
invoking_line
)
{
static_cast
<
void
>
(
snes
);
static_cast
<
void
>
(
invoking_file
);
static_cast
<
void
>
(
invoking_line
);
}
void
Umfpack
::
SupplInitOptions
(
Snes
&
snes
,
const
char
*
invoking_file
,
int
invoking_line
)
{
static_cast
<
void
>
(
snes
);
static_cast
<
void
>
(
invoking_file
);
static_cast
<
void
>
(
invoking_line
);
}
const
std
::
string
&
Umfpack
::
GetPetscName
()
const
noexcept
{
static
std
::
string
ret
(
MATSOLVERUMFPACK
);
return
ret
;
}
}
//namespace Instantiations
}
//namespace Petsc
}
//namespace Wrappers
}
// namespace HappyHeart
Sources/ThirdParty/Wrappers/Petsc/Solver/Instantiations/Umfpack.hpp
0 → 100644
View file @
6f93b23f
//
// Umfpack.hpp
// HappyHeart
//
// Created by Sebastien Gilles on 02/11/15.
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_UMFPACK_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_UMFPACK_HPP_
# include <memory>
# include <vector>
# include "ThirdParty/Wrappers/Petsc/Solver/Private/Solver.hpp"
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
namespace
Instantiations
{
class
Umfpack
final
:
public
Private
::
Solver
{
public:
//! Alias to parent.
using
parent
=
Private
::
Solver
;
//! Alias to self.
using
self
=
Umfpack
;
//! Alias to unique pointer.
using
unique_ptr
=
std
::
unique_ptr
<
self
>
;
public:
/// \name Special members.
///@{
//! Constructor.
explicit
Umfpack
();
//! Destructor.
~
Umfpack
()
=
default
;
//! Copy constructor.
Umfpack
(
const
Umfpack
&
)
=
delete
;
//! Move constructor.
Umfpack
(
Umfpack
&&
)
=
delete
;
//! Copy affectation.
Umfpack
&
operator
=
(
const
Umfpack
&
)
=
delete
;
//! Move affectation.
Umfpack
&
operator
=
(
Umfpack
&&
)
=
delete
;
///@}
private:
//! Set the options that are specific to the solver.
void
SetSolveLinearOptions
(
Snes
&
snes
,
const
char
*
invoking_file
,
int
invoking_line
)
override
;
//! Set the options that are specific to the solver.
void
SupplInitOptions
(
Snes
&
snes
,
const
char
*
invoking_file
,
int
invoking_line
)
override
;
/*!
* \brief Name of the solver used in Petsc.
*
* \internal The Petsc functions in which this name might be used depends on the type of the solver.
*/
const
std
::
string
&
GetPetscName
()
const
noexcept
override
;
};
}
//namespace Instantiations
}
//namespace Petsc
}
//namespace Wrappers
}
// namespace HappyHeart
# include "ThirdParty/Wrappers/Petsc/Solver/Instantiations/Umfpack.hxx"
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_UMFPACK_HPP_
Sources/ThirdParty/Wrappers/Petsc/Solver/Instantiations/Umfpack.hxx
0 → 100644
View file @
6f93b23f
//
// Umfpack.hxx
// HappyHeart
//
// Created by Sebastien Gilles on 02/11/15.
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_UMFPACK_HXX_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_UMFPACK_HXX_
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
namespace
Instantiations
{
}
//namespace Instantiations
}
//namespace Petsc
}
//namespace Wrappers
}
// namespace HappyHeart
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_UMFPACK_HXX_
Sources/ThirdParty/Wrappers/Petsc/Solver/Snes.cpp
View file @
6f93b23f
...
...
@@ -52,9 +52,7 @@ namespace HappyHeart
else
if
(
solver_name
==
"Gmres"
)
solver_
=
std
::
make_unique
<
Instantiations
::
Gmres
>
(
gmres_restart
);
else
if
(
solver_name
==
"Umfpack"
)
{
assert
(
false
&&
"Not implemented yet"
);
}
solver_
=
std
::
make_unique
<
Instantiations
::
Umfpack
>
();
else
{
assert
(
false
&&
"All legit choices should be addressed here!"
);
...
...
Sources/ThirdParty/Wrappers/Petsc/Solver/Snes.hpp
View file @
6f93b23f
...
...
@@ -21,7 +21,7 @@
#include
"ThirdParty/Wrappers/Petsc/Exceptions/Petsc.hpp"
#include
"ThirdParty/Wrappers/Petsc/Solver/Instantiations/Mumps.hpp"
#include
"ThirdParty/Wrappers/Petsc/Solver/Instantiations/Gmres.hpp"
#include
"ThirdParty/Wrappers/Petsc/Solver/Instantiations/Umfpack.hpp"
#include
"Utilities/TimeKeep/TimeKeep.hpp"
...
...
@@ -66,8 +66,8 @@ namespace HappyHeart
//! Friendship to helper class.
// \todo #729 I don't like having to put the list here; improve that!
friend
Instantiations
::
Mumps
;
friend
Instantiations
::
Gmres
;
friend
Instantiations
::
Gmres
;
friend
Instantiations
::
Umfpack
;
public:
...
...
Write
Preview
Supports
Markdown
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