[overture] Re: help to get a simple hyperbolic mapping code working

  • From: Sunil S Nandihalli <sunil.nandihalli@xxxxxxxxx>
  • To: overture@xxxxxxxxxxxxx
  • Date: Thu, 16 Apr 2009 17:00:13 +0530

Thanks Bill, I am using version 23 now. Its working now.

 I would like to know
1. if there is a way to explicitly say in which direction the hyperbolic
mapping has to grow geometrically may be with the help of a vector ..
instead of saying forward or backward?
2. Is there a way to say create a single MappedGrid by merging two Mapped
Grids which have coincident(or identical) geometry on one of the faces and
identical number of points in both directions on the face with identical
geometry ?

Thanks and regards,
Sunil.



On Tue, Apr 14, 2009 at 8:37 PM, Bill Henshaw <henshaw@xxxxxxxx> wrote:

> Hi Sunil:
>  The HyperbolicMapping is usually called interactively and so has
> not been tested very much when called directly.
> The following should work but you will need Overture.v23.
>
> ...Bill
>
> int extrude2DMapping(Mapping& m,const int NLayers)
> {
>  HyperbolicMapping hyp;
>  const bool isSurfaceGrid=false, init=true;
>  hyp.setSurface(m,isSurfaceGrid,init);
>  hyp.setGridDimensions(axis1,20);
>  hyp.setGridDimensions(axis2,30);
> //  hyp.setIsSurfaceGrid(false);
>  hyp.generate();
>
>  int plotOption=1;
>  PlotStuff ps(plotOption,"extrude2DMapping");         // for plotting
>  PlotStuffParameters psp;
>
>  PlotIt::plot(ps,hyp,psp);
> }
>
> Sunil S Nandihalli wrote:
>
>> Hello every body,
>>  I would like some help with getting a simple hyperbolic mesher working...
>> Any help would be appreciated.
>> The following is the output from the run inside a debugger
>> *********************************************
>> Starting program:
>> /home/sunil/work/download/overture/Overture.v22.debug.withBillChanges/primer/hyperbolic.step1
>> [Thread debugging using libthread_db enabled]
>> A++ Internal_Index bounds checking: ON
>> Mapping::mapGrid:ERROR: array r is not of the expected shape
>> terminate called after throwing an instance of 'char*'
>> [New Thread 0xb39036c0 (LWP 17179)]
>>
>> Program received signal SIGABRT, Aborted.
>> [Switching to Thread 0xb39036c0 (LWP 17179)]
>> 0xb7f32410 in __kernel_vsyscall ()
>> ************************************
>> The backtrace is
>> #6  0xb3c69e6a in __cxa_throw () from /usr//lib/libstdc++.so.6
>> #7  0xb6837648 in Mapping::mapGrid (this=0xbf80c364, r=@0xbf801078,
>> x=@0xbf80a7c4, xr=@0x87ba5c0, params=@0x87cd050) at Mapping.C:3002
>> #8  0xb6af4be4 in HyperbolicMapping::evaluateStartCurve (this=0xbf80a1ec,
>> xStart=@0xbf80a7c4) at hype/generate.C:739
>> #9  0xb6af5dcf in HyperbolicMapping::initializeMarchingArrays
>> (this=0xbf80a1ec, i3Start=0, numberOfAdditionalSteps=0, x=@0xbf80b468,
>> xt=@0xbf80b5e8, xr=@0xbf8093e4, normal=@0xbf8
>> 09264, xrr=@0xbf8090e4, s=@0xbf808de4, ss=@0xbf808c64,
>> xrrDotN=@0xbf808f64, kappa=@0xbf808ae4) at hype/generate.C:873
>> #10 0xb6af817b in HyperbolicMapping::generate (this=0xbf80a1ec,
>> numberOfAdditionalSteps=@0xbf80c30c) at hype/generate.C:100
>> #11 0x0806de83 in extrude2DMapping (m=@0xbf80c364, NLayers=10) at
>> hyperbolic.step1.C:15
>> #12 0x0806df92 in main (argc=Cannot access memory at address 0x431b
>> ) at hyperbolic.step1.C:22
>>
>> Thanks in advance..
>> Sunil.
>>
>>
>> ------------------------------------------------------------------------
>>
>> #include <iostream>
>> #include "Overture.h"
>> #include "HyperbolicMapping.h"
>> #include "PlaneMapping.h"
>> #include "MappedGrid.h"
>> #include "PlotStuff.h"
>>
>> int extrude2DMapping(Mapping& m,const int NLayers)
>> {
>>  HyperbolicMapping hyp;
>>  hyp.setSurface(m);
>>  hyp.setGridDimensions(axis1,20);
>>  hyp.setGridDimensions(axis2,30);
>>  hyp.setIsSurfaceGrid(false);
>>  hyp.generate();
>> }
>>
>> int main(int argc,char** argv)
>> {
>>  Overture::start(argc,argv);
>>  PlaneMapping p;
>>  extrude2DMapping(p,10);
>>  Overture::finish();
>> }
>>
>
>


-- 
the more you know, the more you realize of how little you know in the
grander scheme of things

Other related posts: