Commit ff91bd01 authored by Alexander Danilov's avatar Alexander Danilov

AutoDiff: fix compilation with USE_AUTODIFF=OFF

parent eba0ad0d
......@@ -4,7 +4,9 @@ add_subdirectory(DrawMatrix)
add_subdirectory(MatSolve)
add_subdirectory(GridGen)
add_subdirectory(FVDiscr)
if(USE_AUTODIFF AND USE_SOLVER AND USE_MESH)
add_subdirectory(ADFVDiscr)
add_subdirectory(ADMFD)
endif(USE_AUTODIFF AND USE_SOLVER AND USE_MESH)
#add_subdirectory(OctreeCutcell)
add_subdirectory(Solver)
\ No newline at end of file
......@@ -3861,6 +3861,7 @@ void draw_screen()
}
break;
}
#if defined(USE_AUTODIFF)
case DATA_VARIABLE:
{
Storage::var_array arr = e->VariableArray(*t);
......@@ -3878,6 +3879,7 @@ void draw_screen()
}
break;
}
#endif
}
sprintf(temp,"%s %s %s",t->GetTagName().c_str(),DataTypeName(t->GetDataType()),str);
strcpy(str,temp);
......
......@@ -31,7 +31,7 @@ namespace INMOST
template<> struct Promote<variable, INMOST_DATA_REAL_TYPE> {typedef variable type;};
template<> struct Promote<variable, variable> {typedef variable type;};
#else
INMOST_DATA_REAL_TYPE get_value(INMOST_DATA_REAL_TYPE x) {return x;}
__INLINE INMOST_DATA_REAL_TYPE get_value(INMOST_DATA_REAL_TYPE x) {return x;}
#endif
template<typename Var>
......
......@@ -2053,10 +2053,8 @@ namespace INMOST
INMOST_DATA_ENUM_TYPE Mesh::GetDataCapacity(const INMOST_DATA_BULK_TYPE * adata, INMOST_DATA_ENUM_TYPE size, const Tag & tag) const
{
assert( tag.GetMeshLink() == this );
if( tag.GetDataType() != DATA_VARIABLE )
return size*tag.GetBytesSize();
#if defined(USE_AUTODIFF)
else
if( tag.GetDataType() == DATA_VARIABLE )
{
INMOST_DATA_ENUM_TYPE ret = 0;
const Sparse::Row::entry * arr = static_cast<const Sparse::Row::entry *>(static_cast<const void *>(adata));
......@@ -2064,7 +2062,9 @@ namespace INMOST
ret += variable::RetriveSize(arr+ret);
return ret*sizeof(Sparse::Row::entry);
}
else
#endif
return size*tag.GetBytesSize();
assert(false);
return 0;
}
......
......@@ -1255,6 +1255,7 @@ namespace INMOST
Repeat = ConvertMultiplier(multiplier,SetSize);
}
#if defined(USE_AUTODIFF)
void XMLReader::ParseVariable(std::string word, std::vector<INMOST::Storage::var> & Vector, int & Repeat, int SetSize)
{
std::string value, multiplier;
......@@ -1277,6 +1278,7 @@ namespace INMOST
Repeat = ConvertMultiplier(multiplier,SetSize);
}
#endif
void XMLReader::ParseInteger(std::string word, std::vector<INMOST::Storage::integer> & Vector, int & Repeat, int SetSize)
{
std::string value, multiplier;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment