MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
get_mumps_version.cpp
Go to the documentation of this file.
1// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
11
12#ifdef MFEM_USE_SINGLE
13#include "smumps_c.h"
14#else
15#include "dmumps_c.h"
16#endif
17#include <string>
18#include <iostream>
19#include <algorithm>
20
21// Macros to expand a macro as a string
22#define STR_EXPAND(s) #s
23#define STR(s) STR_EXPAND(s)
24
25int main()
26{
27#ifdef MUMPS_VERSION
28 const char *ptr = STR(MUMPS_VERSION);
29 std::string s(ptr);
30 s.erase(std::remove(s.begin(), s.end(), '"'), s.end());
31 s.erase(std::remove(s.begin(), s.end(), '.'), s.end());
32 std::cout << s << "\n";
33 return 0;
34#else
35 return -1;
36#endif
37}
int main()
RefCoord s[3]