Skip to content

Commit f38a5f5

Browse files
committed
examples: boris: improving logging and consistency
1 parent 8c49d9c commit f38a5f5

File tree

5 files changed

+121
-112
lines changed

5 files changed

+121
-112
lines changed

examples/boris/bindings/wrapper_simple_physics_solver_impl.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@ namespace pfasst
115115
ParticleCloudComponent<scalar>
116116
WrapperSimplePhysicsSolver<scalar, time>::e_field_evaluate(const particle_cloud_type& particles, const time t)
117117
{
118-
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << "time=" << t;
118+
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << " time=" << t;
119119
size_t num_particles = particles->size();
120120
assert(DIM == particles->dim());
121121

122-
// VLOG(3) << LOG_INDENT << "positions:" << particles->positions();
123-
124122
scalar* packed_positions = new scalar[num_particles * DIM];
125123
scalar* packed_masses = new scalar[num_particles];
126124
scalar* packed_charges = new scalar[num_particles];
@@ -145,7 +143,7 @@ namespace pfasst
145143
ParticleCloudComponent<scalar>
146144
WrapperSimplePhysicsSolver<scalar, time>::b_field_evaluate(const particle_cloud_type& particles, const time t)
147145
{
148-
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << "time=" << t;
146+
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << " time=" << t;
149147
size_t num_particles = particles->size();
150148
assert(DIM == particles->dim());
151149

@@ -173,7 +171,7 @@ namespace pfasst
173171
ParticleCloudComponent<scalar>
174172
WrapperSimplePhysicsSolver<scalar, time>::b_field_vecs(const particle_cloud_type& particles, const time t)
175173
{
176-
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << "time=" << t;
174+
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << " time=" << t;
177175
auto b_vecs = cloud_component_factory<scalar>(particles->size(), particles->dim());
178176
for (size_t p = 0; p < particles->size(); ++p) {
179177
b_vecs[p] = this->get_b_field_vector() / particles->charges()[p] / particles->masses()[p];
@@ -186,7 +184,7 @@ namespace pfasst
186184
ParticleCloudComponent<scalar>
187185
WrapperSimplePhysicsSolver<scalar, time>::force_evaluate(const particle_cloud_type& particles, const time t)
188186
{
189-
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << "time=" << t;
187+
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << " time=" << t;
190188
auto e_force = this->e_field_evaluate(particles, t);
191189
auto b_force = this->b_field_evaluate(particles, t);
192190
VLOG_FUNC_END("WrapperSimplePhysicsSolver");
@@ -197,7 +195,7 @@ namespace pfasst
197195
scalar
198196
WrapperSimplePhysicsSolver<scalar, time>::energy(const particle_cloud_type& particles, const time t)
199197
{
200-
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << "time=" << t;
198+
VLOG_FUNC_START("WrapperSimplePhysicsSolver") << " time=" << t;
201199
size_t num_particles = particles->size();
202200
assert(DIM == particles->dim());
203201

@@ -212,7 +210,6 @@ namespace pfasst
212210

213211
auto energy = solver::compute_energy(packed_positions, packed_velocities, packed_charges, packed_masses,
214212
num_particles, t, this->config.get());
215-
VLOG(2) << LOG_INDENT << "energy =" << energy;
216213
delete[] packed_velocities;
217214
delete[] packed_positions;
218215
delete[] packed_masses;

0 commit comments

Comments
 (0)