diff --git a/GUI/Model/Model/ParameterTreeUtil.h b/GUI/Model/Model/ParameterTreeUtil.h index a1c6a59c5167e37f7afa54b6a2e620cf12f8a626..afc38f1faa6ee2cb38cacba18f242f06c478c26d 100644 --- a/GUI/Model/Model/ParameterTreeUtil.h +++ b/GUI/Model/Model/ParameterTreeUtil.h @@ -56,7 +56,7 @@ private: void addParameterItem(ParameterLabelItem* parent, DoubleProperty& d, const QString& label = QString()); void addParameterItem(ParameterLabelItem* parent, VectorProperty& d); - void addMagnetizationNoZ(ParameterLabelItem *parent, VectorProperty &d); + void addMagnetizationNoZ(ParameterLabelItem* parent, VectorProperty& d); ParameterContainerItem* parameterContainerItem(); bool allowMagneticFields() const; diff --git a/GUI/View/SampleDesigner/LayerEditorUtil.cpp b/GUI/View/SampleDesigner/LayerEditorUtil.cpp index 89ccd7197a9ad5a80db8907a0fd9f3c397e4c0ff..37cf6a069fe6e844d02bdcb21b60e8c5430471d9 100644 --- a/GUI/View/SampleDesigner/LayerEditorUtil.cpp +++ b/GUI/View/SampleDesigner/LayerEditorUtil.cpp @@ -135,14 +135,16 @@ void LayerEditorUtil::addVectorToGrid(QGridLayout* m_gridLayout, int firstCol, V vertically, addSpacer); } -void LayerEditorUtil::addMagnetizationNoZToGrid(QGridLayout *m_gridLayout, int firstCol, VectorProperty &v, std::function<void (double, DoubleProperty &)> setNewValue, bool vertically, bool addSpacer) +void LayerEditorUtil::addMagnetizationNoZToGrid( + QGridLayout* m_gridLayout, int firstCol, VectorProperty& v, + std::function<void(double, DoubleProperty&)> setNewValue, bool vertically, bool addSpacer) { // Setting z-component is temporary disabled (see issue #654) // When interaction with magnetic field in fronting medium is implemented, // delete this method and use 'addVectorToGrid' instead - addMultiPropertyToGrid(m_gridLayout, firstCol, {&v.x(), &v.y()}, setNewValue, - vertically, addSpacer); + addMultiPropertyToGrid(m_gridLayout, firstCol, {&v.x(), &v.y()}, setNewValue, vertically, + addSpacer); } QLabel* LayerEditorUtil::createBoldLabel(const QString& text) @@ -261,4 +263,3 @@ QList<QColor> LayerEditorUtil::predefinedLayerColors() return colors; } - diff --git a/GUI/View/SampleDesigner/LayerEditorUtil.h b/GUI/View/SampleDesigner/LayerEditorUtil.h index 90cbbdf2b35e425d04a6d1bee81d5d603ec68df5..9af6be1d749d8dbf9a492281c3b1944a755ce436 100644 --- a/GUI/View/SampleDesigner/LayerEditorUtil.h +++ b/GUI/View/SampleDesigner/LayerEditorUtil.h @@ -65,8 +65,8 @@ void addVectorToGrid(QGridLayout* m_gridLayout, int firstCol, VectorProperty& v, std::function<void(double, DoubleProperty&)> setNewValue, bool vertically, bool addSpacer); void addMagnetizationNoZToGrid(QGridLayout* m_gridLayout, int firstCol, VectorProperty& v, - std::function<void(double, DoubleProperty&)> setNewValue, bool vertically, - bool addSpacer); + std::function<void(double, DoubleProperty&)> setNewValue, + bool vertically, bool addSpacer); QLabel* createBoldLabel(const QString& text); diff --git a/GUI/View/SampleDesigner/MaterialInplaceForm.cpp b/GUI/View/SampleDesigner/MaterialInplaceForm.cpp index b73f99436e7424266a26f62a90af27e8a24ef87c..934696c62ebb297b8bb44c3b95e64c38d1886912 100644 --- a/GUI/View/SampleDesigner/MaterialInplaceForm.cpp +++ b/GUI/View/SampleDesigner/MaterialInplaceForm.cpp @@ -120,11 +120,12 @@ void MaterialInplaceForm::createWidgets() }; // Processing z-magnetization is not implemented yet (see issue #654) - // LayerEditorUtil::addVectorToGrid(m_layout, col, material->magnetization(), setNewValue, true, false); - // When implemented, rm following lines and use 'addVectorToGrid' + // LayerEditorUtil::addVectorToGrid(m_layout, col, material->magnetization(), setNewValue, true, + // false); When implemented, rm following lines and use 'addVectorToGrid' const LayerItem* layer_item = dynamic_cast<LayerItem*>(m_item); - if(layer_item && !layer_item->isTopLayer()) - LayerEditorUtil::addMagnetizationNoZToGrid(m_layout, col, material->magnetization(), setNewValue, true, false); + if (layer_item && !layer_item->isTopLayer()) + LayerEditorUtil::addMagnetizationNoZToGrid(m_layout, col, material->magnetization(), + setNewValue, true, false); // -- Create UI for material selection button auto* btn = new QPushButton("...", this); diff --git a/Resample/Slice/Slice.cpp b/Resample/Slice/Slice.cpp index 7bdfdfa3a05440d0dba8baa57186a926838e23a7..71416d938625c20e057b8df0d755fe63339cd0d4 100644 --- a/Resample/Slice/Slice.cpp +++ b/Resample/Slice/Slice.cpp @@ -83,7 +83,7 @@ SpinMatrix Slice::polarizedReducedPotential(R3 k, double n_ref) const void Slice::initBField(R3 h_field, double h_z) { // Temporary forbid z-magnetization in all layers (see issue #654) - if(m_material.magnetization().z() != 0) + if (m_material.magnetization().z() != 0) throw std::runtime_error("Processing z-magnetization is not implemented yet."); static constexpr double Magnetic_Permeability = 4e-7 * pi; diff --git a/Resample/Slice/SliceStack.cpp b/Resample/Slice/SliceStack.cpp index fde2db529036684ab7670b85a214abd346ddedb0..11ca87bc6db83bcef29b738a9e3db12b98b6fe0b 100644 --- a/Resample/Slice/SliceStack.cpp +++ b/Resample/Slice/SliceStack.cpp @@ -51,11 +51,11 @@ void SliceStack::addNSlices(size_t n, double thickness, const Material& material SliceStack SliceStack::setBField(const R3& externalField) { // Temporary forbid non-zero magnetization in fronting medium (see issue #654) - if(this->at(0).material().magnetization() != R3()) + if (this->at(0).material().magnetization() != R3()) throw std::runtime_error("Processing fronting magnetization is not implemented yet."); // Temporary forbid non-zero external field (see issue #654) - if(externalField != R3()) + if (externalField != R3()) throw std::runtime_error("Processing external field is not implemented yet."); if (this->empty())