Skip to content

Commit 842ee50

Browse files
authored
Merge pull request #326 from masterleinad/fix_indentation
Fix indentation for adamantine.hh
2 parents a38a87b + 5e70f2e commit 842ee50

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

application/adamantine.hh

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,8 @@ run_ensemble(MPI_Comm const &global_communicator,
20192019
material_properties_ensemble[0]->get_dof_handler());
20202020
}
20212021

2022-
// Only continue data assimilation if some of the observations are mapped to DOFs
2022+
// Only continue data assimilation if some of the observations are
2023+
// mapped to DOFs
20232024
if (expt_to_dof_mapping.first.size() > 0)
20242025
{
20252026
// NOTE: As is, this updates the dof mapping and covariance sparsity
@@ -2030,35 +2031,35 @@ run_ensemble(MPI_Comm const &global_communicator,
20302031
// for each operation. If this is a bottleneck, it can be fixed in the
20312032
// future.
20322033
timers[adamantine::da_dof_mapping].start();
2033-
#ifdef ADAMANTINE_WITH_CALIPER
2034+
#ifdef ADAMANTINE_WITH_CALIPER
20342035
CALI_MARK_BEGIN("da_dof_mapping");
2035-
#endif
2036+
#endif
20362037
data_assimilator.update_dof_mapping<dim>(expt_to_dof_mapping);
2037-
#ifdef ADAMANTINE_WITH_CALIPER
2038+
#ifdef ADAMANTINE_WITH_CALIPER
20382039
CALI_MARK_END("da_dof_mapping");
2039-
#endif
2040+
#endif
20402041
timers[adamantine::da_dof_mapping].stop();
20412042

20422043
timers[adamantine::da_covariance_sparsity].start();
2043-
#ifdef ADAMANTINE_WITH_CALIPER
2044+
#ifdef ADAMANTINE_WITH_CALIPER
20442045
CALI_MARK_BEGIN("da_covariance_sparsity");
2045-
#endif
2046+
#endif
20462047
data_assimilator.update_covariance_sparsity_pattern<dim>(
20472048
thermal_dof_handler,
20482049
solution_augmented_ensemble[0].block(augmented_state).size());
2049-
#ifdef ADAMANTINE_WITH_CALIPER
2050+
#ifdef ADAMANTINE_WITH_CALIPER
20502051
CALI_MARK_END("da_covariance_sparsity");
2051-
#endif
2052+
#endif
20522053
timers[adamantine::da_covariance_sparsity].start();
20532054

20542055
unsigned int experimental_data_size = points_values.values.size();
20552056

20562057
// Create the R matrix (the observation covariance matrix)
20572058
// PropertyTreeInput experiment.estimated_uncertainty
20582059
timers[adamantine::da_obs_covariance].start();
2059-
#ifdef ADAMANTINE_WITH_CALIPER
2060+
#ifdef ADAMANTINE_WITH_CALIPER
20602061
CALI_MARK_BEGIN("da_obs_covariance");
2061-
#endif
2062+
#endif
20622063
double variance_entries = experiment_optional_database.get().get(
20632064
"estimated_uncertainty", 0.0);
20642065
variance_entries = variance_entries * variance_entries;
@@ -2076,28 +2077,28 @@ run_ensemble(MPI_Comm const &global_communicator,
20762077
{
20772078
R.add(i, i, variance_entries);
20782079
}
2079-
#ifdef ADAMANTINE_WITH_CALIPER
2080+
#ifdef ADAMANTINE_WITH_CALIPER
20802081
CALI_MARK_END("da_obs_covariance");
2081-
#endif
2082+
#endif
20822083
timers[adamantine::da_obs_covariance].stop();
20832084

20842085
// Perform data assimilation to update the augmented state ensemble
20852086
timers[adamantine::da_update_ensemble].start();
2086-
#ifdef ADAMANTINE_WITH_CALIPER
2087+
#ifdef ADAMANTINE_WITH_CALIPER
20872088
CALI_MARK_BEGIN("da_update_ensemble");
2088-
#endif
2089+
#endif
20892090
data_assimilator.update_ensemble(solution_augmented_ensemble,
2090-
points_values.values, R);
2091-
#ifdef ADAMANTINE_WITH_CALIPER
2091+
points_values.values, R);
2092+
#ifdef ADAMANTINE_WITH_CALIPER
20922093
CALI_MARK_END("da_update_ensemble");
2093-
#endif
2094+
#endif
20942095
timers[adamantine::da_update_ensemble].stop();
20952096

20962097
// Extract the parameters from the augmented state
20972098
for (unsigned int member = 0; member < local_ensemble_size; ++member)
20982099
{
20992100
for (unsigned int index = 0;
2100-
index < augmented_state_parameters.size(); ++index)
2101+
index < augmented_state_parameters.size(); ++index)
21012102
{
21022103
// FIXME: Need to consider how we want to generalize this. It
21032104
// could get unwieldy if we want to specify every parameter of an
@@ -2111,7 +2112,7 @@ run_ensemble(MPI_Comm const &global_communicator,
21112112
augmented_state)[index]);
21122113
}
21132114
else if (augmented_state_parameters.at(index) ==
2114-
adamantine::AugmentedStateParameters::beam_0_max_power)
2115+
adamantine::AugmentedStateParameters::beam_0_max_power)
21152116
{
21162117
database_ensemble[member].put(
21172118
"sources.beam_0.max_power",
@@ -2127,7 +2128,8 @@ run_ensemble(MPI_Comm const &global_communicator,
21272128
// Print out the augmented parameters
21282129
if (solution_augmented_ensemble[0].block(1).size() > 0)
21292130
{
2130-
for (unsigned int member = 0; member < local_ensemble_size; ++member)
2131+
for (unsigned int member = 0; member < local_ensemble_size;
2132+
++member)
21312133
{
21322134
std::cout << "Rank: " << global_rank
21332135
<< " | New parameters for member "
@@ -2139,10 +2141,13 @@ run_ensemble(MPI_Comm const &global_communicator,
21392141
}
21402142
}
21412143
}
2142-
else
2144+
else
21432145
{
21442146
if (global_rank == 0)
2145-
std::cout << "WARNING: NO EXPERIMENTAL DATA POINTS MAPPED ONTO THE SIMULATION MESH. SKIPPING DATA ASSIMILATION OPERATION." << std::endl;
2147+
std::cout
2148+
<< "WARNING: NO EXPERIMENTAL DATA POINTS MAPPED ONTO THE "
2149+
"SIMULATION MESH. SKIPPING DATA ASSIMILATION OPERATION."
2150+
<< std::endl;
21462151
}
21472152
}
21482153

indent

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ clang-format -style=file -i source/*.cc
22
clang-format -style=file -i source/*.hh
33
clang-format -style=file -i tests/*.cc
44
clang-format -style=file -i application/*.cc
5+
clang-format -style=file -i application/*.hh

0 commit comments

Comments
 (0)