Skip to content

Commit 45472c9

Browse files
use merge dir in example
1 parent dc5ed4a commit 45472c9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

examples/dipole_ice/dipole_ice.cxx

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main(int argc, char* argv[]) {
2727

2828
auto eps = [](scalar_t r, scalar_t z) {
2929

30-
return 1.0;
30+
// return 1.0;
3131

3232
scalar_t z_m = z / 3.0;
3333
if(z_m > 0.0) {
@@ -58,14 +58,14 @@ int main(int argc, char* argv[]) {
5858

5959
// CylinderGeometry geom(20, -15, 15, eps);
6060
// InfEDipoleAntenna dipole(0.0, 10.0, 0.0, impulse_response);
61+
// scalar_t t_end = 25;
6162

62-
CylinderGeometry geom(70, -150, 150, eps);
63-
InfEDipoleAntenna dipole(0.0, 10.0, 0.0, impulse_response);
64-
63+
CylinderGeometry geom(150, -150, 150, eps);
64+
InfEDipoleAntenna dipole(0.0, 10.0, -30.0, impulse_response);
6565
scalar_t t_end = 150;
66-
//scalar_t t_end = 25;
66+
6767
CylindricalWeightingFieldCalculator wfc(geom, dipole, t_end);
68-
wfc.Calculate(wf_path);
68+
wfc.Calculate(wf_path, "/scratch/midway3/windischhofer/eisvogel/");
6969

7070
return 0;
7171
}

include/Eisvogel/CylindricalWeightingFieldCalculator.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CylindricalWeightingFieldCalculator {
1313
public:
1414
CylindricalWeightingFieldCalculator(CylinderGeometry& geom, const Antenna& antenna, scalar_t t_end,
1515
double courant_factor = 0.5, double resolution = 12, double pml_width = 1.0);
16-
void Calculate(std::filesystem::path outdir, std::filesystem::path tmpdir = "", std::filesystem::path mergedir = "");
16+
void Calculate(std::filesystem::path outdir, std::filesystem::path mergedir = "", std::filesystem::path tmpdir = "");
1717

1818
private:
1919

src/CylindricalWeightingFieldCalculator.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ namespace meep {
325325

326326
} // end namespace meep
327327

328-
void CylindricalWeightingFieldCalculator::Calculate(std::filesystem::path outdir, std::filesystem::path tmpdir, std::filesystem::path mergedir) {
328+
void CylindricalWeightingFieldCalculator::Calculate(std::filesystem::path outdir, std::filesystem::path mergedir, std::filesystem::path tmpdir) {
329329

330330
// Prepare merge directory
331331
if(mergedir.empty()) {
@@ -425,7 +425,7 @@ void CylindricalWeightingFieldCalculator::Calculate(std::filesystem::path outdir
425425
std::cout << "==============================================" << std::endl;
426426

427427
if(meep::am_master()) {
428-
std::shared_ptr<CylindricalWeightingField> cwf = std::make_shared<CylindricalWeightingField>(outdir, *m_start_coords, *m_end_coords);
428+
std::shared_ptr<CylindricalWeightingField> cwf = std::make_shared<CylindricalWeightingField>(mergedir, *m_start_coords, *m_end_coords);
429429
cwf -> MakeMetadataPersistent();
430430
cwf -> RebuildChunks(requested_chunk_size);
431431

0 commit comments

Comments
 (0)