preCICE v3.2.0
Loading...
Searching...
No Matches
PartitionOfUnityMappingTest.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/PartitionOfUnityMapping.hpp"
#include "mapping/impl/BasisFunctions.hpp"
#include "mapping/impl/MappingDataCache.hpp"
#include "mesh/Data.hpp"
#include "mesh/Mesh.hpp"
#include "mesh/SharedPointer.hpp"
#include "mesh/Utils.hpp"
#include "mesh/Vertex.hpp"
#include "mesh/config/MeshConfiguration.hpp"
#include "testing/TestContext.hpp"
#include "testing/Testing.hpp"
Include dependency graph for PartitionOfUnityMappingTest.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)
double sumComponentWise (const Eigen::VectorXd &vec, int component, int dataDimension)
void perform2DTestConsistentMapping (Mapping &mapping)
void perform2DTestConsistentMappingVector (Mapping &mapping)
void performTestConsistentMapDeadAxis (Mapping &mapping, int dim)
void perform2DTestConservativeMapping (Mapping &mapping)
void perform2DTestConservativeMappingVector (Mapping &mapping)
void perform3DTestConsistentMapping (Mapping &mapping)
void perform3DTestJustInTimeMappingWithPolynomial (Mapping &mapping)
void perform2DTestJustInTimeMappingNoPolynomial (Mapping &mapping)
void perform3DTestConsistentMappingVector (Mapping &mapping)
void perform3DTestConservativeMapping (Mapping &mapping)
void perform3DTestJustInTimeMappingConservative (Mapping &mapping)
void perform2DTestJustInTimeMappingConservative (Mapping &mapping)
void perform3DTestConservativeMappingVector (Mapping &mapping)
 BOOST_AUTO_TEST_CASE (PartitionOfUnityMappingTests)
 BOOST_AUTO_TEST_CASE (JustInTimeMapping)
 BOOST_AUTO_TEST_CASE (TestSingleClusterPartitionOfUnity)
void getDistributedMesh (const TestContext &context, MeshSpecification const &vertices, mesh::PtrMesh &mesh, mesh::PtrData &data, int globalIndexOffset=0, bool meshIsSmaller=false)
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(DistributedConsistent2D)
 PRECICE_TEST_SETUP (""_on(2_ranks).setupIntraComm()) BOOST_AUTO_TEST_CASE(DistributedConservative2DTwoRanks)
void testTagging (const TestContext &context, MeshSpecification inMeshSpec, MeshSpecification outMeshSpec, MeshSpecification shouldTagFirstRound, MeshSpecification shouldTagSecondRound, bool consistent)

Typedef Documentation

◆ MeshSpecification

using MeshSpecification = std::vector<VertexSpecification>

Definition at line 1989 of file PartitionOfUnityMappingTest.cpp.

◆ ReferenceSpecification

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

Definition at line 1992 of file PartitionOfUnityMappingTest.cpp.

Function Documentation

◆ addGlobalIndex()

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

Definition at line 31 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( JustInTimeMapping )

Definition at line 1807 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( PartitionOfUnityMappingTests )

Definition at line 1780 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( TestSingleClusterPartitionOfUnity )

Definition at line 1831 of file PartitionOfUnityMappingTest.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,
bool meshIsSmaller = false )

Definition at line 1994 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConservativeMapping()

void perform2DTestConservativeMapping ( Mapping & mapping)

Definition at line 381 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConservativeMappingVector()

void perform2DTestConservativeMappingVector ( Mapping & mapping)

Definition at line 478 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConsistentMapping()

void perform2DTestConsistentMapping ( Mapping & mapping)

Definition at line 50 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestConsistentMappingVector()

void perform2DTestConsistentMappingVector ( Mapping & mapping)

Definition at line 182 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestJustInTimeMappingConservative()

void perform2DTestJustInTimeMappingConservative ( Mapping & mapping)

Definition at line 1494 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform2DTestJustInTimeMappingNoPolynomial()

void perform2DTestJustInTimeMappingNoPolynomial ( Mapping & mapping)

Definition at line 939 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConservativeMapping()

void perform3DTestConservativeMapping ( Mapping & mapping)

Definition at line 1198 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConservativeMappingVector()

void perform3DTestConservativeMappingVector ( Mapping & mapping)

Definition at line 1640 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConsistentMapping()

void perform3DTestConsistentMapping ( Mapping & mapping)

Definition at line 625 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestConsistentMappingVector()

void perform3DTestConsistentMappingVector ( Mapping & mapping)

Definition at line 1102 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestJustInTimeMappingConservative()

void perform3DTestJustInTimeMappingConservative ( Mapping & mapping)

Definition at line 1311 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ perform3DTestJustInTimeMappingWithPolynomial()

void perform3DTestJustInTimeMappingWithPolynomial ( Mapping & mapping)

Definition at line 772 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ performTestConsistentMapDeadAxis()

void performTestConsistentMapDeadAxis ( Mapping & mapping,
int dim )

Definition at line 319 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ PRECICE_TEST_SETUP() [1/2]

PRECICE_TEST_SETUP ( "" _on2_ranks).setupIntraComm()

Definition at line 2298 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ PRECICE_TEST_SETUP() [2/2]

PRECICE_TEST_SETUP ( "" _on4_ranks).setupIntraComm()

Definition at line 2080 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function:

◆ sumComponentWise()

double sumComponentWise ( const Eigen::VectorXd & vec,
int component,
int dataDimension )

Definition at line 38 of file PartitionOfUnityMappingTest.cpp.

◆ testDistributed()

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

Definition at line 2037 of file PartitionOfUnityMappingTest.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 2345 of file PartitionOfUnityMappingTest.cpp.

Here is the call graph for this function: