MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
assembly_elem_operation.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast_assembly_elem_operation_h__
21 #define __mast_assembly_elem_operation_h__
22 
23 // MAST includes
24 #include "base/mast_data_types.h"
25 
26 
27 // libMesh includes
28 #include "libmesh/elem.h"
29 
30 namespace MAST {
31 
32  // Forward declerations
33  class FEBase;
34  class ElementBase;
35  class AssemblyBase;
36  class FunctionBase;
37  class SystemInitialization;
38  class PhysicsDisciplineBase;
39  class GeomElem;
40  template <typename ValType> class FieldFunction;
41 
43 
44  public:
46 
47  virtual ~AssemblyElemOperations();
48 
49 
54 
59 
63  virtual void
66 
67 
71  virtual void
73 
77  virtual void set_assembly(MAST::AssemblyBase& assembly);
78 
83 
87  virtual void clear_assembly();
88 
94  virtual void
95  set_elem_data(unsigned int dim,
96  const libMesh::Elem& ref_elem,
97  MAST::GeomElem& elem) const = 0;
98 
103  virtual void
104  init(const MAST::GeomElem& elem) = 0;
105 
109  virtual void clear_elem();
110 
116 
117  libmesh_assert(_physics_elem);
118  return *_physics_elem;
119  }
120 
127  void set_skip_comm_sum(bool skip) { _skip_comm_sum = skip;}
128 
132  virtual void
133  set_elem_solution(const RealVectorX& sol);
134 
138  virtual void
140 
144  virtual void
146 
147 
151  virtual void set_elem_velocity(const RealVectorX& vel);
152 
156  virtual void set_elem_velocity_sensitivity(const RealVectorX& vel);
157 
161  virtual void set_elem_perturbed_velocity(const RealVectorX& vel);
162 
166  virtual void set_elem_acceleration(const RealVectorX& accel);
167 
171  virtual void set_elem_acceleration_sensitivity(const RealVectorX& accel);
172 
176  virtual void set_elem_perturbed_acceleration(const RealVectorX& accel);
177 
178 
185  virtual std::pair<const MAST::FieldFunction<RealVectorX>*, unsigned int>
187 
188 
189  protected:
190 
193 
195 
197 
203  };
204 }
205 
206 
207 #endif // __mast_assembly_elem_operation_h__
208 
virtual void set_elem_perturbed_solution(const RealVectorX &sol)
sets the element perturbed solution
virtual void set_elem_acceleration_sensitivity(const RealVectorX &accel)
sets the element acceleration
virtual void set_elem_solution_sensitivity(const RealVectorX &sol)
sets the element solution sensitivity
virtual void set_assembly(MAST::AssemblyBase &assembly)
sets the assembly object
virtual void set_elem_solution(const RealVectorX &sol)
sets the element solution
virtual void clear_discipline_and_system()
clears association with a system to this discipline
MAST::PhysicsDisciplineBase * _discipline
virtual std::pair< const MAST::FieldFunction< RealVectorX > *, unsigned int > get_elem_boundary_velocity_data()
searches through the side load data and populates the data with the boundary id and velocity function...
virtual void set_elem_data(unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const =0
some analyses may want to set additional element data before initialization of the GeomElem...
MAST::SystemInitialization & get_system_initialization()
MAST::ElementBase & get_physics_elem()
MAST::PhysicsDisciplineBase & get_discipline()
bool _skip_comm_sum
If an output has contrinutions only from local processor then the user can request that the global co...
virtual void clear_assembly()
clears the assembly object
This creates the base class for functions that have a saptial and temporal dependence, and provide sensitivity operations with respect to the functions and parameters.
virtual MAST::AssemblyBase & get_assembly()
virtual void set_discipline_and_system(MAST::PhysicsDisciplineBase &discipline, MAST::SystemInitialization &system)
attaches a system to this discipline
void set_skip_comm_sum(bool skip)
If an output has contrinutions only from local processor then the user can request that the global co...
Matrix< Real, Dynamic, 1 > RealVectorX
virtual void init(const MAST::GeomElem &elem)=0
initializes the object for calculation of element quantities for the specified elem.
virtual void set_elem_perturbed_acceleration(const RealVectorX &accel)
sets the element perturbed acceleration
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
virtual void set_elem_velocity(const RealVectorX &vel)
sets the element velocity
virtual void set_elem_velocity_sensitivity(const RealVectorX &vel)
sets the element velocity sensitivity
virtual void clear_elem()
clears the element initialization
virtual void set_elem_perturbed_velocity(const RealVectorX &vel)
sets the element perturbed velocity
virtual void set_elem_acceleration(const RealVectorX &accel)
sets the element acceleration
MAST::SystemInitialization * _system
This is the base class for elements that implement calculation of finite element quantities over the ...
Definition: elem_base.h:72