Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/AMReX-Codes/amrex in…
Browse files Browse the repository at this point in the history
…to comments-linop-AB-convention
  • Loading branch information
eebasso committed Dec 6, 2023
2 parents d0039d1 + edb4c25 commit adf9ac0
Show file tree
Hide file tree
Showing 22 changed files with 345 additions and 274 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/cleanup-cache-postpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
set +e
keys=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH | cut -f 1)
# $keys might contain spaces. Thus we set IFS to \n.
IFS=$'\n'
for k in $keys
do
gh actions-cache delete $k -R $REPO -B $BRANCH --confirm
gh actions-cache delete "$k" -R $REPO -B $BRANCH --confirm
done
unset IFS
13 changes: 8 additions & 5 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
EVENT=${{ github.event.workflow_run.event }}
# Triggering workflow run name (e.g., LinuxClang)
WORKFLOW_NAME=${{ github.event.workflow_run.name }}
WORKFLOW_NAME="${{ github.event.workflow_run.name }}"
if [[ $EVENT == "pull_request" ]]; then
gh run download ${{ github.event.workflow_run.id }} -n pr_number
Expand All @@ -45,16 +45,19 @@ jobs:
# The goal is to keep the last used key of each job and delete all others.
# something like ccache-LinuxClang-
keyprefix=ccache-${WORKFLOW_NAME}-
keyprefix="ccache-${WORKFLOW_NAME}-"
cached_jobs=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key $keyprefix | awk -F '-git-' '{print $1}' | sort | uniq)
cached_jobs=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key "$keyprefix" | awk -F '-git-' '{print $1}' | sort | uniq)
# cached_jobs is something like "ccache-LinuxClang-configure-1d ccache-LinuxClang-configure-2d".
# It might also contain spaces. Thus we set IFS to \n.
IFS=$'\n'
for j in $cached_jobs
do
old_keys=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key ${j}-git- --sort last-used | cut -f 1 | tail -n +2)
old_keys=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key "${j}-git-" --sort last-used | cut -f 1 | tail -n +2)
for k in $old_keys
do
gh actions-cache delete $k -R $REPO -B $BRANCH --confirm
gh actions-cache delete "$k" -R $REPO -B $BRANCH --confirm
done
done
unset IFS
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

jobs:
analyze:
if: ${{ github.repository == 'AMReX-Codes/amrex' || github.event_name != 'schedule' }}
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down
41 changes: 41 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
# 23.12

