Changeset 15728


Ignore:
Timestamp:
08/06/13 14:39:01 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixing some memory leaks + cosmetics

Location:
issm/trunk-jpl/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r15726 r15728  
    55975597        /*Fetch number of nodes and dof for this finite element*/
    55985598        int numnodes = this->NumberofNodes();
    5599         int numdof   = numnodes*NDOF1;
    56005599
    56015600        /*Initialize Element matrix and vectors*/
    56025601        ElementMatrix* Ke     = new ElementMatrix(nodes,numnodes,this->parameters,NoneApproximationEnum);
    56035602        IssmDouble*    basis  = xNew<IssmDouble>(numnodes);
    5604         IssmDouble*    B      = xNew<IssmDouble>(2*numdof);
    5605         IssmDouble*    Bprime = xNew<IssmDouble>(2*numdof);
     5603        IssmDouble*    B      = xNew<IssmDouble>(2*numnodes);
     5604        IssmDouble*    Bprime = xNew<IssmDouble>(2*numnodes);
    56065605        IssmDouble     D[2][2];
    56075606
     
    56335632                D_scalar=gauss->weight*Jdettria;
    56345633
    5635                 TripleMultiply(basis,1,numdof,1,
     5634                TripleMultiply(basis,1,numnodes,1,
    56365635                                        &D_scalar,1,1,0,
    5637                                         basis,1,numdof,0,
     5636                                        basis,1,numnodes,0,
    56385637                                        Ke->values,1);
    56395638
     
    56475646                D[0][0]=D_scalar*dvxdx;
    56485647                D[0][1]=0.;
     5648                D[1][0]=0.;
    56495649                D[1][1]=D_scalar*dvydy;
    5650                 D[1][1]=0.;
    5651                 TripleMultiply(B,2,numdof,1,
     5650                TripleMultiply(B,2,numnodes,1,
    56525651                                        &D[0][0],2,2,0,
    5653                                         B,2,numdof,0,
     5652                                        B,2,numnodes,0,
    56545653                                        &Ke->values[0],1);
    56555654
    56565655                D[0][0]=D_scalar*vx;
    56575656                D[1][1]=D_scalar*vy;
    5658                 TripleMultiply(B,2,numdof,1,
     5657                TripleMultiply(B,2,numnodes,1,
    56595658                                        &D[0][0],2,2,0,
    5660                                         Bprime,2,numdof,0,
     5659                                        Bprime,2,numnodes,0,
    56615660                                        &Ke->values[0],1);
    56625661
     
    56675666                D[0][1]=D_scalar*diffusivity*h/(2*vel)*vx*vy;
    56685667                D[1][1]=D_scalar*diffusivity*h/(2*vel)*vy*vy;
    5669                 TripleMultiply(Bprime,2,numdof,1,
     5668                TripleMultiply(Bprime,2,numnodes,1,
    56705669                                        &D[0][0],2,2,0,
    5671                                         Bprime,2,numdof,0,
     5670                                        Bprime,2,numnodes,0,
    56725671                                        &Ke->values[0],1);
    56735672        }
  • issm/trunk-jpl/src/c/main/globals.h

    r15048 r15728  
    1313bool IssmComm::parallel;
    1414
    15 /*String that is used to characterize our toolkits, ends up in Petsc Options database if we use Petsc. Can also be used to characterize the ISSM toolkit, often used when Petsc is not allowed*/
     15/*String that is used to characterize our toolkits, ends up in Petsc Options
     16 * database if we use Petsc. Can also be used to characterize the ISSM toolkit,
     17 * often used when Petsc is not allowed*/
    1618char* ToolkitOptions::toolkitoptions;
    1719
  • issm/trunk-jpl/src/c/toolkits/ToolkitOptions.cpp

    r15048 r15728  
    22 * \brief  file containing the methods for ToolkitOptions.h
    33 */
    4 
    5 #ifdef HAVE_CONFIG_H
    6         #include <config.h>
    7 #else
    8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    9 #endif
    104
    115#include <string.h>
  • issm/trunk-jpl/src/c/toolkits/ToolkitOptions.h

    r15048 r15728  
    77#ifndef _TOOLKIT_OPTIONS_H
    88#define _TOOLKIT_OPTIONS_H
    9 
    10 /*{{{*/
    11 #ifdef HAVE_CONFIG_H
    12         #include <config.h>
    13 #else
    14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    15 #endif
    16 
    17 /*}}}*/
    189
    1910class ToolkitOptions {
Note: See TracChangeset for help on using the changeset viewer.