Line data Source code
1 : // *****************************************************************************
2 : /*!
3 : \file src/Inciter/zalcg.ci
4 : \copyright 2012-2015 J. Bakosi,
5 : 2016-2018 Los Alamos National Security, LLC.,
6 : 2019-2021 Triad National Security, LLC.,
7 : 2022-2025 J. Bakosi
8 : All rights reserved. See the LICENSE file for details.
9 : \brief Charm++ module interface for ZalCG
10 : */
11 : // *****************************************************************************
12 :
13 : module zalcg {
14 :
15 : extern module transporter;
16 : extern module discretization;
17 :
18 : include "UnsMesh.hpp";
19 : include "PUPUtil.hpp";
20 :
21 : namespace inciter {
22 :
23 : array [1D] ZalCG {
24 : entry ZalCG( const CProxy_Discretization& disc,
25 : const std::map< int, std::vector< std::size_t > >& bface,
26 : const std::map< int, std::vector< std::size_t > >& bnode,
27 : const std::vector< std::size_t >& triinpoel );
28 : initnode void registerReducers();
29 : entry void setup( tk::real v );
30 : entry void start();
31 : entry void evalres( const std::vector< tk::real >& l2ref );
32 : entry [reductiontarget] void advance( tk::real newdt );
33 : entry void comnorm( const std::unordered_map< int,
34 : std::unordered_map< std::size_t, std::array< tk::real, 4 > > >& inbnd );
35 435 : entry void comrhs( const std::unordered_map< std::size_t,
36 : std::vector< tk::real > >& inrhs );
37 5330 : entry void comaec( const std::unordered_map< std::size_t,
38 : std::vector< tk::real > >& inaec );
39 5330 : entry void comalw( const std::unordered_map< std::size_t,
40 : std::vector< tk::real > >& inalw );
41 5330 : entry void comlim( const std::unordered_map< std::size_t,
42 : std::vector< tk::real > >& inlim );
43 5330 : entry [reductiontarget] void deastat( int dea );
44 : entry void comdea( std::size_t reactivate );
45 190 : entry void comact( int ch, int deactivated );
46 : entry void feop();
47 : entry void step();
48 190 : entry void integrals();
49 : entry void evalLB( int nrestart );
50 6040 :
51 : // SDAG code follows. See http://charm.cs.illinois.edu/manuals/html/
52 : // charm++/manual.html, Sec. "Structured Control Flow: Structured Dagger".
53 :
54 : entry void wait4int() {
55 : when ownnorm_complete(), comnorm_complete() serial { merge(); } }
56 :
57 : entry void wait4rhs() {
58 : when ownrhs_complete(), comrhs_complete() serial { fct(); } }
59 :
60 : entry void wait4aec() {
61 : when ownaec_complete(), comaec_complete() serial { alw(); } }
62 :
63 : entry void wait4alw() {
64 : when ownalw_complete(), comalw_complete() serial { lim(); } }
65 :
66 : entry void wait4sol() {
67 : when ownlim_complete(), comlim_complete() serial { solve(); } }
68 :
69 : entry void wait4dea() {
70 : when owndea_complete(), comdea_complete() serial { activate(); } }
71 :
72 : entry void wait4act() {
73 : when ownact_complete(), comact_complete(), deastat_complete()
74 : serial { refine(); } }
75 :
76 : entry void wait4step() {
77 : when feop_complete(), resize_complete() serial { out(); } }
78 :
79 : entry void ownnorm_complete();
80 : entry void comnorm_complete();
81 : entry void ownrhs_complete();
82 : entry void comrhs_complete();
83 : entry void ownaec_complete();
84 : entry void comaec_complete();
85 : entry void ownalw_complete();
86 : entry void comalw_complete();
87 : entry void ownlim_complete();
88 : entry void comlim_complete();
89 : entry void owndea_complete();
90 : entry void comdea_complete();
91 : entry void ownact_complete();
92 : entry void comact_complete();
93 : entry void deastat_complete();
94 : entry void feop_complete();
95 : entry void resize_complete();
96 : }
97 :
98 : } // inciter::
99 :
100 : }
|