Skip to content
Snippets Groups Projects
Select Git revision
  • 9e76055a0721f9ce3d96b13d3460fe11cd7e00f1
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

sparsityPattern.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    optimization.cpp 560.67 KiB
    /*************************************************************************
    Copyright (c) Sergey Bochkanov (ALGLIB project).
    
    >>> SOURCE LICENSE >>>
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation (www.fsf.org); either version 2 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.
    
    A copy of the GNU General Public License is available at
    http://www.fsf.org/licensing/licenses
    >>> END OF LICENSE >>>
    *************************************************************************/
    #include "stdafx.h"
    #include "optimization.h"
    
    // disable some irrelevant warnings
    #if (AE_COMPILER==AE_MSVC)
    #pragma warning(disable:4100)
    #pragma warning(disable:4127)
    #pragma warning(disable:4702)
    #pragma warning(disable:4996)
    #endif
    using namespace std;
    
    /////////////////////////////////////////////////////////////////////////
    //
    // THIS SECTION CONTAINS IMPLEMENTATION OF C++ INTERFACE
    //
    /////////////////////////////////////////////////////////////////////////
    namespace alglib
    {
    
    
    /*************************************************************************
    This object stores state of the nonlinear CG optimizer.
    
    You should use ALGLIB functions to work with this object.
    *************************************************************************/
    _mincgstate_owner::_mincgstate_owner()
    {
        p_struct = (alglib_impl::mincgstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::mincgstate), NULL);
        if( p_struct==NULL )
            throw ap_error("ALGLIB: malloc error");
        if( !alglib_impl::_mincgstate_init(p_struct, NULL, ae_false) )
            throw ap_error("ALGLIB: malloc error");
    }
    
    _mincgstate_owner::_mincgstate_owner(const _mincgstate_owner &rhs)
    {
        p_struct = (alglib_impl::mincgstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::mincgstate), NULL);
        if( p_struct==NULL )
            throw ap_error("ALGLIB: malloc error");
        if( !alglib_impl::_mincgstate_init_copy(p_struct, const_cast<alglib_impl::mincgstate*>(rhs.p_struct), NULL, ae_false) )
            throw ap_error("ALGLIB: malloc error");
    }
    
    _mincgstate_owner& _mincgstate_owner::operator=(const _mincgstate_owner &rhs)
    {
        if( this==&rhs )
            return *this;
        alglib_impl::_mincgstate_clear(p_struct);
        if( !alglib_impl::_mincgstate_init_copy(p_struct, const_cast<alglib_impl::mincgstate*>(rhs.p_struct), NULL, ae_false) )
            throw ap_error("ALGLIB: malloc error");
        return *this;