MFEM
v4.8.0
Finite element discretization library
Toggle main menu visibility
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
x
Enumerations
a
b
c
d
e
f
g
i
j
m
o
q
r
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Symbols
a
b
d
e
f
g
h
i
l
m
n
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
i
k
m
n
o
p
q
r
s
v
w
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
p
s
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
Loading...
Searching...
No Matches
miniapps
spde
util.hpp
Go to the documentation of this file.
1
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
2
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3
// LICENSE and NOTICE for details. LLNL-CODE-806117.
4
//
5
// This file is part of the MFEM library. For more information and source code
6
// availability visit https://mfem.org.
7
//
8
// MFEM is free software; you can redistribute it and/or modify it under the
9
// terms of the BSD-3 license. We welcome feedback and contributions, see file
10
// CONTRIBUTING.md for details
11
12
#ifndef SPDE_UTIL_HPP
13
#define SPDE_UTIL_HPP
14
15
#include <random>
16
#include <vector>
17
#include "
mfem.hpp
"
18
19
namespace
mfem
20
{
21
22
/// Fills the vector x with random numbers between a and b.
23
void
FillWithRandomNumbers
(std::vector<real_t> &x,
real_t
a
= 0.0,
24
real_t
b
= 1.0);
25
26
/// This function creates random rotation matrices (3 x 3) and stores them in
27
/// the vector. That means, x[0-8] is the first rotation matrix, x[9-17] is
28
/// the second and so forth. Size of the vector determines the number of
29
/// rotation that fit into the vector and should be a multiple of 9.
30
void
FillWithRandomRotations
(std::vector<real_t> &x);
31
32
}
// namespace mfem
33
34
#endif
// SPDE_UTIL_HPP
b
real_t b
Definition
lissajous.cpp:42
a
real_t a
Definition
lissajous.cpp:41
mfem.hpp
mfem
Definition
CodeDocumentation.dox:1
mfem::FillWithRandomRotations
void FillWithRandomRotations(std::vector< real_t > &x)
Definition
util.cpp:26
mfem::FillWithRandomNumbers
void FillWithRandomNumbers(std::vector< real_t > &x, real_t a, real_t b)
Fills the vector x with random numbers between a and b.
Definition
util.cpp:18
mfem::real_t
float real_t
Definition
config.hpp:43
Generated on Wed Apr 9 2025 16:53:03 for MFEM by
1.11.0