MFEM  v4.4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
fmsconvert.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2022, 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 #ifndef FMS_CONVERT
13 #define FMS_CONVERT
14 
15 #include "../config/config.hpp"
16 #include "datacollection.hpp"
17 
18 #ifdef MFEM_USE_FMS
19 #include <fms.h>
20 
21 namespace mfem
22 {
23 
24 /** In-memory conversion of FMS data collection to an MFEM data collection.
25  @param dc The FMS data collection to convert.
26  @param[out] mfem_dc A pointer to a new MFEM DataCollection containing the
27  FMS data.
28  @return 0 on success; non-zero on failure.
29 */
30 int FmsDataCollectionToDataCollection(FmsDataCollection dc,
31  DataCollection **mfem_dc);
32 
33 /** In-memory conversion of MFEM data collection to an FMS data collection.
34  @param mfem_dc The MFEM data collection to convert.
35  @param[out] dc A pointer to a new FmsDataCollection containing the MFEM
36  data.
37  @return 0 on success; non-zero on failure.
38 */
39 int DataCollectionToFmsDataCollection(DataCollection *mfem_dc,
40  FmsDataCollection *dc);
41 
42 } // namespace mfem
43 
44 #endif
45 
46 #endif
int DataCollectionToFmsDataCollection(DataCollection *mfem_dc, FmsDataCollection *dc)
int FmsDataCollectionToDataCollection(FmsDataCollection dc, DataCollection **mfem_dc)