Verified Commit df375f5e authored by Lars Bilke's avatar Lars Bilke
Browse files

MR review suggestions and clang-format.

parent f6e6d253
......@@ -89,8 +89,8 @@ void CoProcess(MeshLib::Mesh const& mesh, double const time,
vtkSource->Update();
dataDescription->GetInputDescriptionByName("input")->SetGrid(
vtkSource->GetOutput());
auto cwd = fs::current_path();
fs::current_path(output_directory);
auto const cwd = fs::current_path();
fs::current_path(std::move(output_directory));
Processor->CoProcess(dataDescription.GetPointer());
fs::current_path(cwd);
INFO("End InSitu process.");
......
......@@ -19,7 +19,7 @@
namespace MeshLib
{
class Node;
class Node;
}
namespace MeshLib
......@@ -28,30 +28,33 @@ template <class Scalar>
class VtkMeshNodalCoordinatesTemplate : public vtkMappedDataArray<Scalar>
{
public:
vtkAbstractTemplateTypeMacro(VtkMeshNodalCoordinatesTemplate<Scalar>, vtkMappedDataArray<Scalar>)
vtkAbstractTemplateTypeMacro(VtkMeshNodalCoordinatesTemplate<Scalar>,
vtkMappedDataArray<Scalar>)
vtkMappedDataArrayNewInstanceMacro(
VtkMeshNodalCoordinatesTemplate<Scalar>) static VtkMeshNodalCoordinatesTemplate* New();
VtkMeshNodalCoordinatesTemplate<
Scalar>) static VtkMeshNodalCoordinatesTemplate* New();
void PrintSelf(std::ostream& os, vtkIndent indent) override;
typedef typename Superclass::ValueType ValueType;
using ValueType = typename Superclass::ValueType;
/// Pass the nodes from OGS mesh
void SetNodes(std::vector<MeshLib::Node*> const & nodes);
void SetNodes(std::vector<MeshLib::Node*> const& nodes);
// Reimplemented virtuals -- see superclasses for descriptions
void Initialize() override;
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output) override;
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override;
void GetTuples(vtkIdList* ptIds, vtkAbstractArray* output) override;
void GetTuples(vtkIdType p1, vtkIdType p2,
vtkAbstractArray* output) override;
void Squeeze() override;
vtkArrayIterator *NewIterator() override;
vtkArrayIterator* NewIterator() override;
vtkIdType LookupValue(vtkVariant value) override;
void LookupValue(vtkVariant value, vtkIdList *ids) override;
void LookupValue(vtkVariant value, vtkIdList* ids) override;
vtkVariant GetVariantValue(vtkIdType idx) override;
void ClearLookup() override;
double* GetTuple(vtkIdType i) override;
void GetTuple(vtkIdType i, double *tuple) override;
void GetTuple(vtkIdType i, double* tuple) override;
vtkIdType LookupTypedValue(Scalar value) override;
void LookupTypedValue(Scalar value, vtkIdList *ids) override;
void LookupTypedValue(Scalar value, vtkIdList* ids) override;
Scalar& GetValueReference(vtkIdType idx) override;
// This container is read only -- this method does nothing but print a
......@@ -59,27 +62,29 @@ public:
int Allocate(vtkIdType sz, vtkIdType ext) override;
int Resize(vtkIdType numTuples) override;
void SetNumberOfTuples(vtkIdType number) override;
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override;
void SetTuple(vtkIdType i, const float *source) override;
void SetTuple(vtkIdType i, const double *source) override;
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override;
void InsertTuple(vtkIdType i, const float *source) override;
void InsertTuple(vtkIdType i, const double *source) override;
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds,
vtkAbstractArray *source) override;
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source) override;
void SetTuple(vtkIdType i, const float* source) override;
void SetTuple(vtkIdType i, const double* source) override;
void InsertTuple(vtkIdType i, vtkIdType j,
vtkAbstractArray* source) override;
void InsertTuple(vtkIdType i, const float* source) override;
void InsertTuple(vtkIdType i, const double* source) override;
void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds,
vtkAbstractArray* source) override;
void InsertTuples(vtkIdType /*unused*/, vtkIdType /*unused*/,
vtkIdType /*unused*/,
vtkAbstractArray* /*unused*/) override;
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source) override;
vtkIdType InsertNextTuple(const float *source) override;
vtkIdType InsertNextTuple(const double *source) override;
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray* source) override;
vtkIdType InsertNextTuple(const float* source) override;
vtkIdType InsertNextTuple(const double* source) override;
void InsertVariantValue(vtkIdType idx, vtkVariant value) override;
void DeepCopy(vtkAbstractArray *aa) override;
void DeepCopy(vtkDataArray *da) override;
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
vtkAbstractArray* source, double* weights) override;
void InterpolateTuple(vtkIdType i, vtkIdType id1, vtkAbstractArray *source1,
vtkIdType id2, vtkAbstractArray *source2, double t) override;
void DeepCopy(vtkAbstractArray* aa) override;
void DeepCopy(vtkDataArray* da) override;
void InterpolateTuple(vtkIdType i, vtkIdList* ptIndices,
vtkAbstractArray* source, double* weights) override;
void InterpolateTuple(vtkIdType i, vtkIdType id1, vtkAbstractArray* source1,
vtkIdType id2, vtkAbstractArray* source2,
double t) override;
void SetVariantValue(vtkIdType idx, vtkVariant value) override;
void RemoveTuple(vtkIdType id) override;
void RemoveFirstTuple() override;
......@@ -106,10 +111,7 @@ protected:
const std::vector<MeshLib::Node*>* _nodes{nullptr};
private:
// VtkMeshNodalCoordinatesTemplate(const VtkMeshNodalCoordinatesTemplate&) = delete;
// void operator=(const VtkMeshNodalCoordinatesTemplate&) = delete;
vtkIdType Lookup(const Scalar &val, vtkIdType startIndex);
vtkIdType Lookup(const Scalar& val, vtkIdType startIndex);
double* TempDoubleArray{nullptr};
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment