preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
PetRadialBasisFctMappingTest.cpp File Reference
#include <Eigen/Core>
#include <algorithm>
#include <map>
#include <memory>
#include <ostream>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "logging/Logger.hpp"
#include "mapping/Mapping.hpp"
#include "mapping/PetRadialBasisFctMapping.hpp"
#include "mapping/config/MappingConfiguration.hpp"
#include "mapping/impl/BasisFunctions.hpp"
#include "mesh/Data.hpp"
#include "mesh/Mesh.hpp"
#include "mesh/SharedPointer.hpp"
#include "mesh/Utils.hpp"
#include "mesh/Vertex.hpp"
#include "precice/impl/versions.hpp"
#include "testing/TestContext.hpp"
#include "testing/Testing.hpp"
#include "utils/EigenHelperFunctions.hpp"
#include "utils/Petsc.hpp"
Include dependency graph for PetRadialBasisFctMappingTest.cpp:

Go to the source code of this file.

Classes

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

Typedefs

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

Functions

void addGlobalIndex (mesh::PtrMesh &mesh, int offset=0)
 
void testSerialScaledConsistent (mesh::PtrMesh inMesh, mesh::PtrMesh outMesh, PtrData inData, PtrData outData)
 
void getDistributedMesh (const TestContext &context, MeshSpecification const &vertices, mesh::PtrMesh &mesh, mesh::PtrData &data, int globalIndexOffset=0)
 
void testDistributed (const TestContext &context, Mapping &mapping, MeshSpecification inMeshSpec, MeshSpecification outMeshSpec, ReferenceSpecification referenceSpec, int inGlobalIndexOffset=0)
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV1)
 Test with a homogeneous distribution of mesh among ranks.
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV1Vector)
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV2)
 Using a more heterogeneous distributon of vertices and owner.
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV3)
 Test with a very heterogeneous distributed and non-continuous ownership.
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV3Vector)
 Test with a very heterogeneous distributed and non-continuous ownership.
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV4)
 Some ranks are empty, does not converge.
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV5)
 
 BOOST_AUTO_TEST_CASE (DistributedConsistent2DV6, *boost::unit_test::tolerance(1e-7))
 same as 2DV4, but strictly linear input values, converges and gives correct results
 
 BOOST_AUTO_TEST_CASE (DistributedConservative2DV1)
 Test with a homogeneous distribution of mesh among ranks.
 
 BOOST_AUTO_TEST_CASE (DistributedConservative2DV1Vector)
 Test with a homogeneous distribution of mesh among ranks.
 
 BOOST_AUTO_TEST_CASE (DistributedConservative2DV2)
 Using a more heterogeneous distribution of vertices and owner.
 
 BOOST_AUTO_TEST_CASE (DistributedConservative2DV3)
 Using meshes of different sizes, inMesh is smaller then outMesh.
 
 BOOST_AUTO_TEST_CASE (DistributedConservative2DV4, *boost::unit_test::tolerance(1e-6))
 Using meshes of different sizes, outMesh is smaller then inMesh.
 
 BOOST_AUTO_TEST_CASE (testDistributedConservative2DV5)
 Tests a non-contigous owner distributed at the outMesh.
 
 BOOST_AUTO_TEST_CASE (testDistributedConservative2DV5Vector)
 Tests a non-contigous owner distributed at the outMesh.
 
void testTagging (const TestContext &context, MeshSpecification inMeshSpec, MeshSpecification outMeshSpec, MeshSpecification shouldTagFirstRound, MeshSpecification shouldTagSecondRound, bool consistent)
 
 BOOST_AUTO_TEST_CASE (TaggingConsistent)
 
 BOOST_AUTO_TEST_CASE (TaggingConservative)
 
void perform2DTestConsistentMapping (Mapping &mapping)
 
void perform2DTestConsistentMappingVector (Mapping &mapping)
 
void perform3DTestConsistentMapping (Mapping &mapping)
 
void perform2DTestScaledConsistentMapping (Mapping &mapping)
 
void perform3DTestScaledConsistentMapping (Mapping &mapping)
 
void perform2DTestConservativeMapping (Mapping &mapping)
 
void perform2DTestConservativeMappingVector (Mapping &mapping)
 
void perform3DTestConservativeMapping (Mapping &mapping)
 
 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 (MapPetCompactPolynomialC0)
 
 BOOST_AUTO_TEST_CASE (MapPetCompactPolynomialC6)
 
 BOOST_AUTO_TEST_CASE (DeadAxis2)
 
 BOOST_AUTO_TEST_CASE (DeadAxis3D)
 
 BOOST_AUTO_TEST_CASE (ConsistentPolynomialSwitch, *boost::unit_test::tolerance(1e-6))
 
 BOOST_AUTO_TEST_CASE (ConservativePolynomialSwitch, *boost::unit_test::tolerance(1e-6))
 
 BOOST_AUTO_TEST_CASE (NoMapping)
 
 BOOST_AUTO_TEST_CASE (TestNonHomongenousGlobalIndex)
 

Typedef Documentation

◆ MeshSpecification

using MeshSpecification = std::vector<VertexSpecification>

Definition at line 85 of file PetRadialBasisFctMappingTest.cpp.

◆ ReferenceSpecification

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

Definition at line 88 of file PetRadialBasisFctMappingTest.cpp.

Function Documentation

◆ addGlobalIndex()

void addGlobalIndex ( mesh::PtrMesh & mesh,
int offset = 0 )

