add extract method to fix external

This commit is contained in:
Axel Kohlmeyer
2021-07-16 17:21:57 -04:00
parent 88e363c0bb
commit 8b1dedf04a
2 changed files with 16 additions and 1 deletions

View File

@ -238,7 +238,7 @@ void FixExternal::set_virial_peratom(double **caller_virial)
void FixExternal::set_vector_length(int n)
{
delete [] caller_vector;
delete[] caller_vector;
vector_flag = 1;
size_vector = n;
@ -342,3 +342,16 @@ void FixExternal::set_callback(FnPtr caller_callback, void *caller_ptr)
callback = caller_callback;
ptr_caller = caller_ptr;
}
/* ----------------------------------------------------------------------
get access to internal data structures
------------------------------------------------------------------------- */
void *FixExternal::extract(const char *str, int &dim)
{
if (strcmp(str, "fexternal") == 0) {
dim = 2;
return (void *) fexternal;
}
return nullptr;
}