Skip to content

Commit

Permalink
Added 2 DOFs for He on dislocations and GB (ORNL-Fusion#112).
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Blondel committed Jul 13, 2023
1 parent 7a1c4fb commit 7b713c3
Show file tree
Hide file tree
Showing 17 changed files with 963 additions and 38 deletions.
51 changes: 51 additions & 0 deletions xolotl/core/include/xolotl/core/network/PSIReaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,57 @@ class PSISinkReaction :
double
computeRate(IndexType gridIndex, double time = 0.0);
};

template <typename TSpeciesEnum>
class PSIDisloSinkReaction :
public DisloSinkReaction<PSIReactionNetwork<TSpeciesEnum>,
PSIDisloSinkReaction<TSpeciesEnum>>
{
public:
using Superclass = DisloSinkReaction<PSIReactionNetwork<TSpeciesEnum>,
PSIDisloSinkReaction<TSpeciesEnum>>;

using Superclass::Superclass;
using IndexType = typename Superclass::IndexType;

KOKKOS_INLINE_FUNCTION
double
getSinkBias();

KOKKOS_INLINE_FUNCTION
double
getSinkStrength();

KOKKOS_INLINE_FUNCTION
double
computeRate(IndexType gridIndex, double time = 0.0);
};

template <typename TSpeciesEnum>
class PSIGBSinkReaction :
public GBSinkReaction<PSIReactionNetwork<TSpeciesEnum>,
PSIGBSinkReaction<TSpeciesEnum>>
{
public:
using Superclass = GBSinkReaction<PSIReactionNetwork<TSpeciesEnum>,
PSIGBSinkReaction<TSpeciesEnum>>;

using Superclass::Superclass;
using IndexType = typename Superclass::IndexType;

KOKKOS_INLINE_FUNCTION
double
getSinkBias();

KOKKOS_INLINE_FUNCTION
double
getSinkStrength();

KOKKOS_INLINE_FUNCTION
double
computeRate(IndexType gridIndex, double time = 0.0);
};

template <typename TSpeciesEnum>
class PSITrapMutationReaction :
public TrapMutationReaction<PSIReactionNetwork<TSpeciesEnum>,
Expand Down
3 changes: 3 additions & 0 deletions xolotl/core/include/xolotl/core/network/PSIReactionNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ class PSIReactionNetwork :
void
initializeExtraClusterData(const options::IOptions& options);

void
initializeExtraDOFs(const options::IOptions& options);

void
updateExtraClusterData(const std::vector<double>& gridTemps,
const std::vector<double>& gridDepths);
Expand Down
9 changes: 8 additions & 1 deletion xolotl/core/include/xolotl/core/network/PSITraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class PSIDissociationReaction;
template <typename TSpeciesEnum>
class PSISinkReaction;
template <typename TSpeciesEnum>
class PSIDisloSinkReaction;
template <typename TSpeciesEnum>
class PSIGBSinkReaction;
template <typename TSpeciesEnum>
class PSITrapMutationReaction;
template <typename TSpeciesEnum>
class PSIClusterGenerator;
Expand Down Expand Up @@ -281,10 +285,13 @@ struct ReactionNetworkTraits<PSIReactionNetwork<TSpeciesEnum>>
using ProductionReactionType = PSIProductionReaction<Species>;
using DissociationReactionType = PSIDissociationReaction<Species>;
using SinkReactionType = PSISinkReaction<Species>;
using DisloSinkReactionType = PSIDisloSinkReaction<Species>;
using GBSinkReactionType = PSIGBSinkReaction<Species>;
using TrapMutationReactionType = PSITrapMutationReaction<Species>;

using ReactionTypeList = std::tuple<ProductionReactionType,
DissociationReactionType, SinkReactionType, TrapMutationReactionType>;
DissociationReactionType, SinkReactionType, DisloSinkReactionType,
GBSinkReactionType, TrapMutationReactionType>;

using ClusterGenerator = PSIClusterGenerator<Species>;
};
Expand Down
5 changes: 5 additions & 0 deletions xolotl/core/include/xolotl/core/network/ReactionNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ class ReactionNetwork : public ReactionNetworkInterface<TImpl>::Type
{
}

void
initializeExtraDOFs(const options::IOptions&)
{
}

void
updateExtraClusterData(
const std::vector<double>&, const std::vector<double>&)
Expand Down
Loading

0 comments on commit 7b713c3

Please sign in to comment.