Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71920511
manifold_ellipsoid.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 13, 18:31
Size
666 B
Mime Type
text/x-c
Expires
Mon, Jul 15, 18:31 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
18941165
Attached To
rLAMMPS lammps
manifold_ellipsoid.cpp
View Options
#include "manifold_ellipsoid.h"
using
namespace
LAMMPS_NS
;
using
namespace
user_manifold
;
manifold_ellipsoid
::
manifold_ellipsoid
(
LAMMPS
*
lmp
,
int
narg
,
char
**
argv
)
:
manifold
(
lmp
)
{}
double
manifold_ellipsoid
::
g
(
const
double
*
x
)
{
const
double
ai
=
1.0
/
params
[
0
];
const
double
bi
=
1.0
/
params
[
1
];
const
double
ci
=
1.0
/
params
[
2
];
return
x
[
0
]
*
x
[
0
]
*
ai
*
ai
+
x
[
1
]
*
x
[
1
]
*
bi
*
bi
+
x
[
2
]
*
x
[
2
]
*
ci
*
ci
-
1.0
;
}
void
manifold_ellipsoid
::
n
(
const
double
*
x
,
double
*
n
)
{
const
double
ai
=
1.0
/
params
[
0
];
const
double
bi
=
1.0
/
params
[
1
];
const
double
ci
=
1.0
/
params
[
2
];
n
[
0
]
=
2
*
x
[
0
]
*
ai
*
ai
;
n
[
1
]
=
2
*
x
[
1
]
*
bi
*
bi
;
n
[
2
]
=
2
*
x
[
2
]
*
ci
*
ci
;
}
Event Timeline
Log In to Comment