feat(probe): vector overload for glVisView
glVisView can now also be called with a vector and finite element space as opposed to just a grid function and mesh
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include "config.h"
|
||||
#include "probe.h"
|
||||
|
||||
#include "warning_control.h"
|
||||
|
||||
|
||||
namespace Probe {
|
||||
|
||||
@@ -43,6 +45,15 @@ void glVisView(mfem::GridFunction& u, mfem::Mesh& mesh,
|
||||
}
|
||||
}
|
||||
|
||||
void glVisView(mfem::Vector &vec, mfem::FiniteElementSpace &fes, const std::string &windowTitle) {
|
||||
mfem::GridFunction gf(&fes);
|
||||
|
||||
DEPRECATION_WARNING_OFF
|
||||
gf.SetData(vec);
|
||||
DEPRECATION_WARNING_ON
|
||||
glVisView(gf, *fes.GetMesh(), windowTitle);
|
||||
}
|
||||
|
||||
double getMeshRadius(mfem::Mesh& mesh) {
|
||||
int numVertices = mesh.GetNV(); // Number of vertices
|
||||
double maxRadius = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user