From 3652faf5ff1c9520d8383c1f6bfd5f636835e2b1 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 17 May 2021 09:58:33 +0200 Subject: [PATCH] Added a function Field::getFieldValues --- CDMATH/mesh/inc/Field.hxx | 2 ++ CDMATH/mesh/src/Field.cxx | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/CDMATH/mesh/inc/Field.hxx b/CDMATH/mesh/inc/Field.hxx index 70cfc80..bc4ff85 100755 --- a/CDMATH/mesh/inc/Field.hxx +++ b/CDMATH/mesh/inc/Field.hxx @@ -257,6 +257,8 @@ class Field void setTime ( double time, int iter ); + std::vector< double > getFieldValues(int compo=0) const ; + Vector getValuesOnComponent(int compo) const ; Vector getValuesOnAllComponents(int elem) const ; diff --git a/CDMATH/mesh/src/Field.cxx b/CDMATH/mesh/src/Field.cxx index 2934d6a..b7a4e94 100755 --- a/CDMATH/mesh/src/Field.cxx +++ b/CDMATH/mesh/src/Field.cxx @@ -1108,6 +1108,15 @@ Field::getValuesOnComponent(int compo) const return v; } +std::vector< double > +Field::getFieldValues(int compo) const +{ + std::vector< double > v(getNumberOfElements()); + for(int i=0;i