Commit Graph

2861 Commits

Author SHA1 Message Date
Arne Morten Kvarving
abb21feef7 added: allow use of automatic differentation in analytic solutions 2023-10-31 18:38:31 +01:00
Knut Morten Okstad
cca533fa1c Added: Option to save result components on grid files 2023-10-31 13:16:55 +01:00
Knut Morten Okstad
520bd0d3c4 Added: matrix::augmentRows() 2023-10-31 13:16:55 +01:00
Knut Morten Okstad
8e0f93f253 Added: Input of result point grid 2023-10-31 13:16:55 +01:00
Knut Morten Okstad
04776d05b0 Changed: Put PointValue[s] definition in Vec3.h for reuse
while replacing typedef with using
2023-10-31 13:16:55 +01:00
Arne Morten Kvarving
67a22decb0 added: template EvalFunction over a Scalar type
rename to EvalFuncSpatial and make EvalFunction a type alias
for EvalFuncSpatial<Real> to avoid breaking existing code.

add deriv, dderiv, gradient and hessian specializations
for autodiff::var, thus adding automatic differentiation
2023-10-27 11:21:08 +02:00
Arne Morten Kvarving
264146b22e rename EvalFuncImpl to EvalFuncScalar 2023-10-27 11:21:08 +02:00
Arne Morten Kvarving
38f7265dc1 added: template EvalFunc over a Scalar type
rename to EvalFuncImpl and make EvalFunc a type alias
for EvalFuncImpl<Real> to avoid breaking existing code.

