@@ -181,7 +181,7 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
181
181
ofile.open (fname.c_str ());
182
182
183
183
ofile << " strict digraph G {\n "
184
- << " rankdir=\" LR\" " ;
184
+ << " rankdir=\" LR\"\n " ;
185
185
186
186
for (const auto & n : m_nodes) {
187
187
const auto & unmet = m_unmet_deps.at (n.id );
@@ -584,52 +584,6 @@ void AtmProcDAG::add_edges () {
584
584
}
585
585
586
586
void AtmProcDAG::process_initial_conditions (const grid_field_map &ic_inited) {
587
- // return if there's nothing to do
588
- if (ic_inited.size () == 0 ) {
589
- return ;
590
- }
591
- // Create a node for the ICs
592
- int id = m_nodes.size ();
593
- m_nodes.push_back (Node ());
594
- Node& ic_node = m_nodes.back ();
595
- ic_node.id = id;
596
- ic_node.name = " Initial Conditions" ;
597
- m_unmet_deps[id].clear ();
598
- for (auto &node : m_nodes) {
599
- if (m_unmet_deps.at (node.id ).empty ()) {
600
- continue ;
601
- } else {
602
- // NOTE: node_unmet_fields is a std::set<int>
603
- auto &node_unmet_fields = m_unmet_deps.at (node.id );
604
- // add the current node as a child of the IC node
605
- ic_node.children .push_back (node.id );
606
- for (auto um_fid : node_unmet_fields) {
607
- for (auto &it1 : ic_inited) {
608
- const auto &grid_name = it1.first ;
609
- // if this unmet-dependency field's name is in the ic_inited map for
610
- // the provided grid_name key, then we flip its value negative and
611
- // break from the for (ic_inited) and for (node_unmet_fields) loops;
612
- // otherwise, keep trying for the next grid_name
613
- if (ekat::contains (ic_inited.at (grid_name), m_fids[um_fid].name ())) {
614
- auto id_now_met = node_unmet_fields.extract (um_fid);
615
- id_now_met.value () = -id_now_met.value ();
616
- node_unmet_fields.insert (std::move (id_now_met));
617
- // add the fid of the formerly unmet dep to the initial condition
618
- // node's computed list
619
- ic_node.computed .insert (um_fid);
620
- goto endloop;
621
- } else {
622
- continue ;
623
- }
624
- }
625
- endloop:;
626
- }
627
- }
628
- }
629
- m_IC_processed = true ;
630
- }
631
-
632
- void AtmProcDAG::process_IC_alt (const grid_field_map &ic_inited) {
633
587
// First, add the fields that were determined to come from the previous time
634
588
// step => IC for t = 0
635
589
// get the begin_node since the IC is identical at first
0 commit comments