Skip to content

Commit

Permalink
TestSubcycling: clang-format subcycling.cxx
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Sep 6, 2024
1 parent b829f41 commit 265b04a
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions TestSubcycling/src/subcycling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,26 @@
#include "cctk_Parameters.h"
#include "loop.hxx"

extern "C"
void TestSubcycling_Init(CCTK_ARGUMENTS)
{
extern "C" void TestSubcycling_Init(CCTK_ARGUMENTS) {
DECLARE_CCTK_PARAMETERS;
DECLARE_CCTK_ARGUMENTSX_TestSubcycling_Init;

CCTK_INFO("Initializing grid function");
grid.loop_all<0,0,0>(grid.nghostzones, [=](const Loop::PointDesc &pt) {
grid.loop_all<0, 0, 0>(grid.nghostzones, [=](const Loop::PointDesc &pt) {
CCTK_REAL canary = 100 + 10 * cctk_iteration + 1 * cctk_level;
iteration(pt.I) = canary;
});

}

extern "C"
void TestSubcycling_Update(CCTK_ARGUMENTS)
{
extern "C" void TestSubcycling_Update(CCTK_ARGUMENTS) {
DECLARE_CCTK_PARAMETERS;
DECLARE_CCTK_ARGUMENTSX_TestSubcycling_Update;

CCTK_VINFO("Updating grid function at iteration %d level %d time %g", cctk_iteration, cctk_level, cctk_time);
grid.loop_int<0,0,0>(grid.nghostzones, [=] CCTK_HOST(const Loop::PointDesc &pt) {
CCTK_REAL canary = 100 + 10 * cctk_iteration + 1 * cctk_level;
iteration(pt.I) = canary;
});

CCTK_VINFO("Updating grid function at iteration %d level %d time %g",
cctk_iteration, cctk_level, cctk_time);
grid.loop_int<0, 0, 0>(
grid.nghostzones, [=] CCTK_HOST(const Loop::PointDesc &pt) {
CCTK_REAL canary = 100 + 10 * cctk_iteration + 1 * cctk_level;
iteration(pt.I) = canary;
});
}

0 comments on commit 265b04a

Please sign in to comment.