add deriv autodiff::var, thus adding automatic differentation
2023-10-26 17:47:16 +02:00
Arne Morten Kvarving
943044538d changed: CompatibleOperators::Weak::Laplacian - check if symmetric
if not also add stress terms to lower block
2023-10-25 14:37:38 +02:00
Arne Morten Kvarving
33252358b1 changed: optimize various EqualOrderOperators
more BLAS usage
2023-10-25 13:03:34 +02:00
Arne Morten Kvarving
c4ea583708 changed: optimize ResidualOperators::Laplacian
and remove templating for the EqualOrder one
2023-10-25 12:17:36 +02:00
Arne Morten Kvarving
b02de8d87b SIMSolver: avoid unused variable
iStep is not used
2023-10-25 10:15:10 +02:00
Arne Morten Kvarving
4f6bae7992 ASMu2D::getNoBoundaryElms: remove unnecessary if
the conditions were wrong and in any case the indices
are checked further up
2023-10-25 10:15:10 +02:00
Arne Morten Kvarving
d1356a07cf HDF5Restart: avoid unused lambda captures
these are only used with MPI
2023-10-25 10:15:10 +02:00
Arne Morten Kvarving
53fc5be069 Function.h: remove deprecated unary_function and binary_function
these are deprecated in c++-17 and we do not use any functionality from
them in any case
2023-10-25 10:15:10 +02:00
Arne Morten Kvarving
aa95ce1dd1 BasisFunctionCache: add missing include 2023-10-25 10:15:10 +02:00
Arne Morten Kvarving
12a1b6f08b ASMUtils: avoid unused variable warnings
the loop counters are only used in debug code
2023-10-25 10:15:10 +02:00
Arne Morten Kvarving
0ceb57e206 added: (Tensor|Vec)Func::hessian
returns the second derivatives of the function
2023-10-24 18:21:50 +02:00
Arne Morten Kvarving
c22de7be5a added: (Tensor|Vec)Func::timeDerivative
returns the time derivative of the function
2023-10-24 15:41:24 +02:00
Arne Morten Kvarving
dbcbede16c added: (Tensor|Vec)Func::Gradient
returns the gradient of the function
2023-10-24 10:49:52 +02:00
Arne Morten Kvarving
cf8b5542a1 added: RealFunc::hessian
returns the hessian of the function as a SymmTensor
2023-10-20 13:12:52 +02:00
Arne Morten Kvarving
1f042ee93a added: RealFunc::gradient
returns the gradient of the function as a Vec3
2023-10-20 10:31:22 +02:00
Arne Morten Kvarving
09cf3e55e5 changed: use a common implementation for setNoDims()
add a helper template and specialize this
for the types instead. preparation for upcoming changes
to workaround c++'s inability to partially specialize
member functions
2023-10-19 15:02:18 +02:00
Arne Morten Kvarving
abbf8a2dd1 changed: use a common implementation for deriv/dderiv 2023-10-19 15:02:18 +02:00
Arne Morten Kvarving
48172df260 changed: use a common implementation for evaluate()
this transposes tensor input to column-major order
adjust TensorFuncExpr::deriv / TensorFuncExpr::dderiv accordingly
2023-10-19 15:02:18 +02:00
Arne Morten Kvarving
de3f5b4930 added: allow passing eps(T|X) into EvalMultiFunction 2023-10-19 15:02:18 +02:00
Arne Morten Kvarving
e3cae68a34 ExprFunctions: modernize
use anonymous namespace
2023-10-19 13:07:59 +02:00
Arne Morten Kvarving
2cdfd9f640 ExprFunctions: modernize
use 'override'
2023-10-19 13:07:59 +02:00
Arne Morten Kvarving
8f02d0511e ExprFunction: modernize
use 'using'
2023-10-19 13:07:59 +02:00
Arne Morten Kvarving
574bf77266 ExprFunctions: modernize code
use unique_ptr
2023-10-19 13:07:59 +02:00
Arne Morten Kvarving
367e3fbe6d vector::add: also expose stridey and ofsy 2023-10-17 12:40:53 +02:00
Arne Morten Kvarving
32d7f01872 StabilizationUtils: remove pointless bool return values
use return values instead of out-params
2023-10-16 12:27:14 +02:00
Arne Morten Kvarving
e4e61a9b74 StabilizationUtils::getTauNSPt
use matrix::trace()
2023-10-16 12:27:14 +02:00
Arne Morten Kvarving
b8add08563 StabilizationUtils::getTauPt:
use matrix::norm2()
2023-10-16 12:27:14 +02:00
Arne Morten Kvarving
40508f0e12 StabilizationUtils: some cosmetics 2023-10-16 12:27:14 +02:00
Arne Morten Kvarving
5be5c5fb1b EqualOrderOperators: cosmetics
also use MxV instead of loops in WeakOps::Divergence and ResidualOps::Divergence
2023-10-16 09:01:41 +02:00
Arne Morten Kvarving
1d503ac1c8 ExprEval: update log of ifem changes 2023-10-11 08:52:55 +02:00
Arne Morten Kvarving
d64d2c642c ExprEval: add tests for auto-differentiation 2023-10-11 08:52:55 +02:00
Arne Morten Kvarving
327a855d1b expreval: make all classes a template over a scalar
instance for double and autodiff::Variable<double>
2023-10-11 08:52:55 +02:00
Arne Morten Kvarving
c9c13d888c import 'autodiff' third party library
this is version v1.0.3
2023-10-11 08:52:55 +02:00
Arne Morten Kvarving
a8a4cd780e added: allow explicitly specifying time derivative of function 2023-09-26 08:33:06 +02:00
Arne Morten Kvarving
72f9748aa1 changed: rename EvalFunc::derivative to EvalFunc::addDerivative
consistent with EvalFunction and more descriptive of what it does
2023-09-26 07:58:02 +02:00
Knut Morten Okstad
d1e222590b Fixed: Deactivate multi-threading for patches with rigid couplings 2023-09-25 21:13:04 +02:00
Knut Morten Okstad
7c0d5e8ee6 Changed: Use findBoundaryElms() when setting up boundary thread groups
Fixed: Override findBoundaryElms() for ASMs2DLag and ASMs3DLag.
2023-09-25 21:13:04 +02:00
Knut Morten Okstad
038e4bbe78 Changed: Method getEdgeNodes() is removed (using getBoundaryNodes() instead).
Added: Sanity checking on lIndex argument in getBoundary[Nodes|Elms]().
Added: Static helper getEdgeEnum().
2023-09-25 21:13:04 +02:00
Knut Morten Okstad
81bd53234c Changed: Use getBoundaryNodes() instead of getFaceNodes() which is removed.
Added: Sanity checking on lIndex argument in getBoundary[Elms|Nodes]().
Fixed: Calculation of u,v parameters in ASMu3D::getBoundary1Nodes().
2023-09-25 21:13:04 +02:00
Knut Morten Okstad
161a3f3c74 Changed: ASMbase::getBoundaryElms() can optionally return patch-local element indices 2023-09-25 21:13:04 +02:00
Arne Morten Kvarving
55184edfef ASMsxDmx::evalSolution: support separate geometry 2023-09-25 07:45:08 +02:00
Knut Morten Okstad
dbfb741a62 Changed: Remove "with grading" printout when explicit knots 2023-09-20 06:23:54 +02:00
Arne Morten Kvarving
f131400ec8 changed: use BasisFunctionValues also in boundary integrals
this allows simplifying the MxFiniteElement::(Hessian|Jacobian) methods.

add a type alias and a helper class to make it convenient.
2023-09-19 14:45:31 +02:00