libMesh
Loading...
Searching...
No Matches
rb_data_serialization.h
Go to the documentation of this file.
1// rbOOmit: An implementation of the Certified Reduced Basis method.
2// Copyright (C) 2009, 2010, 2015 David J. Knezevic
3
4// This file is part of rbOOmit.
5
6// rbOOmit is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10
11// rbOOmit 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// Lesser General Public License for more details.
15
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20#ifndef RB_DATA_SERIALIZATION_H
21#define RB_DATA_SERIALIZATION_H
22
23#include "libmesh/libmesh_config.h"
24#if defined(LIBMESH_HAVE_CAPNPROTO)
25
26// C++ includes
27#include <string>
28
29// libMesh/reduced_basis includes
30#include "libmesh/rb_data.capnp.h"
31
32// Cap'n'Proto includes
33#include "capnp/message.h"
34
35namespace libMesh
36{
37
38// Forward declarations
39class RBEvaluation;
40class TransientRBEvaluation;
41class RBEIMEvaluation;
42class RBSCMEvaluation;
43class RBParametrized;
44class Point;
45class Elem;
46
47namespace RBDataSerialization
48{
49
94
95
96
137
138
139
180
181
182
183// RBSCMEvaluation should only be available
184// if SLEPc and GLPK support is enabled.
185#if defined(LIBMESH_HAVE_SLEPC) && (LIBMESH_HAVE_GLPK)
186
227
228#endif // LIBMESH_HAVE_SLEPC && LIBMESH_HAVE_GLPK
229
230
231
232
236void add_parameter_ranges_to_builder(const RBParametrized & rb_evaluation,
237 RBData::ParameterRanges::Builder & parameter_ranges,
238 RBData::DiscreteParameterList::Builder & discrete_parameters_list);
239
243template <typename RBEvaluationBuilderNumber>
245 RBEvaluationBuilderNumber & rb_eval_builder);
246
251template <typename RBEvaluationBuilderNumber, typename TransRBEvaluationBuilderNumber>
253 RBEvaluationBuilderNumber & rb_eval_builder,
254 TransRBEvaluationBuilderNumber & trans_rb_eval_builder);
255
260template <typename RBEIMEvaluationBuilderNumber>
262 RBEIMEvaluationBuilderNumber & rb_eim_eval_builder);
263
264#if defined(LIBMESH_HAVE_SLEPC) && (LIBMESH_HAVE_GLPK)
273 RBData::RBSCMEvaluation::Builder & rb_scm_eval_builder);
274#endif // LIBMESH_HAVE_SLEPC && LIBMESH_HAVE_GLPK
275
279void add_point_to_builder(const Point & point,
280 RBData::Point3D::Builder point_builder);
281
282} // namespace RBDataSerialization
283
284} // namespace libMesh
285
286#endif // #if defined(LIBMESH_HAVE_CAPNPROTO)
287
288#endif // RB_DATA_SERIALIZATION_H
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
This class serializes an RBEIMEvaluation object using the Cap'n Proto library.
RBEIMEvaluation & _rb_eim_eval
The RBEvaluation object that will be written to disk.
RBEIMEvaluationSerialization & operator=(const RBEIMEvaluationSerialization &)=delete
void write_to_file(const std::string &path, bool use_packing=false)
Write the Cap'n'Proto buffer to disk.
RBEIMEvaluationSerialization(RBEIMEvaluationSerialization &&)=default
Special functions.
RBEIMEvaluationSerialization(const RBEIMEvaluationSerialization &)=default
This class serializes an RBEvaluation object using the Cap'n Proto library.
RBEvaluationSerialization & operator=(const RBEvaluationSerialization &)=delete
RBEvaluationSerialization(const RBEvaluationSerialization &)=default
void write_to_file(const std::string &path, bool use_packing=false)
Write the Cap'n'Proto buffer to disk.
RBEvaluationSerialization(RBEvaluationSerialization &&)=default
Special functions.
RBEvaluation & _rb_eval
The RBEvaluation object that will be written to disk.
This class serializes an RBSCMEvaluation object using the Cap'n Proto library.
RBSCMEvaluation & _rb_scm_eval
The RBEvaluation object that will be written to disk.
RBSCMEvaluationSerialization(RBSCMEvaluationSerialization &&)=default
Special functions.
RBSCMEvaluationSerialization & operator=(const RBSCMEvaluationSerialization &)=delete
void write_to_file(const std::string &path, bool use_packing=false)
Write the Cap'n'Proto buffer to disk.
RBSCMEvaluationSerialization(const RBSCMEvaluationSerialization &)=default
This class serializes a TransientRBEvaluation object using the Cap'n Proto library.
TransientRBEvaluationSerialization(TransientRBEvaluationSerialization &&)=default
Special functions.
TransientRBEvaluationSerialization(const TransientRBEvaluationSerialization &)=default
void write_to_file(const std::string &path, bool use_packing=false)
Write the Cap'n'Proto buffer to disk.
TransientRBEvaluationSerialization & operator=(const TransientRBEvaluationSerialization &)=delete
TransientRBEvaluation & _trans_rb_eval
The RBEvaluation object that will be written to disk.
This class enables evaluation of an Empirical Interpolation Method (EIM) approximation.
This class is part of the rbOOmit framework.
This class is part of the rbOOmit framework.
This class is part of the rbOOmit framework.
This class is part of the rbOOmit framework.
void add_rb_eim_evaluation_data_to_builder(RBEIMEvaluation &rb_eim_eval, RBEIMEvaluationBuilderNumber &rb_eim_eval_builder)
Add data for an RBEIMEvaluation to the builder.
void add_point_to_builder(const Point &point, RBData::Point3D::Builder point_builder)
Helper function that adds point data.
void add_rb_evaluation_data_to_builder(RBEvaluation &rb_eval, RBEvaluationBuilderNumber &rb_eval_builder)
Add data for an RBEvaluation to the builder.
void add_transient_rb_evaluation_data_to_builder(TransientRBEvaluation &trans_rb_eval, RBEvaluationBuilderNumber &rb_eval_builder, TransRBEvaluationBuilderNumber &trans_rb_eval_builder)
Add data for a TransientRBEvaluation to the builder.
void add_rb_scm_evaluation_data_to_builder(RBSCMEvaluation &rb_scm_eval, RBData::RBSCMEvaluation::Builder &rb_scm_eval_builder)
Add data for an RBSCMEvaluation to the builder.
void add_parameter_ranges_to_builder(const RBParametrized &rb_evaluation, RBData::ParameterRanges::Builder &parameter_ranges, RBData::DiscreteParameterList::Builder &discrete_parameters_list)
Add parameter ranges for continuous and discrete parameters.
The libMesh namespace provides an interface to certain functionality in the library.