Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
petsc_utils.hpp
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2//
3// Copyright (C) 2024 - 2025 by the Vulpes authors.
4// This file is part of Vulpes.
5//
6// Vulpes is free software; you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// Vulpes is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with Vulpes. If not, see <http://www.gnu.org/licenses/>.
18//
19// ----------------------------------------------------------------------
20
21// Author: Matteo Caldana <matteo.caldana@polimi.it>
22
23#ifndef VULPES_LA_PETSC_UTILS_HPP_
24#define VULPES_LA_PETSC_UTILS_HPP_
25
26#include <petscsys.h>
27
28#include <string>
29
31
32#define PetscCallAbortWorld(...) \
33 do { \
34 PetscCallAbort(PETSC_COMM_WORLD, __VA_ARGS__); \
35 } while (0)
36
37namespace vulpes {
38namespace la {
39
45 const std::string& name, const std::string& value) {
47 PetscOptionsSetValue(nullptr, name.c_str(), value.c_str()));
48}
49
50} // namespace la
51} // namespace vulpes
52
53#endif // VULPES_LA_PETSC_UTILS_HPP_
void setPETScOptionValue(const std::string &name, const std::string &value)
Definition petsc_utils.hpp:44
Definition cell_manager.hpp:38
#define PetscCallAbortWorld(...)
Definition petsc_utils.hpp:32