#-+--------------------------------------------------------------------
# Igatools a general purpose Isogeometric analysis library.
# Copyright (C) 2012-2016  by the igatools authors (see authors.txt).
#
# This file is part of the igatools library.
#
# The igatools library is free software: you can use it, redistribute
# it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#-+--------------------------------------------------------------------

# QA (pauletti, Jun 6, 2014):
from init_instantiation_data import *

data = Instantiation()
(f, inst) = (data.file_output, data.inst)

classes = ['BernsteinExtraction<%d,%d,%d>' %(x.dim, x.range, x.rank)  
          for x in inst.all_ref_sp_dims]

classes.append('BernsteinExtraction<0,0,1>')



#---------------------------------------------------
f.write('IGA_NAMESPACE_CLOSE\n')

archives = ['OArchive','IArchive']

id = 0 
for c in unique(classes):
    alias = 'BernsteinExtractionAlias%d' %(id)
    f.write('using %s = iga::%s; \n' % (alias, c))
    for ar in archives:
        f.write('CEREAL_SPECIALIZE_FOR_ARCHIVE(%s,%s,cereal::specialization::member_serialize)\n' %(ar,alias))

    id += 1 
    
f.write('IGA_NAMESPACE_OPEN\n')
#---------------------------------------------------
