diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..2a448a3040f1ae2a42e8950a6319168154422a15 --- /dev/null +++ b/readme.txt @@ -0,0 +1,157 @@ +- For installation instructions see "installationHelp.txt". + +- Experiments are located in the "experiments" directory. + After installation of the required software packages, the experiments can be run with python3. + E.g., relaxation part of standard problem #4: + $ cd pathTOcommics/commics/experiments/commicsPaper/sp4 + $ python3 sp4_sState.py + Now initial data for the switching stage was produced. + Create a folder "data" and put the created files "sp4mesh.vol" and "sp4sState.vtk" inside. + Now you can run the second stage of the experiment by executing: + $ python3 sp4_switching.py + +- The structure of the package as well as a brief description of all the files is given below. + +commics +├── addons +│ ├── convergenceOrderWrapper.py # wrapper for experimental convergence order +│ └── __init__.py # addons init file +├── experiments +│ └── commicsPaper +│ ├── fmr +│ │ └── fmr.py # experiment of Section 5.5 +│ ├── helimag +│ │ └── helimag.py # experiment of Section 5.6 +│ ├── sp4 +│ │ ├── sp4_sState.py # experiment of Section 5.3.1 +│ │ └── sp4_switching.py # experiment of Section 5.3.2 +│ └── sp5 +│ └── sp5.py # experiment of Section 5.4 +├── _gridFunctions +│ ├── derivative.py # class for derivatives of magnetization +│ ├── _detailsMagnetostaticField.py # hiding bem details: options, space setup, solution +│ ├── _detailsOerstedField.py # hiding fem details of oersted field system +│ ├── _detailsStrayField.py # hiding fem details of stray field system +│ ├── __init__.py # _gridFunctions init file +│ ├── magnetization.py # class for magnetization +│ ├── _magnetostaticField.py # base class for stray/oersted field +│ ├── oerstedField.py # class for oersted field +│ ├── strayField.py # class for stray field +│ └── _zeroField.py # vector field representing zero +├── help.py # calls help() function for main classes +├── __init__.py # commics init file +├── installationHelp.txt # instructions for installation of ngsolve, bempp, ngbem, commics +├── integrators +│ ├── _details +│ │ ├── __init__.py # integrators/_details init file +│ │ ├── interfaces +│ │ │ ├── communicationInterface.py # interface for auxiliary functions, e.g., GetTime(), _GetMesh() etc. +│ │ │ ├── computeInterface.py # abstract base class, defining coarse procedure of integrators +│ │ │ ├── contributionInterface.py # provides CoefficientFunction representing 0 +│ │ │ ├── __init__.py # integrators/_details/interfaces init file +│ │ │ ├── _interface.py # abstract base class for interface classes +│ │ │ ├── parameterInterface.py # interface mainly for setting (physical) parameters +│ │ │ ├── _preconditionerInterface.py # abstract base class for preconditioners +│ │ │ ├── tpsPreconditionerJacobiStationary.py # special class for TPS with Jacobi preconditioner +│ │ │ ├── tpsPreconditioner.py # class for various TPS preconditioners +│ │ │ └── writeInterface.py # implementation of output data writing +│ │ ├── iterationCounter.py # class for counting fixed-point iterations +│ │ └── physicalToMathematical.py # various functions converting physical input parameters to rescaled ones +│ ├── dummy.py # dummy integrator, collecting mandatory mehtods to write new integrator +│ ├── _forms +│ │ ├── _bilinearForms +│ │ │ ├── bulkDMI.py # bulk DMI matrix blf +│ │ │ ├── __init__.py # integrators/_forms/_bilinearForms init file +│ │ │ ├── mass.py # mass matrix blf +│ │ │ ├── skew.py # skew symmetric matrix blf +│ │ │ └── stiff.py # stiffness matrix blf +│ │ ├── blf_common.py # common blfs +│ │ ├── blf_magnetization.py # magnetization dependent blfs +│ │ ├── blf_piImplicit.py # blfs for implicit treatment of pi +│ │ ├── __init__.py # integrators/_forms init file +│ │ ├── lf_common.py # common lfs +│ │ ├── lf_derivative.py # derivative dependent lfs +│ │ ├── lf_eta.py # eta=m(t_n+k/2) dependent lfs +│ │ ├── lf_magnetization.py # magnetization dependent lfs +│ │ ├── lf_old.py # old_magnetization dependent lfs +│ │ └── _linearForms +│ │ ├── applied.py # applied field lf +│ │ ├── bulkDMI.py # bulk DMI lf +│ │ ├── exchange.py # exchange lf +│ │ ├── _gPrimeSlonczewski.py # derivative of G in Slonczewski lf +│ │ ├── _gSlonczewski.py # G in Slonczewski lf +│ │ ├── __init__.py # integrators/_forms/_linearForms init file +│ │ ├── interfacialAxisDMI.py # interfacial DMI lf +│ │ ├── mass.py # mass lf +│ │ ├── oersted.py # oersted field lf +│ │ ├── _opInterfacialDMI.py # auxiliary operator for interfacial DMI lf +│ │ ├── _opZhangLi.py # auxiliary operator for Zhang-Li lf +│ │ ├── slonczewskiFirst.py # auxiliary operator for Slonczewski lf +│ │ ├── slonczewskiSecond.py # auxiliary operator for Slonczewski lf +│ │ ├── stray.py # stray field lf +│ │ ├── uniaxialAnisotropy.py # uniaxial anisotropy lf +│ │ ├── zhangLiFirst.py # first Zhang-Li lf +│ │ └── zhangLiSecond.py # second Zhang-Li lf +│ ├── __init__.py # integrators init file +│ ├── _integrator.py # base class for all integrators +│ ├── integrator.py # user interface for all integrators +│ ├── mpsab.py # Midpoint scheme with Adams-Bashforth treatment of lower order terms +│ ├── mps.py # Midpoint scheme +│ ├── _specialForms +│ │ ├── __init__.py # integrators/_specialForms init file +│ │ └── zero.py # defines 0 as CoefficientFunction +│ ├── tps1pf.py # first-order tangent plane scheme omitting projection +│ ├── tps1.py # first-order tangent plane scheme +│ ├── tps2ab.py # second-order tangent plane scheme with Adams-bashforth treatment of lower order terms +│ ├── tps2.py # second-order tangent plane scheme +│ └── _tpsx.py # base class for tangent plane schemes +├── LICENSE # GPLv3 license +├── readme.txt # file briefly describing all files of the code; +├── _setup +│ ├── geometries +│ │ ├── geometry.py # class for ngsolve geometries +│ │ ├── __init__.py # _setup/geometries init file +│ │ └── standardGeometries +│ │ ├── ball.py # ngsolve ball geometry +│ │ ├── cuboid.py # ngsolve cuboid geometry +│ │ ├── disk.py # ngsolve disk geometry +│ │ ├── __init__.py # _setup/geometries init file +│ │ ├── _standardGeometry.py # base class for standard geometries +│ │ ├── _structuredMeshing +│ │ │ ├── addMesh_Face.py # adding all faces of cuboid for structured mesh generation +│ │ │ ├── addStructuredAbtuseMesh_MicroCuboid.py # adding obtuse tetrahedra +│ │ │ ├── addStructuredMesh_BoundaryFaceCuboid.py # adding one face of cuboid for structured mesh generation +│ │ │ ├── addStructuredMesh_MicroCuboid.py # add 6 non-obtuse tetrahedra representing one (micro-)cube +│ │ │ ├── __init__.py # _setup/geometries/standardGeometries/_structuredMeshing init file +│ │ │ ├── structuredAbtuseMesh_Cuboid.py # manually mesh cuboid by obtuse tetrahedra +│ │ │ └── structuredMesh_Cuboid.py # manually mesh cuboid by non-obtuse tetrahedra +│ │ ├── unitBall.py # ngsolve unit ball geometry +│ │ └── unitCube.py # ngsolve unit cube geometry +│ ├── __init__.py # _setup init file +│ ├── outputOptions.py # class defining filenames, headers, etc. for output +│ └── parameters.py # class for (mostly physical) simulation parameters +└── _tools + ├── algebra + │ ├── crossProd.py # cross product + │ ├── curl.py # curl + │ ├── frobeniusInnerProd.py # frobenius inner product + │ ├── __init__.py # _tools/algebra init file + │ ├── innerProd.py # inner product + │ └── scipySparseFromNgMatrix.py # convert ngsolve matrix to scipy sparse matrix + ├── __init__.py # _tools init file + ├── misc + │ ├── __init__.py # _tools/misc init file + │ ├── maximumMeshSize.py # determine actual maximum mesh size of an ngsolve mesh + │ └── timeToString.py # nicely format physical time for screen output + ├── output + │ ├── createNewFolder.py # create new folder with uniqe name + │ ├── __init__.py # _tools/output init file + │ ├── liveSaveValues.py # append an array of values to a file + │ └── saveContent.py # append string to a file + ├── postprocessing + │ └── compareFiles.py # compare/plot output file(s), eg. simulation1/averages.dat with simulation2/averages.dat + └── vtk + ├── _details.py # details of writing 3D, S1 vtk file (e.g., of magnetization, stray field) + ├── __init__.py # _tools/vtk init file + ├── loadMagnetization.py # load 3D, S1 ngsolve GridFunction from vtk-File + └── saveMagnetization.py # save 3D, S1 ngsolve GridFunction to vtk-File