From af856f9326c4f22858add03d9b284143729ba4eb Mon Sep 17 00:00:00 2001
From: mtegeler <94855292+mtegeler@users.noreply.github.com>
Date: Fri, 29 May 2026 15:37:02 +0200
Subject: [PATCH] Delete include/Containers/NodeVn.h
NodeVN.h exists, having these two files causes problems on Windows and MacOS.
---
include/Containers/NodeVn.h | 371 ------------------------------------
1 file changed, 371 deletions(-)
delete mode 100644 include/Containers/NodeVn.h
diff --git a/include/Containers/NodeVn.h b/include/Containers/NodeVn.h
deleted file mode 100644
index e3f05f1..0000000
--- a/include/Containers/NodeVn.h
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * This file is part of the OpenPhase (R) software library.
- *
- * Copyright (c) 2009-2026 Ruhr-Universitaet Bochum,
- * Universitaetsstrasse 150, D-44801 Bochum, Germany
- * AND 2018-2026 OpenPhase Solutions GmbH,
- * Universitaetsstrasse 136, D-44799 Bochum, Germany.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- */
-
-#ifndef NODEVN_H
-#define NODEVN_H
-
-#include "dVector.h"
-
-namespace openphase
-{
-
-template
-struct VectorVnEntry /// Individual entries. Used in the NodeVn class as a storage unit.
-{
- double value[N];
- size_t index;
-};
-
-/***************************************************************/
-template
-class NodeVn /// Basic class to store the vector valued quantities for each phase field. Provide access and manipulation methods for the entrys.
-{
- public:
- NodeVn(void){}; /// Empty constructor
- NodeVn(const NodeVn& rhs); /// Copy constructor
- void set_comp(const size_t idx, const size_t ss, const double value); /// Set component ss for phase field index idx to value.
- void set (const size_t idx, const dVector value); /// Set dVector for phase field index idx.
- void set (const size_t idx, const double value); /// Set all entries to single value for phase field index idx.
- void set_to_zero(const size_t idx); /// Set all entries to zero for phase field index idx.
- double get_comp(const size_t idx, const size_t ss) const; /// Return value of component ss for phase field index idx.
- dVector get (const size_t idx) const; /// Return vector corresponding to phase field index idx.
- void add (const size_t n, const double value[N]); /// Increment value using two indices.
- void change_index (const size_t n, const size_t m);
-
- NodeVn& operator=(const NodeVn& n);
- NodeVn operator+(const NodeVn& n) const; /// Plus operator. Takes as input another Node type entry.
- NodeVn operator-(const NodeVn& n) const; /// Minus operator. Takes as input another Node type entry.
- NodeVn operator*(const double n) const; /// Multiply all fields by a number.
- NodeVn operator+(const double n) const; /// Multiply all fields by a number.
- NodeVn operator-(const double n) const; /// Multiply all fields by a number.
-
- NodeVn add (const NodeVn& value) const; /// Add two nodes.
-
- void clear(){VectorVnFields.clear();}; /// Empties the vector fields.
- size_t size() const {return VectorVnFields.size();}; /// Returns the size of vector fields.
- typedef typename std::vector>::iterator iterator; /// Iterator over the vector fields
- typedef typename std::vector>::const_iterator citerator; /// Constant iterator over the vector fields
- iterator begin() {return VectorVnFields.begin();}; /// Iterator to the begin of vector fields
- iterator end() {return VectorVnFields.end();}; /// Iterator to the end of vector fields
- citerator cbegin() const {return VectorVnFields.begin();}; /// Constant iterator to the begin of vector fields
- citerator cend() const {return VectorVnFields.end();}; /// Constant iterator to the end of vector fields
- void pack(std::vector& buffer)
- {
- buffer.push_back(VectorVnFields.size());
- for (size_t i = 0; i < VectorVnFields.size(); ++i)
- {
- buffer.push_back(VectorVnFields[i].index);
- for (size_t n = 0; n < N; ++n)
- {
- buffer.push_back(VectorVnFields[i].value[n]);
- }
- }
- }
- void unpack(std::vector& buffer, size_t& it)
- {
- VectorVnFields.resize(buffer[it]); ++it;
- for (size_t i = 0; i < VectorVnFields.size(); ++i)
- {
- VectorVnFields[i].index = buffer[it]; ++it;
- for (size_t n = 0; n < N; ++n)
- {
- VectorVnFields[i].value[n] = buffer[it]; ++it;
- }
- }
- }
- protected:
- private:
- std::vector> VectorVnFields; /// List of nonvanishing vector fields.
-};
-
-template
-inline NodeVn::NodeVn(const NodeVn& n)
-{
- VectorVnFields = n.VectorVnFields;
-}
-
-template
-inline void NodeVn::set_comp(const size_t idx, const size_t ss, const double value)
-{
- for (iterator i = begin(); i < end(); ++i)
- if (i->index == idx)
- {
- i->value[ss] = value;
- return;
- }
-
- VectorVnEntry NewEntry;
- NewEntry.index = idx;
- for(size_t ii = 0; ii < N; ii++) NewEntry.value[ii] = 0.0;
- NewEntry.value[ss] = value;
-
- VectorVnFields.push_back(NewEntry);
-}
-
-template
-inline void NodeVn::set(const size_t idx, const dVector value)
-{
- for (iterator i = begin(); i < end(); ++i)
- if (i->index == idx)
- {
- for (size_t ss = 0; ss < N; ss++)
- {
- i->value[ss] = value[ss];
- }
- return;
- }
-
- VectorVnEntry NewEntry;
- NewEntry.index = idx;
- for(size_t ii = 0; ii < N; ii++)
- {
- NewEntry.value[ii] = value[ii];
- }
- VectorVnFields.push_back(NewEntry);
-}
-
-template
-inline void NodeVn::set(const size_t idx, const double value)
-{
- for (iterator i = begin(); i < end(); ++i)
- {
- if (i->index == idx)
- {
- for (size_t ii = 0; ii < N; ++ii)
- {
- i->value[ii] = value;
- }
- return;
- }
- }
-
- VectorVnEntry NewEntry;
- NewEntry.index = idx;
- for(size_t ii = 0; ii < N; ii++) NewEntry.value[ii] = value;
-
- VectorVnFields.push_back(NewEntry);
-}
-
-template
-inline void NodeVn::set_to_zero(const size_t idx)
-{
- for (iterator i = begin(); i < end(); ++i)
- {
- if (i->index == idx)
- {
- for (size_t ii = 0; ii < N; ++ii)
- {
- i->value[ii] = 0.0;
- }
- return;
- }
- }
-
- VectorVnEntry NewEntry;
- NewEntry.index = idx;
- for(size_t ii = 0; ii < N; ii++) NewEntry.value[ii] = 0.0;
-
- VectorVnFields.push_back(NewEntry);
-}
-
-template
-inline void NodeVn::change_index(const size_t n, const size_t m)
-{
- // Set values and index of m to index n
- // Warning: Values are averaged arithmetically!
- if (n != m)
- {
- double returndV[N];
- for (size_t ss = 0; ss < N; ss++) returndV[ss] = 0.0;
-
- bool found = false;
- for (auto i = cbegin(); i < cend(); ++i)
- {
- if (i->index == m)
- {
- for (size_t ss = 0; ss < N; ss++)
- {
- returndV[ss] = (i->value)[ss];
- }
- found = true;
- break;
- }
- }
- if (found == true)
- {
- for (auto i = begin(); i < end(); ++i)
- if (i->index == m)
- {
- for (size_t ss = 0; ss < N; ss++)
- {
- (i->value)[ss] = 0.5*((i->value)[ss]+returndV[ss]);
- }
- i->index = n;
- break;
- }
- }
- }
-}
-
-template
-inline double NodeVn::get_comp(const size_t idx, const size_t ss) const
-{
- for (citerator i = cbegin(); i < cend(); ++i)
- if (i->index == idx)
- {
- return i->value[ss];
- }
- return 0.0;
-}
-
-template
-inline dVector NodeVn::get(const size_t idx) const
-{
- dVector returndV; returndV.set_to_zero();
- for (citerator i = cbegin(); i < cend(); ++i)
- {
- if (i->index == idx)
- {
- for (size_t ss = 0; ss < N; ss++)
- {
- returndV[ss] = (i->value)[ss];
- }
- break;
- }
- }
- return returndV;
-}
-
-template
-inline void NodeVn::add(const size_t n, const double summand[N])
-{
- for (auto i = begin(); i < end(); ++i)
- if (i->index == n)
- {
- for(size_t ss = 0; ss < N; ++ss)
- {
- i->value[ss] += summand[ss];
- }
- return;
- }
-
- VectorVnEntry NewEntry;
- NewEntry.index = n;
- for (size_t ss = 0; ss < N; ss ++) NewEntry.value[ss] = summand[ss];
-
- VectorVnFields.push_back(NewEntry);
-}
-
-template
-inline NodeVn NodeVn::add(const NodeVn& n) const
-{
- NodeVn result = n;
-
- for (auto i = cbegin(); i < cend(); ++i)
- {
- result.add(i->index, i->value);
- }
- return result;
-}
-
-template
-inline NodeVn& NodeVn::operator=(const NodeVn& n)
-{
- VectorVnFields = n.VectorVnFields;
- return *this;
-}
-
-template
-inline NodeVn NodeVn::operator+(const NodeVn& n) const
-{
- NodeVn result = n;
-
- for (auto i = cbegin(); i < cend(); ++i)
- {
- result.add(i->index, i->value);
- }
- return result;
-}
-
-template
-inline NodeVn NodeVn::operator-(const NodeVn& n) const
-{
- NodeVn result = n;
-
- for (auto i = result.begin(); i < result.end(); ++i)
- for(size_t ss = 0; ss < N; ++ss)
- {
- i->value[ss] = -i->value[ss];
- }
-
- for (auto i = cbegin(); i < cend(); ++i)
- {
- result.add(i->index, i->value);
- }
- return result;
-}
-
-template
-inline NodeVn NodeVn::operator*(const double n) const
-{
- NodeVn result = *this;
-
- for(auto i = result.begin(); i < result.end(); ++i)
- for(size_t ss = 0; ss < N; ++ss)
- {
- i->value[ss] *= n;
- }
-
- return result;
-}
-
-template
-inline NodeVn NodeVn::operator+(const double n) const
-{
- NodeVn result = *this;
-
- for(auto i = result.begin(); i < result.end(); ++i)
- for(size_t ss = 0; ss < N; ++ss)
- {
- i->value[ss] += n;
- }
-
- return result;
-}
-
-template
-inline NodeVn NodeVn::operator-(const double n) const
-{
- NodeVn result = *this;
-
- for(auto i = result.begin(); i < result.end(); ++i)
- for(size_t ss = 0; ss < N; ++ss)
- {
- i->value[ss] -= n;
- }
-
- return result;
-}
-
-} //namespace openphase
-#endif