preCICE v3.2.0
Loading...
Searching...
No Matches
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)
 PRECICE_TEST_SETUP (""_on(4_ranks).setupIntraComm(), Require::PETSc) 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)
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)
 PRECICE_TEST_SETUP (1_rank, Require::PETSc)
 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.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [1/14]

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

Definition at line 2256 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/14]

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

Definition at line 2184 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/14]

BOOST_AUTO_TEST_CASE ( DeadAxis2 )

Definition at line 2076 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/14]

BOOST_AUTO_TEST_CASE ( DeadAxis3D )

Definition at line 2127 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/14]

BOOST_AUTO_TEST_CASE ( MapCompactThinPlateSplinesC2 )

Definition at line 2004 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/14]

BOOST_AUTO_TEST_CASE ( MapGaussian )

Definition at line 1982 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/14]

BOOST_AUTO_TEST_CASE ( MapInverseMultiquadrics )

Definition at line 1938 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/14]

BOOST_AUTO_TEST_CASE ( MapMultiquadrics )

Definition at line 1912 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/14]

BOOST_AUTO_TEST_CASE ( MapPetCompactPolynomialC0 )

Definition at line 2028 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/14]

BOOST_AUTO_TEST_CASE ( MapPetCompactPolynomialC6 )

Definition at line 2052 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/14]

BOOST_AUTO_TEST_CASE ( MapThinPlateSplines )

Definition at line 1890 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [12/14]

BOOST_AUTO_TEST_CASE ( MapVolumeSplines )

Definition at line 1960 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/14]

BOOST_AUTO_TEST_CASE ( NoMapping )

Definition at line 2337 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [14/14]

BOOST_AUTO_TEST_CASE ( TestNonHomongenousGlobalIndex )

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

Here is the call graph for this function:

◆ perform2DTestConservativeMappingVector()

void perform2DTestConservativeMappingVector ( Mapping & mapping)

Definition at line 1760 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConsistentMapping()

void perform2DTestConsistentMapping ( Mapping & mapping)

Definition at line 1169 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConsistentMappingVector()

void perform2DTestConsistentMappingVector ( Mapping & mapping)

Definition at line 1282 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestScaledConsistentMapping()

void perform2DTestScaledConsistentMapping ( Mapping & mapping)

Definition at line 1574 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConservativeMapping()

void perform3DTestConservativeMapping ( Mapping & mapping)

Definition at line 1843 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConsistentMapping()

void perform3DTestConsistentMapping ( Mapping & mapping)

Definition at line 1413 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestScaledConsistentMapping()

void perform3DTestScaledConsistentMapping ( Mapping & mapping)

Definition at line 1626 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ PRECICE_TEST_SETUP() [1/2]

PRECICE_TEST_SETUP ( "" _on4_ranks).setupIntraComm(,
Require::PETSc  )

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 182 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function:

◆ PRECICE_TEST_SETUP() [2/2]

PRECICE_TEST_SETUP ( 1_rank ,
Require::PETSc  )

◆ 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 1040 of file PetRadialBasisFctMappingTest.cpp.

Here is the call graph for this function: