Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing include #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/contrib/dfise/dfise_dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@
#include <sstream>
#include <fstream>


#include "vector_value.h"
#include "tensor_value.h"
#include "dfise.h"

#ifdef WINDOWS
#include <io.h> // for windows _access function
#else
#include <unistd.h> // for POSIX access function
#endif


void printusage()
{
Expand Down
34 changes: 17 additions & 17 deletions src/solution/cgns_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void CGNSIO::read (const std::string& filename)
genius_assert(B==1);

int cell_dim, physical_dim;
char base_name[32];
char base_name[33];
//read base information
genius_assert(!cg_base_read(fn, B, base_name, &cell_dim, &physical_dim));
genius_assert(physical_dim==3);
Expand All @@ -99,7 +99,7 @@ void CGNSIO::read (const std::string& filename)
genius_assert(!cg_ndescriptors(&nd));
for(int d=1; d<=nd; ++d)
{
char descriptor_name[32];
char descriptor_name[33];
char *_description;
genius_assert(!cg_descriptor_read(d, descriptor_name, &_description));

Expand Down Expand Up @@ -128,7 +128,7 @@ void CGNSIO::read (const std::string& filename)
}

// zone basic information
char zone_name[32];
char zone_name[33];
{
genius_assert(!cg_zone_read(fn, B, z_id, zone_name, isize));
mesh.set_subdomain_label(z_id -1, zone_name );
Expand All @@ -141,7 +141,7 @@ void CGNSIO::read (const std::string& filename)
genius_assert(!cg_ndescriptors(&ndescriptor));
if(ndescriptor)
{
char descriptorname[32];
char descriptorname[33];
char *material;
genius_assert(!cg_descriptor_read(ndescriptor, descriptorname, &material));
mesh.set_subdomain_material(z_id -1, material);
Expand Down Expand Up @@ -170,7 +170,7 @@ void CGNSIO::read (const std::string& filename)
int A;
genius_assert(!cg_narrays( &A ));
genius_assert(A==1);
char ArrayName[32];
char ArrayName[33];
DataType_t DataType;
int DataDimension;
int DimensionVector;
Expand Down Expand Up @@ -199,7 +199,7 @@ void CGNSIO::read (const std::string& filename)

//read section information
{
char sectionname[32];
char sectionname[33];
ElementType_t elemtype;
int range_min = 1;
int nbndry;
Expand Down Expand Up @@ -230,7 +230,7 @@ void CGNSIO::read (const std::string& filename)

for(int a=1; a<=A; a++)
{
char ArrayName[32];
char ArrayName[33];
DataType_t DataType;
int DataDimension;
int DimensionVector;
Expand Down Expand Up @@ -407,7 +407,7 @@ void CGNSIO::read (const std::string& filename)
genius_assert(!cg_nbocos(fn, B, z_id, &BC));
for(int bc_id=1; bc_id<=BC; bc_id++)
{
char boco_name[32];
char boco_name[33];
BCType_t boco_type ;
PointSetType_t ptset_type ;
int npnts ;
Expand All @@ -429,7 +429,7 @@ void CGNSIO::read (const std::string& filename)
int ndescriptor;
genius_assert(!cg_ndescriptors(&ndescriptor));

char descriptorname[32];
char descriptorname[33];
for(int nd=1; nd<=ndescriptor; ++nd)
{
char *_text;
Expand Down Expand Up @@ -465,7 +465,7 @@ void CGNSIO::read (const std::string& filename)

for(int a=1; a<=A; a++)
{
char ArrayName[32];
char ArrayName[33];
DataType_t DataType;
int DataDimension;
int DimensionVector;
Expand Down Expand Up @@ -510,7 +510,7 @@ void CGNSIO::read (const std::string& filename)
genius_assert(!cg_narrays(&narray));
for(int a=1; a<=narray; a++)
{
char array[32];
char array[33];
DataType_t type;
int dimension;
int vector;
Expand Down Expand Up @@ -541,14 +541,14 @@ void CGNSIO::read (const std::string& filename)
for(int sol_id=1; sol_id<=SOL; sol_id++)
{
genius_assert(!cg_nfields(fn, B, z_id, sol_id, &F));
char solutionname[32];
char solutionname[33];
GridLocation_t locationtype;
genius_assert(!cg_sol_info(fn,B,z_id,sol_id,solutionname, &locationtype));
for(int f_id=1; f_id<=F; f_id++)
{
int imin=1;
DataType_t datatype;
char fieldname[32];
char fieldname[33];
cg_field_info(fn, B, z_id, sol_id, f_id, &datatype, fieldname);
genius_assert(datatype==RealDouble);

Expand All @@ -564,7 +564,7 @@ void CGNSIO::read (const std::string& filename)
genius_assert(!cg_ndescriptors(&ndescriptors));
for(int d_it=1; d_it<=ndescriptors; d_it++)
{
char descriptorname[32];
char descriptorname[33];
char *_description;
genius_assert(!cg_descriptor_read(d_it, descriptorname, &_description));
region_solution_units.insert( std::make_pair( std::string(descriptorname), std::string(_description)) );
Expand All @@ -583,7 +583,7 @@ void CGNSIO::read (const std::string& filename)
int nuserdata; genius_assert(!cg_nuser_data(&nuserdata));
for(int u=1; u<=nuserdata; ++u)
{
char userdataname[32];
char userdataname[33];
genius_assert(!cg_user_data_read(u, userdataname));
if( std::string(userdataname) != "ExtraBoundaryInfo" ) continue;

Expand All @@ -593,7 +593,7 @@ void CGNSIO::read (const std::string& filename)
for(int i=1; i<=ndescriptor; ++i)
{
// read first descriptor -- bc label
char descriptorname[32];
char descriptorname[33];
char *_description;
assert(!cg_descriptor_read(i, descriptorname, &_description));
mesh.boundary_info->add_extra_description(std::string(_description));
Expand Down Expand Up @@ -1306,7 +1306,7 @@ void CGNSIO::write (const std::string& filename)
// now write down boundary information

// write a dummy bc label
char bc_label[32];
char bc_label[33];
sprintf( bc_label, "boundary_%d", bd_id );

// boundary as point list
Expand Down