Skip to content
Snippets Groups Projects
Select Git revision
  • ac275de925405cf3f5fd5db19ebae6e196cdb5a7
  • master default protected
  • feature/pp_iteration_example
  • feature/add-fft-interface
  • feature/particle_state_generation_with_variable_box_size
  • feature/forcing-unit-test
  • feature/dealias-check2
  • bugfix/check_field_exists
  • feature/dealias-check
  • v3.x
  • feature/particles-vectorization
  • 6.2.4
  • 6.2.3
  • 6.2.2
  • 6.2.1
  • 6.2.0
  • 6.1.0
  • 6.0.0
  • 5.8.1
  • 5.8.0
  • 5.7.2
  • 5.7.1
  • 5.7.0
  • 5.6.0
  • 5.5.1
  • 5.5.0
  • 5.4.7
  • 5.4.6
  • 5.4.5
  • 5.4.4
  • 5.4.3
31 results

field_descriptor.hpp

Blame
  • field_descriptor.hpp 829 B
    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    #include <mpi.h>
    #include <fftw3-mpi.h>
    
    #ifndef __FIELD_DESCRIPTOR__
    
    #define __FIELD_DESCRIPTOR__
    
    extern int myrank, nprocs;
    
    class field_descriptor
    {
        public:
            int *sizes;
            int *subsizes;
            int *starts;
            int ndims;
            int local_size, full_size;
            MPI_Datatype mpi_array_dtype, mpi_dtype;
    
            field_descriptor(
                    int ndims,
                    int *n,
                    MPI_Datatype element_type);
            ~field_descriptor();
            int read(
                    const char *fname,
                    void *buffer);
            int write(
                    const char *fname,
                    void *buffer);
            int transpose(
                    float *input,
                    float *output);
    };
    
    #endif//__FIELD_DESCRIPTOR__