@@ -84,4 +84,175 @@ KRATOS_TEST_CASE_IN_SUITE(CreateScheme_ReturnsCorrectScheme_ForBackwardEulerQuas
8484 KRATOS_EXPECT_NE (backward_euler_scheme, nullptr );
8585}
8686
87+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForBackwardEulerQuasiStaticPw,
88+ KratosGeoMechanicsFastSuiteWithoutKernel)
89+ {
90+ const auto parameters =
91+ R"(
92+ {
93+ "scheme_type" : "Backward_Euler",
94+ "solution_type" : "Quasi-Static",
95+ "solver_type" : "Pw"
96+ }
97+ )" ;
98+
99+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
100+ const auto backward_euler_scheme =
101+ dynamic_cast <const BackwardEulerQuasistaticPwScheme<SparseSpaceType, LocalSpaceType>*>(
102+ scheme.get ());
103+
104+ KRATOS_EXPECT_NE (backward_euler_scheme, nullptr );
105+ }
106+
107+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForNewmarkDynamic,
108+ KratosGeoMechanicsFastSuiteWithoutKernel)
109+ {
110+ const auto parameters =
111+ R"(
112+ {
113+ "scheme_type" : "Newmark",
114+ "solution_type" : "dynamic",
115+ "newmark_beta" : 0.25,
116+ "newmark_gamma" : 0.5,
117+ "newmark_theta" : 0.5
118+ }
119+ )" ;
120+
121+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
122+ const auto newmark_scheme =
123+ dynamic_cast <const NewmarkDynamicUPwScheme<SparseSpaceType, LocalSpaceType>*>(
124+ scheme.get ());
125+
126+ KRATOS_EXPECT_NE (newmark_scheme, nullptr );
127+ }
128+
129+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForNewmarkQuasiStaticUndamped,
130+ KratosGeoMechanicsFastSuiteWithoutKernel)
131+ {
132+ const auto parameters =
133+ R"(
134+ {
135+ "scheme_type" : "Newmark",
136+ "solution_type" : "Quasi-Static",
137+ "newmark_beta" : 0.25,
138+ "newmark_gamma" : 0.5,
139+ "newmark_theta" : 0.5
140+ }
141+ )" ;
142+
143+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
144+ const auto newmark_scheme =
145+ dynamic_cast <const NewmarkQuasistaticUPwScheme<SparseSpaceType, LocalSpaceType>*>(
146+ scheme.get ());
147+
148+ KRATOS_EXPECT_NE (newmark_scheme, nullptr );
149+ }
150+
151+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForNewmarkQuasiStaticDamped,
152+ KratosGeoMechanicsFastSuiteWithoutKernel)
153+ {
154+ const auto parameters =
155+ R"(
156+ {
157+ "scheme_type" : "Newmark",
158+ "solution_type" : "Quasi-Static",
159+ "newmark_beta" : 0.25,
160+ "newmark_gamma" : 0.5,
161+ "newmark_theta" : 0.5,
162+ "rayleigh_m" : 0.1
163+ }
164+ )" ;
165+
166+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
167+ const auto newmark_scheme =
168+ dynamic_cast <const NewmarkQuasistaticDampedUPwScheme<SparseSpaceType, LocalSpaceType>*>(
169+ scheme.get ());
170+
171+ KRATOS_EXPECT_NE (newmark_scheme, nullptr );
172+ }
173+
174+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForNewmarkQuasiStaticDampedWithK,
175+ KratosGeoMechanicsFastSuiteWithoutKernel)
176+ {
177+ const auto parameters =
178+ R"(
179+ {
180+ "scheme_type" : "Newmark",
181+ "solution_type" : "Quasi-Static",
182+ "newmark_beta" : 0.25,
183+ "newmark_gamma" : 0.5,
184+ "newmark_theta" : 0.5,
185+ "rayleigh_k" : 1.0e-5
186+ }
187+ )" ;
188+
189+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
190+ const auto newmark_scheme =
191+ dynamic_cast <const NewmarkQuasistaticDampedUPwScheme<SparseSpaceType, LocalSpaceType>*>(
192+ scheme.get ());
193+
194+ KRATOS_EXPECT_NE (newmark_scheme, nullptr );
195+ }
196+
197+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForNewmarkQuasiStaticPw,
198+ KratosGeoMechanicsFastSuiteWithoutKernel)
199+ {
200+ const auto parameters =
201+ R"(
202+ {
203+ "scheme_type" : "Newmark",
204+ "solution_type" : "Quasi-Static",
205+ "newmark_beta" : 0.25,
206+ "newmark_gamma" : 0.5,
207+ "newmark_theta" : 0.5,
208+ "solver_type" : "Pw"
209+ }
210+ )" ;
211+
212+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
213+ const auto newmark_scheme =
214+ dynamic_cast <const NewmarkQuasistaticPwScheme<SparseSpaceType, LocalSpaceType>*>(
215+ scheme.get ());
216+
217+ KRATOS_EXPECT_NE (newmark_scheme, nullptr );
218+ }
219+
220+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForStaticLoadStepping,
221+ KratosGeoMechanicsFastSuiteWithoutKernel)
222+ {
223+ const auto parameters =
224+ R"(
225+ {
226+ "scheme_type" : "load_stepping",
227+ "solution_type" : "static"
228+ }
229+ )" ;
230+
231+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
232+ const auto load_stepping_scheme =
233+ dynamic_cast <const LoadSteppingScheme<SparseSpaceType, LocalSpaceType>*>(
234+ scheme.get ());
235+
236+ KRATOS_EXPECT_NE (load_stepping_scheme, nullptr );
237+ }
238+
239+ KRATOS_TEST_CASE_IN_SUITE (CreateScheme_ReturnsCorrectScheme_ForStaticDefault,
240+ KratosGeoMechanicsFastSuiteWithoutKernel)
241+ {
242+ const auto parameters =
243+ R"(
244+ {
245+ "scheme_type" : "some_scheme",
246+ "solution_type" : "static"
247+ }
248+ )" ;
249+
250+ const auto scheme = SchemeFactoryType::Create (Parameters{parameters});
251+ const auto static_scheme =
252+ dynamic_cast <const GeoMechanicsStaticScheme<SparseSpaceType, LocalSpaceType>*>(
253+ scheme.get ());
254+
255+ KRATOS_EXPECT_NE (static_scheme, nullptr );
256+ }
257+
87258} // namespace Kratos::Testing
0 commit comments