BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Objective.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_CL_OBJECTIVE_HPP
13
#define BELFEM_CL_OBJECTIVE_HPP
14
15
#include "
typedefs.hpp
"
16
#include "
cl_Vector.hpp
"
17
18
namespace
belfem
19
{
20
namespace
opt
21
{
22
//------------------------------------------------------------------------------
23
31
class
Objective
32
{
33
// number of design variables
34
const
uint
mDimension;
35
36
//------------------------------------------------------------------------------
37
public
:
38
//------------------------------------------------------------------------------
39
40
Objective
(
const
uint
aDimension ) :
41
mDimension( aDimension )
42
{};
43
44
//------------------------------------------------------------------------------
45
46
virtual
~Objective
() =
default
;
47
48
//------------------------------------------------------------------------------
49
61
virtual
real
62
compute_objective
(
63
const
Vector< real >
& aX,
64
Vector< real >
& aGradient ) = 0;
65
66
//------------------------------------------------------------------------------
67
71
inline
uint
72
dimension
()
const
73
{
74
return
mDimension;
75
}
76
77
//------------------------------------------------------------------------------
78
};
79
}
80
}
81
#endif
//BELFEM_CL_OBJECTIVE_HPP
cl_Vector.hpp
belfem::Vector< real >
belfem::opt::Objective::compute_objective
virtual real compute_objective(const Vector< real > &aX, Vector< real > &aGradient)=0
evaluate the objective at the design point aX.
belfem::opt::Objective::~Objective
virtual ~Objective()=default
belfem::opt::Objective::Objective
Objective(const uint aDimension)
Definition
cl_Objective.hpp:40
belfem::opt::Objective::dimension
uint dimension() const
return the number of design variables
Definition
cl_Objective.hpp:72
belfem::opt
Definition
cl_Objective.hpp:21
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::uint
unsigned int uint
Definition
typedefs.hpp:30
belfem::real
double real
Definition
typedefs.hpp:36
typedefs.hpp
src
numerics
opt
cl_Objective.hpp
Generated by
1.18.0