preCICE v3.2.0
Loading...
Searching...
No Matches
RadialBasisFctMappingTest.cpp File Reference
#include <Eigen/Core>
#include <algorithm>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "logging/Logger.hpp"
#include "mapping/Mapping.hpp"
#include "mapping/RadialBasisFctMapping.hpp"
#include "mapping/RadialBasisFctSolver.hpp"
#include "mapping/config/MappingConfiguration.hpp"
#include "mapping/impl/BasisFunctions.hpp"
#include "mapping/tests/RadialBasisFctHelper.hpp"
#include "mesh/Data.hpp"
#include "mesh/Mesh.hpp"
#include "mesh/SharedPointer.hpp"
#include "mesh/Utils.hpp"
#include "mesh/Vertex.hpp"
#include "testing/TestContext.hpp"
#include "testing/Testing.hpp"
Include dependency graph for RadialBasisFctMappingTest.cpp:

Go to the source code of this file.

Classes

struct  VertexSpecification
 Holds rank, owner, position and value of a single vertex. More...
struct  MeshSpecification

Macros

#define doLocalCode(Type, function, polynomial)

Typedefs

using ReferenceSpecification = std::vector<std::pair<int, std::vector<double>>>
 Contains which values are expected on which rank: rank -> vector of data.

Functions

mesh::PtrMesh getDistributedMesh (const TestContext &context, MeshSpecification &meshSpec, int globalIndexOffset=0, bool meshIsSmaller=false)
Eigen::VectorXd getDistributedData (const TestContext &context, MeshSpecification const &meshSpec)
void testDistributed (const TestContext &context, Mapping &mapping, MeshSpecification inMeshSpec, MeshSpecification outMeshSpec, ReferenceSpecification referenceSpec, int inGlobalIndexOffset=0, bool meshIsSmaller=false)
 PRECICE_TEST_SETUP (""_on(4_ranks).setupIntraComm()) BOOST_AUTO_TEST_CASE(DistributedConsistent2DV1)
 Test with a homogeneous distribution of mesh among ranks.
void testTagging (const TestContext &context, MeshSpecification inMeshSpec, MeshSpecification outMeshSpec, MeshSpecification shouldTagFirstRound, MeshSpecification shouldTagSecondRound, bool consistent)
 BOOST_AUTO_TEST_CASE (MapThinPlateSplines)
 BOOST_AUTO_TEST_CASE (MapMultiquadrics)
 BOOST_AUTO_TEST_CASE (MapInverseMultiquadrics)
 BOOST_AUTO_TEST_CASE (MapVolumeSplines)
 BOOST_AUTO_TEST_CASE (MapGaussian)
 BOOST_AUTO_TEST_CASE (MapCompactThinPlateSplinesC2)
 BOOST_AUTO_TEST_CASE (MapCompactPolynomialC0)
 BOOST_AUTO_TEST_CASE (MapCompactPolynomialC2)
 BOOST_AUTO_TEST_CASE (MapCompactPolynomialC4)
 BOOST_AUTO_TEST_CASE (MapCompactPolynomialC6)
 BOOST_AUTO_TEST_CASE (MapCompactPolynomialC8)
void testDeadAxis2d (Polynomial polynomial, Mapping::Constraint constraint)
void testDeadAxis3d (Polynomial polynomial, Mapping::Constraint constraint)
 BOOST_AUTO_TEST_CASE (DeadAxis2Consistent)
 BOOST_AUTO_TEST_CASE (DeadAxis3DConsistent)
 BOOST_AUTO_TEST_CASE (DeadAxis2Conservative)
 BOOST_AUTO_TEST_CASE (DeadAxis3DConervative)
 BOOST_AUTO_TEST_CASE (inverseTriangularMatrix)

Variables

constexpr int meshDims2D {2}

Macro Definition Documentation

◆ doLocalCode

#define doLocalCode ( Type,
function,
polynomial )
Value:
{ \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> consistentMap2D(Mapping::CONSISTENT, 2, function, {{false, false, false}}, polynomial); \
perform2DTestConsistentMapping(consistentMap2D); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> consistentMap2DVector(Mapping::CONSISTENT, 2, function, {{false, false, false}}, polynomial); \
perform2DTestConsistentMappingVector(consistentMap2DVector); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> consistentMap3D(Mapping::CONSISTENT, 3, function, {{false, false, false}}, polynomial); \
perform3DTestConsistentMapping(consistentMap3D); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> scaledConsistentMap2D(Mapping::SCALED_CONSISTENT_SURFACE, 2, function, {{false, false, false}}, polynomial); \
perform2DTestScaledConsistentMapping(scaledConsistentMap2D); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> scaledConsistentMap3D(Mapping::SCALED_CONSISTENT_SURFACE, 3, function, {{false, false, false}}, polynomial); \
perform3DTestScaledConsistentMapping(scaledConsistentMap3D); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> conservativeMap2D(Mapping::CONSERVATIVE, 2, function, {{false, false, false}}, polynomial); \
perform2DTestConservativeMapping(conservativeMap2D); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> conservativeMap2DVector(Mapping::CONSERVATIVE, 2, function, {{false, false, false}}, polynomial); \
perform2DTestConservativeMappingVector(conservativeMap2DVector); \
RadialBasisFctMapping<RadialBasisFctSolver<Type>> conservativeMap3D(Mapping::CONSERVATIVE, 3, function, {{false, false, false}}, polynomial); \
perform3DTestConservativeMapping(conservativeMap3D); \
}
Mapping with radial basis functions.

