Dummy implementation of the Grid interface
This commit is contained in:
169
src/core/grid.cu
169
src/core/grid.cu
@@ -17,3 +17,172 @@
|
||||
along with Astaroth. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "astaroth_grid.h"
|
||||
|
||||
#include "astaroth_node.h"
|
||||
|
||||
const size_t MAX_NUM_NODES = 32;
|
||||
size_t num_nodes = 0;
|
||||
static Node nodes[MAX_NUM_NODES];
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridInit(const AcMeshInfo node_config)
|
||||
{
|
||||
acNodeCreate(0, node_config, &nodes[0]);
|
||||
++num_nodes;
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridQuit(void)
|
||||
{
|
||||
acNodeDestroy(nodes[0]);
|
||||
--num_nodes;
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridSynchronizeStream(const Stream stream)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridSwapBuffers(void)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridLoadConstant(const Stream stream, const AcRealParam param, const AcReal value)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridLoadVertexBufferWithOffset(const Stream stream, const AcMesh host_mesh,
|
||||
const VertexBufferHandle vtxbuf_handle, const int3 src,
|
||||
const int3 dst, const int num_vertices)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridLoadMeshWithOffset(const Stream stream, const AcMesh host_mesh, const int3 src,
|
||||
const int3 dst, const int num_vertices)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridLoadVertexBuffer(const Stream stream, const AcMesh host_mesh,
|
||||
const VertexBufferHandle vtxbuf_handle)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridLoadMesh(const Stream stream, const AcMesh host_mesh)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridStoreVertexBufferWithOffset(const Stream stream, const VertexBufferHandle vtxbuf_handle,
|
||||
const int3 src, const int3 dst, const int num_vertices,
|
||||
AcMesh* host_mesh)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridStoreMeshWithOffset(const Stream stream, const int3 src, const int3 dst,
|
||||
const int num_vertices, AcMesh* host_mesh)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridStoreVertexBuffer(const Stream stream, const VertexBufferHandle vtxbuf_handle,
|
||||
AcMesh* host_mesh)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridStoreMesh(const Stream stream, AcMesh* host_mesh)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridIntegrateSubstep(const Stream stream, const int step_number, const int3 start, const int3 end,
|
||||
const AcReal dt)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridIntegrateStep(const Stream stream, const AcReal dt)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
/** */
|
||||
AcResult
|
||||
acGridPeriodicBoundcondStep(const Stream stream)
|
||||
{
|
||||
WARNING("Not implemented");
|
||||
return AC_FAILURE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/** */
|
||||
AcResult acGridReduceScal(const Stream stream, const ReductionType rtype,
|
||||
const VertexBufferHandle vtxbuf_handle, AcReal* result);
|
||||
/** */
|
||||
AcResult acGridReduceVec(const Stream stream, const ReductionType rtype,
|
||||
const VertexBufferHandle vec0, const VertexBufferHandle vec1,
|
||||
const VertexBufferHandle vec2, AcReal* result);
|
||||
#endif
|
||||
/** */
|
||||
AcResult
|
||||
acGridReduceScal(const Stream stream, const ReductionType rtype,
|
||||
const VertexBufferHandle vtxbuf_handle, AcReal* result)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/** */
|
||||
AcResult
|
||||
acGridReduceVec(const Stream stream, const ReductionType rtype, const VertexBufferHandle vec0,
|
||||
const VertexBufferHandle vec1, const VertexBufferHandle vec2, AcReal* result)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user