|
| 1 | +/* |
| 2 | + For more information, please see: http://software.sci.utah.edu |
| 3 | +
|
| 4 | + The MIT License |
| 5 | +
|
| 6 | + Copyright (c) 2015 Scientific Computing and Imaging Institute, |
| 7 | + University of Utah. |
| 8 | +
|
| 9 | + License for the specific language governing rights and limitations under |
| 10 | + Permission is hereby granted, free of charge, to any person obtaining a |
| 11 | + copy of this software and associated documentation files (the "Software"), |
| 12 | + to deal in the Software without restriction, including without limitation |
| 13 | + the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 14 | + and/or sell copies of the Software, and to permit persons to whom the |
| 15 | + Software is furnished to do so, subject to the following conditions: |
| 16 | +
|
| 17 | + The above copyright notice and this permission notice shall be included |
| 18 | + in all copies or substantial portions of the Software. |
| 19 | +
|
| 20 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 21 | + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 22 | + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 23 | + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 24 | + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 25 | + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 26 | + DEALINGS IN THE SOFTWARE. |
| 27 | +*/ |
| 28 | + |
| 29 | +#ifndef ALGORITHMS_MATH_BiotSavartSolverAlgorithm_H |
| 30 | +#define ALGORITHMS_MATH_BiotSavartSolverAlgorithm_H |
| 31 | + |
| 32 | +#include <Core/Datatypes/Legacy/Field/Mesh.h> |
| 33 | +#include <Core/Datatypes/Legacy/Field/Field.h> |
| 34 | +#include <Core/Datatypes/Matrix.h> |
| 35 | + |
| 36 | +#include <Core/Algorithms/Base/AlgorithmBase.h> |
| 37 | +#include <Core/Algorithms/BrainStimulator/share.h> |
| 38 | + |
| 39 | +///@file BiotSavartSolverAlgorithm |
| 40 | +///@brief |
| 41 | +/// |
| 42 | +/// |
| 43 | +///@author |
| 44 | +/// Implementation: Petar Petrov for SCIRun 4.7 |
| 45 | +/// Converted to SCIRun5 by Moritz Dannhauer |
| 46 | +///@details |
| 47 | +/// |
| 48 | +/// |
| 49 | + |
| 50 | +namespace SCIRun { |
| 51 | +namespace Core { |
| 52 | +namespace Algorithms { |
| 53 | +namespace BrainStimulator { |
| 54 | + |
| 55 | + ALGORITHM_PARAMETER_DECL(Mesh); |
| 56 | + ALGORITHM_PARAMETER_DECL(Coil); |
| 57 | + ALGORITHM_PARAMETER_DECL(VectorBField); |
| 58 | + ALGORITHM_PARAMETER_DECL(VectorAField); |
| 59 | + ALGORITHM_PARAMETER_DECL(OutType); |
| 60 | + |
| 61 | + class SCISHARE BiotSavartSolverAlgorithm : public AlgorithmBase |
| 62 | + { |
| 63 | + public: |
| 64 | + BiotSavartSolverAlgorithm() |
| 65 | + { |
| 66 | + istep=0.0; |
| 67 | + tfactor = 0; |
| 68 | + addParameter(Parameters::OutType,0); |
| 69 | + } |
| 70 | + AlgorithmOutput run(const AlgorithmInput& input) const override; |
| 71 | + bool run(FieldHandle mesh, FieldHandle coil, Datatypes::MatrixHandle &outdata, int outtype) const; |
| 72 | + |
| 73 | + private: |
| 74 | + double istep; |
| 75 | + unsigned int tfactor; |
| 76 | + |
| 77 | + }; |
| 78 | + |
| 79 | +}}}} |
| 80 | + |
| 81 | +#endif |
0 commit comments