[Dune] Re: [Dune-CVS] dune-grid r3732 - in releases/1.0/grid/io/visual: . grape
Oliver Sander
sander at mi.fu-berlin.de
Wed Jun 20 11:14:39 CEST 2007
my error. Please consider this email as not written.
sorry,
O
Oliver Sander wrote:
> Hi Robert!
> Do I understand correctly that DiscreteFunctionSpace is in
> dune-fem and that we thus have a dependency of dune-grid
> on dune-fem?
>
> greetings,
> Oliver
>
> robertk at dune-project.org wrote:
>
>> Author: robertk
>> Date: 2007-06-20 11:03:50 +0200 (Wed, 20 Jun 2007)
>> New Revision: 3732
>>
>> Modified:
>> releases/1.0/grid/io/visual/grape/grapedatadisplay.cc
>> releases/1.0/grid/io/visual/grapedatadisplay.hh
>> Log:
>> consequently use DiscreteFunctionSpace, as we visualize discrete
>> functions.
>> Also remove none workung maximum calculation for vectorial data.
>>
>>
>>
>> Modified: releases/1.0/grid/io/visual/grape/grapedatadisplay.cc
>> ===================================================================
>> --- releases/1.0/grid/io/visual/grape/grapedatadisplay.cc
>> 2007-06-15 12:15:47 UTC (rev 3731)
>> +++ releases/1.0/grid/io/visual/grape/grapedatadisplay.cc
>> 2007-06-20 09:03:50 UTC (rev 3732)
>> @@ -53,7 +53,7 @@
>> DiscreteFunctionType & func, LocalFunctionType &lf, const
>> int * comp, int localNum, double * val)
>> {
>> - enum { polynomialOrder = FunctionSpaceType :: polynomialOrder };
>> + enum { polynomialOrder = DiscreteFunctionSpaceType ::
>> polynomialOrder };
>> static const
>> GrapeLagrangePoints<ctype,dim,dimworld,polynomialOrder> lagrangePoints;
>> const FieldVector<ctype,dim> & localPoint =
>> lagrangePoints.getPoint(geomType,polynomialOrder,localNum);
>> @@ -83,7 +83,7 @@
>> // corners , kind of hack, but works for the moment if(polOrd == 0)
>> {
>> - enum { polynomialOrder = FunctionSpaceType :: polynomialOrder };
>> + enum { polynomialOrder = SpaceType :: polynomialOrder };
>> static const
>> GrapeLagrangePoints<ctype,dim,dimworld,polynomialOrder> lagrangePoints;
>> const FieldVector<ctype,dim> & localPoint =
>> lagrangePoints.getPoint(geomType,polynomialOrder,localNum);
>> @@ -223,33 +223,9 @@
>> }
>> else {
>> - typedef typename DiscreteFunctionType:: ConstDofIteratorType
>> DofIteratorType; - int comp = df->comp[0];
>> - int dimVal = df->dimVal;
>> - - DofIteratorType enddit = func.dend();
>> - {
>> - DofIteratorType dit = func.dbegin(); - int count = 0;
>> - while ( (dit != enddit) ) - {
>> - if((count%dimVal) == comp )
>> - {
>> - minValue = (*dit);
>> - maxValue = (*dit);
>> - break;
>> - }
>> - ++count;
>> - }
>> - }
>> - - int count = 0;
>> - for(DofIteratorType dit = func.dbegin(); dit != enddit; ++dit,
>> ++count)
>> - {
>> - if((count%dimVal) != comp) continue; - if( (*dit) <
>> minValue) minValue = (*dit);
>> - if( (*dit) > maxValue) maxValue = (*dit);
>> - }
>> + derr << "EvalDiscreteFunctions::calcMinMax: method not
>> implemented for vectorial data! \n";
>> + minValue = 0.0;
>> + maxValue = 1.0;
>> }
>>
>> if((maxValue-minValue) < 1e-10) @@ -497,8 +473,8 @@
>> inline void GrapeDataDisplay<GridType>::
>> addData(const DiscFuncType &func , const DATAINFO * dinf, double time
>> ) { - typedef typename DiscFuncType::FunctionSpaceType
>> FunctionSpaceType;
>> - enum { polynomialOrder = FunctionSpaceType :: polynomialOrder };
>> + typedef typename DiscFuncType::DiscreteFunctionSpaceType
>> DiscreteFunctionSpaceType;
>> + enum { polynomialOrder = DiscreteFunctionSpaceType ::
>> polynomialOrder };
>> typedef typename DiscFuncType::LocalFunctionType LocalFuncType;
>>
>> assert(dinf);
>> @@ -512,7 +488,7 @@
>> // add function wether is exists or not if(!already)
>> {
>> - int num = (int) FunctionSpaceType::DimRange;
>> + int num = (int) DiscreteFunctionSpaceType::DimRange;
>> if(vector) num = 1;
>>
>> vecFdata_.resize(size+num);
>> @@ -568,10 +544,10 @@
>> data->name = name;
>>
>> data->dimVal = dimVal;
>> - data->dimRange = FunctionSpaceType::DimRange;
>> + data->dimRange = DiscreteFunctionSpaceType::DimRange;
>> // set grid part selection methods - typedef
>> typename FunctionSpaceType :: GridPartType GridPartType;
>> + typedef typename DiscreteFunctionSpaceType :: GridPartType
>> GridPartType;
>> data->gridPart = ((void *) &func.space().gridPart());
>> data->setGridPartIterators = &BaseType::template
>> SetIter<GridPartType>::setGPIterator;
>> Modified: releases/1.0/grid/io/visual/grapedatadisplay.hh
>> ===================================================================
>> --- releases/1.0/grid/io/visual/grapedatadisplay.hh 2007-06-15
>> 12:15:47 UTC (rev 3731)
>> +++ releases/1.0/grid/io/visual/grapedatadisplay.hh 2007-06-20
>> 09:03:50 UTC (rev 3732)
>> @@ -79,10 +79,10 @@
>> typedef typename GridType :: ctype ctype;
>>
>> typedef typename DiscreteFunctionType :: LocalFunctionType
>> LocalFunctionType; - typedef typename DiscreteFunctionType ::
>> FunctionSpaceType FunctionSpaceType;
>> + typedef typename DiscreteFunctionType :: DiscreteFunctionSpaceType
>> DiscreteFunctionSpaceType;
>>
>> - typedef typename FunctionSpaceType :: RangeType RangeType;
>> - typedef typename FunctionSpaceType :: DomainType DomainType;
>> + typedef typename DiscreteFunctionSpaceType :: RangeType RangeType;
>> + typedef typename DiscreteFunctionSpaceType :: DomainType DomainType;
>>
>> typedef typename GrapeInterface<dim,dimworld>::DUNE_ELEM DUNE_ELEM;
>> typedef typename GrapeInterface<dim,dimworld>::DUNE_FDATA DUNE_FDATA;
>>
>>
>> _______________________________________________
>> Dune-CVS mailing list
>> Dune-CVS at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-cvs
>>
>>
>
>
--
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75217 *
* Institut für Mathematik II ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list