7#include <Kokkos_Core.hpp>
21template<
typename ValueType>
28template<
typename ValueType>
32 std::pair<localIdx, localIdx> range
49template<
typename ValueType>
59 : Base(mesh, dict, patchID, {.assignable =
true, .fixesValue =
false}), mesh_(mesh)
72#ifdef NF_WITH_MPI_SUPPORT
73 fence(domainVector.exec());
74 const int neighborRank =
76 domainVector.boundaryData().communicate(this->range(), neighborRank);
89 static std::string
name() {
return "processor"; }
91 static std::string
doc()
93 return "Set processor boundary values from the corresponding processor-neighbour data.";
96 static std::string
schema() {
return "none"; }
98 virtual std::unique_ptr<VolumeBoundaryFactory<ValueType>>
clone() const final
100 return std::make_unique<Processor>(*
this);
localIdx neighbourRankForRange(std::pair< localIdx, localIdx > range) const
Returns the neighbour rank for the processor patch whose face range matches the given range.
A class representing a dictionary that stores key-value pairs.
Represents the domain fields for a computational domain.
A class for the representation of a 3x3 tensor.
Represents an unstructured mesh in NeoN.
const BoundaryMesh & boundaryMesh() const
Get the boundary mesh.
A class for the representation of a 3D Vec3.
virtual std::unique_ptr< VolumeBoundaryFactory< ValueType > > clone() const final
virtual void update(Field< ValueType > &domainVector) final
static std::string name()
static std::string schema()
std::string getName() const override
Processor(const UnstructuredMesh &mesh, const Dictionary &dict, localIdx patchID)
virtual void correctBoundaryCondition(Field< ValueType > &domainVector) final
virtual void set(Field< ValueType > &domainVector) final
A template class for registering derived classes with a base class.
void updateProcBoundaryOwnerValue(Field< ValueType > &domainVector, const UnstructuredMesh &mesh, std::pair< localIdx, localIdx > range)
template void setProcBoundaryCoefficients< Vec3 >(Field< Vec3 > &, std::pair< localIdx, localIdx >)
void setProcBoundaryCoefficients(Field< ValueType > &domainVector, std::pair< localIdx, localIdx > range)
template void setProcBoundaryCoefficients< scalar >(Field< scalar > &, std::pair< localIdx, localIdx >)
template void setProcBoundaryCoefficients< Tensor >(Field< Tensor > &, std::pair< localIdx, localIdx >)
void fence(const Executor &exec)