Definition at line 37 of file PetRadialBasisFctMappingTest.cpp.

◆ BOOST_AUTO_TEST_CASE() [1/31]

BOOST_AUTO_TEST_CASE ( ConservativePolynomialSwitch ,
* boost::unit_test::tolerance1e-6 )

Definition at line 2227 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/31]

BOOST_AUTO_TEST_CASE ( ConsistentPolynomialSwitch ,
* boost::unit_test::tolerance1e-6 )

Definition at line 2156 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/31]

BOOST_AUTO_TEST_CASE ( DeadAxis2 )

Definition at line 2050 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/31]

BOOST_AUTO_TEST_CASE ( DeadAxis3D )

Definition at line 2100 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/31]

BOOST_AUTO_TEST_CASE ( DistributedConservative2DV1 )

Test with a homogeneous distribution of mesh among ranks.

Definition at line 584 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/31]

BOOST_AUTO_TEST_CASE ( DistributedConservative2DV1Vector )

Test with a homogeneous distribution of mesh among ranks.

Definition at line 647 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/31]

BOOST_AUTO_TEST_CASE ( DistributedConservative2DV2 )

Using a more heterogeneous distribution of vertices and owner.

Definition at line 710 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/31]

BOOST_AUTO_TEST_CASE ( DistributedConservative2DV3 )

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

Definition at line 775 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/31]

BOOST_AUTO_TEST_CASE ( DistributedConservative2DV4 ,
* boost::unit_test::tolerance1e-6 )

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

Definition at line 839 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV1 )

Test with a homogeneous distribution of mesh among ranks.

Definition at line 182 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV1Vector )

Definition at line 218 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [12/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV2 )

Using a more heterogeneous distributon of vertices and owner.

Definition at line 255 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV3 )

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

Definition at line 293 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [14/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV3Vector )

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

Definition at line 349 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [15/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV4 )

Some ranks are empty, does not converge.

Definition at line 405 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [16/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV5 )

Definition at line 460 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [17/31]

BOOST_AUTO_TEST_CASE ( DistributedConsistent2DV6 ,
* boost::unit_test::tolerance1e-7 )

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

Definition at line 528 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [18/31]

BOOST_AUTO_TEST_CASE ( MapCompactThinPlateSplinesC2 )

Definition at line 1981 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [19/31]

BOOST_AUTO_TEST_CASE ( MapGaussian )

Definition at line 1960 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [20/31]

BOOST_AUTO_TEST_CASE ( MapInverseMultiquadrics )

Definition at line 1918 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [21/31]

BOOST_AUTO_TEST_CASE ( MapMultiquadrics )

Definition at line 1893 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [22/31]

BOOST_AUTO_TEST_CASE ( MapPetCompactPolynomialC0 )

Definition at line 2004 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [23/31]

BOOST_AUTO_TEST_CASE ( MapPetCompactPolynomialC6 )

Definition at line 2027 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [24/31]

BOOST_AUTO_TEST_CASE ( MapThinPlateSplines )

Definition at line 1872 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [25/31]

BOOST_AUTO_TEST_CASE ( MapVolumeSplines )

Definition at line 1939 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [26/31]

BOOST_AUTO_TEST_CASE ( NoMapping )

Definition at line 2307 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [27/31]

BOOST_AUTO_TEST_CASE ( TaggingConservative )

Definition at line 1121 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [28/31]

BOOST_AUTO_TEST_CASE ( TaggingConsistent )

Definition at line 1091 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [29/31]

BOOST_AUTO_TEST_CASE ( testDistributedConservative2DV5 )

Tests a non-contigous owner distributed at the outMesh.

Definition at line 900 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [30/31]

BOOST_AUTO_TEST_CASE ( testDistributedConservative2DV5Vector )

Tests a non-contigous owner distributed at the outMesh.

Definition at line 963 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [31/31]

BOOST_AUTO_TEST_CASE ( TestNonHomongenousGlobalIndex )

Definition at line 2346 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ getDistributedMesh()

void getDistributedMesh ( const TestContext & context,
MeshSpecification const & vertices,
mesh::PtrMesh & mesh,
mesh::PtrData & data,
int globalIndexOffset = 0 )

Definition at line 90 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConservativeMapping()

void perform2DTestConservativeMapping ( Mapping & mapping)

Definition at line 1665 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConservativeMappingVector()

void perform2DTestConservativeMappingVector ( Mapping & mapping)

Definition at line 1743 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConsistentMapping()

void perform2DTestConsistentMapping ( Mapping & mapping)

Definition at line 1152 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConsistentMappingVector()

void perform2DTestConsistentMappingVector ( Mapping & mapping)

Definition at line 1265 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestScaledConsistentMapping()

void perform2DTestScaledConsistentMapping ( Mapping & mapping)

Definition at line 1557 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConservativeMapping()

void perform3DTestConservativeMapping ( Mapping & mapping)

Definition at line 1826 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConsistentMapping()

void perform3DTestConsistentMapping ( Mapping & mapping)

Definition at line 1396 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestScaledConsistentMapping()

void perform3DTestScaledConsistentMapping ( Mapping & mapping)

Definition at line 1609 of file PetRadialBasisFctMappingTest.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 )

Definition at line 126 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ testSerialScaledConsistent()

void testSerialScaledConsistent ( mesh::PtrMesh inMesh,
mesh::PtrMesh outMesh,
PtrData inData,
PtrData outData )

Definition at line 44 of file PetRadialBasisFctMappingTest.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 1025 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function: