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
cd3d8744
Commit
cd3d8744
authored
Nov 02, 2015
by
GILLES Sebastien
Browse files
#729
ThirdParty/Snes: begin the new scheme to tailor the class for all different solvers.
parent
0d00eee4
Changes
13
Hide whitespace changes
Inline
Side-by-side
HappyHeart.xcodeproj/project.pbxproj
View file @
cd3d8744
...
...
@@ -260,6 +260,13 @@
BE41E97C1AC460380072C8E6 /* EnumUnknown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE41E97B1AC460380072C8E6 /* EnumUnknown.cpp */; };
BE42A43B1A5D650E00B3FF6B /* InitTimeKeepLog.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE42A4381A5D650E00B3FF6B /* InitTimeKeepLog.hpp */; };
BE42A43C1A5D650E00B3FF6B /* InitTimeKeepLog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE42A4391A5D650E00B3FF6B /* InitTimeKeepLog.hxx */; };
BE4335C41BE7C05700802A82 /* Enum.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4335BF1BE7C05700802A82 /* Enum.hpp */; };
BE4335CC1BE7C22F00802A82 /* Solver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4335C91BE7C22F00802A82 /* Solver.cpp */; };
BE4335CD1BE7C22F00802A82 /* Solver.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4335CA1BE7C22F00802A82 /* Solver.hpp */; };
BE4335CE1BE7C22F00802A82 /* Solver.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE4335CB1BE7C22F00802A82 /* Solver.hxx */; };
BE4335D31BE7C47300802A82 /* Mumps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4335D01BE7C47300802A82 /* Mumps.cpp */; };
BE4335D41BE7C47300802A82 /* Mumps.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4335D11BE7C47300802A82 /* Mumps.hpp */; };
BE4335D51BE7C47300802A82 /* Mumps.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE4335D21BE7C47300802A82 /* Mumps.hxx */; };
BE43DC9C1BCCFF980093EB01 /* AllocateGlobalLinearAlgebra.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE43DC9B1BCCFF980093EB01 /* AllocateGlobalLinearAlgebra.cpp */; };
BE4478731AA70A1300665010 /* PrintAndAbort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4478701AA70A1300665010 /* PrintAndAbort.cpp */; };
BE4478741AA70A1300665010 /* PrintAndAbort.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4478711AA70A1300665010 /* PrintAndAbort.hpp */; };
...
...
@@ -562,9 +569,6 @@
BE863E3B1BE7AB6700EE3338 /* Snes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE863E381BE7AB6700EE3338 /* Snes.cpp */; };
BE863E3C1BE7AB6700EE3338 /* Snes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE863E391BE7AB6700EE3338 /* Snes.hpp */; };
BE863E3D1BE7AB6700EE3338 /* Snes.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE863E3A1BE7AB6700EE3338 /* Snes.hxx */; };
BE863E421BE7ABA900EE3338 /* Mumps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE863E3F1BE7ABA900EE3338 /* Mumps.cpp */; };
BE863E431BE7ABA900EE3338 /* Mumps.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE863E401BE7ABA900EE3338 /* Mumps.hpp */; };
BE863E441BE7ABA900EE3338 /* Mumps.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE863E411BE7ABA900EE3338 /* Mumps.hxx */; };
BE86A9EE1A385C9B003B211D /* SegmentP2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE86A9EC1A385C9B003B211D /* SegmentP2.cpp */; };
BE86A9EF1A385C9B003B211D /* SegmentP2.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE86A9ED1A385C9B003B211D /* SegmentP2.hpp */; };
BE86B21D1AE90F6B00406F5B /* GlobalVectorStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE86B21A1AE90F6B00406F5B /* GlobalVectorStorage.cpp */; };
...
...
@@ -3669,6 +3673,13 @@
BE42A4381A5D650E00B3FF6B /* InitTimeKeepLog.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InitTimeKeepLog.hpp; sourceTree = "<group>"; };
BE42A4391A5D650E00B3FF6B /* InitTimeKeepLog.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InitTimeKeepLog.hxx; sourceTree = "<group>"; };
BE42C2711A94ADCA00D03605 /* Result.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Result.cpp; sourceTree = "<group>"; };
BE4335BF1BE7C05700802A82 /* Enum.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Enum.hpp; path = Solver/Enum.hpp; sourceTree = "<group>"; };
BE4335C91BE7C22F00802A82 /* Solver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Solver.cpp; path = Solver/Private/Solver.cpp; sourceTree = "<group>"; };
BE4335CA1BE7C22F00802A82 /* Solver.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Solver.hpp; path = Solver/Private/Solver.hpp; sourceTree = "<group>"; };
BE4335CB1BE7C22F00802A82 /* Solver.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Solver.hxx; path = Solver/Private/Solver.hxx; sourceTree = "<group>"; };
BE4335D01BE7C47300802A82 /* Mumps.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mumps.cpp; path = Solver/Instantiations/Mumps.cpp; sourceTree = "<group>"; };
BE4335D11BE7C47300802A82 /* Mumps.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Mumps.hpp; path = Solver/Instantiations/Mumps.hpp; sourceTree = "<group>"; };
BE4335D21BE7C47300802A82 /* Mumps.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Mumps.hxx; path = Solver/Instantiations/Mumps.hxx; sourceTree = "<group>"; };
BE43AA8019E7D29B00FCCB24 /* ComputeOrientation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComputeOrientation.hpp; sourceTree = "<group>"; };
BE43AA8119E7D29B00FCCB24 /* ComputeOrientation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComputeOrientation.hxx; sourceTree = "<group>"; };
BE43AA8D19E7E30600FCCB24 /* BuildInterfaceListHelper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = BuildInterfaceListHelper.hpp; sourceTree = "<group>"; };
...
...
@@ -4034,9 +4045,6 @@
BE863E381BE7AB6700EE3338 /* Snes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Snes.cpp; path = Solver/Snes.cpp; sourceTree = "<group>"; };
BE863E391BE7AB6700EE3338 /* Snes.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Snes.hpp; path = Solver/Snes.hpp; sourceTree = "<group>"; };
BE863E3A1BE7AB6700EE3338 /* Snes.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Snes.hxx; path = Solver/Snes.hxx; sourceTree = "<group>"; };
BE863E3F1BE7ABA900EE3338 /* Mumps.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mumps.cpp; path = Solver/Private/Mumps.cpp; sourceTree = "<group>"; };
BE863E401BE7ABA900EE3338 /* Mumps.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Mumps.hpp; path = Solver/Private/Mumps.hpp; sourceTree = "<group>"; };
BE863E411BE7ABA900EE3338 /* Mumps.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Mumps.hxx; path = Solver/Private/Mumps.hxx; sourceTree = "<group>"; };
BE86A9EC1A385C9B003B211D /* SegmentP2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SegmentP2.cpp; sourceTree = "<group>"; };
BE86A9ED1A385C9B003B211D /* SegmentP2.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SegmentP2.hpp; sourceTree = "<group>"; };
BE86B21A1AE90F6B00406F5B /* GlobalVectorStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalVectorStorage.cpp; sourceTree = "<group>"; };
...
...
@@ -5655,6 +5663,26 @@
path = Private;
sourceTree = "<group>";
};
BE4335C81BE7C17C00802A82 /* Private */ = {
isa = PBXGroup;
children = (
BE4335C91BE7C22F00802A82 /* Solver.cpp */,
BE4335CA1BE7C22F00802A82 /* Solver.hpp */,
BE4335CB1BE7C22F00802A82 /* Solver.hxx */,
);
name = Private;
sourceTree = "<group>";
};
BE4335CF1BE7C44800802A82 /* Instantiations */ = {
isa = PBXGroup;
children = (
BE4335D01BE7C47300802A82 /* Mumps.cpp */,
BE4335D11BE7C47300802A82 /* Mumps.hpp */,
BE4335D21BE7C47300802A82 /* Mumps.hxx */,
);
name = Instantiations;
sourceTree = "<group>";
};
BE43AD311AFB9ADB0082AF43 /* Products */ = {
isa = PBXGroup;
children = (
...
...
@@ -6629,24 +6657,16 @@
BE863E371BE7AAF700EE3338 /* Solver */ = {
isa = PBXGroup;
children = (
BE4335BF1BE7C05700802A82 /* Enum.hpp */,
BE863E381BE7AB6700EE3338 /* Snes.cpp */,
BE863E391BE7AB6700EE3338 /* Snes.hpp */,
BE863E3A1BE7AB6700EE3338 /* Snes.hxx */,
BE863E3E1BE7AB8200EE3338 /* Private */,
BE4335CF1BE7C44800802A82 /* Instantiations */,
BE4335C81BE7C17C00802A82 /* Private */,
);
name = Solver;
sourceTree = "<group>";
};
BE863E3E1BE7AB8200EE3338 /* Private */ = {
isa = PBXGroup;
children = (
BE863E3F1BE7ABA900EE3338 /* Mumps.cpp */,
BE863E401BE7ABA900EE3338 /* Mumps.hpp */,
BE863E411BE7ABA900EE3338 /* Mumps.hxx */,
);
name = Private;
sourceTree = "<group>";
};
BE8F0E381A8110EE00D81C9F /* GlobalVariationalOperator.xctemplate */ = {
isa = PBXGroup;
children = (
...
...
@@ -8648,7 +8668,9 @@
BE90E1D11A2492AA00CCAFDE /* PetscViewer.hpp in Headers */,
BE90E19F1A24929A00CCAFDE /* Op.hpp in Headers */,
BE90E1951A24929A00CCAFDE /* TimeKeep.hpp in Headers */,
BE4335CD1BE7C22F00802A82 /* Solver.hpp in Headers */,
BE4ED31E1A2CBAC400DE374E /* MatrixOperations.hxx in Headers */,
BE4335C41BE7C05700802A82 /* Enum.hpp in Headers */,
BE90E1671A24926E00CCAFDE /* Print.hpp in Headers */,
BE41A8CB1A24AA46004E4312 /* Mpi.hxx in Headers */,
BE90E18B1A24929A00CCAFDE /* TupleIteration.hpp in Headers */,
...
...
@@ -8667,6 +8689,7 @@
BE90E1A81A24929A00CCAFDE /* Parmetis.hpp in Headers */,
BE90E1681A24926E00CCAFDE /* PointerComparison.hpp in Headers */,
BE90E1841A24929A00CCAFDE /* InputParameterList.hxx in Headers */,
BE4335D51BE7C47300802A82 /* Mumps.hxx in Headers */,
BE768E951B832C8C009B24CB /* TupleIteration.hxx in Headers */,
BE90E1C11A2492AA00CCAFDE /* SeldonFunctions.hpp in Headers */,
BEC157F21A249C3D007D20EB /* Numeric.hpp in Headers */,
...
...
@@ -8692,8 +8715,6 @@
BE1E873D1B8DBF460002EE64 /* Definitions.hpp in Headers */,
BE41A8CA1A24AA46004E4312 /* Mpi.hpp in Headers */,
BE768E851B832795009B24CB /* Subtuple.hpp in Headers */,
BE863E431BE7ABA900EE3338 /* Mumps.hpp in Headers */,
BE863E441BE7ABA900EE3338 /* Mumps.hxx in Headers */,
BE41A8CF1A24AA46004E4312 /* Mpi.hxx in Headers */,
BE1E87641B8DFB710002EE64 /* PrepareDefaultEntry.hxx in Headers */,
BE56978E1BE383AD00B2EC67 /* MatrixOperations.hpp in Headers */,
...
...
@@ -8716,6 +8737,7 @@
BE5697B11BE396E100B2EC67 /* ShellMatrix.hxx in Headers */,
BE90E1CA1A2492AA00CCAFDE /* Parmetis.hpp in Headers */,
BE6E4EE21B2ABE8B0049BB2D /* AccessGhostContent.hpp in Headers */,
BE4335CE1BE7C22F00802A82 /* Solver.hxx in Headers */,
BE1E87631B8DFB710002EE64 /* PrepareDefaultEntry.hpp in Headers */,
BE90E1621A24926E00CCAFDE /* Exception.hpp in Headers */,
BE90E1D71A2492AA00CCAFDE /* Iterator.hpp in Headers */,
...
...
@@ -8754,6 +8776,7 @@
BE90E1921A24929A00CCAFDE /* UniqueId.hpp in Headers */,
BE90E1D31A2492AA00CCAFDE /* Logs.hpp in Headers */,
BE90E1B81A24929A00CCAFDE /* Petsc.hpp in Headers */,
BE4335D41BE7C47300802A82 /* Mumps.hpp in Headers */,
BE90E1C61A2492AA00CCAFDE /* SubVector_Base.hxx in Headers */,
BE90E1691A24926E00CCAFDE /* PointerComparison.hxx in Headers */,
);
...
...
@@ -10393,6 +10416,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BE4335D31BE7C47300802A82 /* Mumps.cpp in Sources */,
BE90E1A71A24929A00CCAFDE /* Parmetis.cpp in Sources */,
BE90E1B71A24929A00CCAFDE /* Petsc.cpp in Sources */,
BE90E1901A24929A00CCAFDE /* Folder.cpp in Sources */,
...
...
@@ -10417,8 +10441,8 @@
BE41A8CD1A24AA46004E4312 /* Mpi.cpp in Sources */,
BE768E7E1B8325BB009B24CB /* ManualParsing.cpp in Sources */,
BE90E17A1A24926E00CCAFDE /* Singleton.cpp in Sources */,
BE4335CC1BE7C22F00802A82 /* Solver.cpp in Sources */,
BE90E1C01A2492AA00CCAFDE /* SeldonFunctions.cpp in Sources */,
BE863E421BE7ABA900EE3338 /* Mumps.cpp in Sources */,
BE90E1A01A24929A00CCAFDE /* Comm.cpp in Sources */,
BE1E87401B8DBF670002EE64 /* Definitions.cpp in Sources */,
BE6E4EE11B2ABE8B0049BB2D /* AccessGhostContent.cpp in Sources */,
...
...
Sources/Core/InputParameter/Solver/Petsc.hxx
View file @
cd3d8744
...
...
@@ -6,7 +6,8 @@
// Copyright (c) 2013 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_SOLVER_x_PETSC_HXX_
# define HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_SOLVER_x_PETSC_HXX_
namespace
HappyHeart
{
...
...
@@ -36,3 +37,4 @@ namespace HappyHeart
}
// namespace HappyHeart
#endif // HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_SOLVER_x_PETSC_HXX_
Sources/Core/Solver/Solver.hxx
View file @
cd3d8744
...
...
@@ -5,7 +5,6 @@
// Created by Sebastien Gilles on 29/10/15.
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_CORE_x_SOLVER_x_SOLVER_HXX_
# define HAPPY_HEART_x_CORE_x_SOLVER_x_SOLVER_HXX_
...
...
Sources/ThirdParty/Wrappers/Petsc/Solver/Enum.hpp
0 → 100644
View file @
cd3d8744
//
// Enum.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_ENUM_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_ENUM_HPP_
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
enum
class
SolverId
{
none
,
Mumps
,
Umfpack
,
Gmres
};
}
//namespace Petsc
}
//namespace Wrappers
}
// namespace HappyHeart
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_ENUM_HPP_
Sources/ThirdParty/Wrappers/Petsc/Solver/
Private
/Mumps.cpp
→
Sources/ThirdParty/Wrappers/Petsc/Solver/
Instantiations
/Mumps.cpp
View file @
cd3d8744
...
...
@@ -6,9 +6,11 @@
// Copyright © 2015 Inria. All rights reserved.
//
#include
"ThirdParty/Wrappers/Petsc/Solver/Private/Mumps.hpp"
#include
"ThirdParty/Wrappers/Petsc/Solver/Instantiations/Mumps.hpp"
#include
"ThirdParty/Wrappers/Petsc/Solver/Snes.hpp"
namespace
HappyHeart
{
...
...
@@ -21,10 +23,16 @@ namespace HappyHeart
{
namespace
Private
namespace
Instantiations
{
Mumps
::
Mumps
()
:
parent
(
solver_type
::
direct
)
{
}
void
Mumps
::
SetOptions
(
Snes
&
snes
,
const
char
*
invoking_file
,
int
invoking_line
)
{
...
...
@@ -75,7 +83,14 @@ namespace HappyHeart
}
}
//namespace Private
const
std
::
string
&
Mumps
::
GetPetscName
()
const
noexcept
{
static
std
::
string
ret
(
MATSOLVERMUMPS
);
return
ret
;
}
}
//namespace Instantiations
}
//namespace Petsc
...
...
Sources/ThirdParty/Wrappers/Petsc/Solver/Instantiations/Mumps.hpp
0 → 100644
View file @
cd3d8744
//
// Mumps.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_MUMPS_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_MUMPS_HPP_
# include <memory>
# include <vector>
# include "ThirdParty/Wrappers/Petsc/Solver/Private/Solver.hpp"
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
namespace
Instantiations
{
class
Mumps
final
:
public
Private
::
Solver
{
public:
//! Alias to parent.
using
parent
=
Private
::
Solver
;
//! Alias to self.
using
self
=
Mumps
;
//! Alias to unique pointer.
using
unique_ptr
=
std
::
unique_ptr
<
self
>
;
public:
/// \name Special members.
///@{
//! Constructor.
explicit
Mumps
();
//! Destructor.
~
Mumps
()
=
default
;
//! Copy constructor.
Mumps
(
const
Mumps
&
)
=
delete
;
//! Move constructor.
Mumps
(
Mumps
&&
)
=
delete
;
//! Copy affectation.
Mumps
&
operator
=
(
const
Mumps
&
)
=
delete
;
//! Move affectation.
Mumps
&
operator
=
(
Mumps
&&
)
=
delete
;
///@}
private:
//! Set the options that are specific to the solver.
void
SetOptions
(
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/Mumps.hxx"
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_INSTANTIATIONS_x_MUMPS_HPP_
Sources/ThirdParty/Wrappers/Petsc/Solver/
Private
/Mumps.hxx
→
Sources/ThirdParty/Wrappers/Petsc/Solver/
Instantiations
/Mumps.hxx
View file @
cd3d8744
...
...
@@ -6,8 +6,8 @@
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_
PRIVATE
_x_MUMPS_HXX_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_
PRIVATE
_x_MUMPS_HXX_
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_
INSTANTIATIONS
_x_MUMPS_HXX_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_
INSTANTIATIONS
_x_MUMPS_HXX_
namespace
HappyHeart
...
...
@@ -22,12 +22,12 @@ namespace HappyHeart
{
namespace
Private
namespace
Instantiations
{
}
//namespace
Private
}
//namespace
Instantiations
}
//namespace Petsc
...
...
@@ -39,4 +39,4 @@ namespace HappyHeart
}
// namespace HappyHeart
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_
PRIVATE
_x_MUMPS_HXX_
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_
INSTANTIATIONS
_x_MUMPS_HXX_
Sources/ThirdParty/Wrappers/Petsc/Solver/Private/Solver.cpp
0 → 100644
View file @
cd3d8744
//
// Solver.cpp
// HappyHeart
//
// Created by Sebastien Gilles on 02/11/15.
// Copyright © 2015 Inria. All rights reserved.
//
#include
"ThirdParty/Wrappers/Petsc/Solver/Private/Solver.hpp"
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
namespace
Private
{
Solver
::~
Solver
()
=
default
;
Solver
::
Solver
(
solver_type
type
)
:
type_
(
type
)
{
}
solver_type
Solver
::
GetSolverType
()
const
noexcept
{
return
type_
;
}
}
//namespace Private
}
//namespace Petsc
}
//namespace Wrappers
}
// namespace HappyHeart
Sources/ThirdParty/Wrappers/Petsc/Solver/Private/Solver.hpp
0 → 100644
View file @
cd3d8744
//
// Solver.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_PRIVATE_x_SOLVER_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_PRIVATE_x_SOLVER_HPP_
# include <memory>
# include <vector>
namespace
HappyHeart
{
namespace
Wrappers
{
namespace
Petsc
{
// ============================
// Forward declarations.
// ============================
class
Snes
;
// ============================
// End of forward declarations.
// ============================
enum
class
solver_type
{
direct
,
iterative
};
namespace
Private
{
class
Solver
{
public:
//! Alias to self.
using
self
=
Solver
;
//! Alias to unique pointer.
using
unique_ptr
=
std
::
unique_ptr
<
self
>
;
public:
/// \name Special members.
///@{
//! Constructor.
explicit
Solver
(
solver_type
type
);
//! Destructor.
virtual
~
Solver
()
=
0
;
//! Copy constructor.
Solver
(
const
Solver
&
)
=
delete
;
//! Move constructor.
Solver
(
Solver
&&
)
=
delete
;
//! Copy affectation.
Solver
&
operator
=
(
const
Solver
&
)
=
delete
;
//! Move affectation.
Solver
&
operator
=
(
Solver
&&
)
=
delete
;
///@}
//! Set the options that are specific to the solver.
virtual
void
SetOptions
(
Snes
&
snes
,
const
char
*
invoking_file
,
int
invoking_line
)
=
0
;
/*!
* \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.
*/
virtual
const
std
::
string
&
GetPetscName
()
const
noexcept
=
0
;
//! Get the type of solver.
solver_type
GetSolverType
()
const
noexcept
;
private:
//! Type of solver.
solver_type
type_
;
};
}
//namespace Private
}
//namespace Petsc
}
//namespace Wrappers
}
// namespace HappyHeart
# include "ThirdParty/Wrappers/Petsc/Solver/Private/Solver.hxx"
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_PRIVATE_x_SOLVER_HPP_
Sources/ThirdParty/Wrappers/Petsc/Solver/Private/
Mumps.hpp
→
Sources/ThirdParty/Wrappers/Petsc/Solver/Private/
Solver.hxx
View file @
cd3d8744
//
//
Mumps.hpp
//
Solver.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_PRIVATE_x_MUMPS_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_PRIVATE_x_MUMPS_HPP_
# include <memory>
# include <vector>
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_PRIVATE_x_SOLVER_HXX_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_PETSC_x_SOLVER_x_PRIVATE_x_SOLVER_HXX_
namespace
HappyHeart