123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /* 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 "Lemma"
- #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\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);
- }
-
- LinearMag* Mag = LinearMag::New();
- Mag->SetInducingMagField( 55234., 60, 14, NANOTESLA );
- Mag->SetVTUGridFile( argv[1] );
- Mag->CalculateRHS( "kappa" );
- Mag->Solve( argv[2] );
-
- // Print out YAML serialization of class
- std::cout << *Mag << std::endl;
-
- Mag->Delete();
- exit(EXIT_SUCCESS);
- }
|