namespace PETScWrappers
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
NonlinearSolver<VectorType, PMatrixType, AMatrixType>::NonlinearSolver(
const NonlinearSolverData &data,
const MPI_Comm mpi_comm)
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
NonlinearSolver<VectorType, PMatrixType, AMatrixType>::operator SNES() const
{
return snes;
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
SNES NonlinearSolver<VectorType, PMatrixType, AMatrixType>::petsc_snes()
{
return snes;
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
MPI_Comm NonlinearSolver<VectorType, PMatrixType, AMatrixType>::
get_mpi_communicator() const
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
NonlinearSolver<VectorType, PMatrixType, AMatrixType>::~NonlinearSolver()
{
AssertPETSc(SNESDestroy(&snes));
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void NonlinearSolver<VectorType, PMatrixType, AMatrixType>::reinit()
{
AssertPETSc(SNESReset(snes));
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void NonlinearSolver<VectorType, PMatrixType, AMatrixType>::reinit(
const NonlinearSolverData &data)
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void NonlinearSolver<VectorType, PMatrixType, AMatrixType>::set_matrix(
PMatrixType &P)
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void NonlinearSolver<VectorType, PMatrixType, AMatrixType>::set_matrices(
AMatrixType &A,
PMatrixType &P)
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
unsigned int NonlinearSolver<VectorType, PMatrixType, AMatrixType>::solve(
VectorType &x)
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
unsigned int NonlinearSolver<VectorType, PMatrixType, AMatrixType>::solve(
VectorType & x,
PMatrixType &P)
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
unsigned int NonlinearSolver<VectorType, PMatrixType, AMatrixType>::solve(
VectorType & x,
AMatrixType &A,
namespace PETScWrappers
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
TimeStepper<VectorType, PMatrixType, AMatrixType>::TimeStepper(
const TimeStepperData &data,
const MPI_Comm mpi_comm)
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
TimeStepper<VectorType, PMatrixType, AMatrixType>::~TimeStepper()
{
AssertPETSc(TSDestroy(&ts));
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
TimeStepper<VectorType, PMatrixType, AMatrixType>::operator TS() const
{
return ts;
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
TS TimeStepper<VectorType, PMatrixType, AMatrixType>::petsc_ts()
{
return ts;
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
inline MPI_Comm
TimeStepper<VectorType, PMatrixType, AMatrixType>::get_mpi_communicator()
const
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
typename TimeStepper<VectorType, PMatrixType, AMatrixType>::real_type
TimeStepper<VectorType, PMatrixType, AMatrixType>::get_time()
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
typename TimeStepper<VectorType, PMatrixType, AMatrixType>::real_type
TimeStepper<VectorType, PMatrixType, AMatrixType>::get_time_step()
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void TimeStepper<VectorType, PMatrixType, AMatrixType>::reinit()
{
AssertPETSc(TSReset(ts));
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void TimeStepper<VectorType, PMatrixType, AMatrixType>::reinit(
const TimeStepperData &data)
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void TimeStepper<VectorType, PMatrixType, AMatrixType>::set_matrix(
PMatrixType &P)
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
void TimeStepper<VectorType, PMatrixType, AMatrixType>::set_matrices(
AMatrixType &A,
PMatrixType &P)
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
unsigned int TimeStepper<VectorType, PMatrixType, AMatrixType>::solve(
VectorType &y)
{
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
unsigned int TimeStepper<VectorType, PMatrixType, AMatrixType>::solve(
VectorType & y,
PMatrixType &P)
template <typename VectorType, typename PMatrixType, typename AMatrixType>
- DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
- std::constructible_from<VectorType, Vec>))
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_dealii_petsc_vector_type<VectorType> ||
+ std::constructible_from<
+ VectorType,
+ Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+ std::constructible_from<
+ PMatrixType,
+ Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+ std::constructible_from<AMatrixType, Mat>))
unsigned int TimeStepper<VectorType, PMatrixType, AMatrixType>::solve(
VectorType & y,
AMatrixType &A,