File: sub_systems_manager.cpp

package info (click to toggle)
dolfinx 2019.2.0~git20210130.c14cb0a-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,584 kB
  • sloc: cpp: 48,110; python: 9,536; xml: 9,114; makefile: 261; sh: 17
file content (25 lines) | stat: -rw-r--r-- 522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (C) 2015 Garth N. Wells
//
// This file is part of DOLFINX (https://www.fenicsproject.org)
//
// SPDX-License-Identifier:    LGPL-3.0-or-later

#include <catch.hpp>
#include <petscvec.h>

namespace
{
void init_petsc()
{
  // Test user initialisation of PETSc
  int argc = 0;
  char** argv = nullptr;
  PetscInitialize(&argc, &argv, nullptr, nullptr);

  Vec x;
  VecCreate(MPI_COMM_WORLD, &x);
  VecDestroy(&x);
}
} // namespace

TEST_CASE("Initialise PETSc", "[petsc_init]") { CHECK_NOTHROW(init_petsc()); }