21template <
typename RADIAL_BASIS_FUNCTION_T>
35 const RADIAL_BASIS_FUNCTION_T &function,
78template <
typename RADIAL_BASIS_FUNCTION_T>
82 const RADIAL_BASIS_FUNCTION_T &function,
85 :
Mapping(constraint, dimensions, false, mappingType),
98template <
typename RADIAL_BASIS_FUNCTION_T>
105 "Setting the z-axis to dead on a 2-dimensional problem has no effect. Please remove the respective mapping's \"z-dead\" attribute.");
106 PRECICE_CHECK(
std::any_of(
_deadAxis.begin(),
_deadAxis.end(), [](
const auto &ax) { return ax == false; }),
"You cannot set all axes to dead for an RBF mapping. Please remove one of the respective mapping's \"x-dead\", \"y-dead\", or \"z-dead\" attributes.");
109template <
typename RADIAL_BASIS_FUNCTION_T>
123template <
typename RADIAL_BASIS_FUNCTION_T>
132 filterMesh =
input();
136 if (otherMesh->empty())
141 auto bb = otherMesh->getBoundingBox();
146 auto &vertices = filterMesh->vertices();
147 std::for_each(vertices.begin(), vertices.end(), [&bb](
auto &v) {
148 if (bb.contains(v)) {
153 filterMesh->tagAll();
161template <
typename RADIAL_BASIS_FUNCTION_T>
188 auto vertices =
mesh->index().getVerticesInsideBox(bb);
189 std::for_each(vertices.begin(), vertices.end(), [&
mesh](
size_t v) { mesh->vertex(v).tag(); });
#define PRECICE_WARN_IF(condition,...)
#define PRECICE_TRACE(...)
#define PRECICE_CHECK(check,...)
#define PRECICE_ASSERT(...)
T back_inserter(T... args)
mesh::PtrMesh output() const
Returns pointer to output mesh.
Constraint
Specifies additional constraints for a mapping.
int getDimensions() const
Mapping(Constraint constraint, int dimensions, bool requiresGradientData, InitialGuessRequirement initialGuessRequirement)
Constructor, takes mapping constraint.
mesh::PtrMesh input() const
Returns pointer to input mesh.
bool isScaledConsistent() const
Returns true if mapping is a form of scaled consistent mapping.
void setInputRequirement(MeshRequirement requirement)
Sets the mesh requirement for the input mesh.
void setOutputRequirement(MeshRequirement requirement)
Sets the mesh requirement for the output mesh.
virtual bool hasConstraint(const Constraint &constraint) const
Checks whether the mapping has the given constraint or not.
InitialGuessRequirement
Specifies whether the mapping requires an initial guess.
RadialBasisFctBaseMapping(Constraint constraint, int dimensions, const RADIAL_BASIS_FUNCTION_T &function, std::array< bool, 3 > deadAxis, InitialGuessRequirement mappingType)
Constructor.
~RadialBasisFctBaseMapping() override=default
void tagMeshSecondRound() final override
void setDeadAxis(std::array< bool, 3 > deadAxis)
converts the boolean switches to a boolean vector
void computeMapping() override=0
Computes the mapping coefficients from the in- and output mesh.
void tagMeshFirstRound() final override
Method used by partition. Tags vertices that could be owned by this rank.
int getPolynomialParameters() const
std::vector< bool > _deadAxis
true if the mapping along some axis should be ignored
void clear() override=0
Removes a computed mapping.
precice::logging::Logger _log
RADIAL_BASIS_FUNCTION_T _basisFunction
Radial basis function type used in interpolation.
An axis-aligned bounding box around a (partition of a) mesh.
void expandBy(const BoundingBox &otherBB)
Expand bounding box using another bounding box.
contains the logging framework.
contains data mapping from points to meshes.
provides Mesh, Data and primitives.
std::shared_ptr< Mesh > PtrMesh
Main namespace of the precice library.