Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
usadelndsoc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JYU Condensed Matter Theory
usadelndsoc
Commits
a88f5a04
Commit
a88f5a04
authored
2 years ago
by
patavirt
Browse files
Options
Downloads
Patches
Plain Diff
Add copying/readme
parent
fbb0d4e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
COPYING.txt
+661
-0
661 additions, 0 deletions
COPYING.txt
README.md
+16
-0
16 additions, 0 deletions
README.md
src/action.hpp
+35
-15
35 additions, 15 deletions
src/action.hpp
src/common.hpp
+8
-0
8 additions, 0 deletions
src/common.hpp
with
721 additions
and
15 deletions
.gitignore
+
1
−
0
View file @
a88f5a04
/builddir
/build
/Makefile
*~
This diff is collapsed.
Click to expand it.
COPYING.txt
0 → 100644
+
661
−
0
View file @
a88f5a04
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
16
−
0
View file @
a88f5a04
# usadelndsoc
Solver for Usadel equations in 2D with SOC gauge fields.
Uses a discretization with local gauge invariance.
## Requirements
-
C++ compiles
-
C++ libraries: Eigen, CppAD
-
Meson (build requirement)
## Compiling
See https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project
This diff is collapsed.
Click to expand it.
src/action.hpp
+
35
−
15
View file @
a88f5a04
/* usadelndsoc
*
* Copyright © 2022 Pauli Virtanen
* @author Pauli Virtanen <pauli.t.virtanen@jyu.fi>
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#ifndef ACTION_HPP_
#define ACTION_HPP_
...
...
@@ -5,8 +12,18 @@
#include
"array.hpp"
template
<
typename
Scalar
,
typename
Shape
>
inline
Scalar
S_2
(
array
::
Array
<
Scalar
,
Shape
>
Q
)
inline
auto
get_Q_matrix
(
array
::
Array
<
Scalar
,
Shape
>
Q
)
{
return
0
;
}
template
<
typename
Scalar
,
typename
Shape
,
typename
Shape2
>
inline
Scalar
S_2
(
array
::
Array
<
Scalar
,
Shape
>
Q
,
array
::
Array
<
Complex
,
Shape2
>
U
,
double
h
)
{
static
const
int
N_i
[
4
]
=
{
0
,
1
,
-
1
,
0
};
static
const
int
N_j
[
4
]
=
{
1
,
0
,
0
,
-
1
};
Scalar
S
=
Scalar
(
0
);
size_t
nx
=
Q
.
dim
(
0
);
size_t
ny
=
Q
.
dim
(
1
);
...
...
@@ -15,29 +32,32 @@ inline Scalar S_2(array::Array<Scalar, Shape> Q)
auto
Q1
=
Q
.
part
(
i
,
j
).
matrix
();
/* Sum over neighbors */
for
(
int
di
=
-
1
;
di
<=
1
;
++
di
)
{
for
(
int
dj
=
-
1
;
dj
<=
1
;
++
dj
)
{
if
(
i
==
0
&&
di
<
0
)
for
(
size_t
k
=
0
;
k
<
4
;
++
k
)
{
size_t
di
=
N_i
[
k
];
size_t
dj
=
N_j
[
k
];
if
(
i
==
0
&&
di
<
0
)
continue
;
if
(
i
==
nx
-
1
&&
di
>
0
)
if
(
i
==
nx
-
1
&&
di
>
0
)
continue
;
if
(
j
==
0
&&
dj
<
0
)
continue
;
if
(
j
==
ny
-
1
&&
dj
>
0
)
continue
;
if
(
di
==
0
&&
dj
==
0
)
if
(
j
==
0
&&
dj
<
0
)
continue
;
if
(
j
==
ny
-
1
&&
dj
>
0
)
continue
;
size_t
i2
=
i
+
di
;
size_t
j2
=
j
+
dj
;
size_t
i2
=
i
+
di
;
size_t
j2
=
j
+
dj
;
auto
Q2
=
Q
.
part
(
i2
,
j2
).
matrix
();
auto
U12
=
U
.
part
(
i
,
j
,
k
);
auto
U21
=
U
.
part
(
j
,
i
,
k
);
auto
Q2
=
Q
.
part
(
i2
,
j2
).
matrix
();
}
S
+=
2
/
(
4
*
h
)
*
(
Q1
-
U12
*
Q2
*
U21
).
trace
();
}
}
}
return
S
calar
(
0
)
;
return
S
;
}
...
...
This diff is collapsed.
Click to expand it.
src/common.hpp
+
8
−
0
View file @
a88f5a04
/* usadelndsoc
*
* Copyright © 2022 Pauli Virtanen
* @author Pauli Virtanen <pauli.t.virtanen@jyu.fi>
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#ifndef COMMON_HPP_
#define COMMON_HPP_
...
...
@@ -8,6 +15,7 @@
#include
<Eigen/Core>
typedef
std
::
complex
<
double
>
Complex
;
typedef
CppAD
::
AD
<
double
>
ADDouble
;
typedef
std
::
complex
<
ADDouble
>
ADComplex
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment