1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /* This file is part of Lemma, a geophysical modelling and inversion API.
- * More information is available at http://lemmasoftware.org
- */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
- /**
- * @file
- * @date 03/21/2016 09:59:10 PM
- * @version $Id$
- * @author Trevor Irons (ti)
- * @email tirons@egi.utah.edu
- * @copyright Copyright (c) 2016, University of Utah
- * @copyright Copyright (c) 2016, Trevor Irons & Lemma Software, LLC
- */
-
- #include "LemmaCore"
- #include "LinearMag.h"
-
- using namespace Lemma;
-
- int main( int argc, char** argv ) {
-
-
- std::cout << "###################################################\n";
- std::cout << "# Example of LinearMag class #\n";
- std::cout << "# #\n";
- std::cout << "# This program solves for the secondary magnetic #\n";
- std::cout << "# field from a low susceptibily model in the #\n";
- std::cout << "# presence of a homogeneous static inducing field #\n";
- std::cout << "# #\n";
- std::cout << "# (C) University of Utah, 2016 #\n";
- std::cout << "# #\n";
- std::cout << "###################################################\n\n";
-
- if (argc < 3) {
- std::cout << "\e[1museage\e[0m:\n";
- std::cout << "./Sphere in.vtu out.vtu\n\n" << std::endl;
- exit(EXIT_SUCCESS);
- }
-
- auto Mag = LinearMag::NewSP();
- Mag->SetInducingMagField( 55234., 0, 0, NANOTESLA );
- Mag->SetVTUGridFile( argv[1] );
- Mag->CalculateRHS( "kappa" );
- Mag->Solve( argv[2] );
-
- // Print out YAML serialization of class
- std::cout << *Mag << std::endl;
-
- exit(EXIT_SUCCESS);
- }
|