Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion src/field/field3d.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,28 @@ void Field3D::setBoundaryTo(const Field3D& f3d) {

allocate(); // Make sure data allocated

/// Loop over boundary regions
if (isFci()) {
// Set yup/ydown using midpoint values from f3d
ASSERT1(f3d.hasParallelSlices());
ASSERT1(hasParallelSlices());

for (auto& region : fieldmesh->getBoundariesPar()) {
for (const auto& pnt : *region) {
// Interpolate midpoint value in f3d
const BoutReal val = pnt.interpolate_sheath_o1(f3d);
// Set the same boundary value in this field
pnt.dirichlet_o1(*this, val);
}
}
}

// Non-FCI.
// Transform to field-aligned coordinates?
// Loop over boundary regions
for (const auto& reg : fieldmesh->getBoundaries()) {
if (isFci() && reg->by != 0) {
continue;
}
/// Loop within each region
for (reg->first(); !reg->isDone(); reg->next()) {
for (int z = 0; z < nz; z++) {
Expand Down
2 changes: 1 addition & 1 deletion tests/integrated/test-fci-mpi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bout_add_mms_test(test-fci-mpi
USE_RUNTEST
USE_DATA_BOUT_INP
PROCESSORS 6
DOWNLOAD https://zenodo.org/record/7614499/files/W7X-conf4-36x8x128.fci.nc?download=1
DOWNLOAD https://zenodo.org/records/14221309/files/W7X-conf0-36x8x128.fci.nc?download=1
DOWNLOAD_NAME grid.fci.nc
REQUIRES BOUT_HAS_PETSC
)
2 changes: 1 addition & 1 deletion tests/integrated/test-laplace-petsc3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ bout_add_integrated_test(test-laplace-petsc3d
data_slab_core/BOUT.inp
data_slab_sol/BOUT.inp
USE_RUNTEST
REQUIRES BOUT_HAS_PETSC
REQUIRES BOUT_HAS_PETSC BOUT_ENABLE_ALL_TESTS
)
3 changes: 3 additions & 0 deletions tests/unit/include/bout/test_single_index_ops.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ TEST_F(SingleIndexOpsTest, Div_par) {

// Need parallel derivatives of input
input.calcParallelSlices();
// and of coordinates
input.getMesh()->getCoordinates()->J.calcParallelSlices();
input.getMesh()->getCoordinates()->g_22.calcParallelSlices();

// Differentiate whole field
Field3D difops = Div_par(input);
Expand Down
Loading