 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_SHARED_ARRAY3_H
26 #define SHKZ_SHARED_ARRAY3_H
55 [](
const shape3 &shape, std::string core_name ) {
57 credit(
"Shared Array 3D",
"SharedArray"));
58 return (
void *)(
new array3<T>(shape,T(),core_name));
61 delete reinterpret_cast<array3<T> *
>(ptr);
63 m_array->clear(initial_value);
64 assert( m_array->shape() == shape );
75 m_array->set_type(type);
145 [](
const shape3 &shape, std::string core_name ) {
147 credit(
"Shared MAC Array 3D",
"SharedMACArray"));
153 assert( m_array->shape() == shape );
154 m_array->clear(initial_value);
165 m_array->set_type(type);
174 m_array->copy(array);
~shared_array3()
Destructor for shared_array2.
Definition: shared_array3.h:90
macarray3< T > & operator()()
Get the reference to the internal borrowed array.
Definition: shared_array3.h:193
Collection of properties of this grid.
Definition: macarray3.h:1043
macarray3< T > * operator->()
Get the pointer to the internal borrowed array.
Definition: shared_array3.h:198
Storage class that enables sharing pre-allocated arrays.
Definition: shared_array3.h:41
shared_array3(const array3< T > &array)
Borrow a shared array and copy the input.
Definition: shared_array3.h:83
const macarray3< T > * operator->() const
Get the const pointer to the internal borrowed array.
Definition: shared_array3.h:203
shared_array3(const shape3 &shape, T initial_value=T(), std::string core_name="")
Borrow a shared array.
Definition: shared_array3.h:53
Storage class that enables sharing pre-allocated arrays for MAC grid.
Definition: shared_array3.h:131
array3< T > & operator()()
Get the reference to the internal borrowed array.
Definition: shared_array3.h:103
Structure that defines a three dimensional shape such as width, height and depth.
Definition: shape.h:478
shared_macarray3(const macarray3< T > &array)
Borrow a shared array and copy the input.
Definition: shared_array3.h:173
shared_macarray3(const typename macarray3< T >::type3 &type, vec3< T > initial_value=vec3< T >())
Borrow a shared array.
Definition: shared_array3.h:164
array3< T > * get()
Get the pointer to the internal borrowed array.
Definition: shared_array3.h:118
#define SHKZ_BEGIN_NAMESPACE
Name space beggining definition for shiokaze.
Definition: common.h:39
Collection of properties of this grid.
Definition: array3.h:1821
macarray3< T > * get()
Get the pointer to the internal borrowed array.
Definition: shared_array3.h:208
const macarray3< T > * get() const
Get the const pointer to the internal borrowed array.
Definition: shared_array3.h:213
array3< T > * operator->()
Get the pointer to the internal borrowed array.
Definition: shared_array3.h:108
const macarray3< T > & operator()() const
Get the const reference to the internal borrowed array.
Definition: shared_array3.h:188
static configuration & get_global_configuration()
Get the global settings of the program.
shared_macarray3(const shape3 &shape, vec3< T > initial_value=vec3< T >(), std::string core_name="")
Borrow a shared MAC array.
Definition: shared_array3.h:143
Class that automates the push and pop groups.
Definition: configuration.h:107
~shared_macarray3()
Destructor for shared_macarray2.
Definition: shared_array3.h:180
static void return_shared(void *array)
Return a borrowed array.
Fixed sized vector structure.
Definition: vec.h:38
static void * borrow_shared(const shape3 &shape, size_t class_hash, std::string core_name, std::function< void *(const shape3 &shape, std::string core_name)> alloc_func, std::function< void(void *ptr)> dealloc_func)
Borrow a shared array.
Class that defines the name, argument name, author's name, email address, date and the version of the...
Definition: credit.h:47
const array3< T > * operator->() const
Get the const pointer to the internal borrowed array.
Definition: shared_array3.h:113
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
Three dimensional staggered grid class designed to be defined as instance member in recursive_configu...
Definition: macarray3.h:37
const array3< T > & operator()() const
Get the const reference to the internal borrowed array.
Definition: shared_array3.h:98
const array3< T > * get() const
Get the const pointer to the internal borrowed array.
Definition: shared_array3.h:123
shared_array3(const typename array3< T >::type3 &type, T initial_value=T())
Borrow a shared array.
Definition: shared_array3.h:74
Three dimensional array class designed to be defined as instance member in recursive_configurable cla...
Definition: array3.h:42