-- solve_cg: avoid use of MF `z` (#3637)

-- Fix: nosmt OMP Threads Default (#3647)
`amrex.omp_threads`: Can Avoid SMT (#3607)

-- When checking for periodic outs on GPU, copy full particle data (#3646)

-- MLEBABecLap: Support Robin BC at Domain Boundaries (#3617)

-- Ascent: SoA Particle Support (#3350)

-- solve_bicgstab: use fewer MFs (#3635)

-- solve_bicgstab: cut use of `s` (#3629)

-- Bug fix for amrex::Subtract when called with interger nghost (#3634)

-- Fix typo in `MLMGT<MF>::getGradSolution` when `MF` is different from `AMF` (#3631)

-- SUNDIALS: Use sunrealtype instead of realtype (#3632)

-- SYCL: Use get_multi_ptr instead of get_pointer (#3630)

-- Plotfile Tools: GPU support (#3626)

-- solve_cg: use linop.make instead of MF constructor (#3627)

-- CArena: shrink_in_place and operator<< (#3621)

-- solve_bicgstab: use linop.make instead of MF constructor (#3619)

-- replace AMREX_DEVICE_COMPILE with AMREX_IF_ON_DEVICE and AMREX_IF_ON_HOST (#3591)

-- [Breaking] Prefix `amrex_` to each plotfile Tool (#3600)

-- FillRandom: Use MKL host API (#3536)

-- use hipPointerAttribute_t.type as HIP is removing hipPointerAttribute_t.memoryType (#3610)

# 23.11

-- Give FlashFluxRegisters ways to accumulate data in registers (#3597)
Expand Down
9 changes: 6 additions & 3 deletions Docs/sphinx_documentation/source/LinearSolvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@ To set homogeneous Dirichlet boundary conditions, call
ml_ebabeclap->setEBHomogDirichlet(lev, coeff);

where coeff can be a real number (i.e. the value is the same at every cell)
or is the MultiFab holding the coefficient of the gradient at each cell with an EB face.
or a MultiFab holding the coefficient of the gradient at each cell with an EB face.
In other words, coeff is :math:`\beta` in the canonical form given in equation :eq:`eqn::abeclap`
located at the EB surface centroid.

To set inhomogeneous Dirichlet boundary conditions, call

Expand All @@ -494,8 +496,9 @@ To set inhomogeneous Dirichlet boundary conditions, call
ml_ebabeclap->setEBDirichlet(lev, phi_on_eb, coeff);

where phi_on_eb is the MultiFab holding the Dirichlet values in every cut cell,
and coeff again is a real number (i.e. the value is the same at every cell)
or a MultiFab holding the coefficient of the gradient at each cell with an EB face.
and coeff again is a real number
or a MultiFab holding the coefficient of the gradient at each cell with an EB face,
i.e. :math:`\beta` in equation :eq:`eqn::abeclap` located at the EB surface centroid.

Currently there are options to define the face-based coefficients on
face centers vs face centroids, and to interpret the solution variable
Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_amrex_version():

intersphinx_mapping = {
'amrex_tutorials': ('https://amrex-codes.github.io/amrex/tutorials_html/', None),
'amrex_hydro':('https://amrex-codes.github.io/amrex/hydro_html/', None)
'amrex_hydro':('https://amrex-fluids.github.io/amrex-hydro/docs_html/', None)
}

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion Src/AmrCore/AMReX_AmrMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ AmrMesh::checkInput ()
for (int i = 0; i < max_level; i++)
{
if (MaxRefRatio(i) < 2) {
amrex::Error("Amr::checkInput: bad ref_ratios");
amrex::Warning("Amr::checkInput: ref_ratios all equal to one!");
}
}

Expand Down
96 changes: 48 additions & 48 deletions Src/Base/AMReX_BaseFab.H
Original file line number Diff line number Diff line change
Expand Up @@ -90,54 +90,6 @@ makeArray4 (T* p, Box const& bx, int ncomp) noexcept
return Array4<T>{p, amrex::begin(bx), amrex::end(bx), ncomp};
}

/**
* \brief A Fortran Array-like Object
* BaseFab emulates the Fortran array concept.
* Useful operations can be performed upon
* BaseFabs in C++, and they provide a convenient interface to
* Fortran when it is necessary to retreat into that language.
* BaseFab is a template class. Through use of the
* template, a BaseFab may be based upon any class. So far at least,
* most applications have been based upon simple types like integers,
* real*4s, or real*8s. Most applications do not use BaseFabs
* directly, but utilize specialized classes derived from BaseFab.
* Classes derived from BaseFab include FArrayBox, IArrayBox, TagBox,
* Mask, EBFArrayBox, EBCellFlag and CutFab.
* BaseFab objects depend on the dimensionality of space
* (indirectly through the DOMAIN Box member). It is
* typical to define the macro SPACEDIM to be 1, 2, or 3 to indicate
* the dimension of space. See the discussion of class Box for more
* information. A BaseFab contains a Box DOMAIN, which indicates the
* integer indexing space over which the array is defined. A BaseFab
* also has NVAR components. By components, we mean that for each
* point in the rectangular indexing space, there are NVAR values
* associated with that point. A Fortran array corresponding to a
* BaseFab would have (SPACEDIM+1) dimensions.
* By design, the array layout in a BaseFab mirrors that of a
* Fortran array. The first index (x direction for example) varies
* most rapidly, the next index (y direction), if any, varies next
* fastest. The component index varies last, after all the spatial
* indices.
* It is sometimes convenient to be able to treat a sub-array within an
* existing BaseFab as a BaseFab in its own right. This is often
* referred to as aliasing the BaseFab. Note that when aliasing is
* used, the BaseFabs domain will not, in general, be the same as the
* parent BaseFabs domain, nor will the number of components.
* BaseFab is a dimension dependent class, so SPACEDIM must be
* defined as either 1, 2, or 3 when compiling.
* This is NOT a polymorphic class.
* It does NOT provide a copy constructor or assignment operator.
* T MUST have a default constructor and an assignment operator.
*/

template <typename T>
typename std::enable_if<std::is_arithmetic<T>::value>::type
placementNew (T* const /*ptr*/, Long /*n*/)
Expand Down Expand Up @@ -178,6 +130,54 @@ placementDelete (T* const ptr, Long n)
});
}

/**
* \brief A FortranArrayBox(FAB)-like object
*
* BaseFab emulates the Fortran array concept.
* Useful operations can be performed upon
* BaseFabs in C++, and they provide a convenient interface to
* Fortran when it is necessary to retreat into that language.
*
* BaseFab is a template class. Through use of the
* template, a BaseFab may be based upon any class. So far at least,
* most applications have been based upon simple types like integers,
* real*4s, or real*8s. Most applications do not use BaseFabs
* directly, but utilize specialized classes derived from BaseFab.
*
* Classes derived from BaseFab include FArrayBox, IArrayBox, TagBox,
* Mask, EBFArrayBox, EBCellFlag and CutFab.
*
* BaseFab objects depend on the dimensionality of space
* (indirectly through the DOMAIN Box member). It is
* typical to define the macro SPACEDIM to be 1, 2, or 3 to indicate
* the dimension of space. See the discussion of class Box for more
* information. A BaseFab contains a Box DOMAIN, which indicates the
* integer indexing space over which the array is defined. A BaseFab
* also has NVAR components. By components, we mean that for each
* point in the rectangular indexing space, there are NVAR values
* associated with that point. A Fortran array corresponding to a
* BaseFab would have (SPACEDIM+1) dimensions.
*
* By design, the array layout in a BaseFab mirrors that of a
* Fortran array. The first index (x direction for example) varies
* most rapidly, the next index (y direction), if any, varies next
* fastest. The component index varies last, after all the spatial
* indices.
*
* It is sometimes convenient to be able to treat a sub-array within an
* existing BaseFab as a BaseFab in its own right. This is often
* referred to as aliasing the BaseFab. Note that when aliasing is
* used, the BaseFabs domain will not, in general, be the same as the
* parent BaseFabs domain, nor will the number of components.
* BaseFab is a dimension dependent class, so SPACEDIM must be
* defined as either 1, 2, or 3 when compiling.
*
* This is NOT a polymorphic class.
*
* It does NOT provide a copy constructor or assignment operator.
*
* \tparam T MUST have a default constructor and an assignment operator.
*/
template <class T>
class BaseFab
: public DataAllocator
Expand Down
12 changes: 6 additions & 6 deletions Src/Base/AMReX_BoxArray.H
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,16 @@ struct BATransformer
// for backward compatibility
using BndryBATransformer = BATransformer;

/**
* \brief A collection of Boxes stored in an Array. It is a
* reference-counted concrete class, not a polymorphic one; i.e. you
* cannot use any of the List member functions with a BoxList.
*/

class MFIter;
class AmrMesh;
class FabArrayBase;

/**
* \brief A collection of Boxes stored in an Array.
*
* It is a reference-counted concrete class, not a polymorphic one; i.e. you
* cannot use any of the List member functions with a BoxList.
*/
class BoxArray
{
public:
Expand Down
2 changes: 0 additions & 2 deletions Src/Base/AMReX_FArrayBox.H
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class FArrayBox;
* primarily for FArrayBox implementers; i.e. user's shouldn't
* call any of the member functions in this class directly.
*/

class FABio // NOLINT(cppcoreguidelines-special-member-functions)
{
public:
Expand Down Expand Up @@ -224,7 +223,6 @@ private:
* This class does NOT provide a copy constructor or assignment operator,
* but it has a move constructor.
*/

class FArrayBox
:
public BaseFab<Real>
Expand Down
Loading

0 comments on commit adf9ac0

Please sign in to comment.