Definition at line 1301 of file RadialBasisFctMappingTest.cpp.

Typedef Documentation

◆ ReferenceSpecification

Contains which values are expected on which rank: rank -> vector of data.

Definition at line 65 of file RadialBasisFctMappingTest.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/16]

BOOST_AUTO_TEST_CASE ( DeadAxis2Conservative )

Definition at line 1574 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/16]

BOOST_AUTO_TEST_CASE ( DeadAxis2Consistent )

Definition at line 1556 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/16]

BOOST_AUTO_TEST_CASE ( DeadAxis3DConervative )

Definition at line 1583 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/16]

BOOST_AUTO_TEST_CASE ( DeadAxis3DConsistent )

Definition at line 1565 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/16]

BOOST_AUTO_TEST_CASE ( inverseTriangularMatrix )

Definition at line 1596 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/16]

BOOST_AUTO_TEST_CASE ( MapCompactPolynomialC0 )

Definition at line 1374 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/16]

BOOST_AUTO_TEST_CASE ( MapCompactPolynomialC2 )

Definition at line 1383 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/16]

BOOST_AUTO_TEST_CASE ( MapCompactPolynomialC4 )

Definition at line 1392 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/16]

BOOST_AUTO_TEST_CASE ( MapCompactPolynomialC6 )

Definition at line 1401 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/16]

BOOST_AUTO_TEST_CASE ( MapCompactPolynomialC8 )

Definition at line 1410 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/16]

BOOST_AUTO_TEST_CASE ( MapCompactThinPlateSplinesC2 )

Definition at line 1365 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [12/16]

BOOST_AUTO_TEST_CASE ( MapGaussian )

Definition at line 1357 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/16]

BOOST_AUTO_TEST_CASE ( MapInverseMultiquadrics )

Definition at line 1340 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [14/16]

BOOST_AUTO_TEST_CASE ( MapMultiquadrics )

Definition at line 1331 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [15/16]

BOOST_AUTO_TEST_CASE ( MapThinPlateSplines )

Definition at line 1322 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [16/16]

BOOST_AUTO_TEST_CASE ( MapVolumeSplines )

Definition at line 1348 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ getDistributedData()

Eigen::VectorXd getDistributedData ( const TestContext & context,
MeshSpecification const & meshSpec )

Definition at line 99 of file RadialBasisFctMappingTest.cpp.

◆ getDistributedMesh()

mesh::PtrMesh getDistributedMesh ( const TestContext & context,
MeshSpecification & meshSpec,
int globalIndexOffset = 0,
bool meshIsSmaller = false )

Definition at line 67 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ PRECICE_TEST_SETUP()

PRECICE_TEST_SETUP ( "" _on4_ranks).setupIntraComm()

Test with a homogeneous distribution of mesh among ranks.

Tests a non-contigous owner distributed at the outMesh.

Using meshes of different sizes, outMesh is smaller then inMesh.

Using meshes of different sizes, inMesh is smaller then outMesh.

Using a more heterogeneous distribution of vertices and owner.

same as 2DV4, but strictly linear input values, converges and gives correct results

Some ranks are empty, does not converge.

Test with a very heterogeneous distributed and non-continuous ownership.

Using a more heterogeneous distributon of vertices and owner.

Definition at line 158 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ testDeadAxis2d()

void testDeadAxis2d ( Polynomial polynomial,
Mapping::Constraint constraint )

Definition at line 1419 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ testDeadAxis3d()

void testDeadAxis3d ( Polynomial polynomial,
Mapping::Constraint constraint )

Definition at line 1481 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ testDistributed()

void testDistributed ( const TestContext & context,
Mapping & mapping,
MeshSpecification inMeshSpec,
MeshSpecification outMeshSpec,
ReferenceSpecification referenceSpec,
int inGlobalIndexOffset = 0,
bool meshIsSmaller = false )

Definition at line 119 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ testTagging()

void testTagging ( const TestContext & context,
MeshSpecification inMeshSpec,
MeshSpecification outMeshSpec,
MeshSpecification shouldTagFirstRound,
MeshSpecification shouldTagSecondRound,
bool consistent )

Definition at line 1188 of file RadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

Variable Documentation

◆ meshDims2D

int meshDims2D {2}
constexpr

Definition at line 155 of file RadialBasisFctMappingTest.cpp.