30 dataScalar->requireDataGradient();
31 dataVector->requireDataGradient();
37 Eigen::VectorXd &valuesScalar = dataScalar->values();
38 Eigen::VectorXd &valuesVector = dataVector->values();
39 valuesScalar << 1.0, 2.0;
40 valuesVector << 1.0, 2.0, 3.0, 4.0;
43 Eigen::MatrixXd &gradientsScalar = dataScalar->gradients();
44 Eigen::MatrixXd &gradientsVector = dataVector->gradients();
45 gradientsScalar.setOnes();
46 gradientsVector.setOnes();
48 std::string filename =
"io-VTKExport-ExportDatawithGradient";
50 exportVTK.
doExport(filename, location, mesh);
67 std::string filename =
"io-VTKExport-ExportPolygonalMesh";
69 exportVTK.
doExport(filename, location, mesh);
87 std::string filename =
"io-VTKExport-ExportTriangulatedMesh";
89 exportVTK.
doExport(filename, location, mesh);
105 std::string filename =
"io-VTKExport-ExportTetrahedron";
107 exportVTK.
doExport(filename, location, mesh);
BOOST_AUTO_TEST_CASE(ExportDataWithGradient)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
Writes polygonal, or triangle meshes to vtk files.
virtual void doExport(const std::string &name, const std::string &location, const mesh::Mesh &mesh)
Perform writing to VTK file.
Linear edge of a mesh, defined by two Vertex objects.
Container and creator for meshes.
Triangle & createTriangle(Edge &edgeOne, Edge &edgeTwo, Edge &edgeThree)
Creates and initializes a Triangle object.
PtrData & createData(const std::string &name, int dimension, DataID id, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Create only data for vertex.
Tetrahedron & createTetrahedron(Vertex &vertexOne, Vertex &vertexTwo, Vertex &vertexThree, Vertex &vertexFour)
Creates and initializes a Tetrahedron object.
Edge & createEdge(Vertex &vertexOne, Vertex &vertexTwo)
Creates and initializes an Edge object.
Vertex & createVertex(const Eigen::VectorXd &coords)
Creates and initializes a Vertex object.
void allocateDataValues()
Allocates memory for the vertex data values and corresponding gradient values.
provides Mesh, Data and primitives.
Main namespace of the precice library.