-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add diagnostics that does not depend on communication
- Loading branch information
Showing
42 changed files
with
715 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
set(namel diagnostics) | ||
string(TOUPPER ${namel} nameu) | ||
|
||
file(GLOB src_files | ||
*.cpp | ||
) | ||
|
||
string(TOLOWER ${CMAKE_BUILD_TYPE} buildl) | ||
string(TOUPPER ${CMAKE_BUILD_TYPE} buildu) | ||
|
||
add_library(${namel}_${buildl} | ||
OBJECT | ||
${src_files} | ||
) | ||
|
||
set_target_properties(${namel}_${buildl} | ||
PROPERTIES | ||
COMPILE_FLAGS ${CMAKE_CXX_FLAGS_${buildu}} | ||
) |
13 changes: 7 additions & 6 deletions
13
src/snap/diagnostics/buoyancy.cpp → src/diagnostics/buoyancy.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// C/C++ headers | ||
#include <cstring> | ||
#include <sstream> | ||
#include <stdexcept> | ||
|
||
// application | ||
#include <application/application.hpp> | ||
|
||
// Athena++ headers | ||
#include <athena/mesh/mesh.hpp> | ||
|
||
// diagnostics | ||
#include "diagnostics.hpp" | ||
|
||
Diagnostics::Diagnostics(MeshBlock *pmb, std::string name) | ||
: NamedGroup(name), pmy_block_(pmb), ncycle_(0) { | ||
Application::Logger app("main"); | ||
app->Log("Initialize Diagnostics"); | ||
|
||
ncells1_ = pmb->block_size.nx1 + 2 * (NGHOST); | ||
ncells2_ = 1; | ||
ncells3_ = 1; | ||
if (pmb->pmy_mesh->f2) ncells2_ = pmb->block_size.nx2 + 2 * (NGHOST); | ||
if (pmb->pmy_mesh->f3) ncells3_ = pmb->block_size.nx3 + 2 * (NGHOST); | ||
|
||
x1edge_.NewAthenaArray(ncells1_ + 1); | ||
x1edge_p1_.NewAthenaArray(ncells1_); | ||
x2edge_.NewAthenaArray(ncells1_ + 1); | ||
x2edge_p1_.NewAthenaArray(ncells1_); | ||
x3edge_.NewAthenaArray(ncells1_ + 1); | ||
x3edge_p1_.NewAthenaArray(ncells1_); | ||
|
||
x1area_.NewAthenaArray(ncells1_ + 1); | ||
x2area_.NewAthenaArray(ncells1_); | ||
x2area_p1_.NewAthenaArray(ncells1_); | ||
x3area_.NewAthenaArray(ncells1_); | ||
x3area_p1_.NewAthenaArray(ncells1_); | ||
|
||
vol_.NewAthenaArray(ncells1_); | ||
total_vol_.NewAthenaArray(ncells1_); | ||
} | ||
|
||
Diagnostics::~Diagnostics() { | ||
Application::Logger app("main"); | ||
app->Log("Destroy Diagnostics"); | ||
} |
Oops, something went wrong.