Skip to content

Commit 13d622b

Browse files
committed
fixup! Merge branch 's1056_branch' into mjs/eamxx/rework-DAG
1 parent 9dfd37d commit 13d622b

File tree

2 files changed

+1
-48
lines changed

2 files changed

+1
-48
lines changed

components/eamxx/src/share/atm_process/atmosphere_process_dag.cpp

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
181181
ofile.open (fname.c_str());
182182

183183
ofile << "strict digraph G {\n"
184-
<< "rankdir=\"LR\"";
184+
<< "rankdir=\"LR\"\n";
185185

186186
for (const auto& n : m_nodes) {
187187
const auto& unmet = m_unmet_deps.at(n.id);
@@ -584,52 +584,6 @@ void AtmProcDAG::add_edges () {
584584
}
585585

586586
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) {
633587
// First, add the fields that were determined to come from the previous time
634588
// step => IC for t = 0
635589
// get the begin_node since the IC is identical at first

components/eamxx/src/share/atm_process/atmosphere_process_dag.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class AtmProcDAG {
1818

1919
using grid_field_map = std::map<std::string,std::vector<std::string>>;
2020
void process_initial_conditions(const grid_field_map &ic_inited);
21-
void process_IC_alt(const grid_field_map &ic_inited);
2221

2322
void init_atm_proc_nodes(const group_type& atm_procs);
2423

0 commit comments

Comments
 (0)