xref: /honee/qfunctions/sgs_dd_model.h (revision 62b7942e37b3edd7bd547f0acf1de11d9ff29152)
1 // Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3 //
4 // SPDX-License-Identifier: BSD-2-Clause
5 //
6 // This file is part of CEED:  http://github.com/ceed
7 
8 /// @file
9 /// Structs and helper functions for data-driven subgrid-stress modeling
10 
11 #ifndef sgs_dd_model_h
12 #define sgs_dd_model_h
13 
14 #include <ceed.h>
15 
16 typedef struct SGS_DD_ModelContext_ *SGS_DDModelContext;
17 struct SGS_DD_ModelContext_ {
18   CeedInt    num_inputs, num_outputs;
19   CeedInt    num_layers;
20   CeedInt    num_neurons;
21   CeedScalar alpha;
22 
23   struct {
24     size_t bias1, bias2;
25     size_t weight1, weight2;
26     size_t out_scaling;
27   } offsets;
28   size_t     total_bytes;
29   CeedScalar data[1];
30 };
31 
32 #endif  // sgs_dd_model_h
33